Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dbo as default owner
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00725285
Message ID:
00725720
Views:
7
I don't think that making the user a member of the db_owner role will have that affect. I think that the login must be make the owner of the database with sp_changedbowner.

I'm not in a position where I can check this but it should be easy enough.
- Create a new login. do not make the login a member of any server roles.
- map the login to a user in the database
- login as the new login and change to the database.
- check user_name() to view the user
- logoff
- map the user to the db_owner role
- login as the new login and change to the database.
- check user_name() to view the user

IMO, from a maintenance POV, I would rather have the tables explicitly prefixed with DBO.

-Mike

>Do you mean adding the user login to the do_owner role?
>
>
>>Great question. I don't know of any way to do this besides logging into sql server as the login that is mapped as DBO for the target database.
>>
>>-Mike
>>
>>>While at the GLGDW Mike Levy pointed out to me that prefixing all your tables with "dbo." will give you a performance gain. This is because SQL server will look for a table under the login name first and then default to dbo. So, now knowing this is there any way to tell SQL Server to use dbo as the default owner when I run a query that doesn't prefix "dbo" to all the table names. I really dont want to go though all my stored procedures and add dbo.
>>>
>>>
>>>Eric
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform