Creating an object with a different owner

  • 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

  • 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)

  • after you create the object, you can use sp_changeobjectowner to change the owner of the object.

    Derek


    Derek

  • 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