I’m trying to take back-up of a large database using “Backup-SQLDatabase” cmdlet using following statement, but I’m getting time-out error after 10 minutes.
Backup-SqlDatabase -ServerInstance $Server -Database $DatabaseName -BackupFile $BackUpFile -CompressionOption On -ConnectionTimeout 0 -Initialize -Verbose -ea Stop
Here’s the error exactly after 600 seconds of execution :
VERBOSE: 60 percent processed.
VERBOSE: The backup or restore was aborted.
The wait operation timed out
+ CategoryInfo : InvalidOperation: (:) [Backup-SqlDatabase], Win3
+ FullyQualifiedErrorId : ExecutionFailed,Microsoft.SqlServer.Management.P
+ PSComputerName : localhost
I looked up at internet and found a bug filled for Restore-SQLDatabase.
However, the issue still exists in SQL Server 2012 (11.0.339).
I’ve also tried reconfiguring “remote query timeout” to 0 as given , but the issue persists.
This negates the very purpose of this cmdlet. Back-ups do take more than 10 minutes. And I don’t think this scenario was even tested.