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 Administration (2000)
 Dependencies

Author  Topic 

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-14 : 11:49:08
Does anyone have a good trick to reset/recheck all dependencies in SQL2K5 (or 2K)?


Jay White

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-14 : 11:53:16
red gate's dependency tracker?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-14 : 11:59:50
I don't think so ... I'm talking about resetting proc-to-table dependencies when a table gets dropped and re-created without the proc being dropped and re-created.

My data dictionary and documentation is automated and partially dependant on the existance of accurate dependencies.

I think, maybe, I just need to drop and re-create all my procs, functions and views ... but I was hoping someone had a trick ...

Jay White
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-14 : 12:03:19
If you are meaning sysdepends I don't think there is any point trying in SQL 2000 - but it behaves better in SQL 2005.

There was a thread about it quite recently, but I can't find it Googling just now, sorry.

Kristen
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-14 : 12:09:38
I assume the tool I'm using is looking at sys.sql_dependencies and BOL clearly states if you drop and recreate a child, the dependency is lost until the parent is also dropped and recreated. Maybe there is not trick ...

Jay White
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-11-14 : 13:25:17
The only solution I could come up with was to write a script to execute the all my drop/create scripts in the correct order ... blah.

Thank goodness for SQLCmd Mode and For Do loops ...

Jay White
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-11-14 : 14:22:50
Perhaps this would be a good time to use Database triggers I would think

I'm suprised sp_recompile doesn't fix that

In any event, can you use the catalog to determine the dependancies and do them in that order, looping until non are left?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-11-14 : 14:37:27
"drop/create scripts in the correct order"

You could create a STUB and then use ALTER instead of Drop/Create, and then the order is probably less important.

Found the threads I was thinking of earlier:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72818
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=61447

Kristen
Go to Top of Page
   

- Advertisement -