Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot export VIEW because table owner changed 1

Status
Not open for further replies.

pwills

Technical User
Sep 14, 2002
54
0
0
GB
I have several views on source database A which refer to pwills.TABLE1.

On my destination database B I intend to change the table to dbo.TABLE1.

When I run DTS Export on the VIEW, it throws an error because "pwills" doesn't exist in database B.

In practice, I have a large number of tables and views. Do you know if I can change the owner of TABLE1 on database A, and SQL Svr will automatically change all the views? If not, do you know if there is another way to do my export?
 
SQL does not automatically change references in dependent objects if the name is changed. That is why Enterprise Manager throws a message stating that dependencies could be broken if you change an object name.

You'll have to manually update the scripts for the views. That should be easy to do in Query Analyzer or a text editor. Simply do a change of pwills to dbo. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top