Friday, March 9, 2012

Login & owner of object

Hi Guys,
When I'm creating login and assinging to DBO role it is still creating
object name with login.objectname instead of dbo.object name..
Am I doing anything wrong or I have to do anything else to do this.
Thanks
- NTHi NT
There is no DBO role.
There is a user DBO and role called db_owner. Although the DBO user is in
the db_owner, other users can be in the db_owner role as well.
Every login has a user name in every database. User names can be members of
database roles.
When using Query Analyzer you can see the current user's name by running
this command:
SELECT user_name()
Only the user DBO will have all the objects she creates owned by DBO, by
default. However, a user in the db_owner role may create objects owned by
the DBO user, if the owner is stated explicitly:
CREATE TABLE dbo.new_table
(col1 ...
col2...
)
etc.
Please read about users and database roles in the Books Online for more
information.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"NT" <NT@.discussions.microsoft.com> wrote in message
news:205A1292-BCEE-467F-99BA-D1856C81737F@.microsoft.com...
> Hi Guys,
> When I'm creating login and assinging to DBO role it is still creating
> object name with login.objectname instead of dbo.object name..
> Am I doing anything wrong or I have to do anything else to do this.
> Thanks
>
> - NT

No comments:

Post a Comment