Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 DBO User

Author  Topic 

nabilpk
Starting Member

2 Posts

Posted - 2010-09-30 : 10:32:30
Only objects created by members of the sysadmin fixed server role (or by the dbo user) belong to dbo. Objects created by any other user who is not also a member of the sysadmin fixed server role (including members of the db_owner fixed database role):

* Belong to the user creating the object, not dbo.

* Are qualified with the name of the user who created the object.

------

I have taken above text from MSDN. Can you please explain this with complete example?

Regards
Nabil Manzoor

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-09-30 : 12:11:06
it means that if we aren't DBO or sysadmins, then when we create objects they will be owned by us...for example, i create the table
Create Table t1(a int)
it will be russell.t1.

You create the same table and it will be nabilpk.t1

Unless we explicitly assign it to dbo
Create Table dbo.t1(a int)
or if we are members of dbo database role of sysadmin server role, in which case all objects we create default to dbo.

We can always specify an alternate schema/owner when creating objects
Go to Top of Page

nabilpk
Starting Member

2 Posts

Posted - 2010-10-01 : 01:34:50
Thats what I was asking. Now main question is how we create a user which is not part of DBO or sysadmin?
For example I login from sa. Create new login nabilpk and mapped one database to it.
Now I login from nabilpk and try to create table then it shows a message that since you are not part of db_owner so you cannot create table.
Kindly tell me where I am wrong?

Database is SQL Server 2005
---------------------------

Regards
Nabil Manzoor
Go to Top of Page
   

- Advertisement -