March 19, 2009 at 11:40 am
Guys,
Is there any way for me to list all the foreign keys in the database which are marked as 'no check'.
ALTER TABLE [dbo].[EMPLOYEE] NOCHECK CONSTRAINT [FK_EMPLOYEE_JOB]
SYSFOREIGNKEYS does not give that information.
Any suggestions or inputs would help.
Thanks
March 19, 2009 at 4:41 pm
SELECT * FROM sys.foreign_keys
WHERE is_disabled = 1
Greg
March 19, 2009 at 5:14 pm
When I create a FK with NOCHECK option then is_not_trusted is set to 1, in the sys.foreign_keys.
Thanks.
Mohit.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply