Blog Post

Install SQL via Windows Command Line

,

I have been on a mission to find easier ways to install SQL Server.  I have recently been working on a process to use the SQL configuration file and Windows command line to install my SQL Server instances.  This process has saved me tons of time and it also has helped keep a standard with SQL installs.  Below I detail the steps to install SQL via Windows command line.

In order to install SQL through command line you need a SQL configuration file.  This is very easy to create just run through the install steps in the gui and right before you click the install button exit out of the gui.  In the bottom half of the display there is a file path to the configuration file, copy this path and save it.  This is the configuration file you will need to install SQL via command line.

Before we can install SQL the configuration file needs a few things added.  Open your favorite text editor and add the statements below to the configuration file:

; Required to acknowledge acceptance of the license terms.

IACCEPTSQLSERVERLICENSETERMS=”True”

If you specify a service account and a sysadmin account add the two statements from below as well (of course edit the passwords):

; Verify the password for SERVICE ACCOUNT

AGTSVCPASSWORD=”password”

SQLSVCPASSWORD=”password”

; sysadmin account password

SAPWD=”password”

Once you make those edits, save the configuration file in a spot on the server you can access.

Now to the actual silent install.

Step 1 – Open Command Prompt as administrator

Step 2 – Run the CD command and navigate to the location of your SQL Server software

Step 3 – Execute the following command in the directory that your SQL software is located include the file path to the configuration file:

setup.exe /ConfigurationFile=”ConfigurationFile.ini”

 

There you have it folks, installing SQL Server via Windows command line!

The post Install SQL via Windows Command Line appeared first on VitaminDBA.

Rate

Share

Share

Rate