I am getting desperate trying to fix that issue. I had to import a dump from an ASE 12.5.4 into a new database on an ASE 15.7. I therefore enabled the compatibility mode server-wide and then proceeded to the load which seems to have performed correctly. The database seems well imported, and I can access most of the tables/views/procedures (from my C# application), but a procedure is giving me troubles.
I am getting this error while executing a given procedure :
Error: 622, Severity: 20, State: 1
Opentable was passed a varno of 52. Object 'temp worktable' in database 'tempdb' already has that session descriptor in use. This occured while opening object id -1245236 in database id 2.
I realised this was caused by a view which is used in this procedure but which is weird is that the error is not thrown when running the SQL code itself, out of the procedure context.
I am using Toad for Sybase as a client, and realised I cannot access the data tab of the concerned view, Toad gives me the same error. So I cannot execute this view while it performs without any trouble on the original server (production server which runs ASE 12.5.4).
I also realised, when trying to execute some pieces of the query individually that I get warnings about unfound tables (and that I should use sp_help to fix the problem). Although, the tables actually exists and I can access their data.
I have tried so many things and still cannot fix this problem. I've used 'upgrade_object', 'sp_recompile' on all tables, 'dbcc reindex' on all tables.
Would you have any idea where the problem could come from? Thank you very much