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.

Multiple Triggers For Same Action

10 posts in Product Futures Discussion Last posting was on 2003-04-03 23:11:13.0Z
putnamr Posted on 2003-03-23 02:25:20.0Z
From: putnamr@river.it.gvsu.edu
Date: Sat, 22 Mar 2003 21:25:20 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Multiple Triggers For Same Action
Message-ID: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums>
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1041
Article PK: 95281

Hello,

Does Sybase have any plans on splitting instrig,deltrig,updtrig from
sysobjects and creating a systriggers system table so that multiple
triggers can be created on an object for the same DML?

Example)
systriggers(id int not null, -- Object ID Of Table
trigid int not null, -- Object ID Of Trigger
type char(1) not null, -- U,I,D
level char(1) not null) -- R=Record, S=Statement

In addition, does Sybase have any plans for record level or per
modification level triggers in addition to the statement level triggers?

Thanks,
Ryan Putnam


Rob Verschoor Posted on 2003-03-23 12:15:40.0Z
Reply-To: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
From: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums>
Subject: Re: Multiple Triggers For Same Action
Date: Sun, 23 Mar 2003 13:15:40 +0100
Lines: 41
Organization: Sypron B.V.
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <u1$hhaT8CHA.321@forums-1-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: a66085.upc-a.chello.nl 62.163.66.85
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1045
Article PK: 95285


<putnamr@river.it.gvsu.edu> wrote in message
news:1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums...
> Hello,
>
> Does Sybase have any plans on splitting instrig,deltrig,updtrig from
> sysobjects and creating a systriggers system table so that multiple
> triggers can be created on an object for the same DML?
>
> Example)
> systriggers(id int not null, -- Object ID Of Table
> trigid int not null, -- Object ID Of Trigger
> type char(1) not null, -- U,I,D
> level char(1) not null) -- R=Record, S=Statement
>
[...]
>
> Thanks,
> Ryan Putnam

Well, frankly, I don't hope they'll go this way. Having multiple triggers
on a single table for a particular DML action brings its own problems. For
example: in which order will these triggers be fired, and how do they
interact? (this issue exists in Oracle).

HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0

Author of "The Complete Sybase ASE Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/qr

mailto:rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------


Carl Kayser Posted on 2003-03-23 13:14:10.0Z
From: "Carl Kayser" <kayser_c@bls.gov>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub>
Subject: Re: Multiple Triggers For Same Action
Date: Sun, 23 Mar 2003 08:14:10 -0500
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <#zTik5T8CHA.259@forums-1-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 146.142.35.25
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1046
Article PK: 95284

Hmmm. Interesting that you don't mention ASA which also allows for muliple
triggers per table. Are there issues with ASA? (I would expect that ASE &
ASA would become more seamless SQL-wise in the future.)

(snip)

>
>
> Well, frankly, I don't hope they'll go this way. Having multiple triggers
> on a single table for a particular DML action brings its own problems. For
> example: in which order will these triggers be fired, and how do they
> interact? (this issue exists in Oracle).
>
> HTH,
>
> Rob
> -------------------------------------------------------------
> Rob Verschoor
>
> Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
>
> Author of "The Complete Sybase ASE Quick Reference Guide"
> Online orders accepted at http://www.sypron.nl/qr
>
> mailto:rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
> http://www.sypron.nl
> Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
> -------------------------------------------------------------
>


Rob Verschoor Posted on 2003-03-23 13:19:29.0Z
Reply-To: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
From: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub>
Subject: Re: Multiple Triggers For Same Action
Date: Sun, 23 Mar 2003 14:19:29 +0100
Lines: 41
Organization: Sypron B.V.
MIME-Version: 1.0
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <eRiMJAU8CHA.332@forums-2-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: a66085.upc-a.chello.nl 62.163.66.85
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1047
Article PK: 95287

I'm not much of an ASA user, that's why...

Rob V.

"Carl Kayser" <kayser_c@bls.gov> wrote in message
news:#zTik5T8CHA.259@forums-1-dub...
> Hmmm. Interesting that you don't mention ASA which also allows for
muliple
> triggers per table. Are there issues with ASA? (I would expect that ASE
&
> ASA would become more seamless SQL-wise in the future.)
>
> (snip)
> >
> >
> > Well, frankly, I don't hope they'll go this way. Having multiple
triggers
> > on a single table for a particular DML action brings its own problems.
For
> > example: in which order will these triggers be fired, and how do they
> > interact? (this issue exists in Oracle).
> >
> > HTH,
> >
> > Rob
> > -------------------------------------------------------------
> > Rob Verschoor
> >
> > Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
> >
> > Author of "The Complete Sybase ASE Quick Reference Guide"
> > Online orders accepted at http://www.sypron.nl/qr
> >
> > mailto:rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
> > http://www.sypron.nl
> > Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
> > -------------------------------------------------------------
> >
>
>


putnamr Posted on 2003-03-23 16:21:57.0Z
From: putnamr@river.it.gvsu.edu
Date: Sun, 23 Mar 2003 11:21:57 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Multiple Triggers For Same Action
Message-ID: <57A022DAA40A70310059E68E85256CF2.0050BCEF85256CF2@webforums>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub> <eRiMJAU8CHA.332@forums-2-dub>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1050
Article PK: 95289

Hello,

Without change ASE will eventually die. It is through mass appeal and
doing something that others cannot yet do that is important that could
increase appeal and market share(customers). Actually, I don't know if
there is just one thing, or a combination of things, but if Sybase cannot
make changes that customers want-why would I use the product? Config
parameters can always be used for backwards compatibility to support all
user demands. This is a basic of all application and product development.

Thanks,
Ryan Putnam


Ray DiMarcello Posted on 2003-04-01 06:07:13.0Z
From: "Ray DiMarcello" <rayd@comcast.net>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub> <eRiMJAU8CHA.332@forums-2-dub> <57A022DAA40A70310059E68E85256CF2.0050BCEF85256CF2@webforums>
Subject: Re: Multiple Triggers For Same Action
Date: Tue, 1 Apr 2003 01:07:13 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <#JlE3QB#CHA.317@forums-1-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 207.245.124.67
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1097
Article PK: 95337

Ok, but change just for change sake makes no sense. Exactly why would
multiple triggers per action be a good thing?

RD

<putnamr@river.it.gvsu.edu> wrote in message
news:57A022DAA40A70310059E68E85256CF2.0050BCEF85256CF2@webforums...
> Hello,
>
> Without change ASE will eventually die. It is through mass appeal and
> doing something that others cannot yet do that is important that could
> increase appeal and market share(customers). Actually, I don't know if
> there is just one thing, or a combination of things, but if Sybase cannot
> make changes that customers want-why would I use the product? Config
> parameters can always be used for backwards compatibility to support all
> user demands. This is a basic of all application and product development.
>
> Thanks,
> Ryan Putnam


putnamr Posted on 2003-04-02 05:09:27.0Z
From: putnamr@river.it.gvsu.edu
Date: Wed, 2 Apr 2003 01:09:27 -0400
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Multiple Triggers For Same Action
Message-ID: <08DAAE66F54420B8001C54B685256CFC.002687F285256CFB@webforums>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub> <eRiMJAU8CHA.332@forums-2-dub> <57A022DAA40A70310059E68E85256CF2.0050BCEF85256CF2@webforums> <#JlE3QB#CHA.317@forums-1-dub>
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1103
Article PK: 95342

Hello,

Simplified Coding. Not having to micromanage every change that needs to be
performed to a trigger by completely reverse engineering a trigger that is
already in place.

Thanks,
Ryan Putnam


M. Searer Posted on 2003-04-03 23:11:13.0Z
From: "M. Searer" <nospam@nospam.com>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub> <eRiMJAU8CHA.332@forums-2-dub> <57A022DAA40A70310059E68E85256CF2.0050BCEF85256CF2@webforums> <#JlE3QB#CHA.317@forums-1-dub> <08DAAE66F54420B8001C54B685256CFC.002687F285256CFB@webforums>
Subject: Re: Multiple Triggers For Same Action
Date: Thu, 3 Apr 2003 18:11:13 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Message-ID: <e1Dh7Zj#CHA.317@forums-1-dub>
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 65-84-11-167.client.dsl.net 65.84.11.167
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1108
Article PK: 95348

For packaged applications (such as accounting, crm, etc.) if you need to add
functionality via a trigger that may already exist this is the best way to
do it. This enables your new trigger to run completely separate. Makes
updates to the packaged application a lot easier. For third party add-ons
to packaged applications, this is a big help if the 3rd party application
requires a trigger.

For in-house developed apps, it also allows you to split out logically the
trigger code into smaller triggers instead of one big trigger.

Mike

<putnamr@river.it.gvsu.edu> wrote in message
news:08DAAE66F54420B8001C54B685256CFC.002687F285256CFB@webforums...
> Hello,
>
> Simplified Coding. Not having to micromanage every change that needs to
be
> performed to a trigger by completely reverse engineering a trigger that is
> already in place.
>
> Thanks,
> Ryan Putnam


putnamr Posted on 2003-03-23 14:52:49.0Z
From: putnamr@river.it.gvsu.edu
Date: Sun, 23 Mar 2003 09:52:49 -0500
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Multiple Triggers For Same Action
Message-ID: <E405338C6A7284650051BD8185256CF2.0050BCEF85256CF2@webforums>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums> <u1$hhaT8CHA.321@forums-1-dub> <#zTik5T8CHA.259@forums-1-dub> <eRiMJAU8CHA.332@forums-2-dub>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1048
Article PK: 95293

Hello,

I don't disagree that this could cause some issues with flow of control for
the triggers execution, but I think this can easily satisfy everyone via a
couple of new config parms.

EXEC sp_configure "number of update triggers"
EXEC sp_configure "number of delete triggers"
EXEC sp_configure "number of insert triggers"

Where the above parms specify the number of triggers that are allowed for a
DML type.

Thanks,
Ryan Putnam


Jim Egan Posted on 2003-03-25 04:11:46.0Z
From: Jim Egan <eganjp@compuserve.com>
Subject: Re: Multiple Triggers For Same Action
Date: Mon, 24 Mar 2003 21:11:46 -0700
Message-ID: <hdlv7vctac7e3tad4l1iskt84tt767d08n@4ax.com>
References: <1A548602F18EF17A000D4E1085256CF2.000D4E5C85256CF2@webforums>
X-Newsreader: Forte Agent 1.93/32.576 English (American) trialware
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: 12-252-236-190.client.attbi.com 12.252.236.190
Lines: 38
Path: forums-1-dub!forums-master.sybase.com!forums-1-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1056
Article PK: 95296


On Sat, 22 Mar 2003 21:25:20 -0500, putnamr@river.it.gvsu.edu wrote:

>Hello,
>
>Does Sybase have any plans on splitting instrig,deltrig,updtrig from
>sysobjects and creating a systriggers system table so that multiple
>triggers can be created on an object for the same DML?
>
>Example)
>systriggers(id int not null, -- Object ID Of Table
> trigid int not null, -- Object ID Of Trigger
> type char(1) not null, -- U,I,D
> level char(1) not null) -- R=Record, S=Statement
>
>In addition, does Sybase have any plans for record level or per
>modification level triggers in addition to the statement level triggers?

Carl is right in that ASA does support multiple triggers, before and
after triggers as well as for each row/for each statement. This is
great flexibility and if for no other reason than keeping up with the
competition it is something that ASE should have.

However, I will say that in support of the status quo I often find
some of my largest performance gains when tuning systems to be
triggers written by simpletons. These are the people that think one
row at a time. Most systems manipulate more than one row at a time.
When a trigger has to be fired multiple times for a single operation
there is a performance drain. Switching per row triggers and triggers
that made extensive use of cursors to ones that were per statement and
used no cursors has yielded very impressive results.
--
Jim Egan [TeamSybase]