About object privilege | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

About object privilege

I had created a database and there is a user "A" in it.
user "A" isn’t a member of db_owner.
But when I create any objects with user "A",I want to appoint "DBO" to the object’s owner,
how to do it ? Thanks for any sugguestion. Jelly is here.
I think you can do this using sp_changeobjectowner.
But note:
BOL-
Only members of sysadmin fixed server role, the db_owner fixed database role, or a member of both the db_ddladmin and db_securityadmin fixed database roles can execute sp_changeobjectowner. Gaurav
… also make sure to script the permissions if you’re changing any of the privileges for any object to be on safe side. _________
Satya SKJ

Thanks for your help.
Now I want to appoint "DBO" to the object’s owner when I create any object with user "A",not change the owner after create the object.and I just granted the privileges of create view©pcreate procedrue to user "A". I can execute the script with user "A" like this:
CREATE VIEW view_name as
my code … but I can’t execute the script with user "A" like this:
CREATE VIEW [dbo.]view_name as
my code … It shows me an error message:
Specified owner name ‘dbo’ either does not exist or you do not have permission to use it. Many thanks for any help.
Jelly is here.
]]>