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.

Change PRIORITY

5 posts in Trigger Last posting was on 2008-10-23 15:59:04.0Z
Thomas Steinmaurer Posted on 2008-10-22 06:31:47.0Z
Date: Wed, 22 Oct 2008 08:31:47 +0200
From: Thomas Steinmaurer <t.steinmaurer_dontbugmewithspam_@upscene.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Change PRIORITY
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.241.89.51
Message-ID: <48fec751@solutions.advantagedatabase.com>
X-Trace: 22 Oct 2008 00:25:21 -0700, 212.241.89.51
Lines: 21
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!212.241.89.51
Xref: solutions.advantagedatabase.com Advantage.Trigger:408
Article PK: 1136470

Hello,

I guess there is no way to change the PRIORITY of an existing trigger
without re-creating the trigger.

So I guess, dropping and creating is the only way? Perhaps you could
either add an ALTER TRIGGER statement or a system procedure which allows
that? Like disabling triggers.

Thanks.

--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/


Joachim Duerr (ADS) Posted on 2008-10-22 09:16:08.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Change PRIORITY
Newsgroups: Advantage.Trigger
References: <48fec751@solutions.advantagedatabase.com>
Date: Wed, 22 Oct 2008 11:16:08 +0200
User-Agent: XanaNews/1.19.1.110
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 130.214.48.4
Message-ID: <48feeddf@solutions.advantagedatabase.com>
X-Trace: 22 Oct 2008 03:09:51 -0700, 130.214.48.4
Lines: 16
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!130.214.48.4
Xref: solutions.advantagedatabase.com Advantage.Trigger:409
Article PK: 1136469


Thomas Steinmaurer wrote:

>I guess there is no way to change the PRIORITY of an existing trigger
>without re-creating the trigger.
>
>So I guess, dropping and creating is the only way? Perhaps you could
>either add an ALTER TRIGGER statement or a system procedure which
>allows that? Like disabling triggers.

ALTER TRIGGER has been implemented for ADS 9

--
Joachim Duerr
Advantage Presales
Sybase GmbH
!!! please reply to newsgroups only !!!


Thomas Steinmaurer Posted on 2008-10-22 13:23:52.0Z
Date: Wed, 22 Oct 2008 15:23:52 +0200
From: Thomas Steinmaurer <t.steinmaurer_dontbugmewithspam@upscene.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: Change PRIORITY
References: <48fec751@solutions.advantagedatabase.com> <48feeddf@solutions.advantagedatabase.com>
In-Reply-To: <48feeddf@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.186.164.88
Message-ID: <48ff27e4@solutions.advantagedatabase.com>
X-Trace: 22 Oct 2008 07:17:24 -0700, 193.186.164.88
Lines: 37
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!193.186.164.88
Xref: solutions.advantagedatabase.com Advantage.Trigger:410
Article PK: 1136471


> Thomas Steinmaurer wrote:
>
>> I guess there is no way to change the PRIORITY of an existing trigger
>> without re-creating the trigger.
>>
>> So I guess, dropping and creating is the only way? Perhaps you could
>> either add an ALTER TRIGGER statement or a system procedure which
>> allows that? Like disabling triggers.
>
> ALTER TRIGGER has been implemented for ADS 9

Ah. Nice. I was looking for a grammer of the ALTER TRIGGER statement in
the help file, but I didn't find one. In the "Supported SQL Statements"
section ALTER TRIGGER isn't listed. Via the search index I also don't
find something about ALTER TRIGGER.

I'm gonna try to figure out the ALTER TRIGGER statement. Won't be that
hard I guess, but hopefully changing the PRIORITY only does not force me
to supply the entire SQL based source code of the trigger.

Perhaps for the next service release ALTER TRIGGER gets mentioned in the
help file more deeply? ;-)


Thanks!


--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/


Joachim Duerr (ADS) Posted on 2008-10-22 21:59:52.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: Change PRIORITY
Newsgroups: Advantage.Trigger
References: <48fec751@solutions.advantagedatabase.com> <48feeddf@solutions.advantagedatabase.com> <48ff27e4@solutions.advantagedatabase.com>
Date: Wed, 22 Oct 2008 23:59:52 +0200
User-Agent: XanaNews/1.19.1.110
X-Face: u2p+</,mb|Ah!x!/qxX5q0t:O~.<1&JzwNHYhSqcviY{~&|iDc"U.Je1A.ZeHR`d;;y#R
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 62.105.177.166
Message-ID: <48ffa0e1@solutions.advantagedatabase.com>
X-Trace: 22 Oct 2008 15:53:37 -0700, 62.105.177.166
Lines: 33
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!62.105.177.166
Xref: solutions.advantagedatabase.com Advantage.Trigger:411
Article PK: 1136472


Thomas Steinmaurer wrote:

>Ah. Nice. I was looking for a grammer of the ALTER TRIGGER statement
>in the help file, but I didn't find one. In the "Supported SQL
>Statements" section ALTER TRIGGER isn't listed. Via the search index
>I also don't find something about ALTER TRIGGER.
>
>I'm gonna try to figure out the ALTER TRIGGER statement. Won't be
>that hard I guess, but hopefully changing the PRIORITY only does not
>force me to supply the entire SQL based source code of the trigger.
>
>Perhaps for the next service release ALTER TRIGGER gets mentioned in
>the help file more deeply? ;-)

it's only listed in the what's new part of the help file...


Miscellaneous SQL Engine Changes
[...]
Added support for the ALTER PROCEDURE and ALTER TRIGGER statements.

But I fear you need to pass in the whole SQL script and not only the
new priority.

A better option would be to use the (undocumented)
sp_ModifyTriggerProperty. To get the params and the description from
the server, call "select * from system.systemprocedures".

--
Joachim Duerr
Advantage Presales
Sybase GmbH
!!! please reply to newsgroups only !!!


Thomas Steinmaurer Posted on 2008-10-23 15:59:04.0Z
Date: Thu, 23 Oct 2008 17:59:04 +0200
From: Thomas Steinmaurer <t.steinmaurer_dontbugmewithspam_@upscene.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: Change PRIORITY
References: <48fec751@solutions.advantagedatabase.com> <48feeddf@solutions.advantagedatabase.com> <48ff27e4@solutions.advantagedatabase.com> <48ffa0e1@solutions.advantagedatabase.com>
In-Reply-To: <48ffa0e1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.241.89.51
Message-ID: <49009dc1@solutions.advantagedatabase.com>
X-Trace: 23 Oct 2008 09:52:33 -0700, 212.241.89.51
Lines: 64
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!212.241.89.51
Xref: solutions.advantagedatabase.com Advantage.Trigger:412
Article PK: 1136473

Hello,

>> Ah. Nice. I was looking for a grammer of the ALTER TRIGGER statement
>> in the help file, but I didn't find one. In the "Supported SQL
>> Statements" section ALTER TRIGGER isn't listed. Via the search index
>> I also don't find something about ALTER TRIGGER.
>>
>> I'm gonna try to figure out the ALTER TRIGGER statement. Won't be
>> that hard I guess, but hopefully changing the PRIORITY only does not
>> force me to supply the entire SQL based source code of the trigger.
>>
>> Perhaps for the next service release ALTER TRIGGER gets mentioned in
>> the help file more deeply? ;-)
>
> it's only listed in the what's new part of the help file...
>
>
> Miscellaneous SQL Engine Changes
> [...]
> Added support for the ALTER PROCEDURE and ALTER TRIGGER statements.
>
> But I fear you need to pass in the whole SQL script and not only the
> new priority.

Right.

> A better option would be to use the (undocumented)
> sp_ModifyTriggerProperty. To get the params and the description from
> the server, call "select * from system.systemprocedures".

If tried, with and without the table name when specifying the trigger name:

execute procedure sp_ModifyTriggerProperty ('CUSTOMER.TRI_CUSTOMER_L_U',
'PRIORITY', '3');

and

execute procedure sp_ModifyTriggerProperty ('TRI_CUSTOMER_L_U',
'PRIORITY', '3');


In both cases, I get:

poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5131;
[iAnywhere Solutions][Advantage SQL][ASA] Error 5131: The specified
object ID is not a valid
database object ID.

Any idea? ;-)

Thanks.



--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/