Copying a Database

When I copy a database from one place to another when I try and open it up I get the following error "The operating system cannot find drive or directory specified for Y:\DB\Database2.fdb please check that the drive and directory name are correct. How do I fix this?

Greg, What’s happening is that Navision is looking at your “ZUP” file to determine the last database and company that you worked with. If you were working with C:\Greg\Gregdata.FDB and then moved the database to C:\OtherDir\Gregdata.FDB, the sytem can no longer find the last place you were working in. The solution is simple…Select File, Database, Open and then choose the location and file name of the relocated database. Also, I would normally recommend that you do a backup of the old database, create a new, empty database in the new location, and then do a restore of the backup. Often when moving databases, you will get a message when you open the database about “recovering free blocks”. This is Navision’s way of rebuilding links, pointers, etc within the database following a system crash or an “abnormal exit” from the database. I will leave it up to the old timers on this forum to get into the other tech issues and merits of copying versus backup and restore. Good luck to you with Navision. I’ve been in the accounting software business for over 15 years and Navision is the absolute best (fastest, most stable, most flexible, most reliable) piece of software that I’ve worked with!! Regards, Mark. Mark Keener Automated Number Crunching Dayton, OH USA

If your database consists of more than one file then the problem is that the location of the subsequent files (database2, database3 etc) are stored in the first file (database1 say). Since you have moved them it cannot find them in the original location. To rectify this you need to open the database with the following parameter DATABASE=c:\dbase\database1.fdb+c:\dbase\database2.fdb+c:\dbase\database3.fdb (or whereever you have moved the files to) This will resave the locations of the files in the main database file. You do not need the parameter on subsequent connections.

The most secure way of making a copy of the database (specially when having varioous files) is making a backup using the navision’s option and restoring it into a new empty database file. (the problem is that this way also takes more time…). Alfonso Pertierra (Spain)apertierra@teleline.es

quote:


Originally posted by MarkKeener: Also, I would normally recommend that you do a backup of the old database, create a new, empty database in the new location, and then do a restore of the backup.


If databese is bigger than 4 Gb it takes more time.

quote:


Often when moving databases, you will get a message when you open the database about “recovering free blocks”. This is Navision’s way of rebuilding links, pointers, etc within the database following a system crash or an “abnormal exit” from the database.


NO! On “recovering free blocks” only removes allocated space for records modification buffers. Then you copy db some users can be done some modification, but not commited. So such modifications is stored in buffers. Recovering of free blocks proccess don’t do any database data modification work. Edited by - db on 2001 Nov 05 08:51:26

Dalius, As far as I understand, you only see “recovering free blocks” when you have abnormally shut down the database. I supposed it could also happen if you tried to copy the database while it was in use by a Navision Server process. When you see this message, the database is attempting to recover from something BAD that happened to it. The free chain should never require recovery if the database is managed properly. Jim.

Basically Dalius and Jim are both correct. Navision needs the “Version Principle” so that it can have optomistic concurrency. The version principle also allows Navision to be very secure and stable, since old “versions” can be recovered very quickly. This is why when the Navision server service is interupted, we don’t loose data. In between transactions, Navision does not delete the old versions, it simple moves the Btree pointer to the most current version. Although there is no similarity, you can think of this in terms of how your normal operating system does not delete files, but changes one byte (word, long word etc) to indicate that the space is now available. As the database grows, Navision slowly resuses the space. When a Navision server starts up, the first thing it does is checks that the database has a valid version. If for any reason it finds a problem, it runs throught the tree checking. In doing so it also releases any old versions that are not intact. The most common cause for invalid versions to exist in the database is due to an incorrect shut down procedure. I am pretty sure that this is correct, but I would be happy to hear from others if it is not. _________________________ David Singleton Navision Consultant since 1991 dmks22@home.com___________

By the way Greg, the fact that your live database is on a Y: is something that should be investigated. Y: seems to say to me that this is a mapped network drive. You shouldn’t put your Navision database on a network drive. Navision is not designed for this. _________________________ David Singleton Navision Consultant since 1991 dmks22@home.com___________

Jim, if you see recovering message, you are lucky guy. You will have db version without last user modification. In some cases you can’t open db at all !!! Some times can hapen following: 1. you are copied 1/2 of db 2. user commits modification 3. some of modifications are writed to first 1/2 ans another to second 1/2 4. you finnished copying 5. fine you have corupted db David, I don’t know you are wrong or not. It’s very hard to discuss about guess things. We need guy from Navision a/s support

I’m not quite sure what you mean by “guess”, I learn’t all this stuff using the rtfm method. _________________________ David Singleton Navision Consultant since 1991 dmks22@home.com___________

David, what is “rtfm Method”??? Aloi

RTFM := ‘Read’ + The.F* Manual; Edited by - alexz on 2001 Nov 09 03:06:43