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.

Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization

4 posts in General Discussion Last posting was on 2013-01-15 20:45:31.0Z
Anthony Posted on 2013-01-07 18:22:17.0Z
Sender: 68e.50eb10cb.1804289383@sybase.com
From: Anthony
Newsgroups: sybase.public.ase.general
Subject: Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50eb1259.6c3.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 7 Jan 2013 10:22:17 -0800
X-Trace: forums-1-dub 1357582937 172.20.134.41 (7 Jan 2013 10:22:17 -0800)
X-Original-Trace: 7 Jan 2013 10:22:17 -0800, 172.20.134.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31632
Article PK: 1158796

I get the following error when I try to execute a Sybase
stored procedure. Does anyone have an idea as to why this
kind of stored procedure execution error would occur and the
solution to it? (i am more concerned about the 'error' and
not the 'warning' at this point.)


Warnings: --->
W (1): 010P4: An output parameter was received and
ignored.
<---
>[Error] Script lines: 1-2 --------------------------
Cannot run query--referenced object (name NAME NOT
RECOVERABLE) dropped during query optimization.
Msg: 225, Level: 16, State: 3
Server: ADVOLTP_DEV, Procedure: dadv_intrvls_ownr_and_hist,
Line: 76
[Executed: 1/7/13 12:19:56 PM CST] [Execution: 157ms]


Rob V Posted on 2013-01-07 19:33:34.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization
References: <50eb1259.6c3.1681692777@sybase.com>
In-Reply-To: <50eb1259.6c3.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: <50eb230e$1@forums-1-dub>
Date: 7 Jan 2013 11:33:34 -0800
X-Trace: forums-1-dub 1357587214 172.20.134.152 (7 Jan 2013 11:33:34 -0800)
X-Original-Trace: 7 Jan 2013 11:33:34 -0800, vip152.sybase.com
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31633
Article PK: 1158797


On 07-Jan-2013 19:22, Anthony wrote:
> I get the following error when I try to execute a Sybase
> stored procedure. Does anyone have an idea as to why this
> kind of stored procedure execution error would occur and the
> solution to it? (i am more concerned about the 'error' and
> not the 'warning' at this point.)
>
>
> Warnings: --->
> W (1): 010P4: An output parameter was received and
> ignored.
> <---
>> [Error] Script lines: 1-2 --------------------------
> Cannot run query--referenced object (name NAME NOT
> RECOVERABLE) dropped during query optimization.
> Msg: 225, Level: 16, State: 3
> Server: ADVOLTP_DEV, Procedure: dadv_intrvls_ownr_and_hist,
> Line: 76
> [Executed: 1/7/13 12:19:56 PM CST] [Execution: 157ms]
>

The warning is unrelated to the error.
There can be various reasons for the error, and this also depends on the
actual ASE version you are running. You should really contact Sybase
TechSupport and open a case, this problem will probably not be resolved
in this newsgroup.

--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Bret Halford Posted on 2013-01-07 21:27:27.0Z
From: Bret Halford <bret.halford@sap.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Cannot run query--referenced object (name NAME NOT RECOVERABLE)dropped during query optimization
References: <50eb1259.6c3.1681692777@sybase.com> <50eb230e$1@forums-1-dub>
In-Reply-To: <50eb230e$1@forums-1-dub>
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: <50eb3dbf$1@forums-1-dub>
Date: 7 Jan 2013 13:27:27 -0800
X-Trace: forums-1-dub 1357594047 172.20.134.152 (7 Jan 2013 13:27:27 -0800)
X-Original-Trace: 7 Jan 2013 13:27:27 -0800, vip152.sybase.com
Lines: 56
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31635
Article PK: 1158800


On 1/7/2013 12:33 PM, Rob V wrote:
> On 07-Jan-2013 19:22, Anthony wrote:
>> I get the following error when I try to execute a Sybase
>> stored procedure. Does anyone have an idea as to why this
>> kind of stored procedure execution error would occur and the
>> solution to it? (i am more concerned about the 'error' and
>> not the 'warning' at this point.)
>>
>>
>> Warnings: --->
>> W (1): 010P4: An output parameter was received and
>> ignored.
>> <---
>>> [Error] Script lines: 1-2 --------------------------
>> Cannot run query--referenced object (name NAME NOT
>> RECOVERABLE) dropped during query optimization.
>> Msg: 225, Level: 16, State: 3
>> Server: ADVOLTP_DEV, Procedure: dadv_intrvls_ownr_and_hist,
>> Line: 76
>> [Executed: 1/7/13 12:19:56 PM CST] [Execution: 157ms]
>>
>
> The warning is unrelated to the error.
> There can be various reasons for the error, and this also depends on the
> actual ASE version you are running. You should really contact Sybase
> TechSupport and open a case, this problem will probably not be resolved
> in this newsgroup.
>

One possible reason for the error is using inconsistent name
references (such as a mix of owner.object and object). This doesn't
always cause error 225, but it sometimes does.

As an example

use tempdb
go
create proc p_qual as
create table dbo.tabq(c1 int)
insert tabq select dbid from master..sysusages
select * from tabq where c1=1
go

Should be rewritten as

create proc p_qual as
create table dbo.tabq(c1 int)
insert dbo.tabq select dbid from master..sysusages
select * from dbo.tabq where c1=1
go

--
Bret Halford
Support Architect, ASE Tactical Support Team, AGS Primary Support
Sybase, Inc., an SAP Company
385 Interlocken Crescent, Suite 300, Broomfield, Colorado, 80021


Anthony Posted on 2013-01-15 20:45:31.0Z
Sender: 4e85.50f5be6b.1804289383@sybase.com
From: Anthony
Newsgroups: sybase.public.ase.general
Subject: Re: Cannot run query--referenced object (name NAME NOT RECOVERABLE)dropped during query optimization
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50f5bfeb.4ebf.1681692777@sybase.com>
References: <50eb3dbf$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 15 Jan 2013 12:45:31 -0800
X-Trace: forums-1-dub 1358282731 172.20.134.41 (15 Jan 2013 12:45:31 -0800)
X-Original-Trace: 15 Jan 2013 12:45:31 -0800, 172.20.134.41
Lines: 72
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31655
Article PK: 1159043

We tried doing that and we still get the same error.
Someone else mentioned that we should break up one the
procedure into two procedures: one procedure to create the
table and the other, subsequent procedure to populate the
table. But we are trying to avoid that. We would like to
create a table and populate it in one procedure. BTW....The
procedure in question is coming from the SQL Server
environment where it works fine. We are now in a project to
move everything over to Sybase, and that is when we
discovered this issue. I wonder if anything special needs
to be done when re-compiling SQL Server 2005 stored
procedures over to Sybase stored procedures?
Any other ideas????

> On 1/7/2013 12:33 PM, Rob V wrote:
> > On 07-Jan-2013 19:22, Anthony wrote:
> >> I get the following error when I try to execute a
> Sybase >> stored procedure. Does anyone have an idea as
> to why this >> kind of stored procedure execution error
> would occur and the >> solution to it? (i am more
> concerned about the 'error' and >> not the 'warning' at
> this point.) >>
> >>
> >> Warnings: --->
> >> W (1): 010P4: An output parameter was received and
> >> ignored.
> >> <---
> >>> [Error] Script lines: 1-2 --------------------------
> >> Cannot run query--referenced object (name NAME NOT
> >> RECOVERABLE) dropped during query optimization.
> >> Msg: 225, Level: 16, State: 3
> >> Server: ADVOLTP_DEV, Procedure:
> dadv_intrvls_ownr_and_hist, >> Line: 76
> >> [Executed: 1/7/13 12:19:56 PM CST] [Execution: 157ms]
> >>
> >
> > The warning is unrelated to the error.
> > There can be various reasons for the error, and this
> > also depends on the actual ASE version you are running.
> > You should really contact Sybase TechSupport and open a
> > case, this problem will probably not be resolved in this
> newsgroup. >
>
> One possible reason for the error is using inconsistent
> name references (such as a mix of owner.object and
> object). This doesn't always cause error 225, but it
> sometimes does.
>
> As an example
>
> use tempdb
> go
> create proc p_qual as
> create table dbo.tabq(c1 int)
> insert tabq select dbid from master..sysusages
> select * from tabq where c1=1
> go
>
> Should be rewritten as
>
> create proc p_qual as
> create table dbo.tabq(c1 int)
> insert dbo.tabq select dbid from master..sysusages
> select * from dbo.tabq where c1=1
> go
>
> --
> Bret Halford
> Support Architect, ASE Tactical Support Team, AGS Primary
> Support Sybase, Inc., an SAP Company
> 385 Interlocken Crescent, Suite 300, Broomfield, Colorado,
> 80021