How to install SQL 2005 from the command prompt and using .ini file ?

I wanted to publish this quick blog tonight to answer some of the questions that I have received recently regarding installation from an .ini file.


Microsoft has published a great MSDN article that lists the commands and options to use for installing SQL 2005 and its components from command prompt.


However, I have observed that it is easy to miss some of the important aspects while reading this lengthy article. If these important pre-requisites are not met, then setup will fail.


So here are the key takeaways:


         Component names are case sensitive. So SQL_ENGINE is wrong, while SQL_Engine is correct

         If you specify SQL_Engine, it won’t install all child features. For example, if you specify SQL_Engine, it won’t automatically install SQL_FullText. You need to specify each child component along with the parent component.

         When installing SQL_Engine, you need to specify the SQLACCOUNT, AGTACCOUNT and SQLBROWSERACCOUNT. If any of these accounts are missing, setup will fail.

         For cluster setup, cluster specific options like VS, GROUP, IP etc. are required, otherwise setup will fail.



Using .ini file

For running setup using an .ini file, you can specify these command line options within a .ini file.


To help you with this, Microsoft ships a template.ini file on the root of the installation media. I would strongly suggest that you use this .ini file as your starting point and remove any options that you don’t want. This .ini file does a great job of documenting these options.


Note that while using .ini file, the [Options] line is a required line in an .ini file. If not present, the setup will fail.



A word about accounts

While specifying the SQLACCOUNT, AGTACCOUNT and SQLBROWSERACCOUNT, refer to these guidelines:


Domain User account          :        <domain\user>

Local System Account         :        “NT AUTHORITY\SYSTEM”

Network Service Account     :        “NT AUTHORITY\NETWORK SERVICE”

Local Service Account         :        “NT AUTHORITY\LOCAL SERVICE”




If you are installing SQL 2005 from command prompt using the CD, setup could fail if you chose to install SQL 2005 client components and documentation.


This is because these components are located in CD2. If you used /qn switch (which suppresses the setup user interface), setup will fail and you will see error 70379 in the Setup log file.


To avoid this situation, copy the contents of both the CDs onto the disk under the Servers and Tools folders, as highlighted in my blog here.


Hope this helps ensure that all bases are covered before you start the install. Let me know if you have any questions.

Comments (11)

  1. Stan says:

    I’m including all three accounts but during the installation I get an error saying "SQL Server could not validate service accounts". Is there an opiton to "Use for all accounts" just like with gui install? Why whould my installations fail.


  2. Sanchan says:

    You should start by looking into the Summary file located under the <install drive>Program FilesMicrosoft SQL Server90Setup BootstrapLog folder.

    This file will show you any error messages that it encountered during setup.

    Let me know what error do you see.


  3. stan says:

    The errors indicated that it cannot validate access for SQLBrowserService. I can get a more detailed description tomorrow. My question, however is this: during the regular installs you have an option of using credentials for all accounts. Is there a way to do the same thing in unattended install (w/o explicitly setting each account)?

  4. Sanchan says:

    If you are installing SQL using command prompt/ini file, then you have to specify each account individually as there is no option for ALL, as it is during the wizard.


  5. When you install SQL Server 2005, depending upon the components you installed, you will see a couple…

  6. I have received a lot of questions on installing Analysis Services 2005 on a cluster and I wanted to…

  7. mike says:

    I continue to get this error: SQL Server Setup has determined that the following account properties are not specified:  ‘AGTACCOUNT, SQLACCOUNT’ . The properties specify the startup account for the services that are installed. To proceed, refer to the template.ini and set the properties to valid account names. If you are specifying a windows user account, you must also specify the password for the account.


  8. Sanchan says:

    These accounts are required.

    Please refer to the template.ini file in the setup CD which has all the information about these accounts.

    You have to specify these accounts manually for each service, along with the password.

    Let me know if you have any further questions.


  9. Igor Van Wambeke says:

    We’re getting troubles with the installation of SQL + AS on a cluster (active-passive)

    Reading the MS article MS144259 helped a lot but we’re still having something to clarify : In the "maintenance scripts" section of the article, there’s a note saying "You cannot install Analysis Services to the same cluster group as the Database Engine. You must install Analysis Services to its own group and then, after installation, you can move Analysis Services to the same group as SQL Server"

    Is this applicable only when we add components or is it also the case when we used the SQL and AS parameters directly in ADDLOCAL from the start?

    How to do the move afterwardss ?

  10. Pour les éditeurs, il est particulièrement utile de pouvoir installer les briques Microsoft embarquées

  11. Pour les éditeurs, il est particulièrement utile de pouvoir installer les briques Microsoft embarquées