Enterprise Manager - Online Copy Jobs

In BBj 9.0 and higher, Online Copy Jobs are available to the BBj Enterprise Manger and BBj Admin Server. An online copy job consists of a list of one or more traditional BBj/BBx data files (Mkeyed, Xkeyed, Vkeyed, etc.) to be copied to another location. This copy occurs while the files are still in use by a BBj application or third party ODBC/JDBC application and maintains synchronization between the original file and the new copy if any changes are made to the original during the copy process. Further, the administrator can specify a delay that occurs between record copies to cut down on the file IO and processor time used by the copy job.

Online copy jobs provide two primary features for administrators:

• Makes it possible to create a backup of their database while users are making changes to those files.

• Provides a way to make a copy of a file and specify a new string template and record layout, and new key definitions for the new file.

Online Copy Job Pane

To work with online copy jobs, first log in to The Enterprise Manager and then select the Online Copy Jobs item from the navigator list. As shown below, the right hand area shows a tree table with a current list of any copy jobs in progress.

Note that the line with the yellow folder shows the name of the copy job and a percent complete. The percentage basically shows the progress of the item in the job that is the least complete. Under the Copy Job folder is a list of all of the individual files that make up the job and the progress for each of the individual files.

Once the progress reaches 100%, the file or job is completely synchronized with the original files. At this point, any changes made to the original files will continue to update the new file until the job or file is finished or aborted using the [Finish] or [Abort] buttons respectively. "Abort "stops synchronization and removes the new data files; [Finish] simply stops synchronizing and closes the new files.

Running an Online Copy Job

Online Copy Jobs are stored in an XML definition file that contains the information necessary to perform the job.

Run an Online Copy Job

1. Log in to The Enterprise Manager.

2. Select the Online Copy Jobs item from the navigator list.

3. Click [Run Job].

4. Select the XML definition file for the job.

This starts the copy job and shows the job's progress in the status area. Click [Refresh] to update the status area with the current job progress.

Create a Job to Make Backup Copy of Data File(s)

Creating a backup copy of one or more data files is the simplest way to use an Online Copy Jobs. Files located in any number of directories can be included in a single copy job.

Create a backup job

1. Login to The Enterprise Manager.

2. Select the Online Copy Jobs item from the navigator list.

3. Click [Add New] to open the Online File Copy Job dialog.

4. Enter a job name.

5. Specify the delay between record copies. This allows the administrator to specify a delay that will occur between each record copy during the job. Without a delay of some kind, the server can become less responsive for other applications while copying large amounts of data. Setting a delay value will cause the copy to take more time, however, this will help the system to continue running smoothly during the process. The delay is in milliseconds, and defaults to 1.

6. To add a single file to the job, click [+]. For a simple copy, you will only need to specify a source file and a destination. For information regarding the other options on the Add File Dialog, see the section below Creating a Modified Copy of a File.

7. To add an entire directory of files to the job, click [Add directory]. Navigate to the desired directory using the File Chooser dialog and all of the files in that directory will be added to the job. Note that only BBj/BBx format data files (excluding ESQL) can be included in the job so it may be necessary to remove other files from the job if there are non-BBj files in the chosen directory.

Creating a Modified Copy of a File

An Online Copy Job can also create a copy of a data file where the record layout and/or key definitions in the new file are modified in some way. This makes it possible to add a new field to a file and/or create multiple keys on a file at one time. Using this feature, an administrator can make necessary changes to the structure of a large data file while users are adding, changing, or removing records from the data file – all with no down time for the users. The following image shows the dialog used for specifying file modifications:

Create a modified copy of a file

1. Create a new Online Copy Job as described above.

2. Click [+] button.

3. Specify the source file that will be copied.

4. Specify the string template that defines the record layout of the source file.

5. Specify the path to the destination file.

6. Specify the string template that defines the record layout of the new file. This may or may not match the original template.

7. The two column table shows a mapping from fields in the source file to fields in the destination file.

For example, in the image above, two fields were added to the CUSTOMER file in the Chile Company database: SALUTATION, and MIDDLE_NAME. Since these are new fields, there is no matching field in the source column. However, if there is a field in the source file that should be mapped to a different field in the destination file, this mapping can be done here.

8. If no key definition are defined in the key definition table, then the keys from the original file will be used.


Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.