I am a Configuration Manager for a big project, we are using TFS for almost three years and we have 200+ users, TSWA is the tool accessed by everyone at the project. Because of high volume of usage, recently (almost 6 months) TSWA used to fail 5-10 times every day, lot of emails, concerns and we have to restart the app pool all the time to bring the TSWA back. Everyone started disliking TFS (from their perspective, TSWA is TFS). I was looking for a way to fix the TSWA issues to make TFS is better product. Finally I found Hakan Eskici blog.
We tried to apply the patch on TFS server. It initially failed with following error, since we have TFS database mirroring enabled
Running the script
Found condition: --TFSDB:UPGRADE:TFS_VC_PROTOCOL_VERSION != 9.20507.00
Changed database context to 'TfsVersionControl'.
Continuing script execution. Condition evaluated to true.
Halting condition evaluation for the remainder of the script.
Microsoft.TeamFoundation.DatabaseInstaller.DatabaseException:
Line 2
Error: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
ALTER DATABASE statement failed.
Upgrade: Database Update Failure - Error %error="5069";% executing EXEC statement for sp_executesql
Backing up recovery model: RECOVERY_MODEL_BACKUP
Setting recovery model to Simple. ---> System.Data.SqlClient.SqlException: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
ALTER DATABASE statement failed.
Upgrade: Database Update Failure - Error %error="5069";% executing EXEC statement for sp_executesql
Backing up recovery model: RECOVERY_MODEL_BACKUP
Setting recovery model to Simple.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.ExecuteSql(SqlConnection sqlConnection, String batch)
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.DeployScript(String script)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.DeployScript(String script)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.RunDbActions(InstallerMode mode, String server, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.RunSteps(InstallerMode mode, String server, IPropertyCollection properties, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.Repair(String server, IPropertyCollection properties, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.Commands.CommandRepair.OnRun()
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.Commands.InstallerCommand.Run()
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.CommandLine.RunCommand(String args)
> Inner Exception:
SQL Error #1
SQL Message: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
So we turned off the mirroring and installed the patch. One we applied the patch, “Boom” all TSWA issues disappeared. We have a happy customer.
We tried to apply the patch on TFS server. It initially failed with following error, since we have TFS database mirroring enabled
Running the script
Found condition: --TFSDB:UPGRADE:TFS_VC_PROTOCOL_VERSION != 9.20507.00
Changed database context to 'TfsVersionControl'.
Continuing script execution. Condition evaluated to true.
Halting condition evaluation for the remainder of the script.
Microsoft.TeamFoundation.DatabaseInstaller.DatabaseException:
Line 2
Error: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
ALTER DATABASE statement failed.
Upgrade: Database Update Failure - Error %error="5069";% executing EXEC statement for sp_executesql
Backing up recovery model: RECOVERY_MODEL_BACKUP
Setting recovery model to Simple. ---> System.Data.SqlClient.SqlException: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
ALTER DATABASE statement failed.
Upgrade: Database Update Failure - Error %error="5069";% executing EXEC statement for sp_executesql
Backing up recovery model: RECOVERY_MODEL_BACKUP
Setting recovery model to Simple.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.ExecuteSql(SqlConnection sqlConnection, String batch)
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.DeployScript(String script)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.DatabaseInstaller.DataDeployer.DeployScript(String script)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.RunDbActions(InstallerMode mode, String server, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.RunSteps(InstallerMode mode, String server, IPropertyCollection properties, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.Installer.Repair(String server, IPropertyCollection properties, Boolean preview)
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.Commands.CommandRepair.OnRun()
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.Commands.InstallerCommand.Run()
at Microsoft.TeamFoundation.DatabaseInstaller.CommandLine.CommandLine.RunCommand(String args)
> Inner Exception:
SQL Error #1
SQL Message: The operation cannot be performed on database "TfsVersionControl" because it is involved in a database mirroring session.
So we turned off the mirroring and installed the patch. One we applied the patch, “Boom” all TSWA issues disappeared. We have a happy customer.
No comments:
Post a Comment