Results 1 to 2 of 2

Thread: Exclusive access to DB

  1. #1
    Join Date
    May 2003
    Location
    Italy
    Posts
    1

    Exclusive access to DB

    Hi.

    I'm new to this forum so a friendly and polite greet to all..


    I get:

    Server: Msg 3101, Level 16, State 1, Procedure SP_xxxxxx_TRANS_restore, Line 11
    Exclusive access could not be obtained because the database is in use.

    ..when I try to run an sp that attempts to restore the trans log in SQL2000 and yet I do execute an sp first to drop all spids...can anyone tell me why(maybe)

    thanks.



    bob.


  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    There may be an application which reconnects after you kill the connection.

    Did you select the database context to master in query analyzer when you run the procedure?

    Or after killing the connection use sp_dboption to change database to dbo only and single user mode, then run the procedure.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •