Change the owner

  • How to change the owner of all the tables and SP's in 2005

    I have tead.table1

    tead.table2 etc.

    How to change this to prg.table1 for entire 100 table.

    Nita

  • select

    'sp_changeobjectowner ' + ''''+'tead.'+name+'''' + ', ' + '''prg''

    GO'

    FROM sysobjects

    WHERE xtype = 'U'

    Output the results to text, then paste the results into a new query window.

  • What he said .

  • EXEC sp_changeobjectowner 'ObjSQL', 'prg'

    Just generate the code with a select on the information schema tables.

  • Thanks for help

    Nita

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply