Delete SQL Server 2005 instance with database problems

On a non-production machine, I have two instances of SQL Server 2005. I want to delete the second instance, but I have two problems. Even though this is a non-production machine, I want to make sure the first instance is safe so I don't have to rebuild anything.

I had a second copy for a month. When I started instance # 2 today, I found that there was no LDF in the user database. I don't need the data in any way.

In addition, a separate database remains in recovery mode from previous work on this server. Again, I don't need the data in any way.

My goal is to safely remove the second instance. I don't need any data in the second instance.

Will the deletion succeed even if the two databases have problems? If not, what should I do to ensure the deletion is smooth? Can I safely detach the database being restored? Can I safely detach a database that is missing LDF? Are there any other steps I should take to ensure that the deletion of the instance goes smoothly? Can I just leave the instance stopped, start a delete, and delete the database files afterwards?

0


a source to share


2 answers


Removal should work without any problem. But if your data in the instance is as important as it seems from your question, you shouldn't do anything, install or remove any types without first backing up your system.



+3


a source


If you want to restore the order of things before proceeding with the deletion, you can fix the database without a log file.

This can be done by first detaching the database without a log file and then reattaching it by creating a new log file using the system stored procedure

sp_attach_single_file_db



See eBook: http://msdn.microsoft.com/en-us/library/ms174385.aspx

However, you should be able to delete all of your user databases and proceed with deleting the instance without issue.

0


a source







All Articles