Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jayprajapati857/b48f098d05e16ac6dc4dd94ac0782bb8 to your computer and use it in GitHub Desktop.
Save jayprajapati857/b48f098d05e16ac6dc4dd94ac0782bb8 to your computer and use it in GitHub Desktop.
Installing SQL Server 2008 from command line

Installing SQL Server 2008 from command line

  • Download SQL Server 2008 Express

  • If you want to know all the available Options and Switches which you can make use of this Installation, Run this command SQLEXPR_x64_ENU.exe /? in command propmp running as Administrator mode and navigating it to the Downloaded path of SQL Server exe.

  • After getting all the Options and Switches use them as per your requirements

  • In this Gist we are going to install only SQL Server 2008 DB Engine. You can also install the other tools from command line, such as SSAS, SSRS, SSIS and Tools(like SSMS).

  • The parameters I am going to set are:

    Instance Name: SQL2008

    SQLSVCACCOUNT (Service Account for DB Engine): NT Authority\System

    AGTSVCACCOUNT (Service Account for SQL Agent): NT Authority\System

    SQLSYSADMINACCOUNTS: Sysadmins on SQL Server. I will add myself here.

    Features: SQL(This implies just DB Engine, If you want to Install SSIS, SSRS, SSAS as well on the same server - which you should never do; you can enter IS, RS and AS as well)

    SECURITYMODE: Windows Authentication / SQL Authentication - I'll choose SQL in this demo.

    SQLUSERDBDIR, SQLUSERDBLOGDIR, SQLTEMPDBDIR are pretty much self explanatory.

  • So combining all together my syntax would become:

    SQLEXPR_x64_ENU.exe /? C:\Downloads>SQLEXPR_x64_ENU.exe /QUIETSIMPLE /ACTION=install /FEATURES=SQL /INS TANCENAME=SQL2008 /SQLSVCACCOUNT="NT Authority\System" /SQLSYSADMINACCOUNTS="jaypc\jay" /AGTSVCACCOUNT="NT Authority\System" /SECURITYMODE=SQL /SAPWD="Pa$$w0rd" /SQLTEMPDBDIR="C:\SQL2008\TempDB\\" /SQLUSERDBDIR="C:\SQL2008\SQLData\\" /SQLUSERDBLOGDIR="C:\SQL2008\SQLLog\\"

  • After some time I was returned to the main command prompt without any issues and you can also see in config manager with our instance(SQL2008) being successfully installed.

Helpers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment