May 18, 2004 at 5:49 pm
I am trying to complete a very simple VB .NET app which will allow a client to add, remove and do simple housekeeping like backup and restore on MSDE 2000 databases.
I am completely stuck trying to use the 'remove' method on the SQLDMO database object, as everytime I try to call it an error says that the database cannot be dropped as it is in use. It seems that the act of enumerating the databases on the server starts a new SQL Server process for each one which blocks the drop instruction. I have tried disconnecting the sqlserver object and making sure all connections are closed, but nothing seems to work. Part of the code that loops through each database opens a connection to check a value in a particular table and then closes the connection again but even deleting this bit of code completely has no effect on the running processes.
Is there a way of killing off the processes to allow a database to be dropped - without closing the app itself - which does release all the processes - but too late of course.
Many thanks if anyone can help.
Geoff
May 21, 2004 at 8:00 am
This was removed by the editor as SPAM
May 24, 2004 at 5:13 am
I think there is a script here in sqlservercentral.com that help u to kill all of the runnung processes .. so you can remove the DB .. search for that script ..
Note: you can't remove the DB while you are using it (by using even .. use DB)
I hope this help u
Alamir Mohamed
Alamir_mohamed@yahoo.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply