Need help changing Owners in views

  •  Hi,

    I have alot of views within a database. I know how to change the owner of the view itself but I need a script to change the inside i.e. when I go to design/modify, it is referencing to the wrong owner like proddta.table1 I want to change all the views to be changed to crpdta.table1

    Can someone send me a script that can do that?  I would really appreciate it.  Thank you.  Andre

  • Andre

    Script out all your views that reference the changed tables, then use the Replace feature in SSMS to search for "procdta." and replace it to "crpdta.". Of course if only some of your views/tables have changed owneership, then you will need to take care only to effect the replacements in the right places.

    John

Viewing 2 posts - 1 through 1 (of 1 total)

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