setup.exe /qb REMOVE=ALL instancename=test
Hello ,
I am usingMSFT SQL Server 2005(v 9.00) and have 3 databases listed under Database when I launch SQL Mgmt Studio
These are:
Deva, Devb, Test
I have to UNINSTALL and REMOVE only the TEST instance. I did following:
setup.exe /qb REMOVE=ALL instancename=test
I launch the above from C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap>
but it does NOT UNINSTALL that TEST instance... can anyone please help me on this?
Whats the BEST WAY to remove a DB Instance via COMMAND LINE....
NOTE: I have to use COMMAND LINE only to uninstall... please help
THANKS!
Mr. Bombay
What is the path of the setup.exe that you are trying to call? If you installed this from a cd, can you insert the cd again and run from that drive? Similarly, if you installed from a network share, can you try running the setup.exe from there?
Thanks,
Sam Lester (MSFT)
Here is an article about running an unattended uninstall.
http://msdn2.microsoft.com/en-us/ms144259.aspx#uninstallscripts
To remove a default, stand-alone installation of SQL Server 2005 from the command prompt
-
Insert the SQL Server 2005 installation media into the disk drive.
-
Uninstall SQL Server, using the following syntax:
Start /wait <CD or DVD Drive>\setup.exe /qb REMOVE=SQL_Engine,Client_Components INSTANCENAME=<InstanceName>
For the default instance, specify "MSSQLSERVER" for <InstanceName>. Using REMOVE=ALL to remove instance components also removes shared components: SQL Server Tools, Integration Services, and Notification Services.
It also mentions to use the original media. It doesn't mention the use of a mapped network drive, but I know this works as well. So if you needed to uninstall over a few machines, you could place the media in one machine and access it from the others.
Thanks,
Sam Lester (MSFT)
Sorry, I forgot to reply to the question about osql. The osql (and now even better, sqlcmd) utility is used to run adhoc queries from a command prompt window, or can be used to execute a script containing T-SQL statements. It's not intended to be used as an install/uninstall method.
Thanks,
Sam Lester (MSFT)
Thank You Sir Sam.
Actually I got confused with osql. I was able to work on my stuff by using
osql -S localhost -E -q "drop database test"
Is there any link which talks about osql?
Thanks!