Hi guys.
[Version: Octopus 3.3.12]
I am using a pre-configured Step Template (SQL - Backup Database) available from Step templates section.
When backing up a big database (65+ GB), I noticed that it always fails with a SqlClient operation timeout as shown below:
BackupDatabase : An error occurred backing up the database!
System.Management.Automation.MethodInvocationException: Exception calling “SqlB
ackup” with “1” argument(s): "Backup failed for Server ‘XYZ’. " —>
Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed fo
r Server ‘XYZ’. —> Microsoft.SqlServer.Management.Common.Executi
onFailureException: An exception occurred while executing a Transact-SQL statem
ent or batch. —> System.Data.SqlClient.SqlException: Timeout expired. The ti
meout period elapsed prior to completion of the operation or the server is not
responding.
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(Execu
teTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchExcep
tion)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(St
ring sqlCommand, ExecutionTypes executionType)
— End of inner exception stack trace —
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(St
ring sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(St
ringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(Strin
gCollection queries)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQueryWithMe
ssage(StringCollection queries, ServerMessageEventHandler dbccMessageHandler, B
oolean errorsAsMessages)
at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server se
rver, StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
— End of inner exception stack trace —
at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
at SqlBackup(Object , Object )
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object t
arget, Object arguments, MethodInformation methodInformation, Object origin
alArguments)
— End of inner exception stack trace —
at System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object t
arget, Object arguments, MethodInformation methodInformation, Object origin
alArguments)
at System.Management.Automation.DotNetAdapter.MethodInvokeDotNet(String meth
odName, Object target, MethodInformation methodInformation, Object argument
s)
at System.Management.Automation.Adapter.BaseMethodInvoke(PSMethod method, Ob
ject arguments)
at System.Management.Automation.ParserOps.CallMethod(Token token, Object tar
get, String methodName, Object paramArray, Boolean callStatic, Object valueTo
Set)
at System.Management.Automation.MethodCallNode.InvokeMethod(Object target, O
bject arguments, Object value)
at System.Management.Automation.MethodCallNode.Execute(Array input, Pipe out
putPipe, ExecutionContext context)
at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outp
utPipe, ArrayList& resultList, ExecutionContext context)
at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTree
Node statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionC
ontext context)
At C:\Octopus\Work\20160818070349-963\Script.ps1:128 char:15
- BackupDatabase <<<< $DatabaseName $Devices $CompressionOption
- CategoryInfo : NotSpecified: (
[Write-Error], WriteErrorExcep
tion- FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
n,BackupDatabase
The remote script failed with exit code 1
For your information, I am uncertain whether this is related to a bug in Octopus 3+ or to the database whose size has recently grown up just large enough to trigger this problem.
If anyone has experienced this, please kindly share your solutions/suggestions here.
Thank you.
Regards,
Sung-Jae