Error upgrading a large db from CMS6 to CMS7 using Deployment Center


We are currently trying to upgrade a large CMS6 db (35GB) to CMS7 using the deployment center. We are experiencing an error during the execution of oune of the SQL scripts. If we run the scripts through SQL Managment Stodio the script succeedes (after running for nearly 30 minutes). We tried to see if changing the "Remote query timeout" setting on the sql server, but it did not help.

All the other sql scripts leading up to the long running one executes OK, so I don't supect it to be an issue with db users or access...

Error message from Deployment Center:

Executing database script "C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Upgrade\Database\sql\0007_0000_0041_0000to0007_0000_0147_0000.sql"

An error has occured and the transaction will be rolled back



An unhandled error has occured:

The wait operation timed out

When executing


At C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Upgrade\System Scripts\Upgrad

e Site Database (SqlServer).ps1:9 char:25

+             Execute-EPiSqlSvrScript <<<<  -EPiServerScript -ScriptPath $file -SqlServerN

ame $dbConnection.DataSource -DatabaseName $dbConnection.InitialCatalog -LoginN

ame $dbConnection.UserID -LoginPassword $dbConnection.Password





At C:\Program Files (x86)\EPiServer\CMS\7.0.586.1\Upgrade\System Scripts\Upgrade Site Database (SqlServer).ps1:9 char:25

+             Execute-EPiSqlSvrScript <<<<  -EPiServerScript -ScriptPath $file -SqlServerName $dbConnection.DataSource -DatabaseName $dbConnection.InitialCatalog -LoginName $dbConnection.UserID -LoginPassword $dbConnection.Password

System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

   at EPiServer.Install.InstallationManager.Install(Installer installer)

   at EPiServer.Install.SqlServer.SqlServerInstallationManager.ExecuteDatabaseScript(String sqlServerName, Nullable`1 sqlServerPort, String databaseName, String loginName, String loginPassword, String scriptFilePath, Boolean avoidDbTransaction, Boolean isEPiServerScript, IDictionary parameters)

   at EPiServer.Install.SqlServer.Cmdlets.ExecuteSqlScriptCmdlet.ProcessRecord()

   at System.Management.Automation.Cmdlet.DoProcessRecord()

   at System.Management.Automation.CommandProcessor.ProcessRecord()


Apr 09, 2013 12:13

I know this is an old post, but thought I would share my findings.

Add the following configuration to C:\Program Files (x86)\EPiServer\Shared\Install\EPiServerInstall.exe.config.

  <add key="commandTimeout" value="600"/>

The value is in seconds, so in your case you would need at least 1800.

Note! Settings are cached in EPiServer Deployment Center, so you need to restart the application and then click the Refresh link in the upper right corner.

Edit: Turns out it's still a problem. After doing some assembly diving in EPiServerInstall.Common.1.dll (version 1.1.1239.0) I found the cause. The following is set in the constructor for SqlServerConnectionFactory, which sadly enough is never overridden.

this.ConnectionTimeout = new int?(30);

Regardless of what you write in your connection string, Connection Timeout will always be 30 seconds.

Edited, Oct 09, 2013 17:01

Thanx for this post!

We haven't had any issues with the SQL-conneciton, though. We changed the Connect Timeout value in the connectionstring config and also the "Remote query timout...” value  in SQL server. If that was the reason, I don't know. The longest period of waiting was at the end - about 40 minutes.

Jun 23, 2015 14:25
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.