How to: Install SQL Server 2005 from the Command Prompt
Before you run Setup for SQL Server 2005, review Preparing to Install SQL Server 2005. If you are installing a failover cluster, also review Before Installing Failover Clustering.
When you install SQL Server 2005 from the command prompt, you can specify Setup parameters at the command prompt, or you can use the /settings switch to load Setup parameters from an .ini file. You must use either Setup parameters at the command prompt, or an .ini file, but you cannot use both.
To specify Setup parameters by loading them from an .ini file, use the /settings filename.ini argument to specify the .ini file. The template.ini file on the SQL Server 2005 installation media provides detailed instructions for creating an .ini file. Note in particular that the first noncommented line in the .ini file must contain the string [Options]. The following example illustrates the format of an .ini file:
[Options]
USERNAME=MyName
COMPANYNAME=MyCompany
PIDKEY=ABCDE12345FGHIJ67890KLMNO
INSTALLSQLDIR="C:\Program Files\Microsoft SQL Server\"
INSTALLOLAPDATADIR="C:\Program Files\Microsoft SQL Server\MSSQL\OLAP\Data"
ADDLOCAL=SQL_Engine,Analysis_Server,RS_Server...
INSTANCENAME=MyInstance
...
For more information about specifying SQL Server 2005 Setup parameters by using an .ini file, see the template.ini file in the root folder of the SQL Server 2005 installation media.
Note
For local installations, you must run Setup as an administrator. If you install SQL Server from a remote share, you must use a domain account that has read and execute permissions on the remote share. For failover cluster installations, you must be a local administrator with permissions to logon as a service, and to act as part of the operating system on all nodes of the virtual server.
Use the following sample scripts to install, update, or remove SQL Server 2005 components from the command prompt. The scripts provide command prompt syntax to install SQL Server 2005 in typical user scenarios. Test and modify samples to meet the needs of your organization.
Sample scripts are divided into the following categories:
- Installation scripts
- Maintenance scripts
- Uninstall scripts
For detailed information about specific parameters for installing from command prompt, see Parameters.
Installation Scripts
Test and modify the following installation scripts to meet the needs of your organization.
To install a new, stand-alone instance with all SQL Server 2005 components
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
Start /wait <CD or DVD Drive>\servers\setup.exe /qb INSTANCENAME=<InstanceName> ADDLOCAL=All PIDKEY=<pidkey value with no "-"> SAPWD=<StrongPassword> SQLACCOUNT=<domain\user> SQLPASSWORD=<DomainUserPassword> AGTACCOUNT=<domain\user> AGTPASSWORD=<DomainUserPassword> SQLBROWSERACCOUNT=<domain\user> SQLBROWSERPASSWORD=<DomainUserPassword>
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The /qn switch suppresses all Setup dialog boxes and error messages. If the /qn switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files9d77af64-9084-4375-908a-d90f99535062.
The /qb switch allows the display of basic Setup dialog boxes. Error messages are also displayed.
To install a new, stand-alone instance with instance-unaware components of SQL Server 2005 - Notification Services, Integration Services, Full-Text Search, SQLXML, and Replication
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
Start /wait <CD or DVD Drive>\servers\setup.exe /qb ADDLOCAL=Client_components,Connectivity,SQLXML PIDKEY=<pidkey value with no "-"> SAPWD=<StrongPassword>
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.The
/qb
switch allows the display of basic Setup dialog boxes. Error messages are also displayed.
To install SQL Server 2005 Client Tools only
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
Start /wait <CD or DVD Drive>\servers\setup.exe /qb INSTANCENAME=<InstanceName> ADDLOCAL=SQL_DTS,Client_Components,Connectivity,SQL_Tools90,SQL_WarehouseDevWorkbench,SQLXML,Tools_Legacy,SQL_Documentation,SQL_BooksOnline PIDKEY=<pidkey value with no "-"> SAPWD=<StrongPassword>
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.
To install SQL Server 2005 connectivity and SQLXML components
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
Start /wait <CD or DVD Drive>\servers\setup.exe /qb ADDLOCAL=Client_Components,Connectivity,SQLXML PIDKEY=<pidkey value with no "-"> SAPWD=<StrongPassword>
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.
To upgrade a SQL Server instance to SQL Server 2005
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait setup.exe /qn INSTANCENAME=<Instancename> UPGRADE=SQL_Engine ADMINPASSWORD=<Strongpassword> SAPWD=<strongpassword> SQLACCOUNT=<domain\user> SQLPASSWORD=<domainuserpassword> AGTACCOUNT=<domain\user> AGTPASSWORD=<domainuserpassword> SQLBROWSERACCOUNT=<domain\user> SQLBROWSERPASSWORD=<domainuserpassword>
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.
To install a new, clustered instance of SQL Server 2005 from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
For a new failover cluster, use the following syntax to install SQL Server Database Services and management tools:
Start /wait <CD or DVD Drive>\servers\setup.exe /qn VS=<VSName> INSTALLVS=SQL_Engine INSTANCENAME=<InstanceName> ADDLOCAL=SQL_Engine,Client_Components PIDKEY=<pidkey value with no "-"> ADDNODE=<NodeName1,NodeName2> GROUP=<Diskgroup> IP=<IP,Networkname> ADMINPASSWORD=<StrongPassword> SAPWD=<StrongPassord> INSTALLSQLDIR=<InstallationPath> INSTALLSQLDATADIR=<ShareDrivePath> SQLACCOUNT=<domain\user> SQLPASSWORD=<DomainUserPassword> AGTACCOUNT=<domain\user> AGTPASSWORD=<DomainUserPassword> SQLBROWSERACCOUNT=<domain\user> SQLBROWSERPASSWORD=<DomainUserPassword> SQLCLUSTERGROUP="MyDomain\MySQLDomainGroup" AGTCLUSTERGROUP="MyDomain\MyAGTDomainGroup" FTSCLUSTERGROUP="MyDomain\MyFTSDomainGroup" ERRORREPORTING=1, SQMREPORTING=1 SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS
Important
Do not use a blank password. Use a strong password.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.The
/qb
switch allows the display of basic Setup dialog boxes. Error messages are also displayed.
To upgrade a SQL Server failover cluster to SQL Server 2005
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait setup.exe /qn VS=<VSNAME> INSTALLVS=SQL_Engine INSTANCENAME=<Instancename> UPGRADE=SQL_Engine ADDNODE=<NodeName1,NodeName2> GROUP=<Diskgroup> ADMINPASSWORD=<Strongpassword> SAPWD=<strongpassword> SQLACCOUNT=<domain\user> SQLPASSWORD=<domainuserpassword> AGTACCOUNT=<domain\user> AGTPASSWORD=<domainuserpassword> SQLBROWSERACCOUNT=<domain\user> SQLBROWSERPASSWORD=<domainuserpassword> SQLCLUSTERGROUP="MYDOMIAN\MYSQLDOMAINGROUP" AGTCLUSTERGROUP="MYDOMIAN\MYAGTDOMAINGROUP" FTSCLUSTERGROUP="MYDOMIAN\MYFTSDOMAINGROUP"
Important
Do not use a blank password. Use a strong password.
Note
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a named instance, specify the instance name. For instance naming guidelines, see Instance Name.
Important
Installations from CD media are split into \servers and \tools folders. Installations from CD must specify the \servers or \tools folder in the path to Setup.exe. Installations from DVD media are on a single disk. Installations from DVD should not include the \servers or \tools folder in the path to Setup.exe.
The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.
Return to top.
Maintenance Scripts
Test and modify the following maintenance scripts to meet the needs of your organization.
To add components to an existing, stand-alone instance of SQL Server 2005 from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
To add Full-Text Search and remove Replication, use the following syntax:
Start /wait <CD or DVD Drive>setup.exe /qb INSTANCENAME=<InstanceName> ADDLOCAL=SQL_FullText REMOVE=SQL_Replication
For the default instance, specify "MSSQLSERVER" for <InstanceName>. For a complete list of parameters, see Parameters below.
To add components to an existing, SQL Server 2005 cluster from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
To add Analysis Services to an existing cluster, use the following syntax:
start /wait <CD or DVD Drive>\setup.exe /qn VS=<VSName> INSTALLVS=Analysis_Server INSTANCENAME=<InstanceName> ADDLOCAL=Analysis_Server ADDNODE=n GROUP=<NotSQLDiskGroup> IP=<IP,Networkname> ADMINPASSWORD=<StrongPassword> SAPWD=<StrongPassword> INSTALLSQLDIR=<InstallationPath> INSTALLSQLDATADIR=<ShareDrivePath> ASACCOUNT=<domain\user> ASPASSWORD=<DomainUserPassword> SQLBROWSERACCOUNT=<domain\user> SQLBROWSERPASSWORD=<DomainUserPassword> SQLREPORTING=1
Note
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.
For a complete list of parameters, see Parameters below.
To add nodes to an existing SQL Server 2005 cluster from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Use the following syntax:
start /wait <CD or DVD Drive>\setup.exe /qn VS=<VSName> INSTALLVS=SQL_Engine INSTANCENAME=<InstanceName> ADMINPASSWORD=<StrongPassword> ADDNODE=<NodeName>
Important
Do not use a blank password. Use a strong password.
For the default instance, specify "MSSQLSERVER" for <InstanceName>.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows the display of basic Setup dialog boxes. Error messages are also displayed.
To remove nodes from an existing SQL Server 2005 cluster from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Use the following syntax:
start /wait <CD or DVD Drive>\setup.exe /qn VS=<VSName> INSTALLVS=SQL_Engine INSTANCENAME=<InstanceName> ADMINPASSWORD=<StrongPassword> REMOVENODE=<NodeName>
Important
Do not use a blank password. Use a strong password.
For the default instance, specify "MSSQLSERVER" for <InstanceName>.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.Warning
If Microsoft SQL Server 2000 and SQL Server 2005 are installed side-by-side in a clustered environment, Microsoft SQL Native Client should not be uninstalled if you uninstall SQL Server 2005. The SQL Server Resource DLL from SQL Server 2005 always uses SQL Native Client to connect to SQL Server. When SQL Server 2005 is installed, the SQL Server Cluster Resource DLL is upgraded. When SQL Server 2005 is uninstalled, the SQL Server Resource DLL is not replaced with the version required by SQL Server 2000. Leaving SQL Native Client on cluster nodes allows the SQL Server Resource DLL to continue to connect to instances of SQL Server 2000.
Rebuilding System Databases, Rebuilding the Registry
REINSTALLMODE is used to repair installed SQL Server 2005 components. For additional information about use of REINSTALLMODE, see the [REINSTALLMODE] and [REBUILDDATABASE] sections below.
To rebuild system databases for a default instance of SQL Server 2005 from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Use the following syntax:
start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=<NewStrongPassword>
Important
Do not use a blank password. Use a strong password.
For the default instance, specify "MSSQLSERVER" for <InstanceName>.
Important The resource database (mssqlsystemresource) is restored from SQL Server 2005 distribution media. When you rebuild the resource database from distribution media, all Service Packs and QFE updates are lost, and therefore must be reapplied. Before you proceed, see [REBUILDDATABASE] for more information.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.Rebuilding the master database installs all system databases to their initial location. If you have moved one or more system databases to a different location, you must move the databases again. For more information about moving system databases, see Moving System Databases.
To rebuild system databases for a clustered instance of SQL Server 2005 from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Use the following syntax:
start /wait <CD or DVD Drive>\setup.exe /qn VS=<VSName> INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 ADMINPASSWORD=<StrongPassword> SAPWD=<NewStrongPassword> SQLCOLLATION=<NewSystemCollation> SQLACCOUNT=<domain\user> SQLPASSWORD=<DomainUserPassword> AGTACCOUNT=<domain\user> AGTPASSWORD=<DomainUserPassword>
Important
Do not use a blank password. Use a strong password.
For the default instance, specify "MSSQLSERVER" for <InstanceName>.
Important The resource database (mssqlsystemresource) is restored from SQL Server 2005 distribution media. When you rebuild the resource database from distribution media, all Service Packs and QFE updates are lost, and therefore must be reapplied. Before you proceed, see [REBUILDDATABASE] for more information.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.Rebuilding the master database installs all system databases to their initial location. If you have moved one or more system databases to a different location, you must move the databases again. For more information about moving system databases, see Moving System Databases.
Specifying a New System Collation
Collation settings, which include character set, sort order, and other locale-specific settings, are fundamental to the structure and function of all SQL Server databases. You should develop a standard within your organization for these options, and apply them at the time of installation. Many server-to-server activities can fail if collation settings are not consistent across servers.
When installing SQL Server 2005, use the correct collation settings. You can change collation settings after running Setup, but you must rebuild the system and user databases and reload user data if you do.
To change collation settings for an existing instance of SQL Server 2005, you must use unattended Setup to rebuild the system databases. This functionality is exposed using a special switch called REBUILDDATABASE=1. When system databases are rebuilt, all database objects and data in master, model and msdb system databases are removed. Rebuilding the master database installs all system databases to their initial location. If you have moved one or more system databases to a different location, you must move the databases again. For more information about moving system databases, see Moving System Databases.
Your syntax must specify either the /qb
or /qn
option. The /qb
option displays basic Setup user interface and error message dialog boxes. If the /qn
option is specified, all Setup dialog boxes, including error messages, are written to Setup log files.
Important
In order to rebuild system databases, a new System Administrator (sa) password is REQUIRED. Do not use a blank password. Use a strong password.
To rebuild system databases and specify a new system collation
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait <CD or DVD Drive>\setup.exe /qn INSTANCENAME=MSSQLSERVER REINSTALL=SQL_Engine REBUILDDATABASE=1 SAPWD=<NewStrongPassword> SQLCOLLATION=<NewSystemCollation>
For INSTANCENAME, use MSSQLSERVER for a default instance. For a named instance, specify the instance name.
Important
The resource database (mssqlsystemresource) is restored from SQL Server 2005 distribution media. When you rebuild the resource database from distribution media, all service packs and hotfix updates are lost, and therefore must be reapplied. Before you proceed, see the [REBUILDDATABASE] section for more information.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.Rebuilding the master database installs all system databases to their initial location. If you have moved one or more system databases to a different location, you must move the databases again. For more information about moving system databases, see Moving System Databases.
Rebuilding the Registry
To rebuild the SQL Server 2005 registry, you must use the Setup command with the REINSTALL=ALL and REINSTALLMODE=omus parameters. Running Setup.exe with these parameter settings rebuild, verify, and repair a SQL Server instance and rebuild the registry. This procedure is most often used to rebuild the registry for a damaged SQL Server installation.
Note
To rebuild the registry, you must use the same package file and options that you specified during the initial installation. If you do not know this information, uninstall and then reinstall SQL Server, rather than rebuild the registry.
Your syntax must specify either the /qb
or /qn
option. The /qb
option displays basic Setup user interface and error message dialog boxes. If the /qn
option is specified, all Setup dialog boxes, including error messages, are written to Setup log files.
Important
In order to rebuild system databases, a new sa password is REQUIRED. Do not use a blank password. Use a strong password.
To repair all files, rebuild the registry, and replace all SQL Server shortcuts from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait <CD or DVD Drive>\setup.exe /qb INSTANCENAME=MSSQLSERVER REINSTALL=ALL REBUILDDATABASE=1 REINSTALLMODE=omus SAPWD=<NewStrongPassword>
For INSTANCENAME, use MSSQLSERVER for a default instance. For a named instance, specify the instance name.
Important
The resource database (mssqlsystemresource) is restored from SQL Server 2005 distribution media. When you rebuild the resource database from distribution media, all Service Packs and QFE updates are lost, and therefore must be reapplied. Before you proceed, see the [REBUILDDATABASE] section more information.
To repair SQL Server Management Studio shortcuts from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait <CD or DVD Drive>\setup.exe /qb REINSTALL=SQL_Tools90 REINSTALLMODE=S
For INSTANCENAME, use MSSQLSERVER for a default instance. For a named instance, specify the instance name.
To repair Full-Text Search Engine registry keys from the command prompt
Insert the SQL Server 2005 installation media into the disk drive.
Run the following command from the command prompt:
start /wait <CD or DVD Drive>\setup.exe /qb REINSTALL=SQL_FullText INSTANCENAME=MSSQLSERVER REINSTALLMODE=M
For INSTANCENAME, use MSSQLSERVER for a default instance. For a named instance, specify the instance name.
Return to top.
Uninstall Scripts
Test and modify the following removal scripts to meet the needs of your organization.
On a computer running SQL Server 2005 along with previous SQL Server versions, Enterprise Manager and other programs that depend on SQL-DMO may be disabled. This may occur in the following situations:
- Side-by-side installations of SQL Server 2005, SQL Server 2000, and/or SQL Server 7.0, where any of the versions is uninstalled.
- Side-by-side installations of SQL Server 2000 with SQL Server 2005, where SQL Server 2000 is installed after SQL Server 2005.
This issue is due to removal of the registration for the SQL Server 2005 SQL-DMO COM library. To re-enable Enterprise Manager and other programs with SQL-DMO dependencies, register SQL-DMO by running regsvr32.exe sqldmo.dll from a command prompt. For more information, see Troubleshooting an Installation of the SQL Server Database Engine.
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.
Uninstall Microsoft SQL Native Client, using the following syntax:
Start /wait C:\Windows\System32\msiexec /qb /X <CD or DVD Drive>\setup\sqlncli.msi
Uninstall Microsoft .NET Framework, using the following syntax:
Start /wait <CD or DVD Drive>\redist\2.0\dotnetfix.exe /q:a /c:"install /qu"
Warning
Uninstalling .NET Framework 1.1 or 2.0 affects existing Microsoft Visual Studio installations, as Visual Studio depends on the Microsoft .NET Framework. If you have Visual Studio installed, do not uninstall the .NET Framework.
To remove a default clustered instance 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 /qn VS=<VSName> INSTANCENAME=<InstanceName> REMOVE=SQL_Engine ADMINPASSWORD=<StrongPassword>
For the default instance, specify "MSSQLSERVER" for <InstanceName>.
The
/qn
switch suppresses all Setup dialog boxes and error messages. If the/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The/qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.Uninstall SQL Native Client, using the following syntax:
Start /wait <CD or DVD Drive>\msiexec /qb /X <CD or DVD Drive>\setup\sqlncli.msi
If SQL Server Setup fails to uninstall the cluster node, use the following steps:
Use the Registry Editor utility, regedit.exe, locate the registry key HLKM\Software\Microsoft\Microsoft SQL Server\<instid>\Setup, where <instid> is the specific SQL Server instance being uninstalled; for example, MSSQL.1 for the first instance and MSSQL.2 for the second instance.
Warning
Incorrectly editing the registry can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from editing the registry incorrectly can be resolved. Before editing the registry, back up any valuable data. For information about how to back up, restore, and edit the registry, see this Microsoft Knowledge Base article.
In this key, set SqlCluster=2.
Repeat the previous 2 steps to update the SqlCluster key on all nodes in the cluster.
Move the shared disk to the computer that is currently being uninstalled and, on that node, use Add or Remove Programs to remove SQL Server 2005.
Move the shared disk to the next node, and use Add or Remove Programs to remove SQL Server 2005.
Repeat this move-and-uninstall process for each remaining node.
If SQL Server 2005 is running along with previous SQL Server versions, Enterprise Manager, or other programs that depend on SQL-DMO, the previous versions may be disabled. This may occur in the following situations:
- Side-by-side installations of SQL Server 2005, SQL Server 2000, and/or SQL Server 7.0, where any of the versions are uninstalled.
- Side-by-side installations of SQL Server 2000 with SQL Server 2005, where SQL Server 2000 is installed after SQL Server 2005.
This issue is due to removal of the registration for the SQL Server 2005 SQL-DMO COM library. To re-enable Enterprise Manager and other programs with SQL-DMO dependencies, register SQL-DMO by running regsvr32.exe sqldmo.dll from a command prompt. For more information, see Troubleshooting an Installation of the SQL Server Database Engine.
If SQL Server 2000 and SQL Server 2005 are installed side-by-side in a clustered environment, SQL Native Client should not be uninstalled if you uninstall SQL Server 2005. The SQL Server Resource DLL from SQL Server 2005 always uses SQL Native Client to connect to SQL Server. When SQL Server 2005 is installed, the SQL Server Cluster Resource DLL is upgraded. When SQL Server 2005 is uninstalled, the SQL Server Resource DLL is not replaced with the version required by SQL Server 2000. Leaving SQL Native Client on cluster nodes allows the SQL Server Resource DLL to continue to connect to instances of SQL Server 2000.
To run a command prompt installation of SQL Server 2005 using an .ini file
Run Setup.exe from the command prompt:
An example command for an installation that references an .ini file would look like this:
<CD or DVD Drive>\Setup.exe /settings C:/set.ini /qn
where the Setup.exe command is followed by the /settings switch that specifies the name of an .ini file containing installation parameters, followed by the
/qn
switch to suppress the Setup user interface. In this example, the "C:\set.ini" file is a text file that contains the installation parameters.If the
/qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about parameters for an .ini file, refer to the content that follows this section. For more information about Setup log file locations, see How to: View SQL Server 2005 Setup Log Files.
Return to top.
Parameters
You can use the parameters listed in the table below to develop command prompt installation scripts.
[Options] |
[PIDKEY] |
[INSTALLSQLDIR] |
[INSTALLSQLSHAREDDIR] |
[INSTALLSQLDATADIR] |
[INSTALLASDATADIR] |
[ADDLOCAL] |
[REMOVE] |
[INSTANCENAME] |
[UPGRADE] |
[SAVESYSDB] |
[USESYSDB] |
[SQLACCOUNT], [SQLPASSWORD], [AGTACCOUNT], [AGTPASSWORD], [ASACCOUNT], [ASPASSWORD], [RSACCOUNT], and [RSPASSWORD] |
[AUTOSTART] |
[SECURITYMODE] and [SAPWD] |
[SQLCOLLATION] and [ASCOLLATION] |
[REBUILDDATABASE] |
[REINSTALLMODE] |
[RSCONFIGURATION] |
[SAMPLEDATABASESERVER] |
[DISABLENETWORKPROTOCOLS] |
[ERRORREPORTING] |
[SKUUPGRADE] |
[PASSIVE] |
For detailed information about each parameter, see the parameter descriptions below.
To install from a command prompt on a cluster, see Parameters Required for Cluster Installation.
Return to top.
[Options]
The [Options] line is REQUIRED when using a settings (.ini) file. This is information for the Registration Information dialog box.
Default: If these parameters are not specified, the default user name and company name values for the server are used.
Note
If names contain spaces, surround the names with quotes.
USERNAME=
COMPANYNAME=
[PIDKEY]
For the SQL Server 2005 milestones, the PIDKEY property is not required, because the parameter for the MSI file is preset. However, the final released version of the SQL Server 2005 requires the PIDKEY property.
Usage: PIDKEY=ABCDE12345FGHIJ67890KLMNO.
Note
This is not an actual key value.
Notes
- PIDKEY cannot be used for SQL Server Express installations.
- Do not include "-" in the PIDKEY.
PIDKEY=
[INSTALLSQLDIR]
This is information for the Feature Selection dialog box. To use the default paths, do not specify this parameter.
Note
If there is a space in a specified path, surround the path with quotes, and end every path with a trailing backslash ().
Usage: INSTALLSQLDIR specifies the location for the instance specific binary files. The default location is: \Program Files\Microsoft SQL Server\.
Important
INSTALLSQLDIR is REQUIRED for clustered installations and must point to a local drive for which the drive letter exists on all nodes in the cluster definition.
INSTALLSQLDIR=
For more information about installation directories, see File Locations for Default and Named Instances of SQL Server 2005.
[INSTALLSQLSHAREDDIR]
The INSTALLSQLSHAREDDIR parameter specifies a custom location for Integration Services, Notification Services, and Workstation components. In the example: Setup.exe <options> INSTALLSQLSHAREDDIR="<InstallDir>", the installation paths are:
- <InstallDir>\90\DTS\
- <InstallDir>\90\Notification\
- <InstallDir>\90\Tools\
INSTALLSQLSHAREDDIR=
For more information about installation directories, see File Locations for Default and Named Instances of SQL Server 2005.
[INSTALLSQLDATADIR]
INSTALLSQLDATADIR specifies the location for the SQL Server data files. The default location is the under the INSTALLSQLDIR location.
Important
INSTALLSQLDATADIR is REQUIRED for clustered installations and must point to a shared drive which is a member of the cluster group specified for installation.
INSTALLSQLDATADIR=
For more information about installation directories, see File Locations for Default and Named Instances of SQL Server 2005.
[INSTALLASDATADIR]
Usage: INSTALLASDATADIR specifies the location for the Analysis Services Data Files. The default location is: INSTALLSQLDIR\Data\.
Note
Do not use this parameter with a SQL Server Express installation.
If Analysis Services is already installed on the computer, this parameter is ignored.
INSTALLASDATADIR=
For more information about installation directories, see File Locations for Default and Named Instances of SQL Server 2005.
[ADDLOCAL]
Usage: ADDLOCAL specifies which components to install. If ADDLOCAL is not specified, Setup fails.
To install all components specify 'ADDLOCAL=All' from the command prompt.
ADDLOCAL Rules:
- Feature names are case sensitive.
- To use ADDLOCAL, provide a comma-delimited list with no spaces between the features to install. For example, to install everything except Analysis Services and Reporting Services components, the list would be as follows:
- ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_FullText,Notification_Services,NS_Engine,NS_Client,SQL_DTS,Client_Components,Connectivity,SQL_Tools90,SDK,SQL_Documentation,SQL_BooksOnline,SQL_Samples,SQL_AdventureWorksSamples,SQL_AdventureWorksDWSamples,SQL_AnalysisServiceSamples,SQL_Samples
- Selecting a parent feature only installs the parent feature, not the parent and the child. Installing the child feature automatically installs the parent and the child features. Removing the parent feature removes both the parent and the child feature.
- You can also use ADDLOCAL to add components in maintenance mode. For example, after performing the installation shown above, you could add Analysis Services by specifying the following:
- ADDLOCAL=Analysis_Server,AnalysisDataFiles,AnalysisSharedTools,Client_Components,Connectivity
The following table shows parent/child feature relationships and their ADDLOCAL requirements for X86, IA64, and AMD64 installations of SQL Server 2005 Enterprise Edition, Developer Edition, Evaluation Edition, and Standard Edition.
SQL Server 2005 feature | Parent feature name | Child feature name |
---|---|---|
SQL Server Database Services |
SQL_Engine |
|
SQL Server data files |
|
SQL_Data_Files |
Replication |
|
SQL_Replication |
Full-Text Search Engine |
|
SQL_FullText |
|
|
|
Analysis Services |
Analysis_Server |
|
Analysis Services data files |
|
AnalysisDataFiles |
|
|
|
Reporting Services |
RS_Server |
|
Report Manager |
|
RS_Web_Interface |
|
|
|
Notification Services |
Notification_Services |
|
Notification Services engine components |
|
NS_Engine |
Notification Services client components |
|
NS_Client |
|
|
|
Integration Services |
|
SQL_DTS |
|
|
|
Client Components |
Client_Components |
|
Connectivity Components |
|
Connectivity |
Management Tools |
|
SQL_Tools90 |
Business Intelligence Development Studio |
|
SQL_WarehouseDevWorkbench |
Software Development Kit |
|
SDK |
SQLXML Client Features |
|
SQLXML |
Legacy components: Data Transformation Services 2000 Runtime and DMO |
|
Tools_Legacy |
Documentation and Samples |
|
SQL_Documentation |
SQL Server Books Online |
|
SQL_BooksOnline |
Sample databases |
|
SQL_DatabaseSamples |
AdventureWorks sample OLTP |
|
SQL_AdventureWorksSamples |
AdventureWorks sample data warehouse |
|
SQL_AdventureWorksDWSamples |
AdventureWorks sample OLAP |
|
SQL_AdventureWorksASSamples |
Samples |
|
SQL_Samples |
ADDLOCAL=
The following table shows parent/child feature relationships and their ADDLOCAL requirements for X86, IA64, and AMD64 installations of SQL Server 2005 Workgroup Edition.
SQL Server 2005 Workgroup feature | Parent feature name | Child feature name |
---|---|---|
SQL Server Database Services |
SQL_Engine |
|
SQL Server data files |
|
SQL_Data_Files |
Replication |
|
SQL_Replication |
Full-Text Search Engine |
|
SQL_FullText |
|
|
|
Integration Services |
|
SQL_DTS |
|
|
|
Client Components |
Client_Components |
|
Connectivity Components |
|
Connectivity |
Management Tools |
|
SQL_Tools90 |
Software Development Kit |
|
SDK |
SQLXML Client Features |
|
SQLXML |
Legacy components: Data Transformation Services 2000 Runtime and DMO |
|
Tools_Legacy |
Documentation and Samples |
|
SQL_Documentation |
SQL Server Books Online |
|
SQL_BooksOnline |
Sample databases |
|
SQL_DatabaseSamples |
AdventureWorks sample OLTP |
|
SQL_AdventureWorksSamples |
AdventureWorks sample data warehouse |
|
SQL_AdventureWorksDWSamples |
AdventureWorks sample OLAP |
|
SQL_AdventureWorksASSamples |
Samples |
|
SQL_Samples |
ADDLOCAL=
The following table shows parent/child feature relationships and their ADDLOCAL requirements for X86, IA64, and AMD64 installations of SQL Server 2005 Express Edition.
SQL Server 2005 Express feature | Parent feature name | Child feature name |
---|---|---|
SQL Server Database Services |
SQL_Engine |
|
SQL Server data files |
|
SQL_Data_Files |
Replication |
|
SQL_Replication |
|
|
|
Client Components |
Client_Components |
|
Connectivity Components |
|
Connectivity |
Software Development Kit |
|
SDK |
ADDLOCAL=
[REMOVE]
The REMOVE parameter specifies which components to uninstall, like SQL Server, Reporting Services, or Analysis Services. This command must be used in conjunction with the INSTANCENAME parameter. For example, to remove the instance aware component AND any non-instance aware components, such as Client_Components, you would specify the following:
REMOVE=All INSTANCENAME=MSSQLSERVER
Important
Do not use this parameter if you have several instances installed and you still want to use client tools.
To remove all non-instance aware components, such as Client_Components and SQL_DTS, specify REMOVE=ALL without reference to the instance name.
When REMOVE is specified for a new installation, components listed after 'REMOVE=' are not included for installation. For example, to install every component except for Reporting Services components during a new installation specify the following:- ADDLOCAL=All REMOVE=RS_Server,RS_Web_Interface
REMOVE can also be used during maintenance to remove components from an existing installation. For example, to remove Full-Text Search, specify the following:
REMOVE=SQL_FullText
Important
Removing the parent feature removes both the parent and the child feature.
REMOVE=
[INSTANCENAME]
This is information for the Instance Name dialog box. The INSTANCENAME parameter is REQUIRED for instance-aware components. For a default instance, use MSSQLSERVER. For shared, instance-unaware components -- Notification Services, Integration Services, and client components -- this parameter can be omitted.
INSTANCENAME=
[UPGRADE]
The UPGRADE parameter specifies which product to upgrade. The allowed value is SQL_Engine to upgrade SQL Server. If the UPGRADE option is specified, the INSTANCENAME parameter is REQUIRED to define the instance to upgrade. For example, to upgrade a default instance of SQL Server, use the following command line:
- UPGRADE=SQL_Engine INSTANCENAME=MSSQLSERVER
To upgrade a named instance of SQL Server in which the SQL Server is running under a domain account, and you would like to add the client components and tools, run this command:
UPGRADE=SQL_Engine INSTANCENAME**=**<InstanceName> SQLACCOUNT=<domainname>\<accountname> SQLPASSWORD=<StrongPassword> ADDLOCAL=Client_Components
UPGRADE=
[SAVESYSDB]
The SAVESYSDB parameter can be used during uninstall to specify not to delete system databases. If SAVESYSDB is set to 1, the system databases are left in the SQL data directory. This option is typically used in cases where a future upgrade is planned.
SAVESYSDB=
[USESYSDB]
The USESYSDB parameter specifies the root path to the data directory of the system databases during upgrade. For example, if the database was installed to D:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA the usesysdb parameter should be USESYSDB="D:\Microsoft SQL Server\MSSQL.1\MSSQL".
If you set an installation path for the Database Engine feature, SQL Server Setup uses that path as the root directory for all instance-specific folders for that installation, including SQL Server data files. In this case, if you set the root to "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\," instance-specific directories are appended to that path.
Customers choosing to use the USESYSDB upgrade functionality can easily lead themselves into a situation where the product gets installed into a recursive folder structure - for example, <SQLProgramFiles>\MSSQL.1\MSSQL\MSSQL.1\MSSQL\Data\. Instead, to use the USESYSDB feature, set an installation path for the SQL Server data files instead of the Database Engine feature.
Note
Data files are always expected to be found in a child directory named "Data." For example, specify "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL" to specify the root path to the data directory of the system databases during upgrade when data files are found under "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data."
Important
When using USESYSDB to install SQL Server 2005 with a set of data files from a previous installation, make sure that the .MDF and .LDF files for system databases are in the same directory.
USESYSDB=
[SQLACCOUNT], [SQLPASSWORD], [AGTACCOUNT], [AGTPASSWORD], [ASACCOUNT], [ASPASSWORD], [RSACCOUNT], and [RSPASSWORD]
This is information for the Service Accounts dialog box. These parameters are required for both stand-alone and virtual server installations. If these parameters are not specified, Setup will fail.
If these parameters are not specified for installations of SQL Server Express Edition, Setup will default to a specific built in machine account depending on the underlying Operating System:
- For Windows XP and Windows 2003, the default service account will be NetworkService (NT AUTHORITY).
- For Windows 2000, the default service account is LocalSystem (NT AUTHORITY\SYSTEM).
If you would like SQL Express to be installed with a specific account, it is recommended that you do not use the default settings. Instead, use the *ACCOUNT settings and make sure to specify the DOMAIN\user name - e.g., SQLACCOUNT=DOMAINNAME\ACCOUNT.
Note
By default, the services for SQL Server and Analysis Services are set to auto-start.
To use the *ACCOUNT settings, make sure to specify the DOMAIN, e.g., SQLACCOUNT=DOMAINNAME\ACCOUNT.
Important
SQLACCOUNT, SQLPASSWORD, AGTACCOUNT, and AGTPASSWORD are required for Virtual Server installations. ASACCOUNT and ASPASSWORD cannot be used with Virtual Server installations.
SQLACCOUNT=
SQLPASSWORD=
AGTACCOUNT=
AGTPASSWORD=
ASACCOUNT=
ASPASSWORD=
RSACCOUNT=
RSPASSWORD=
[AUTOSTART]
To use the *AUTOSTART parameter, specify 1 to start automatically or 0 to start manually. If you decide to start SQL Server Agent automatically, then SQL is also started automatically. The default values for these parameters are specified below.
SQLAUTOSTART=1
AGTAUTOSTART=0
ASAUTOSTART=1
RSAUTOSTART=1
[SECURITYMODE] and [SAPWD]
This is information for the Authentication Mode dialog box. To use Mixed Mode Authentication, use SECURITYMODE=SQL. If SECURITYMODE=SQL is not specified, then Windows Authentication only is used.
Important
When possible, use Windows Authentication.
To set the sa password specify SAPWD. A strong sa password is required by SQL Server Setup.
Important
Do not use a blank password. Use a strong password. SECURITYMODE=SQL
SAPWD=
For more information about strong password guidelines, see Authentication Mode.
[SQLCOLLATION] and [ASCOLLATION]
This is information for the Collation Settings dialog box. The SQLCOLLATION parameter sets the SQL Server collation, and the ASCOLLATION parameter sets the Analysis Services collation.
SQLCOLLATION=
ASCOLLATION=
For more information about collation settings, see Collation Settings in Setup, Windows Collation Sorting Styles, and Using Binary Collations.
[REBUILDDATABASE]
This is information for rebuilding system databases. When system databases are corrupted, or to reset the system collation, they must be brought back to the state to which they were when originally installed. This functionality is exposed using the REBUILDDATABASE parameter, specifying REBUILDDATABASE=1. Additional parameters required when using REBUILDDATABASE include:
- SQLACCOUNT, SQLPASSWORD
- SQLAGTACCOUNT, SQLAGTPASSWORD
- SQLBROWSERACCOUNT, SQLBROWSERPASSWORD
Implications of rebuilding the master database
Rebuilding the master database reverts all of the system databases to their original content and attributes.
After rebuilding the master database
After rebuilding master, you must:
Restore your most recent full backups of the master, model, and msdb databases. If a backup is not available, go on to Step 2.
If a restored backup of a database is not current, re-create any missing entries. For example, in the master database, re-create all missing entries for your user databases, backup devices, SQL Server logins, endpoints, and so forth. The best way to re-create entries is to run the original scripts that were used to create those entries, if available.
Security Note: We recommend that you secure your scripts to prevent their content from being altered by unauthorized individuals. We also recommend that when you finish updating a database, you back it up. For more information, see the topics for Considerations for Backing Up the master Database and Considerations for Backing Up the model and msdb Databases in SQL Server Books Online.
If the server instance is configured as a replication Distributor, you must restore the distribution database. For more information, see the topic for Backing Up and Restoring Replicated Databases in SQL Server 2005 Book Online.
In SQL Server, system objects are stored in the resource database. This database is updated whenever a SQL Server update is applied to the SQL Server executable, sqlservr.exe. After rebuilding the master database, you must reapply any SQL Server updates that you have previously applied to the server instance. For more information, see the topic for Resource Database in SQL Server Books Online.
Important
Do not include the mssqlsystemresource.mdf file - the resource database - in regular database backup and restore processes. It contains neither data nor metadata; it contains code. By default, SQL Server backup and restore components automatically omit the resource database.
Rebuilding the master database installs all system databases to their initial location. If you have moved one or more system databases to a different location, you must move the databases again. For more information about moving system databases, see Moving System Databases.
Note
The REBUILDDATABASE option is only available in unattended setup. Either the /qn
or /qb
option must be used. The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The /qb
switch allows the display of basic Setup dialog boxes. Error messages are also displayed.
Important
In order to rebuild system databases, a new sa password is REQUIRED.
REBUILDDATABASE=
[REINSTALLMODE]
This is information for repairing installed components. When using REINSTALLMODE, you are required to specify a REINSTALL parameter. REINSTALL parameters use the same values as ADDLOCAL parameters.
Note
The REINSTALLMODE option is only available in unattended Setup and either the /qn
or /qb
option must be used. The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files. The /qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed.
The supported values for REINSTALLMODE are:
- O - Reinstall if the file is missing or if it is an older version
- M - Rewrite machine-specific registry keys under HKLM
- U - Rewrite user-specific registry keys under HKCU
- S - Reinstall all shortcuts
REINSTALLMODE=
[RSCONFIGURATION]
This is information for the Reporting Services Configuration dialog box. This parameter should be specified when Reporting Services or Report Manager features are being installed, and can be either FilesOnly or Default. The FilesOnly option only installs the files without actually configuring the reporting service. The Default option installs the Reporting Services using the default options.
RSCONFIGURATION=
For more information, see Report Server Installation Options.
[SAMPLEDATABASESERVER]
This is information for the Sample Databases dialog box. This parameter is used when AdventureWorks Samples or AdventureWorksDW Samples features are being installed.
Sample databases can be attached to any existing local SQL Server instance that is the same version as the sample databases. The parameter specifies the machine and instance names to which the samples should be attached, as follows:
- SAMPLEDATABASESERVER - MachineName\InstanceName
SAMPLEDATABASESERVER=
[DISABLENETWORKPROTOCOLS]
This parameter is used for setting the startup type of the network protocols. It has the following 3 options:
- 0 - Shared memory = On, Named Pipes = On, TCP/IP = On
- 1 - Shared memory = On, Named Pipes = Off (local only), TCP/IP = Off
- 2 - Shared memory = On, Named Pipes = Off (local only), TCP/IP = On
DISABLENETWORKPROTOCOLS=
[ERRORREPORTING]
This is information for the Error Reporting dialog box. If you enable this feature, SQL Server and its components, and Analysis Services are configured to automatically send a report to Microsoft if a fatal error occurs in the SQL Server Database Engine, SQL Server Agent, or Analysis Services. Microsoft uses error reports to improve SQL Server functionality, and treats all information as confidential.
To enable error reporting specify ERRORREPORTING=1. If ERRORREPORTING=1 is not specified, the Error Reporting feature is disabled.
ERRORREPORTING=
[SKUUPGRADE]
Use the SKUUPGRADE parameter when upgrading from one edition of SQL Server to another edition of SQL Server.
Important
If you use the SKUUPGRADE parameter, Setup will remove all hotfix and service pack updates from the SQL Server instance being upgraded. Once the edition upgrade is complete, you must reapply all hotfix and service pack updates.
To perform an edition upgrade of a default instance of SQL Server (SQL Engine only) via unattended Setup, run the following command using either /qb or /qn:
start /wait setup.exe ADDLOCAL=SQL_Engine INSTANCENAME=MSSQLSERVER UPGRADE=SQL_Engine SKUUPGRADE=1 /qb
SKUUPGRADE=
[PASSIVE]
Use the PASSIVE parameter to patch a passive node on a failover cluster instance without causing the instance to fail over. When this parameter is included in an installation command, hotfix.exe will pass "Passive=1" to the following MSP packages: SQL Server, Analysis Services, Reporting Services, and Integration Services.
PASSIVE=
Parameters Required for Cluster Installations
Note
To run a cluster installation, you must be on a cluster and specify /qn
or /qb
in the command line. The /qn
switch suppresses all Setup dialog boxes and error messages. If the /qn
switch is specified, all Setup messages, including error messages, are written to Setup log files. For more information about log files, see How to: View SQL Server 2005 Setup Log Files.
The /qb
switch allows display of basic Setup dialog boxes. Error messages are also displayed. For more information about failover clustering, see Configuring High Availability and Before Installing Failover Clustering.
The following parameters are required for cluster installations from command prompt.
[INSTALLSQLDIR] |
[INSTALLSQLDATADIR] |
[SQLACCOUNT], [SQLPASSWORD], [AGTACCOUNT], and [AGTPASSWORD] |
[INSTANCENAME] |
[SAPWD] |
[VS] |
[INSTALLVS] |
[IP] |
[GROUP] |
[ADDNODE] |
[REMOVENODE] |
[SQLCLUSTERGROUP] and [AGTCLUSTERGROUP] |
[ADMINPASSWORD] |
[SKUUPGRADE] |
|
[INSTALLSQLDIR]
This parameter is required for failover cluster installations. The drive letter must exist on both machines.
INSTALLSQLDIR=
[INSTALLSQLDATADIR]
This parameter is required for failover cluster installations. The shared drive letter must exist in the disk group used in the GROUP parameters.
INSTALLSQLDATADIR
[SQLACCOUNT], [SQLPASSWORD], [AGTACCOUNT], and [AGTPASSWORD]
These parameters are required for failover cluster installations.
SQLACCOUNT=
SQLPASSWORD=
AGTACCOUNT=
AGTPASSWORD=
[INSTANCENAME]
This parameter is required for failover cluster installations. For a default instance use MSSQLSERVER. For more information about instance naming rules, see Instance Name.
INSTANCENAME=
[SAPWD]
This parameter is required for failover cluster installations.
Important
Do not use a blank password. Use a strong password.
SAPWD=
For more information about strong password guidelines, see Authentication Mode.
[VS]
This parameter is required for failover cluster installations. This parameter is used to specify the name of the virtual server. The name cannot exceed 15 characters and follows the same rules as for a computer name.
VS=
[INSTALLVS]
This parameter is required for failover cluster installations. Specify the server to be installed as a cluster. Use "SQL_Engine" for SQL Server and "Analysis_Server" for Analysis Services.
INSTALLVS=
[IP]
This parameter is required for failover cluster installations. Specify the IP addresses, providing one entry for each network adapter.
- Format: "IP address,network"
- Example: IP="xxx.xxx.xxx.xxx,Local Area Connection"
IP=
[GROUP]
This parameter is required for failover cluster installations. Specify the Cluster group, the group that contains the disk to which the shared data files are to be written, containing SQL Server resources.
- Example: GROUP="Group 2"
GROUP=
[ADDNODE]
This parameter is required for failover cluster installations. Specify the nodes for your virtual server. The nodes must exist in the cluster. You can also use this parameter to add nodes to an existing cluster.
ADDNODE=
[REMOVENODE]
This parameter is required only for cluster maintenance. Use this option to remove nodes from an existing cluster.
REMOVENODE=
[SQLCLUSTERGROUP] and [AGTCLUSTERGROUP]
These parameters are required for failover cluster installations. In order to install a failover cluster, you must specify a global or local domain and group name in the format <DomainName>\<GroupName> that exist at the time Setup is run. SQL Server Setup will not create groups for you as part of installation. For more information, see Domain Groups for Clustered Services.
SQLCLUSTERGROUP=
AGTCLUSTERGROUP=
[ADMINPASSWORD]
This parameter is required for failover cluster installations. Specify the password for the logged-on user account. The specified account must be an administrator on all remote cluster nodes.
ADMINPASSWORD=
See Also
Tasks
How to: Install SQL Server 2005 (Setup)
Concepts
How to: View SQL Server 2005 Setup Log Files