I have the SQL query for getting all the constraint names, but not sure how to get its status like whether it is enabled/disabled?
SELECT OBJECT_NAME(OBJECT_ID) AS NameofConstraint,
SCHEMA_NAME(schema_id) AS SchemaName,
OBJECT_NAME(parent_object_id) AS TableName,
type_desc AS ConstraintType,*
FROM sys.objects
Any help?