SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Check if Constraint is enabled or disable


Check if Constraint is enabled or disable

Author
Message
roberto armellin
roberto armellin
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 100
Comments posted to this topic are about the item Check if Constraint is enabled or disable
Hardy21
Hardy21
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4818 Visits: 1399
I think script is missing. Can you please check?

Thanks
roberto armellin
roberto armellin
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 100
excuse me but this is my first post. I edited the script and now I wait for the publication of this issue.
This is the script :


select
[Table] = o2.name,
[Constraint] = o.name,
[Enabled] = case when ((C.Status & 0x4000)) = 0 then 1 else 0 end
from sys.sysconstraints C
inner join sys.sysobjects o on o.id = c.constid -- and o.xtype='F'
inner join sys.sysobjects o2 on o2.id = o.parent_obj


Hardy21
Hardy21
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4818 Visits: 1399
roberto armellin (11/3/2011)
excuse me but this is my first post. I edited the script and now I wait for the publication of this issue.
This is the script :


select
[Table] = o2.name,
[Constraint] = o.name,
[Enabled] = case when ((C.Status & 0x4000)) = 0 then 1 else 0 end
from sys.sysconstraints C
inner join sys.sysobjects o on o.id = c.constid -- and o.xtype='F'
inner join sys.sysobjects o2 on o2.id = o.parent_obj



No issues. Thanks for sharing.

Thanks
Iwas Bornready
Iwas Bornready
SSC-Dedicated
SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)SSC-Dedicated (35K reputation)

Group: General Forum Members
Points: 35054 Visits: 886
Thanks for the script.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search