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.

Encounter error 208 when call stored Procedure within trigger

4 posts in General Discussion Last posting was on 2011-04-28 18:21:47.0Z
kennedyc Posted on 2011-04-27 06:48:28.0Z
Sender: 2d82.4db7bb60.1804289383@sybase.com
From: kennedyc
Newsgroups: sybase.public.ase.general
Subject: Encounter error 208 when call stored Procedure within trigger
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4db7bc3c.2dad.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Apr 2011 23:48:28 -0700
X-Trace: forums-1-dub 1303886908 10.22.241.41 (26 Apr 2011 23:48:28 -0700)
X-Original-Trace: 26 Apr 2011 23:48:28 -0700, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30142
Article PK: 72323

Hello,

I've placed a stored Procedure inside an insert trigger to
perform calculation whenever a new record is inserted.
However, when new records are inserted, I got the error
message 208 notifying a temp table inside the SP does not
exist. The SP is working fine if I call it outside the
trigger, any idea to fix this error?
any help is appreciated. thanks.

/*error message*/
Server message:
number(208) severity(16) state(1) line(54)
Server name: ase155_1
Procedure name: usp_calculation
#temp_cash not found. Specify owner.objectname or use
sp_help to check whether the object exists (sp_help may
produce lots of output).


"Mark A. Parsons" <iron_horse Posted on 2011-04-27 09:23:03.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Encounter error 208 when call stored Procedure within trigger
References: <4db7bc3c.2dad.1681692777@sybase.com>
In-Reply-To: <4db7bc3c.2dad.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4db7e077$1@forums-1-dub>
Date: 27 Apr 2011 02:23:03 -0700
X-Trace: forums-1-dub 1303896183 10.22.241.152 (27 Apr 2011 02:23:03 -0700)
X-Original-Trace: 27 Apr 2011 02:23:03 -0700, vip152.sybase.com
Lines: 26
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30144
Article PK: 72322

ASE version?

Does #temp_cash exist before the trigger is fired?

There appear to be some known issues with deferred compilation generating Msg 208's in versions of ASE as recently as
early releases of ASE 15.5. Have you tried opening a case with Sybase tech support?

On 04/27/2011 02:48, kennedyc wrote:
> Hello,
>
> I've placed a stored Procedure inside an insert trigger to
> perform calculation whenever a new record is inserted.
> However, when new records are inserted, I got the error
> message 208 notifying a temp table inside the SP does not
> exist. The SP is working fine if I call it outside the
> trigger, any idea to fix this error?
> any help is appreciated. thanks.
>
> /*error message*/
> Server message:
> number(208) severity(16) state(1) line(54)
> Server name: ase155_1
> Procedure name: usp_calculation
> #temp_cash not found. Specify owner.objectname or use
> sp_help to check whether the object exists (sp_help may
> produce lots of output).


kennedyc Posted on 2011-04-28 02:33:16.0Z
Sender: 33d3.4db7e277.1804289383@sybase.com
From: kennedyc
Newsgroups: sybase.public.ase.general
Subject: Re: Encounter error 208 when call stored Procedure within trigger
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4db8d1ec.4a63.1681692777@sybase.com>
References: <4db7e077$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Apr 2011 19:33:16 -0700
X-Trace: forums-1-dub 1303957996 10.22.241.41 (27 Apr 2011 19:33:16 -0700)
X-Original-Trace: 27 Apr 2011 19:33:16 -0700, 10.22.241.41
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30145
Article PK: 72325

Hi Mark,

I'm using ASE 15.5 in-memory db for development. The temp
table is explicitly created inside the sp so it won't exist
before the trigger is fired. Yes,I just logged a support
case this morning on sybase ECM.

> ASE version?
>
> Does #temp_cash exist before the trigger is fired?
>
> There appear to be some known issues with deferred
> compilation generating Msg 208's in versions of ASE as
> recently as early releases of ASE 15.5. Have you tried
> opening a case with Sybase tech support?
>
> On 04/27/2011 02:48, kennedyc wrote:
> > Hello,
> >
> > I've placed a stored Procedure inside an insert trigger
> > to perform calculation whenever a new record is
> > inserted. However, when new records are inserted, I got
> > the error message 208 notifying a temp table inside the
> > SP does not exist. The SP is working fine if I call it
> > outside the trigger, any idea to fix this error?
> > any help is appreciated. thanks.
> >
> > /*error message*/
> > Server message:
> > number(208) severity(16) state(1) line(54)
> > Server name: ase155_1
> > Procedure name: usp_calculation
> > #temp_cash not found. Specify owner.objectname or use
> > sp_help to check whether the object exists (sp_help may
> > produce lots of output).


"Mark A. Parsons" <iron_horse Posted on 2011-04-28 18:21:47.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Encounter error 208 when call stored Procedure within trigger
References: <4db7e077$1@forums-1-dub> <4db8d1ec.4a63.1681692777@sybase.com>
In-Reply-To: <4db8d1ec.4a63.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4db9b03b$2@forums-1-dub>
Date: 28 Apr 2011 11:21:47 -0700
X-Trace: forums-1-dub 1304014907 10.22.241.152 (28 Apr 2011 11:21:47 -0700)
X-Original-Trace: 28 Apr 2011 11:21:47 -0700, vip152.sybase.com
Lines: 64
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30146
Article PK: 72324

Does the following describe your situation:

- insert to some_table (starts transaction)
- insert trigger fires on some_table (executes inside of transaction)
- trigger calls some_proc (still inside transaction)
- some_proc creates #some_temp_table (still inside transaction)
- you get an error stating #some_temp_table doesn't exist

If the above explains your situation ... I'd be curious to know if you received an earlier error stating that you cannot
create a #temp table inside of a transaction? Or have you enabled 'ddl in tran' to allow the #temp table to be created
within a transaction?

I'd suggest running the insert from within a command line isql session in order to see/capture all error messages.
(From your post it appears you're using something other than isql, which in turn could be masking some messages being
generated by the dataserver.)

As for the standalone call to the proc working ok ... what happens when you emulate the trigger behavior with the following:

==============
begin tran
exec your_proc_name_here
go
==============

... do you also get a 208? If so, you'll have to a) create the #temp table before you do the insert or b) enable 'ddl
in tran' in your tempdb database (not usually recommended).

On 04/27/2011 22:33, kennedyc wrote:
> Hi Mark,
>
> I'm using ASE 15.5 in-memory db for development. The temp
> table is explicitly created inside the sp so it won't exist
> before the trigger is fired. Yes,I just logged a support
> case this morning on sybase ECM.
>
>> ASE version?
>>
>> Does #temp_cash exist before the trigger is fired?
>>
>> There appear to be some known issues with deferred
>> compilation generating Msg 208's in versions of ASE as
>> recently as early releases of ASE 15.5. Have you tried
>> opening a case with Sybase tech support?
>>
>> On 04/27/2011 02:48, kennedyc wrote:
>>> Hello,
>>>
>>> I've placed a stored Procedure inside an insert trigger
>>> to perform calculation whenever a new record is
>>> inserted. However, when new records are inserted, I got
>>> the error message 208 notifying a temp table inside the
>>> SP does not exist. The SP is working fine if I call it
>>> outside the trigger, any idea to fix this error?
>>> any help is appreciated. thanks.
>>>
>>> /*error message*/
>>> Server message:
>>> number(208) severity(16) state(1) line(54)
>>> Server name: ase155_1
>>> Procedure name: usp_calculation
>>> #temp_cash not found. Specify owner.objectname or use
>>> sp_help to check whether the object exists (sp_help may
>>> produce lots of output).