Rootman
SSCrazy
Points: 2641
More actions
July 22, 2002 at 1:47 am
#57938
Hi,
If I am logged in as SA, can I use SET USER to run a script which creates an object with a different owner?
Thanks
Antares686
SSC Guru
Points: 125444
July 22, 2002 at 5:52 am
#433157
Not sure, but try. If not then you can reference the name of the user in the object creation to put under them.
Ex.
CREATE TABLE username.tblname
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Derek
SSC Veteran
Points: 213
July 22, 2002 at 6:26 am
#433159
after you create the object, you can use sp_changeobjectowner to change the owner of the object.
zpopo
Grasshopper
Points: 14
July 23, 2002 at 3:58 am
#433215
Yes, create table user_name.table_name does a job
zoran
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply