可能有帮助......
命令行,获取SQL Server 2005安装的64位组件名称和卸载字符串:
powershell ls HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall -rec ^|gp^|select UninstallString,DisplayName ^|select-string -pattern 'SQL Server 2005' ^|FT Line -Au -Hi
输出:
@{UninstallString="C:\App64\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove; DisplayName=Microsoft SQL Server 2005 (64-bit)}
@{UninstallString=MsiExec.exe /I{2D8F2A31-E409-43B5-91AF-2FAF678A0052}; DisplayName=Microsoft SQL Server 2005 Analysis Services (64-bit)}
@{UninstallString=MsiExec.exe /I{5867EB9F-3477-489C-8854-8E09BCB24C4C}; DisplayName=Microsoft SQL Server 2005 Reporting Services (64-bit)}
@{UninstallString=MsiExec.exe /I{62D2F823-0EAA-496D-B0F9-A869BFC51550}; DisplayName=Microsoft SQL Server 2005 Backward compatibility}
@{UninstallString=MsiExec.exe /I{73D8B59D-0BFF-4B5B-A031-FAB3AC629E56}; DisplayName=Microsoft SQL Server 2005 Tools (64-bit)}
@{UninstallString=MsiExec.exe /I{79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}; DisplayName=Microsoft SQL Server 2005 (64-bit)}
@{UninstallString=MsiExec.exe /I{7AC75802-3F1D-4C0C-BAD5-EB0855A28063}; DisplayName=Microsoft SQL Server 2005 Notification Services (64-bit)}
@{UninstallString=MsiExec.exe /I{9ADDBE1C-7180-40E5-967C-C6401ADD9CE6}; DisplayName=Microsoft SQL Server 2005 Integration Services (64-bit)}
命令行,获取SQL Server 2005安装的32位组件名称和卸载字符串:
powershell ls HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall -rec ^|gp^|select UninstallString,DisplayName ^|select-string -pattern 'SQL Server 2005' ^|FT Line -Au -Hi
输出:
@{UninstallString="C:\App32\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove; DisplayName=Microsoft SQL Server 2005}
@{UninstallString=MsiExec.exe /I{6FDD4688-E063-401D-B6BE-7234E20B9173}; DisplayName=Microsoft SQL Server 2005 Books Online (English) (September 2007)}
@{UninstallString=MsiExec.exe /I{B0F9497C-52B4-4686-8E73-74D866BBDF59}; DisplayName=Microsoft SQL Server 2005 (SQL2K5LOG)}
我的旧时SQL Server 2005卸载报告:
卸载 SQL Server 2005
......跑步的时候 ARPWrapper.exe
在日志{454BFA8D-C675-487E-A997-EE8EBF3D2824}错误而不是卸载 SQL Server 2005
。卸载组件:
msiexec /I {454BFA8D-C675-487E-A997-EE8EBF3D2824}
无提示卸载 SQL Server 2005
:
"%ProgramFiles%\Microsoft SQL Server\90\Setup Bootstrap\ARPWrapper.exe" /Remove
卸载 SQL Server 2005
没有安装CD:
start /wait msiexec /x {79BF7CB8-1E09-489F-9547-DB3EE8EA3F16} SKIPREDISTPREREQS=1 /l*v c:\sqlredist_uninstall.log
作为变种删除服务 sc
命令,删除IIS虚拟目录,Active Directory注册服务SQL,删除注册表项和SQL Server文件夹。
如何手动卸载SQL Server 2005的实例
Thx,@ ta.speot.is
注册SQL Server 2005 SQL-DMO COM库:
regsvr32.exe sqldmo.dll
查看SQLServer组:
dsquery group -name SQLServer* | dsget group -sid -samid
删除SQLServer组:
for /f %G in ('dsquery group -name SQLServer* ') do @dsrm %G -c -subtree -uc
删除SQLServer组不提示删除确认:
for /f %G in ('dsquery group -name SQLServer* ') do @dsrm %G -c -subtree -uc -noprompt
查看SPN:
setspn -L %LOGONSERVER:~2%
在登录用户处查看SPN:
setspn -L %USERDNSDOMAIN%\%USERNAME%
删除任意SPN:
setspn -D <SQL SPN>
查看SQL Server服务:
Wmic service where (Caption like "%sql%" OR Name like "%sql%") get Caption, Name
保存SQL Server服务报告:
Wmic service where (Caption like "%sql%" OR Name like "%sql%") get Caption, Name, StartMode, State, PathName, ProcessId, StartName >> C:\SQLService Report.txt
删除SQL Server Active Directory帮助程序服务:
sc delete MSSQLServerADHelper
删除SQL Server Browser服务:
sc delete SQLBrowser
删除SQL Server Integration Services服务:
sc delete MsDtsServer
删除SQL Server服务:
sc delete MSSQL
sc delete MSSQL$Instance
删除SQL Server代理服务:
sc delete SqlAgent
sc delete SqlAgent$Instance
删除SQL Server Analysis Services服务:
sc delete MSOLAP
sc delete MSOLAP$Instance
删除SQL Server Reporting Services服务:
sc delete ReportServer
sc delete ReportServer$Instance
删除SQL Server FullText搜索服务:
sc delete Msftesql
sc delete Msftesql$Instance
查看SQL Server程序集:
dir "%windir%\assembly\GAC\*SQLServer*"
dir "%windir%\assembly\GAC_32\*SQLServer*"
dir "%windir%\assembly\GAC_MSIL\*SQLServer*"
删除SQL Server程序集:
del /s /q /f "%windir%\assembly\GAC\*SQLServer*"
del /s /q /f "%windir%\assembly\GAC_32\*SQLServer*"
del /s /q /f "%windir%\assembly\GAC_MSIL\*SQLServer*"
删除文件夹:
RD /S /Q "%ProgramFiles%\Microsoft SQL Server\90"
RD /S /Q "%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server"
RD /S /Q "%USERPROFILE%\Application Data\Microsoft\Microsoft SQL Server"
RD /S /Q "%USERPROFILE%\..\All Users\Application Data\Microsoft\Microsoft SQL Server"
删除SQL Server 2005注册表项:
reg delete "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90" /f
reg delete "HKCU\SOFTWARE\Microsoft\Microsoft SQL Server\90" /f
删除开始菜单快捷方式:
del /s /q "%ALLUSERSPROFILE%\Start Menu\Programs\Microsoft SQL Server 2005"
查看虚拟目录,默认WWW站点:
IIsVDir /query w3svc/1/ROOT
查看删除 Reports
虚拟目录,默认WWW站点:
IIsVDir /delete w3svc/1/ROOT/Reports
查看删除 ReportServer
虚拟目录,默认WWW站点:
IIsVDir /delete w3svc/1/ROOT/ReportServer