Friday, May 6, 2011

Installing SQL Server Service Pack Silently

Upgrading SQL Server to the latest Cumulative Update or applying the next Service Pack in turn is the task all SQL Server Administrators have to do sooner or later. Scenarios can be different. You have more than one instance of SQL Server on a box and you need to apply a service pack to each and every instance. You have various versions of SQL Server and have to upgrade each version independently because each version has the different sequence of service packs and cumulative updates to apply. You cannot upgrade all instances for some reason and have to upgrade a single named instance, or something else...

So it's good to know that service packs and cumulative updates can be applied silently to specified SQL Server instance using command line parameters.


It means if you have two instances on a box, you don't have to do this twice. You don't have to sit at the table facing your LCD and clicking on buttons to make the update process moving forward. All this could be done automatically from a command line.

For instance, command
SQLServer2005SP2-KB921896-x86-ENU.exe /allinstances /quiet
will apply SQL Server 2005 Service Pack 2 to all instances of SQL Server 2005 which run on a box.

Please note that the same approach applies to installing Cumulative Updates.

Supported command line parameters:

/allinstances
Applies SQL Server Service Pack or Cumulative Update to all instances of SQL Server and to all SQL Server shared instance-unaware components.

/instancename=InstanceName
Applies SQL Server Service Pack or Cumulative Update to an instance of SQL Server named InstanceName and to all SQL Server shared instance-unaware components.

/password=Password
User account password for connecting to a remote failover cluster node.

/quiet
Runs SQL Server Service Pack or Cumulative Update Setup in unattended mode.

/reportonly
Only the discovery and enumeration section of Setup is run. Only a report enumerating the local instances and components of SQL Server is displayed. Note that when using this parameter SQL Server Service Pack and Cumulative Update is not applied.

/rsupgradedatabaseaccount=rsAccountName
Specifies an account that has permissions to modify the schema on a report server database when you use SQL Server Authentication. This parameter is used when you upgrade an instance of Reporting Services that includes a report server database that requires a SQL Server login.

/rsupgradepassword=rsPassword
Specifies the password for an account that has permissions to modify the schema on a remote report server database. This parameter is used when you upgrade an instance of Reporting Services that includes a remote report server database.

/rsupgradedatabase
Use the switch /rsupgradedatabase=0 to prevent the Reporting Services database from being upgraded

/sapwd=SaLoginPassword
Passes the SQL Server Authentication password for the sa login to run scripts. Do not escape characters for /sapwd. Escaping characters will cause Setup to fail.

/user=Domain\UserName
User account for connecting to a remote failover cluster node.

No comments:

Post a Comment