Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

sp_disableTriggers and sp_enabletriggers

2 posts in Trigger Last posting was on 2006-05-23 13:52:15.0Z
Jared Sherman Posted on 2006-05-12 22:52:29.0Z
From: "Jared Sherman" <Jared.Sherman@Per-Se.com>
Newsgroups: Advantage.Trigger
Subject: sp_disableTriggers and sp_enabletriggers
Date: Fri, 12 May 2006 15:52:29 -0700
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
NNTP-Posting-Host: 63.175.205.139
Message-ID: <446510dc@solutions.advantagedatabase.com>
X-Trace: 12 May 2006 16:49:00 -0700, 63.175.205.139
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!63.175.205.139
Xref: solutions.advantagedatabase.com Advantage.Trigger:228
Article PK: 1136294

Here is what you guys have to say about enabling and disabling triggers.
Lets say I have two applications using the same user code to connect. When I
disable a trigger for that user will it be disabled for both connections or
will it just be for the connection that called the SQL statement?
// Disable all triggers for a single user

EXECUTE PROCEDURE sp_DisableTriggers( NULL, NULL, FALSE, 0 )



// Disable all triggers for all users

EXECUTE PROCEDURE sp_DisableTriggers( NULL, NULL, TRUE, 0 )



// Disable all triggers on a specific table (all users is assumed)

EXECUTE PROCEDURE sp_DisableTriggers( 'customers', NULL, FALSE, 0 )



// Disable a specific trigger on a specific table (all users is assumed)

EXECUTE PROCEDURE sp_DisableTriggers( 'auditTrigger', 'customers', FALSE,
0 )


Peter Funk <pfunk Posted on 2006-05-23 13:52:15.0Z
Date: Tue, 23 May 2006 13:52:15 +0000 (UTC)
Message-ID: <864d0bcb3b708c84c54f177469f@devzone.advantagedatabase.com>
From: Peter Funk <pfunk@_no_spam_sybase.com>
Subject: Re: sp_disableTriggers and sp_enabletriggers
Newsgroups: Advantage.Trigger
References: <446510dc@solutions.advantagedatabase.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1; format=flowed
X-Newsreader: JetBrains Omea Reader 936.5
NNTP-Posting-Host: 10.24.38.105
X-Trace: 23 May 2006 07:48:44 -0700, 10.24.38.105
Lines: 15
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.105
Xref: solutions.advantagedatabase.com Advantage.Trigger:234
Article PK: 1136300

Hello Jared,
Sorry I didn't see your post sooner...

> When I
> disable a trigger for that user will it be disabled for both
> connections or
> will it just be for the connection that called the SQL statement?

It will disable the trigger just for that connection.

Regards,
Peter Funk
Advantage R&D