Keys become Inactive

RanaRana Member Posts: 123
Hi All,
I have restore a backup of our client database(NAV IN 4.0 SP3), but when I am going to run the Item Card I am getting an error like “ Value entry table does not have an active key that starts with the following fields Document No. , Posting Date”
On checking the database I found that lots of table does not have the keys with active status.
Though in the original database there are active keys in the tables. I can’t understand why this thing happens? Is there any mistake in taking backup or something else? :-k :-k :-k

Pls reply.............
RANA

Comments

  • jannestigjannestig Member Posts: 1,000
    Are you restoring from NAtive to SQL or SQL to native ? Are you installing into a newer version?
  • RanaRana Member Posts: 123
    jannestig wrote:
    Are you restoring from NAtive to SQL or SQL to native ?
    SQL to Native..
    Are you installing into a newer version?
    Same Version..But there are Upper version in the system .
  • BeliasBelias Member Posts: 2,998
    is it a data-only backup or data&objects backup...or better said...is the version of the objects in your database the same?
    there can be some SETCURRENTKEYs somewhere you don't expect...but it all depends from what are the customization/localization...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • DenSterDenSter Member Posts: 8,304
    Looks to me like someone came in and did some "index tuning" by disabling a number of keys. You need to get your money back from them, and get someone in there that knows what they are doing.

    There's really no good way to get to all of these, but when you get an error like that, it's a flowfield definition that uses a key that is not enabled. What you need to do for those keys is re-enable them, and the problem should go away. You could scan the tables and see if you can spot the disabled keys (the Key virtual table can also be used for this). The tricky part is though that you don't want to just enable all keys in the database, you're going to have performance problems too.

    If you can't solve it yourself, then get someone in there that knows what they are doing. This is too important to try and figure out with forum posts.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    In my experience the main reason for this is that the backup did not complete. The restore is in two phases, the first reads the data into the database then commits, the second phase then activates the keys.

    You can try to complete the backup (just go to File Backup restore and see if you get a message askign to complete the restore) if not then export all tables form the original database and reimport them (Replace All) into the restored database, this will reactivate all the keys.
    David Singleton
  • devu_13devu_13 Member Posts: 101
    Hi

    Here David is right just take full backup and restore properly.
    Devendra Kr. Sharma
    IBIZ Consulting Services,India
  • RanaRana Member Posts: 123
    In my experience the main reason for this is that the backup did not complete. The restore is in two phases, the first reads the data into the database then commits, the second phase then activates the keys.

    You can try to complete the backup (just go to File Backup restore and see if you get a message askign to complete the restore) if not then export all tables form the original database and reimport them (Replace All) into the restored database, this will reactivate all the keys.

    Thank u David Singleton , my probem now solved according ur suggestion. =D>
    Thank u all for ur reply.

    Rgds,
    RANA
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Rana wrote:
    In my experience the main reason for this is that the backup did not complete. The restore is in two phases, the first reads the data into the database then commits, the second phase then activates the keys.

    You can try to complete the backup (just go to File Backup restore and see if you get a message askign to complete the restore) if not then export all tables form the original database and reimport them (Replace All) into the restored database, this will reactivate all the keys.

    Thank u David Singleton , my probem now solved according ur suggestion. =D>
    Thank u all for ur reply.

    Rgds,
    RANA

    You are welcome. :thumbsup:
    David Singleton
Sign In or Register to comment.