How to check consistency of NAV on SQL database

Johannes_Nielsen
Member Posts: 206
Hi
Running NAV 5.0 on MS SQL 2008
I'm trying to figure out how to ensure that my backup routines are up to scratch.
As I've been told, the NAV database can be corrupt without SQL server knowing about it. I a worst case scenario this could mean one would be performing backups that are not restoreable.
One should do a restore test, for sure, but I'm not sure running it every day is nessasary...
But how Should you check for inconsistency of a NAV on SQL?
This thread states that doineg FBK backups on SQL is best avoided
http://www.mibuso.com/forum/viewtopic.php?f=23&t=26350&hilit=FBK+not
So I'm confused :-k
Any insights are welcome :P
Running NAV 5.0 on MS SQL 2008
I'm trying to figure out how to ensure that my backup routines are up to scratch.
As I've been told, the NAV database can be corrupt without SQL server knowing about it. I a worst case scenario this could mean one would be performing backups that are not restoreable.
One should do a restore test, for sure, but I'm not sure running it every day is nessasary...
But how Should you check for inconsistency of a NAV on SQL?
- By running the Test database from File>Database...
- By running some SQL utility
- By doing a FBK backup and restoring this (rebuild all keys)
This thread states that doineg FBK backups on SQL is best avoided
http://www.mibuso.com/forum/viewtopic.php?f=23&t=26350&hilit=FBK+not
So I'm confused :-k
Any insights are welcome :P
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841
Johannes Sebastian
MB7-840,MB7-841
0
Answers
-
If you want to make sure SQL backup is good.
Restore it on another server, and do a NAV backup. You don't need to restore the nav backup.
I have not seen a sql db getting corrupted on it's own.
What I have seen is hardware failure that corrupted sql db.
Or modifying data directly through sql. E.g. inserting lowercase on code field0 -
To check the database integrity:
1. You should ensure that the database property "Page Verify" is set to "CHECKSUM", which is some kind of on-the-fly check up
2. Run a DBCC CHECKDB periodically (e.g. via TSQL or Maintenance Plan). This checks the physical integrity of the SQL Server database.
3. Optionally you could run the NAV internal "Database Test" to verify the logical integrity
Generally skip the old FBK native backup stuff with SQL Server - takes too long, causes too much workload and finally tells shit about the real SQL integrity (excuse my French) ...
A SQL Backup is a 1:1 copy of the database (more or less, actually all occupied Pages), thus potential problems are included.Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
Thanks for the replies guysstryk wrote:To check the database integrity:
2. Run a DBCC CHECKDB periodically (e.g. via TSQL or Maintenance Plan). This checks the physical integrity of the SQL Server database.
3. Optionally you could run the NAV internal "Database Test" to verify the logical integrity
A SQL Backup is a 1:1 copy of the database (more or less, actually all occupied Pages), thus potential problems are included.
Do you thereby mean that the NAV Database Test, is required to fully rule out any corruptions?Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
ara3n wrote:What I have seen is hardware failure that corrupted sql db.
Or modifying data directly through sql. E.g. inserting lowercase on code field
That correspons with the stories of network problems or long time running reports and hardware errors, I've heard of, could cause corruption of the datebase.Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
Johannes Nielsen wrote:
Do you thereby mean that the NAV Database Test, is required to fully rule out any corruptions?
No. Actually I think the NAV internal DB TEst is rather pointless. The physical integrity is what really matters - DBCC CHECKDB.
The logical stuff in NAV - Table Relations etc. - has IMHO pretty low priority ...Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
stryk wrote:Johannes Nielsen wrote:
Do you thereby mean that the NAV Database Test, is required to fully rule out any corruptions?
No. Actually I think the NAV internal DB TEst is rather pointless. The physical integrity is what really matters - DBCC CHECKDB.
The logical stuff in NAV - Table Relations etc. - has IMHO pretty low priority ...
Okay, so I guess I might have been misinformed about NAV being corrupted, without SQL being so.
Thanks for your insights guys!Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410
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