Object Owners


By default, only members of the sysadmin, db_owner, and db_ddladmin roles have the permission to create objects in the database. It is recommended that you keep it this way. When members of sysadmin create an object, it is created with dbo as the owner. Members of db_ddladmin and db_owner should specify dbo as the owner, or they will own the object. If an object is owned by dbo, it doesn't need to be referenced by a two-part name, as in dbo.table1. If users other than dbo own objects in the database, then the username must be included with the object name , as in bob.table1. Additional permission checking is also performed each time an object references an object owned by another user .

Changing Object Ownership

If an object is created with an owner other than dbo, then a system-stored procedure, sp_changeobjectowner, can change the owner. The statement to change an owner to dbo is as follows :

 EXEC sp_changeobjectowner 'tablename' 'dbo' 


Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net