Micro J Products Datafile Maintenance



These instructions are for PcHunter or Tempus Fugit version 9. I am not bothering to write up separate pages for PcHunter and Tempus Fugit because the instructions are identical.

On this page the terms datafile and database are used synonymously, they refer to the same thing, the omnis .df1 (and .df2 etc. if you have multiple segments) file which is what you log into when you are running pchunter or tempus.

In order to run datafile maintenance you must be logged into the datafile as an administrator (this is not the same as being a local administrator on the PC). You will know you are not logged in as a database administrator if you cannot open the administration screen.

You cannot run datafile maintenance while other users are logged into the database. For this reason if you are running pchunter or tempus in a network environment it is a good idea to copy the datafile from the server to one of the workstations, switch the database login to the local copy, and run maintenance on the local copy. This also has the advantage that if something goes wrong while the maintenance is running you haven't corrupted the main copy of the datafile.

If you are repairing a network copy of the datafile locally, if you let the other users log back in to the datafile after you copy it (while you are running maintenance) it is a good idea to tell them to go into "read only" mode (i.e., they can look things up in the datafile but they should not make any changes by editing or adding records). This way if there is damage and you end up fixing the datafile and replacing it on the server, they don't have to keep track of what they did and do the work twice.

By the way, even if you are a single user and don't need to copy the datafile to run maintenance on it, it's a good idea to make a copy of the database for backup before you run maintenance on it. There is no need to copy the attachments folders if that is the case, just the database itself.

If you are copying the data and you are on a network, you need to get all the other database users out of the datafile before you can copy it. If you receive a message while attempting to copy it that a process has locked the file, it usually means one of the other users is still logged into the datafile.

Once you are logged into the copy of the datafile you want to run the maintenance on, click on the administration drawer from the desk. If the administration window opens, you may proceed. If you get a message that you are not an administrator, you need to get the login for a database administrator to proceed.

There should be several pull down menu options at the top of the window. The farthest one to the right (which is normally in the center top of the screen) should say Utilities. Click on this pull down menu.

The bottom option on this is a submenu which says Datafile Maintenance. There is only one option, which reads Check Datafile. Click on that option. If there are other users logged into the same datafile when you do this, you will receive an error message and need to get them out of the datafile. This will not be the case if you have copied the datafile to a workstation and logged into the local copy to run the maintenance.

There is a list of tables on the left and the operation will be defaulted to Reorganize. Click on the radio button for Check Data and the option should move from Reorganize to Check Data. If you click on the top of the table list on the left and press Ctrl + A at this point all the tables on the left should be selected.

Once you change the radio button to Check Data another window will open on the right. The top three of the four boxes will be checked. The bottom option (Peform repairs) will not be checked by default. If you leave it unchecked and run the maintenance you will later have an option to run a separate pass to attempt to repair any damage that is logged. If you run the maintenance and no damage is found, there will be no option to repair anything.

When you are ready to proceed click the Start button at the lower right of the window. Once you do this you will receive a message that you are checking data for XX number of files and ask if you want to proceed. The number is the number of tables you have selected within the datafile. If you click No it will cancel the operation, if you click Yes it will check the datafile.

The maintenance log window will open. This could take a while depending on how big your datafile is. If it is a small datafile the operation will run very quickly. If there is no damage there will be a line which reads examing datafile with a path to the datafile, and the blue line which highlighted that path while the maintenance was running will drop beneath it with no further verbiage. If this happens it means the maintenance could find no structureal damage to any of your database table indexes.

If damage is found each discrete problem will display as separate line in the log. If you selected the option to perform repairs the system will automatically attempt to repair the indexes. If you did not you will have an option on the right side of the window that says Repair, if you click on this option it will make another pass through the datafile and attempt to repair any logged damage.

If there was datafile damage and you successfully fixed it (you can check by logging in and out of the datafile and running the maintenance again to see what comes up), if you were working on a local copy of the datafile on the network, you will again have to get the other users out of the datafile on the network and copy the local copy back to the network. Once that's done you need to switch pchunter or tempus on that computer back to the network copy of the datafile, otherwise you will leave that computer logged into the local copy and if someone tries to work on pchunter or tempus at that computer they will be logging into an archive copy of the datafile and may spend days or weeks inputting data on that copy that no one else can see.

If no damage was found in the datafile and you were in a local copy you also need to switch back to the network copy of the datafile but there is nothing further you need to do other than to let the other users know they can go back to work as usual, or they can log in to the datafile again if you had them logged out.

If you have any questions about this procedure contact me with the information on this page:

Micro J Products Support and Training

Page created 12 November 2018

Return to Micro J Systems page