How to change the owner of a SQL Server table from domain\username to dbo?

3.7k views Asked by At

When I create a table, the owner is always domain\username instead of dbo. For example, domain\username.tablename I know how how to change it to dbo but what should I change in the configuration level to make sure that when I create a table, the default owner is dbo. like dbo.tablename ?

Thanks

3

There are 3 answers

4
John Cappelletti On

You can change the DEFAULT SCHEMA via the Object Explorer

Security > Users > {Your User}

{right-click} > Properties

Then on the General Tab set Default schema

enter image description here

0
Hamed Naeemaei On

This can also be done using the T-SQL statement below:

ALTER USER [Domain\UserName] WITH DEFAULT_SCHEMA=[dbo]
1
Ilyes On

Follow this steps:

  • In the Object Explorer, expand your database node, go to "Security" folder and expend that node too.
  • You will see "Users" folder, expend that node too to see the users.
  • Right click on your user
  • Click propertise from the menu appears.
  • In general tab, you will see "Default Schema", click on the button "..." on the right
  • Select "dbo" schema and click "OK" button.

Now, try to create a new table.