Databse "tempdb: already open...

Databse "tempdb: already open...

Post by Kalen Delane » Wed, 02 Jun 1999 04:00:00



It sounds like somehow your tempdb database got set to single user mode. Do
not use Enterprise Manager. Use Query Analyzer (or isql/w if SQL 6.5) and
from the master database, run the following:

exec sp_dboption tempdb, 'single user', false

HTH

--
Kalen Delaney
MCSE, SQL Server MCT, MVP
www.InsideSQLServer.com
(Please do not send email.
  Post all followups to the newsgroups.)


>I try to manage logins, or databases and I am unable to do anything. I get
>an error that  reports that the database "tempdb" is already open and can
>have only one user at a time.  This install is not critical and the databse
>does not have anything in it,  however I would like to know how to correct
>this before we do have data.

>Stein

 
 
 

Databse "tempdb: already open...

Post by Stei » Thu, 03 Jun 1999 04:00:00


I try to manage logins, or databases and I am unable to do anything. I get
an error that  reports that the database "tempdb" is already open and can
have only one user at a time.  This install is not critical and the databse
does not have anything in it,  however I would like to know how to correct
this before we do have data.

Stein

 
 
 

Databse "tempdb: already open...

Post by Neil Pik » Thu, 03 Jun 1999 04:00:00


Stein,

 Use sp_dboption to take tempdb out of single user mode

Quote:> I try to manage logins, or databases and I am unable to do anything. I get
> an error that  reports that the database "tempdb" is already open and can
> have only one user at a time.  This install is not critical and the databse
> does not have anything in it,  however I would like to know how to correct
> this before we do have data.

> Stein

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 (Please post ALL replies to the newsgroup only unless indicated otherwise)
 For SQL FAQ entries see
 http://go.compuserve.com/sqlserver (library 1) - latest stuff is always here
 www.ntfaq.com/sql.html
 http://www.swynk.com/faq/sql/sqlserverfaq.asp
 
 
 

Databse "tempdb: already open...

Post by Stei » Fri, 04 Jun 1999 04:00:00


Thanks for the quick reply, however the command was unable to take it out of
single user mode because something had letf it in an open state.

Oh well live and learn..

Thanks again

Stein


> It sounds like somehow your tempdb database got set to single user mode.
Do
> not use Enterprise Manager. Use Query Analyzer (or isql/w if SQL 6.5) and
> from the master database, run the following:

> exec sp_dboption tempdb, 'single user', false

> HTH

> --
> Kalen Delaney
> MCSE, SQL Server MCT, MVP
> www.InsideSQLServer.com
> (Please do not send email.
>   Post all followups to the newsgroups.)


> >I try to manage logins, or databases and I am unable to do anything. I
get
> >an error that  reports that the database "tempdb" is already open and can
> >have only one user at a time.  This install is not critical and the
databse
> >does not have anything in it,  however I would like to know how to
correct
> >this before we do have data.

> >Stein

 
 
 

1. Getting "The cursor is already open"-error

Hi,
I have constructed an application in VB3 where I use a SQL Server database.
This problem occurs when I'm creating a temporary table with the help of a
store procedure.
In VB I am first Allocating a statmenthandler, then am I binding parameters
to the procedure and finaly executing following code:

    Retcode = SqlExecDirect(gHstmt, "{call <The Store Procedure>}", SQL_NTS)

    If Retcode <> SQL_SUCCESS Then
        <It returns SQL_SUCCESS, so I skip this part of the code>
    End If

After this am I stopping the work and free the memory associated to the
statmenthandler. The problem occurs when I runs the above descibed function
again. I guess that SQL Server return Ok to soon to VB so the cursor never
was closed. I have tried to put a delay before stopping and freeing the
memory to the statmenthandler, but if its a heavy process must the delay be
up to 20 seconds and that is way to long to be acceptable.
Thanks, Eric

2. How to identiy tables without indexes

3. vb conflict to open DB already open with Access (error 3356)

4. Help with Query

5. Preventing a from from being opened - if already open

6. collections and keys

7. Mail merge from Access try to open an already open DB

8. ODBC LIBRARY

9. Error opening file (already opened)

10. Development of "Glossary" Databse in VB6

11. "distribution agent already running" error

12. "Record already locked this session"

13. Access db "already in use" error