Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to tell if RI constraints are enabled

Status
Not open for further replies.

pdalberth

IS-IT--Management
Nov 22, 2000
13
US
Is there a way to query the data dictionary in SQL 7 to see if referential integrity constraints are enabled for insert/update/delete? I know how to do this in EM but haven't been able to find even an information_schema view that contains this information.

Thanks in advance for any help.
 
The following SQL statement will identify every object that has a trigger:

select parent.name, parent.id, trg.name From sysobjects parent Inner Join sysobjects trg on trg.parent_obj=parent.id where trg.xtype='TR' Order by parent.name

The trigger text is in syscomments, but it's not readily readable. You can either script all objects, and look for the triggers, or choose each table with a trigger, right click and select all tasks, manage triggers, and then read the triggers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top