Procedure documentationCopying a Parameter File from a Data Backup Locate this document in the navigation structure

 

You can use a copy of the parameter file of an existing database (source database) when you create a new database (target database). To do this, you copy the parameter file from a complete data backup of the source database to the new database. You can change the values of the copied parameter values later if necessary.

You need a current complete data backup of the source database.

In the target database, you define a backup template for a complete data backup. The values defined for the properties type, backup type, size, block size, and overwrite have to be identical to the values of the backup template that was used to create the backup of the source database. You can define any name for the backup template name. The data carrier (device/file) property must refer to the location where the complete data backup of the source database was saved.

You use the command recover_config, specifying the newly-defined backup template, to import the data backup from the source database to the target database.

You can now change individual database parameters if required.

If the source database is located on the same database computer as the target database, you must change the value of parameter RUNDIRECTORY and the value of parameter DIAGHISTORY. If the paths for the data and log volumes in the source database are defined as absolute paths, you must also change these in the target database. Otherwise the source database and the target database would mutually overwrite the data in the run directory, the diagnosis history, and the data and log areas.

Scenario

You have created a complete data backup of DEMODB on the GENUA computer, and saved this under the path \\GENUA\Documents and Settings\All Users\Application Data\sdb\data\wrk\DEMODB\Backups 2005\Data\completeDataJan.

On the local computer PARMA, you want to create the new database TESTDB with a nearly identical configuration to that of DEMODB. You want to use the copy of the parameter file from DEMODB for this. For TESTDB you want to change the parameter RUNDIRECTORY to the value C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\TESTDB and the parameter CACHE_SIZE to the value 1000.

The backup template to be defined for TESTDB should have the following properties:

Name of the backup template: DataComplete

Data carrier (device/file): \\GENUA\Documents and Settings\All Users\Application Data\sdb\data\wrk\DEMODB\Backups 2005\Data\completeDataJan

Type: FILE

Backup type: complete data backup (DATA)

Size restriction: none (0)

Block size: 6

overwrite: NO

Prerequisites

For the prerequisites, see Database Manager CLI

service_connect

recover_config

service_release

Procedure

  1. Call Database Manager CLI, create the new database TESTDB and define the first DBM operator with user name DBM and password DBM on the local computer.

    >dbmcli db_create TESTDB DBM,DBM

    OK

  2. Call Database Manager CLI in session mode, log on as operator DBM with password DBM, and connect to the database TESTDB.

    >dbmcli -u DBM,DBM -d TESTDB

    dbmcli on TESTDB>

  3. Define the backup template for a complete data backup to a file using the properties named in the scenario:

    dbmcli on TESTDB>medium_put DataComplete "\\GENUA\Documents and Settings\All Users\Application Data\sdb\data\wrk\DEMODB\Backups 2005\Data\completeDataJan" FILE DATA 0 6 NO

    OK

  4. Open a service session:

    dbmcli on TESTDB>service_connect

    OK

  5. Import the parameter file of DEMODB from the complete data backup DemoDataCompl and thereby copy the database parameters of DEMODB to TESTDB:

    dbmcli on TESTDB>recover_config DataComplete

    OK

    Returncode 0

    Date 20060328

    Time 00162218

    Server GENUA

    Database DEMODB

    ...

    ...

  6. Close the service session:

    dbmcli on TESTDB>service_release

    OK

  7. Change the parameter RUNDIRECTORY to the value named in the scenario:

    dbmcli on TESTDB>param_put RUNDIRECTORY "C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\TESTDB"

    OK

  8. Change the parameter CACHE_SIZE to the value 1000:

    dbmcli on TESTDB>param_put CACHE_SIZE 1000

    OK

  9. Transfer the database to the ADMIN operational state:

    dbmcli on TESTDB>db_admin

    OK

  10. Initialize the new database and create the database system administrator with user name DBADMIN and password SECRET:

    dbmcli on TESTDB>db_activate DBADMIN,SECRET

    OK

  11. Load the system tables:

    dbmcli on TESTDB>load_systab

    OK

    0,OK: everything works fine

    0,""c:\program files\sdb\DEMODB\bin\x_python" "c:\program files\sdb\DEMODB\env\lsystab.py" -R "c:\program files\sdb\DEMODB" -d TESTDB -u dbadmin,*"

    Removing obsolete objects

    Installing Loader tables

    ...

    ...

    Installing tables for JDBC Database Metadata

    Installing tables for SQLDBC Database Metadata

    Installing additional triggers

    ==================================

    Installation successfully finished

    ==================================

Result

The database TESTDB has been created on the basis of the parameter file of DEMODB. The values of the parameters RUNDIRECTORY and CACHE_SIZE have been changed.

TESTDB is in the ONLINE operational state.

For this database, there is currently only the first DBM operator with user name DBM and password DBM and the database system administrator with user name DBADMIN and password SECRET.