SQL Server 2005 upgrade to Service Pack 4 (SP4) via command line I have been wracking my brain over upgrading SQL Server 2005 to SQL Server 2005 SP4. I have a script for installing new instances of SQL Server for all versions and they all work wonderfully. Problem is, SQL Server 2012 can't upgrade SQL Server 2005 SP3 and below. So, I have to install SP4 to SQL Server 2005, AND THEN upgrade to SQL Server 2012, which is highly annoying.

I need to do this silently via the command line, but I cannot get it to work at all. Here are some samples I tried:

SQLSP4.exe /qb /ACTION=Upgrade /INSTANCENAME="FOOBAR"

SQLSP4.exe /quiet /instancename="FOOBAR"


Among a couple other variations. I could not find anything online at all. In fact, the one helpful thread ended in saying that Microsoft didn't have any support for this, but I'm not sure about that.

What can be done here? Does anyone have any experience in updating service packs via command line?
Make sure you include the /IAcceptSQLServerLicenseTerms switch, otherwise your installation will fail.  I have commonly done silent installs of service packs to using the following syntax:

.\&lt;SQLServicePack&gt;.exe /q /action=patch /instancename="FOOBAR" /IAcceptSQLServerLicenseTerms


Full syntax documented here.