Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't change DB to single user

Status
Not open for further replies.

RonPro

Programmer
Apr 10, 2002
74
US
I have a test server onto which I need to restore a backup from a production database. The backup is made, but I can't get the test server to set the single-user option on my test db. It keeps telling me that other users are attached.

There are no apps running against the test server dbs. I have bounced the test server and my workstation to make sure there are no links.

"Current Activity" shows no one using the database I want to restore over.

Any ideas as to where this phantom db user is lurking?

TIA
Ron
 
How are you restoring this DB. Via Query Analyzer or Enterprise Manager?

Thanks

J. Kusch
 
check the sysprocesses table. If may show someone. If may think that your EM is trying to use the database, and that's kicking you out. Try running the restore from Query Analyzer.

Denny
 
Did you try

alter database YOUR_DB_NAME set single_user
with rollback immediate;

in Query Analyzer?

/Stefan Lennerbrant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top