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.
| Author |
Topic |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2005-09-05 : 02:43:01
|
| Hi all, I've been given the unenvious task of defining a list of dependencies between our databases. There's probably 6 databases that reference each other via views and stored proc's. I need to provide:- source database- object name (stored proc/view name)- referenced database- referenced table- action being taken (SELECT, DELETE etc etc)I can write a basic script that can tell me basically everything except the last item. Does anyone know of a script that will tell me all these dependencies??Thanks in advance,Tim |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-05 : 02:52:37
|
you can trace/search SPs and Views for actions takenusing the syscomments table HTH--------------------keeping it simple... |
 |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2005-09-05 : 18:51:50
|
| Tried that. The problem is that I need to know what action is being taken.Tim |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-05 : 21:35:48
|
you mean direct queries and determining who did what?the only way is to incorporate a trace/logging in each of your sproc and remove all direct permissions to manipulate the data by only granting permissions through SPs and UDFsyou could probably run profiler but that's too much of a load just to employ a routine traceHTH --------------------keeping it simple... |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-09-06 : 02:14:26
|
| sp_depends tells you pretty much everything EXCEPT actions on other databases - have I got that about right?Kristen |
 |
|
|
|
|
|