1

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Joie Tamayo
  • 501
  • 3
  • 8
  • 21

3 Answers3

3

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

John Cappelletti
  • 79,615
  • 7
  • 44
  • 66
2

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

ALTER USER [Domain\UserName] WITH DEFAULT_SCHEMA=[dbo]
Hamed Naeemaei
  • 8,052
  • 3
  • 37
  • 46
1

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.

Ilyes
  • 14,640
  • 4
  • 29
  • 55