Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
Administration
»
ObjectProperty returning Null
ObjectProperty returning Null
Rate Topic
Display Mode
Topic Options
Author
Message
Shark Energy
Shark Energy
Posted Friday, April 04, 2008 4:42 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Friday, March 22, 2013 9:32 AM
Points: 547,
Visits: 995
Checking to see if a Trigger is enabled on a table or not.
I'm running the objectproperty function returning for the system id of the table and the property ExecIsTriggerDisabled. This is returning NULL. I know the id is correct, and I know the property is correct. It returns 1 for "HasInsertTrigger".
According to BOL NULL means the object doesn't exist (false) or the property doesn't exist (false). It also says you might not have permissions to view the property. I'm sa so I have.
Any ideas why this is returning NULL?
Oh and I realise I could just enable the trigger to make sure it is....but the table is replicated so it won't let me without dropping repl first. No thanks.
Cheers
Post #479809
SQLZ
SQLZ
Posted Friday, April 04, 2008 4:47 AM
SSC Eights!
Group: General Forum Members
Last Login: Thursday, May 02, 2013 5:38 AM
Points: 870,
Visits: 858
You're supposed to use the object id of the trigger, not the table.
select objectproperty(object_id('name of trigger'), 'ExecIsTriggerDisabled')
Karl
source control for SQL Server
Post #479811
Shark Energy
Shark Energy
Posted Friday, April 04, 2008 5:01 AM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Friday, March 22, 2013 9:32 AM
Points: 547,
Visits: 995
Cheers! haha. Works now.
Post #479820
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.