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
 General SQL Server Forums
 New to SQL Server Programming
 Is Possible via sql

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-02-19 : 03:42:55
or would it have to be achieved through a 3rd party tool?

This is taking my earlier thread http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=120068 a little further

I want to scroll through all the databases and if possible get the dependancy information for every table/view/sp or whatever.

Possible or not?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-19 : 03:46:07
its possible.make use of undocumented stored procedures sp_Msforeachdb & sp_Msforeachtable


http://www.databasejournal.com/features/mssql/article.php/3441031/SQL-Server-Undocumented-Stored-Procedures-spMSforeachtable-and-spMSforeachdb.htm
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-02-19 : 03:50:46
wow, that's amazing!

I'll check it out now, as this is going to save me a packet in buying third party products such as redGate or whatever.
thanks a lot
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-02-19 : 03:55:38
Do you know what the command is that calls for dependancy information?
It's the one that must be iinvoked when you use the 'view dependancy information' option when right clicking on a table
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-02-19 : 04:05:31
OK thanks I found this:
http://www.nyx.net/~bwunder/dbChangeControl/sp_depends.htm
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-02-19 : 04:19:56
or
http://sqlblogcasts.com/blogs/madhivanan/archive/2008/05/13/simulating-undocumented-procedures.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -