How to find all database references


How to find all database references



In trying to figure out this problem (which is still unsolved and I still have no clue what is going on), I am wondering if maybe an external reference to the table in question is causing the problem. For example, a trigger or view or some other such thing.

Is there an easy way to find all references to a given database table? Including all views, triggers, constraints, or anything at all, preferably from the command line, and also preferably without a 3rd party tool (we are using db2).




Copying databases to remote locations

1:



Stored procedures reverse engineering
Wow, I wouldn't have thought it, but there seems to be..


Can Unix shell script be used to manipulate databases?
Good ole DB2..
Do you know any good distributed database systems?
I find the publib db2 docs view very very handy by the way:.
When is it time to change database backends?
http://publib.boulder.ibm.com/infocenter/db2luw/v8//index.jsp.
How important is a database in managing information?
I just found the "SYSCAT.TABDEP" catalog view in it, which seems to contain more or less what you asked for.


Database Backup/Restore Process
I suspect for anything not covered there you'll have to trawl through the rest of the syscat tables which are vast.


What are some techniques for stored database keys in URL
(Unfortunately I can't seem to link you to the exact page on SYSCAT.TABDEP itself, the search facility should lead you to it fairly easily though).. Most databases these days have a set of tables which contain data about the layout of your actual schema tables, quite handy for this sort of thing..


2:


You can write a query search the information schema views (definition column) to find the table in all views, triggers, procedure, etc.

Not sure about FK & indexes though.

.



82 out of 100 based on 82 user ratings 382 reviews