Skip to content

Corrupt NAV SQL Database

December 10, 2012

Quite some time passed by since my last post, i’am sorry for that, christmas is comming, projects are going on, i guess you’re all in the same situation.
Oh yeah and the compare tool consumed a lot of time too.

So what i want to talk about is a very strange problem i faced on a customers database. We had situations where standard NAV 4.0 Code leaded to an “Entry Already exists” error.
Nothing special about this you would normaly think, i understand that. But this situation was different, i can 200% guaranty you that that record did not exists in the database! Since a check on the Insert statement (IF rec.Insert THEN) did return a false, and since i whatched the sql table to know what was going on.

So there was this function (Get Shipment Lines on an Invoice) that occasionaly threw this error. Only on some kind of data. I did like 100 of tests and scratched my head, i posted on mibuso (read the complete story here: http://www.mibuso.com/forum/viewtopic.php?f=23&t=51779)   but i did not receive any useful advice…

But i managed to resolve the issue and this is why i post this: In fact there was some kind of data corruption in this sql database, which i only was able to resolve by making a native backup (fbk) and creating a new sql database where I imported the backup.

I’ve never seen such data corruptions  in NAV databases and i want to make you aware that there is such a possibility.
As I already said on mibuso: i realy hope nobody faces problems like this, but if so i hope these people will find this blog post and are able to resolve their issues by recreating their database this way.

have a nice week

Advertisements

From → Dynamics NAV, SQL

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s