Comprehensive data protection for all workloads
Post Reply
esoo
Influencer
Posts: 14
Liked: 2 times
Joined: Oct 20, 2014 2:13 pm
Full Name: Erik Soosalu
Contact:

Update 2 install fails on mirrored SQL DB

Post by esoo » 2 people like this post

Case ID: 01973690

Just going to leave this here in case other users come across this. I know this isn't going to be common since 9.5 is just around the corner, but someone may find it useful.

Our environment has SQL2008 in a 2-node cluster with mirroring to a third offsite SQL server. Mirroring may not have been turned on during previous upgrades, but during the last SQL2008 update, they turning on mirroring for all DBs.

Veeam B&R upgrade from 9.0U1 to U2. Backup service will not start. Event Log shows the following error:

Code: Select all

Service cannot be started. Veeam.Backup.DBCreator.DatabaseException: Failed to deploy database. Alter failed for Database 'veeam_backup'. 
   at Veeam.Backup.DBCreator.BackupDatabaseDeployer.Deploy()
   at Veeam.Backup.DBManager.SqlRetryableInitializer.Init()
   at Veeam.Backup.Service.CVbServiceImpl..ctor(CVbEnvironment env, CTerminationMediator terminator)
   at Veeam.Backup.Service.CVeeamBackupSvc.OnStart(String[] args)
   at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
DBA confirms the service account has db.owner permission. DBA team tries db.creator and sysadmin permission and the error stays the same. Veeam tech tried to create another DB and it worked fine.

In the Svc.VeeamBackup.log file, we see the following:

Code: Select all

[10.11.2016 17:18:45] <04> Info     [DB] DATABASE OPTIONS:
[10.11.2016 17:18:45] <04> Info     [DB] > SnapshotIsolationState=Enabled
[10.11.2016 17:18:45] <04> Info     [DB] > ReadCommittedSnapshot=False
[10.11.2016 17:18:45] <04> Info     [DB] Enabling database option 'ReadCommittedSnapshot'
[10.11.2016 17:18:45] <04> Info     [DB] Disconnecting from SQL Server (ServerInstance=[XXXXXX])
[10.11.2016 17:18:45] <04> Info     [DB] Connection is terminated
[10.11.2016 17:18:45] <04> Info     [DB|ERROR] Alter failed for Database 'veeam_backup'.  (Microsoft.SqlServer.Management.Smo.FailedOperationException)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Smo.Database.Alter(TerminationClause terminationClause)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Veeam.Backup.DBCreator.DatabaseNamedOptions.Set()
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Veeam.Backup.DBCreator.BackupDatabaseDeployer.Deploy()
[10.11.2016 17:18:45] <04> Info     [DB|ERROR] An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Management.Common.ExecutionFailureException)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplFinish(StringCollection alterQuery, ScriptingPreferences sp)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImplWorker()
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AlterImpl()
[b][10.11.2016 17:18:45] <04> Info     [DB|ERROR] The operation cannot be performed on database "veeam_backup" because it is involved in a database mirroring session.[/b]
[10.11.2016 17:18:45] <04> Info     [DB|ERROR] ALTER DATABASE statement failed. (System.Data.SqlClient.SqlException)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
[10.11.2016 17:18:45] <04> Info     [DB|ERROR]    at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
[10.11.2016 17:18:45] <04> Error    An error occurred during the connect to sql server. Failed to deploy database. Alter failed for Database 'veeam_backup'. 
[10.11.2016 17:18:45] <06> Info     Stop service status tracking.
[10.11.2016 17:18:45] <04> Error    Failed to start service.
[10.11.2016 17:18:45] <04> Error    Failed to deploy database. Alter failed for Database 'veeam_backup'.  (Veeam.Backup.DBCreator.DatabaseException)
[10.11.2016 17:18:45] <04> Error       at Veeam.Backup.DBCreator.BackupDatabaseDeployer.Deploy()
[10.11.2016 17:18:45] <04> Error       at Veeam.Backup.DBManager.SqlRetryableInitializer.Init()
[10.11.2016 17:18:45] <04> Error       at Veeam.Backup.Service.CVbServiceImpl..ctor(CVbEnvironment env, CTerminationMediator terminator)
[10.11.2016 17:18:45] <04> Error       at Veeam.Backup.Service.CVeeamBackupSvc.OnStart(String[] args)
Ultimately Veeam tech wasn't really sure what to do, but I got the DBA to break the mirror and the service started.

So if you have a mirrored SQL, break the mirror before you try to upgrade. I officially request that this be considered a defect as mirror becomes a break point on the upgrade. The installer really should check for this and then stop the process beforehand to ensure that you don't have open a Sev 1 call.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 211 guests