File Partition Location Modification Example

In this example, the database is located in F:\prod\server\c_system but due to size constraints, partitions 1 through 4 of the partitioned file Invoices are located in K:\prod\server\c_system. The disk backup was made to H:\backup. Due to its size, the partitioned file Invoices was backed up to G:\backup.

You need to load this database backup onto another server environment (perhaps the system is being relocated or you are making a copy for testing).

The new server environment has an F: drive, does not have a G: drive or a K: drive, has room on its H: drive for the entire backup, and has a large N: drive to which some backup files could temporarily be loaded and where partitions 1 through 4 of the partitioned file Invoices of the live database should be placed.

In this scenario, after loading the backup (to H:\backup and perhaps N:\temp), the steps that you would take to change the backup file location and destination file partition locations are as follows.

  1. Change the backup path for the file Invoices by running the changeFilePaths command and specifying the backup location of the file in the newBackupPath argument; for example:

    jdbutilb ini=F:\prod\server\jade.ini changeFilePaths backupinfoPath=H:\backup Invoices newBackupPath="<default>"

    This action clears the non-default backup path attribute of the file Invoices in the backupinfo file.

    The following example changes the backup location of this file in the backupinfo file to N:\temp.

    jdbutilb ini=F:\prod\server\jade.ini changeFilePaths backupinfoPath=H:\backup Invoices newBackupPath=N:\temp

    This backup path location must exist.

    You must enclose the <default> value within double quote symbols.

  2. When the backup paths in the backupinfo file have been made to reflect the actual file locations, perform the verifyChecksums operation to ensure that errors have not been injected during the file transfers.

  3. Change the database location of partitions 1 through 4 of the file Invoices by running the changeFilePaths command and specifying the database location for each partition in the newDatabasePath argument.

    The following example changes the database location of partition 1 in the backupinfo file to N:\prod\server\c_system. (Repeat the operation for partitions 2 through 4.)

    jdbutilb ini=F:\prod\server\jade.ini changeFilePaths backupinfoPath=H:\backup Invoices part=1 newDatabasePath=N:\prod\server\c_system
  4. Perform the restore operation to F:\prod\server\c_system.

During database initialization, changed file and file partition path information in the restoreinfo file is adopted and the database control file and partition control files are updated as appropriate.