Microsoft KB Archive/101143

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:02, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

BUG: Permission Denied When USE TEMPDB Issued from SQL


The information in this article applies to:

  • Microsoft SQL Server version 4.2x

BUG# 8882 (4.2)


If a temporary table created by a user currently exists, then other users, including the System Administrator (SA), will get the following error message from SQL Administrator when issuing 'use tempdb' or choosing 'change database' from the query window:

   SELECT permission denied on object #temptable_sunfix', database
   tempdb, owner DBO. (msg 229, severity 14, state 2) 

NOTE: The error message indicates that the owner of the temporary table is DBO (database owner), which is not true if the temporary table is created by a user.


Log in as a user, then type the following:

   create table #test(a int)

Leave the connection there, then log in as SA from SQL Administrator, and from query window, type the following:

   use tempdb

You will then get the error message 229.


Use SAF or isql to switch to tempdb. Or use fully qualified names when referring objects in tempdb.


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

Keywords : kbtool
Issue type :
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ420OS2

Last Reviewed: March 18, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.