HowTo-UpgradeNAVDatabase and SQL Time in Backup step

greatscott001
Member Posts: 32
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
This script works fine with a Demo Database as the source for the upgrade.
Thoughts/Suggestions?
Original
$query = " BACKUP DATABASE `"$DatabaseName`" TO DISK = '$DatabaseBackupFilePath' Invoke-Sqlcmd $query -ServerInstance $SqlServerInstanceUpdated
$query = " SET LOCK_TIMEOUT -1 BACKUP DATABASE `"$DatabaseName`" TO DISK = '$DatabaseBackupFilePath' SET LOCK_TIMEOUT 30000" Invoke-Sqlcmd $query -ServerInstance $SqlServerInstanceBut 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?
0
Answers
-
Didn't try this but adding the querytimeout parameter may help
Invoke-Sqlcmd $query -ServerInstance $SqlServerInstance -querytimeout 65535
plz, let me know if this works0 -
I did try setting the default time but not on the command like that. Will advise. Sorry for the delay I have been out of the country.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions