If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > sqlcode -540 in Sybase

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-02-03, 08:57
cdajay cdajay is offline
Registered User
 
Join Date: Jan 2003
Posts: 4
sqlcode -540 in Sybase

Hi,

We have our application in C with Sybase Database. While running the application, at times it thorws an error (sqlcode -540) with error message
"Schema for table <table-name> has changed since compilation of this query. Please re-execute query."

This error occurs when it is trying to open select cursors on a particular table. We never changed the schema was during execution, and update statistics on the table was not done during execution.

Our Sybase version is 11.1.1.

Does this error has got something to do with the Sybase version?

Help from anyone is appreciated.
Thanks
Ajay
Reply With Quote
  #2 (permalink)  
Old 01-02-03, 19:51
willy_and_the_ci willy_and_the_ci is offline
Registered User
 
Join Date: Feb 2002
Location: Willy is on vacation
Posts: 1,208
Hiya cdajay,

A wild guess, maybe another session might have recompiled the stored proc while this one was calling it.

Cheers
Willy
Reply With Quote
  #3 (permalink)  
Old 01-03-03, 02:50
cdajay cdajay is offline
Registered User
 
Join Date: Jan 2003
Posts: 4
Hi Willy,

Thanks for the suggestion. But we didn't do any recompilation in any other session when this error occurred. Interestingly, this type of error occurs once in 2-3 months.

Does this happen because of the Sybase version 11.9.2.3 (wrongly mentioned as 11.1.1 in previous mail) that we use?

Thanks in advance

Ajay

Last edited by cdajay; 01-03-03 at 04:49.
Reply With Quote
  #4 (permalink)  
Old 01-05-03, 19:43
willy_and_the_ci willy_and_the_ci is offline
Registered User
 
Join Date: Feb 2002
Location: Willy is on vacation
Posts: 1,208
Hiya Ajay,

This is an genuine error message.

From what you are saying, this occurs only once every 2-3 months, there might be a possibility that your cron job to recompile objects runs every 2-3 months as well.

Check that out.

Cheers
Willy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On