Options

Copying navision database while its in use

skidskid Member Posts: 6
I only recently realized how bad it might be to make copies of database while people are working with it (you can end up with inconsistent database?). Funny thing is that we are doing it for a year or so now and nothing went wrong.. How can that be?..

Anyway my question is: is this a problem? If I try to copy database while its in a middle of something will navision transaction system be enough to recover from that?
Then it comes to be that the soothing light at the end of your tunnel was just a freight train comming your way

Comments

  • Options
    DenSterDenSter Member Posts: 8,304
    This is a matter of timing. Like you said, most of the time it will go without any problem, but that one time that you just coincidentally happen to copy the database right in the middle of a transaction, you're screwed.

    I don't really think it has implications for the database that you are copying FROM, but it would have implications for the copy of that database.

    The safest way to do this would be to wait until after hours, create a backup file and create a new database by restoring that backup into it.
  • Options
    fbfb Member Posts: 246
    Or, use HOTCOPY.EXE -- it is built specifically for this purpose: it can read a 'consistent' version of the db, making an exact copy, but avoiding problems with transactions 'in flight' during the copy...
  • Options
    skidskid Member Posts: 6
    That made things clearer. Thanks.
    Then it comes to be that the soothing light at the end of your tunnel was just a freight train comming your way
  • Options
    chaswinchaswin Member Posts: 54
    I was under the impression that a technique called "versioning" is used in the native database and that a Navision (fbk) backup having 100% referential integrity can be taken at any stage, irrespective of the number of current users. (This does not apply to SQL).

    Basically only records created prior to the point at which you started the backup are backed up. Later transactions are ignored. This is very handy for taking on site backups for NSC use. You can do the backup without having to kick everyone off.
  • Options
    Captain_DX4Captain_DX4 Member Posts: 230
    chaswin wrote:
    I was under the impression that a technique called "versioning" is used in the native database and that a Navision (fbk) backup having 100% referential integrity can be taken at any stage, irrespective of the number of current users. (This does not apply to SQL).

    Basically only records created prior to the point at which you started the backup are backed up. Later transactions are ignored. This is very handy for taking on site backups for NSC use. You can do the backup without having to kick everyone off.

    This is correct. But the initial question about doing a file system copy of the database while it is in use does not always apply versioning. And especially if you're in the middle of a transaction the new database copy will be unusable.
    Kristopher Webb
    Microsoft Dynamics NAV Developer
  • Options
    DenSterDenSter Member Posts: 8,304
    You are correct. You can create a new backup of your Navision database at any time, and it is guaranteed to be correct. However, if you run a backup while you have 50 users entering sales orders, you are not going to be a popular person :), since that sucks your system resources right out of the machine.

    I always recommend customers to run backups after hours, or during lunch, so that users are affected as little as possible. It doesn't interfere with production, and it finishes much quicker too.
Sign In or Register to comment.