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.

AFTER UPDATE triggers not firing

9 posts in Trigger Last posting was on 2011-03-08 15:35:24.0Z
Cary Jensen Posted on 2011-03-03 23:14:39.0Z
Date: Thu, 03 Mar 2011 17:14:39 -0600
From: Cary Jensen <cjensen@jensendatasystems.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: AFTER UPDATE triggers not firing
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 108.32.202.80
Message-ID: <4d7020d7$1@solutions.advantagedatabase.com>
X-Trace: 3 Mar 2011 15:14:31 -0800, 108.32.202.80
Lines: 26
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:471
Article PK: 1136530

All:

I have been putting triggers on several tables in a database, and now
have noticed that none of the AFTER UPDATE triggers are executing for
any table. Other triggers are firing, but the AFTER UPDATES are not.
These triggers that are not firing are not disabled, and triggers are
enabled for the entire data dictionary.

To test that the AFTER UPDATE triggers were not firing, I created a new
simple table with one trigger on it, an AFTER UPDATE trigger. This
trigger inserts one literal value into a table called test, which I set
up for this testing.

Here is the SQL of the AFTER UPDATE trigger.

insert into test values('hi');

It can't get any simpler than this, but it does not fire. AFTER INSERT
triggers fire on any table I place them, and I am not using any INSTEAD
triggers on any tables in the data dictionary.

This is a production machine, and I have not stopped and started ADS
since I noticed this problem. Unfortunately, stopping ADS is not an
option unless I exhaust all other options.

Any insight into what might be happening will be greatly appreciated.


Lance Schmidt Posted on 2011-03-04 01:14:27.0Z
From: "Lance Schmidt" <LanceSc@ExtendSys.com>
Newsgroups: Advantage.Trigger
References: <4d7020d7$1@solutions.advantagedatabase.com>
Subject: Re: AFTER UPDATE triggers not firing
Date: Thu, 3 Mar 2011 18:14:27 -0700
Lines: 59
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.6.199.121
Message-ID: <4d703cef$1@solutions.advantagedatabase.com>
X-Trace: 3 Mar 2011 17:14:23 -0800, 10.6.199.121
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:474
Article PK: 1136534

Hi Cary,

I am going to need more details. I just tried the following script and
everything worked on 10.10.0.0.

CREATE TABLE base (
ID AutoInc,
name CIChar( 50 )) IN DATABASE;

CREATE TRIGGER afterupdatebase
ON base
AFTER
UPDATE
BEGIN
INSERT INTO after VALUES ( default, 'Hello' );
END
PRIORITY 1;

CREATE TABLE after (
id AutoInc,
Message CIChar( 50 )) IN DATABASE;

Have you tried debugging into the trigger using an SQL update and ARC?

Best Regards,

Lance Schmidt
Advantage R&D

"Cary Jensen" <cjensen@jensendatasystems.com> wrote in message
news:4d7020d7$1@solutions.advantagedatabase.com...
> All:
>
> I have been putting triggers on several tables in a database, and now have
> noticed that none of the AFTER UPDATE triggers are executing for any
> table. Other triggers are firing, but the AFTER UPDATES are not. These
> triggers that are not firing are not disabled, and triggers are enabled
> for the entire data dictionary.
>
> To test that the AFTER UPDATE triggers were not firing, I created a new
> simple table with one trigger on it, an AFTER UPDATE trigger. This trigger
> inserts one literal value into a table called test, which I set up for
> this testing.
>
> Here is the SQL of the AFTER UPDATE trigger.
>
> insert into test values('hi');
>
> It can't get any simpler than this, but it does not fire. AFTER INSERT
> triggers fire on any table I place them, and I am not using any INSTEAD
> triggers on any tables in the data dictionary.
>
> This is a production machine, and I have not stopped and started ADS since
> I noticed this problem. Unfortunately, stopping ADS is not an option
> unless I exhaust all other options.
>
> Any insight into what might be happening will be greatly appreciated.


Cary Jensen Posted on 2011-03-04 11:09:36.0Z
Date: Fri, 04 Mar 2011 05:09:36 -0600
From: Cary Jensen <cjensen@jensendatasystems.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AFTER UPDATE triggers not firing
References: <4d7020d7$1@solutions.advantagedatabase.com> <4d703cef$1@solutions.advantagedatabase.com>
In-Reply-To: <4d703cef$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 108.32.202.80
Message-ID: <4d70c868$1@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2011 03:09:28 -0800, 108.32.202.80
Lines: 15
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:478
Article PK: 1136540


Lance Schmidt wrote:

> Hi Cary,
>
> I am going to need more details.

I reported this effect because it was something that I had never seen
before, and wanted at least to create a record that something went wrong.

When I wrote we were unable to reboot this server, since it was a
production application used by many. We scheduled a reboot last night,
and now things are working as they should (AFTER UPDATE triggers are
functioning properly now.)

Thank you for your input. I will follow up on this if I ever encounter
this effect again.


Joachim Duerr (ADS) Posted on 2011-03-04 07:50:00.0Z
From: "Joachim Duerr (ADS)" <jojo.duerr@gmx.de>
Subject: Re: AFTER UPDATE triggers not firing
Newsgroups: Advantage.Trigger
References: <4d7020d7$1@solutions.advantagedatabase.com>
Date: Fri, 4 Mar 2011 08:50:00 +0100
User-Agent: XanaNews/1.19.1.269
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
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 130.214.79.11
Message-ID: <4d70992b$1@solutions.advantagedatabase.com>
X-Trace: 3 Mar 2011 23:47:55 -0800, 130.214.79.11
Lines: 13
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:476
Article PK: 1136537


Cary Jensen wrote:

>This is a production machine, and I have not stopped and started ADS
>since I noticed this problem. Unfortunately, stopping ADS is not an
>option unless I exhaust all other options.

probably the table is still open (in cache?) and so ADS doesn't
recognize the newly created trigger.

--
Joachim Duerr, Advantage Presales
*** NEW *** Advantage Pocket Guide released *** NEW ***
http://pocketguide.jd-engineering.de


Cary Jensen Posted on 2011-03-04 11:05:33.0Z
Date: Fri, 04 Mar 2011 05:05:33 -0600
From: Cary Jensen <cjensen@jensendatasystems.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AFTER UPDATE triggers not firing
References: <4d7020d7$1@solutions.advantagedatabase.com> <4d70992b$1@solutions.advantagedatabase.com>
In-Reply-To: <4d70992b$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 108.32.202.80
Message-ID: <4d70c775$1@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2011 03:05:25 -0800, 108.32.202.80
Lines: 11
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:477
Article PK: 1136536


Joachim Duerr (ADS) wrote:

> probably the table is still open (in cache?) and so ADS doesn't
> recognize the newly created trigger.
>

That cannot be the case, since the new table I created, and one on which
I added a new after update trigger to, also did not fire.

After rebooting the server, the triggers are now working. Something must
have been messed up.


Thomas Steinmaurer Posted on 2011-03-04 12:13:02.0Z
Date: Fri, 04 Mar 2011 13:13:02 +0100
From: Thomas Steinmaurer <t.steinmaurer_dontbugmewithspam@upscene.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AFTER UPDATE triggers not firing
References: <4d7020d7$1@solutions.advantagedatabase.com> <4d70992b$1@solutions.advantagedatabase.com>
In-Reply-To: <4d70992b$1@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: <4d70d749$1@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2011 04:12:57 -0800, 193.186.164.88
Lines: 31
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:480
Article PK: 1136541


>> This is a production machine, and I have not stopped and started ADS
>> since I noticed this problem. Unfortunately, stopping ADS is not an
>> option unless I exhaust all other options.
>
> probably the table is still open (in cache?) and so ADS doesn't
> recognize the newly created trigger.

I've seen something like that with ADS LogManager. When registering
objects for logging, triggers are generated behind the scene. In ARC32
then, I can change data and no log data will be produced. This e.g.
happens when I had opened the table editor in ARC32 before the log
triggers have been generated via ADSLM.

I haven't nailed it down if it is some kind of meta data caching issue
or if it works as expected transaction wise (e.g. transaction is started
when opening the table editor and not committed until the table editor
is closed).

This was with V9. Haven't checked with ADS 10.


--
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/


Cary Jensen Posted on 2011-03-04 11:11:28.0Z
Date: Fri, 04 Mar 2011 05:11:28 -0600
From: Cary Jensen <cjensen@jensendatasystems.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AFTER UPDATE triggers not firing - resolved
References: <4d7020d7$1@solutions.advantagedatabase.com>
In-Reply-To: <4d7020d7$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 108.32.202.80
Message-ID: <4d70c8d7$1@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2011 03:11:19 -0800, 108.32.202.80
Lines: 9
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:479
Article PK: 1136539

When I reported this problem we were unable to reboot this server, since
it was a production application used by many. We scheduled a reboot last
night, and now things are working as they should (AFTER UPDATE triggers
are functioning properly now.)

This was an odd case unlike I've seen before. I don't expect this to
happen again, but if it does, I will try to collect more information
about the events that lead up to it.


Rich Rohde Posted on 2011-03-04 16:05:52.0Z
From: "Rich Rohde" <rich@richware.net>
Newsgroups: Advantage.Trigger
References: <4d7020d7$1@solutions.advantagedatabase.com> <4d70c8d7$1@solutions.advantagedatabase.com>
In-Reply-To: <4d70c8d7$1@solutions.advantagedatabase.com>
Subject: Re: AFTER UPDATE triggers not firing - resolved
Date: Fri, 4 Mar 2011 08:05:52 -0800
Lines: 1
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3502.922
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3502.922
NNTP-Posting-Host: 67.42.155.1
Message-ID: <4d710dd7$1@solutions.advantagedatabase.com>
X-Trace: 4 Mar 2011 08:05:43 -0800, 67.42.155.1
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:481
Article PK: 1136542

Cary,

Would I be correct to assume you were running Advantage Server Ver x?

If so, if you would have stopped and restarted the service the problem would
have been resolved?

Rich

"Cary Jensen" wrote in message
news:4d70c8d7$1@solutions.advantagedatabase.com...


When I reported this problem we were unable to reboot this server, since
it was a production application used by many. We scheduled a reboot last
night, and now things are working as they should (AFTER UPDATE triggers
are functioning properly now.)

This was an odd case unlike I've seen before. I don't expect this to
happen again, but if it does, I will try to collect more information
about the events that lead up to it.


Cary Jensen Posted on 2011-03-08 15:35:24.0Z
Date: Tue, 08 Mar 2011 09:35:24 -0600
From: Cary Jensen <cjensen@jensendatasystems.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: Advantage.Trigger
Subject: Re: AFTER UPDATE triggers not firing - resolved
References: <4d7020d7$1@solutions.advantagedatabase.com> <4d70c8d7$1@solutions.advantagedatabase.com> <4d710dd7$1@solutions.advantagedatabase.com>
In-Reply-To: <4d710dd7$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 108.32.202.80
Message-ID: <4d764ca2$1@solutions.advantagedatabase.com>
X-Trace: 8 Mar 2011 07:34:58 -0800, 108.32.202.80
Lines: 12
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Trigger:483
Article PK: 1136544


Rich Rohde wrote:
> Cary,
>
> Would I be correct to assume you were running Advantage Server Ver x?
That server was ADS 9.10
>
> If so, if you would have stopped and restarted the service the problem
> would have been resolved?

Since I do not know what caused the problem, I cannot say. However, I
believe that simply restarting the service would have been sufficient to
getting it running again.