BUG: System SPs Give Errors if 'Select Into' False for Tempdb

Last reviewed: April 8, 1997
Article ID: Q151108

The information in this article applies to:
  • Microsoft SQL Server, versions 6.0 & 6.5
BUG#: 15179 (6.00)

SYMPTOMS

If you create a table with a primary key constraint consisting of more than one columns and run sp_helpconstraint on it, it will execute fine as long as the 'select into/bulkcopy' option is true for tempdb. As soon as you make it false, the first subsequent sp_helpconstraint gives the following message:

   Msg 7130, Level 16, State 3
   UPDATETEXT with no log is not valid at this time. Use sp_dboption to set
   the 'select into/bulk copy' option on for database pubs.

Any subsequent attempts to run sp_helpconstraint on that table or any other table will give the following errors:

   Msg 16915, Level 16, State 1
   A cursor with the name 'cnst_csr' already exists
   Msg 2714, Level 16, State 1
   There is already an object named '#spcnsttab' in the database.
   Msg 2714, Level 16, State 1
   There is already an object named '#spcnstkeys' in the database.
   Msg 16905, Level 16, State 1
   The cursor is already open
   Msg 267, Level 16, State 1
   Object '#spcnsttab' cannot be found.

WORKAROUND

Do not set the 'select into/bulkcopy' option to false for tempdb because there is no practical benefit of doing that. Once you run into this situation, execute the following script from the same connection that gave the error:

close cnst_csr deallocate cnst_csr go use master go sp_dboption 'tempdb', 'select into', true go

STATUS

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

MORE INFORMATION

This problem can be seen with any system stored procedure that uses SELECT INTO into a temporary table, e.g., sp_help, sp_helpconstraint, etc.


Additional query words:
Keywords : kbbug6.00 kbbug6.50 kbprg SSrvProg
Version : 6.0 6.5
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.