Install SQL 2008 on a Windows 2008 Server from Commad Line & Answer File
Posted by Brajesh Panda on January 6, 2010
I have two methods for you;
- Silent Installation from Command Prompt
- Using command syntaxes
- Using Answer File
2. GUI Based Installation
I will be covering small step to uninstall process using command line at the end of the post. Don’t forget to install SQL Server 2008 SP1 after you install the RTM.
1st time I have followed GUI Method but found little time consuming. Hence built my small script to do the same from command line. MSDN website has a fantastic page regarding “How to: Install SQL Server 2008 from Command Prompt” . Take your time & do your research on all parameters from that page.
Let me give you post about Command line Installation of SQL Server
Install SQL Server 2008 on a Windows 2008 Server Using Command Line Syntaxes
##### Install Perquisites ######
servermanagercmd -i NET-Framework-Core
servermanagercmd -i NET-HTTP-Activation
servermanagercmd -i NET-Non-HTTP-Activ
##### Install SQL Server with a Default Instance. Full Blown Installation with some Client Management Features ######
Setup.exe /q /ACTION=Install /ERRORREPORTING=0 /FEATURES=SQL,RS,AS,IS,SSMS,ADV_SSMS,Conn /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT=”NT AUTHORITY\Network Service” /SQLSYSADMINACCOUNTS=”BUILTIN\ADMINISTRATORS” /SQLSVCSTARTUPTYPE=Automatic /AGTSVCACCOUNT=”NT AUTHORITY\Network Service” /AGTSVCSTARTUPTYPE=Automatic /RSSVCACCOUNT=”NT AUTHORITY\Network Service” /RSSVCSTARTUPTYPE=Automatic /ASSVCACCOUNT=”NT AUTHORITY\Network Service” /ASSVCSTARTUPTYPE=Disabled /ASSYSADMINACCOUNTS=”BUILTIN\ADMINISTRATORS /ISSVCACCOUNT=”NT AUTHORITY\Network Service” /ISSVCSTARTUPTYPE=Disabled
|/q||Quite, No User Input|
|/ERRORREPORTING=0||Don’t send errors to MS|
|SQL||SQLEngine, Replication, FullText|
|Tools||Client Management ToolsSSMS-Basic, ADV_SSMS-Complete, Connectivity|
Apart from this I have configured “BUILTIN\ADMINISTRATORS” as System Admin Accounts. Make sure you are changing this parameter. May be you not like to give rights to specific people.
My script is installing everything into default “C:\Program Files” location. If you want to install it in a different location refer to directory switches on MSDN document. My script is also creating a default instance named as MYSQLSERVER. Change your name.
SQL & AS needs System Admin accounts to be defined. Refer to Problem 1 in the end of the post.
Install SQL Server 2008 on a Windows 2008 Server Using Answer File
Download a template file from my Google docs
Uninstall SQL 2008 Using Command Line
Setup.exe /Action=Uninstall /FEATURES= SQL,RS,AS,IS,SSMS,ADV_SSMS,Conn /INSTANCENAME=MSSQLSERVER
Note: After you uninstall & if you like to reinstall SQL 2008 server you may face problem
At least define one system admin account.
Error Result: -2068578304
A computer restart is required because of broken fusion ATL. You must restart your computer before you continue.
Error result: -2067919934
Result facility code: 1214
Result error code: 3010
The Reporting Services catalog database file exists. Select a Reporting Services
files-only mode installation.
Error result: -2067921932
Result facility code: 1214
Result error code: 1012
Solution: Refer to KB956095
After uninstallation I have deleted all un removed folders but when I tried to reinstall, installer was not doing anything. So manually I have installed SQLsupport.msi
Don’t mind to leave a comment, if you like this post. Any suggestions most welcome!