Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

HowTo-UpgradeNAVDatabase and SQL Time in Backup step

$
0
0
I am working with a relatively small database (<6GB) and I am encountering an SQL time out error when the script performs the backup of the database in the "Backup the database before upgrade" step "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.". When I run the backup from SQL Management Studio (SSMS) the backup takes just over one minute. I have tried setting the lock time-out in the Backup command (in the ..\Upgrade\Cmdlets\SQL\Backup-NAVSqlDatabase.ps1 module) to no effect :
Original
$query = " BACKUP DATABASE `"$DatabaseName`" TO DISK = '$DatabaseBackupFilePath'
Invoke-Sqlcmd $query -ServerInstance $SqlServerInstance
Updated
$query = " SET LOCK_TIMEOUT -1
  BACKUP DATABASE `"$DatabaseName`" TO DISK = '$DatabaseBackupFilePath'
  SET LOCK_TIMEOUT 30000"
Invoke-Sqlcmd $query -ServerInstance $SqlServerInstance
But I don't think this is a "lock" timeout issue.

This script works fine with a Demo Database as the source for the upgrade.

Thoughts/Suggestions?

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>