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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP with Drop Database

Status
Not open for further replies.

Nevering

Programmer
Jul 13, 2002
1
US
I'm running SQL Server 2000 Developer. I trying to drop the database via a sql command in osql or isql and I get the message that "The database is in use and cannot be dropped". But I cannot find out what has it in use, the only thing that running is either osql or isql. Is it possible to find out what has the database open ?

I tried Admin Tools/Management/Shared Folder/Open Files and nothing there.

 
Perhaps the OSQL run is the culprit. Use the -dmaster option to change the context of the OSQL connection to the master datbases before executing the DROP statement.

Exec sp_who to see which connection is using the database. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top