On a non-production machine, I have two instances of SQL Server 2005. I want to uninstall the second instance, but I have two problems. Although this is a non-production machine, I want to be sure to keep the first instance safe so that I don't have to re-build anything.
在非生产机器上,我有两个SQL Server 2005实例。我想卸载第二个实例,但我有两个问题。虽然这是一台非生产机器,但我希望确保第一个实例安全,这样我就不必重新构建任何东西了。
I have had the second instance off for a month. When I started instance #2 today, I found that a user database was missing the LDF. I don't need the data in any way.
我已经关闭了第二个实例一个月。当我今天开始实例#2时,我发现用户数据库缺少LDF。我不需要任何方式的数据。
Also, from previous work done on that server, a separate database was left in mode in recovery. Again, I don't need the data in any way.
此外,根据以前在该服务器上完成的工作,还有一个单独的数据库处于恢复模式。同样,我不需要任何方式的数据。
My goal is to safely uninstall the second instance. I don't need any of the data in the second instance.
我的目标是安全地卸载第二个实例。我不需要第二个实例中的任何数据。
Will the uninstall go smoothly, even though these two databases have issues? If not, what should I do to ensure that the uninstall will go smoothly? Can I safely detach a database that is in recovery? Can I safely detach a database that is missing it's LDF? Are there other steps I should take to ensure that the instance uninstall goes smoothly? Can I simply leave the instance stopped, run the uninstall, and delete the database files afterwards?
卸载是否会顺利进行,即使这两个数据库存在问题?如果没有,我该怎么做才能确保卸载顺利进行?我可以安全地分离正在恢复的数据库吗?我可以安全地分离缺少LDF的数据库吗?我应该采取其他措施来确保实例卸载顺利进行吗?我可以简单地让实例停止,运行卸载,然后删除数据库文件吗?
2 个解决方案
#1
The uninstall should work without any issues. But if your data on instance one is so important as it seems from your question, you shouldn't do anything install/uninstall of any sort without prior having a backup of you system.
卸载应该没有任何问题。但是,如果您在实例1上的数据非常重要,那么在您事先没有备份系统的情况下,您不应该执行任何类型的安装/卸载操作。
#2
If you want to restore order to things before going ahead with your uninstall, you could fix the database with no log file.
如果要在继续卸载之前恢复顺序,可以修复没有日志文件的数据库。
This can be done by first detatching the database with no log file and then subsequently re-attach it, building a new log file by using the system stored procedure
这可以通过首先在没有日志文件的情况下分离数据库然后重新附加它,使用系统存储过程构建新的日志文件来完成
sp_attach_single_file_db
See Books Online: http://msdn.microsoft.com/en-us/library/ms174385.aspx
请参阅联机丛书:http://msdn.microsoft.com/en-us/library/ms174385.aspx
That said, you should be able to detatch all of your user databases and proceed with an instance specific uninstall, without issue.
也就是说,您应该能够分离所有用户数据库并继续执行特定于实例的卸载,而不会出现问题。
#1
The uninstall should work without any issues. But if your data on instance one is so important as it seems from your question, you shouldn't do anything install/uninstall of any sort without prior having a backup of you system.
卸载应该没有任何问题。但是,如果您在实例1上的数据非常重要,那么在您事先没有备份系统的情况下,您不应该执行任何类型的安装/卸载操作。
#2
If you want to restore order to things before going ahead with your uninstall, you could fix the database with no log file.
如果要在继续卸载之前恢复顺序,可以修复没有日志文件的数据库。
This can be done by first detatching the database with no log file and then subsequently re-attach it, building a new log file by using the system stored procedure
这可以通过首先在没有日志文件的情况下分离数据库然后重新附加它,使用系统存储过程构建新的日志文件来完成
sp_attach_single_file_db
See Books Online: http://msdn.microsoft.com/en-us/library/ms174385.aspx
请参阅联机丛书:http://msdn.microsoft.com/en-us/library/ms174385.aspx
That said, you should be able to detatch all of your user databases and proceed with an instance specific uninstall, without issue.
也就是说,您应该能够分离所有用户数据库并继续执行特定于实例的卸载,而不会出现问题。