Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 scripted

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2003-04-11 : 17:50:54
I have created a series of views on a test server, (SQL server 7) some of which are interdependent.

My problem is this. When I script them to put them onto the live system, I get a series of errors when I try to run the script and have to re-arrange the scripts by hand so that those that depend on others come after the ones they depend on. Is there a way around this? Am I being really thick and missing something really simple or obvious?

thanks

steve

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-04-11 : 17:56:51
Are you scripting them manually or having SQL Server generate the script? If SQL Server is generating the script and isn't putting them in the correct order, then your problem is with sysdepends.

I would suggest fixing sysdepends on the source server by dropping your views then creating them in the correct order. Then have SQL Server generate the script. It should now be in the correct order so you can run this script on the destination server without any errors.

HTH,

Tara
Go to Top of Page
   

- Advertisement -