Unable to open table at query execution time-error

Unable to open table at query execution time-error

Post by Manoj Goe » Sat, 18 Apr 1998 04:00:00



hi guys,

we keep getting these errors in some of our stored procs.i have some
temporary tables being created in that. it used to run fine but now somehow
we keep getting this error on and off. What could be the problem??

This error is 202 in sysmessages table.

Could some one help me on this.

Thanks
Manoj

 
 
 

Unable to open table at query execution time-error

Post by Neil Pik » Sun, 19 Apr 1998 04:00:00


Manoj,

 It's probably a SQL bug - can you post a repro script?

 Neil Pike MVP/MCSE
 Protech Computing Ltd

 
 
 

Unable to open table at query execution time-error

Post by Neil Pik » Wed, 22 Apr 1998 04:00:00


Manoj,

 I can't see anything specific, and without all the tables and data I
couldn't repro it - however this is non-trivial to do.  It does look
like a variant on a known problem - I'll see if I can find the status
of the bug and whether it will make SP5.

 It's well worth you opening a support call with MS PSS and going
through it with them - it won't cost as it's definitely a bug in their
source code.

 PSS ID Number: Q169376
Article last modified on 06-05-1997

6.5

WINDOWS

======================================================================
-----------------------------------------------------------------------
--
The information in this article applies to:

 - Microsoft SQL Server, version 6.5
-----------------------------------------------------------------------
--
BUG #: 16945 (WINDOWS: 6.5)

SYMPTOMS
========

When you execute a stored procedure, it fails and returns the following
error:

   Msg 202, Level 11, State 2
   Internal error -- Unable to open table at query execution time.

CAUSE
=====

The stored procedure does all the following:

 - Creates a permanent table using the CREATE TABLE statement

 - Drops the permanent table

 - Creates a temporary table

 - Declares a cursor on the temporary table

 - Drops the temporary table

WORKAROUND
==========

To work around this problem, do any of the following and then drop and
re-create the stored procedure:

 - Use the SELECT INTO statement to create the permanent table

 - Eliminate either of the DROP TABLE statements

 - Wrap the DECLARE CURSOR within an EXEC()

 - Create the stored procedure WITH RECOMPILE or always execute it with
the
   WITH RECOMPILE option.

STATUS
======

Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 6.5. We are researching this problem and will post new
information
here in the Microsoft Knowledge Base as it becomes available.
======================================================================

 Neil Pike MVP/MCSE
 Protech Computing Ltd

 
 
 

Unable to open table at query execution time-error

Post by Manoj Goe » Thu, 23 Apr 1998 04:00:00


Thanks neil,

 this information is enough for me to feel better  and take up this case
with MS

Once again appreciate your quick response on it.

manoj


>Manoj,

> I can't see anything specific, and without all the tables and data I
>couldn't repro it - however this is non-trivial to do.  It does look
>like a variant on a known problem - I'll see if I can find the status
>of the bug and whether it will make SP5.

> It's well worth you opening a support call with MS PSS and going
>through it with them - it won't cost as it's definitely a bug in their
>source code.

 
 
 

Unable to open table at query execution time-error

Post by Neil Pik » Fri, 24 Apr 1998 04:00:00


Manoj,

 No problem - let me know how you get on.

 Neil Pike MVP/MCSE
 Protech Computing Ltd

 
 
 

1. Msg 202 Internal error -- unable to open table at query execution time

Sometimes we get error meg. 202 -- unable to open table at query execution
time. Acording to article ID: Q169376 on knowledge base, the procedure has:

1.create a permenent table
2.dop a permanent table
3.create a temporary table
4.declare a cursor on temporary table
5.drop temporary table

We do have the code for steps 3, 4, and 5 in that stored procedure. But not
for steps 1 and 2. So does this error message still apply to our situation.
Question is that this error does not happen every time.

According to Microsoft's suggestion we can use "with recompile" to work
around this problem. But this is a no-no because it defeat the purpose for
stored procedure. Any hint is appreciated.

2. Oracle ODBC driver and visual c++

3. Unable to open table at query execution time

4. Mdac 2.6

5. Unable to Open Table at Query Execution Time

6. Need feedback on real world system requirements : oracle portal & 9iAS

7. Unable to open table at the query execution time

8. RE : Msg 202: unable to open table at query execution time

9. Msg: 202 Unable to open table at query execution time

10. Error 202: Unable to open table at query execution

11. Unable to open table at the query time

12. Internal error -- Unable to open table at query execution time.