Procedure documentationCopying the Parameter File from Another Database 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). The source database and target database must be located on the same computer.

It is essential that you change the parameter value for the run directory of the new database. Otherwise the source database and the target database would mutually overwrite the data in their rundirectories.

You also have to define the paths for the data and log volumes for the new database.

Scenario

You want to create a database TESTDB on the local computer. Its configuration should be nearly identical to that of the database DEMODB on the same computer. However, you want to change the value of the parameter CACHE_SIZE to 1000.

You want the run directory of TESTDB to be created under the path C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\TESTDB.

You want to define a data volume (type: File; name: DISKD0001; size: 32768 pages) and a log volume (type: File; name: DISKL0001; size: 6400 pages).

The database system administrator should have user name DBADMIN and password SECRET.

Prerequisites

You can find the prerequisites under Database Manager CLI, param_copy

Procedure

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

    >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. Open a parameter session:

    dbmcli on TESTDB>param_startsession

    OK

  4. Copy the parameter file from DEMODB:

    dbmcli on TESTDB>param_copy DEMODB

    OK

  5. Change the database parameter CACHE_SIZE to the value 1000:

    dbmcli on TESTDB>param_put CACHE_SIZE 1000

    OK

  6. Change the database parameter RUNDIRECTORY to the value C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\TESTDB:

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

    OK

  7. Check all database parameters:

    dbmcli on TESTDB>param_checkall

    OK

  8. Confirm the changes to the database parameter file:

    dbmcli on TESTDB>param_commitsession

    OK

  9. Create data volume no. 1 with name DISKD0001, type FILE, size 32768 pages:

    dbmcli on TESTDB>param_addvolume 1 DATA DISKD0001 F 32768

    OK

  10. Create log volume no. 1 with name DISKL0001, type FILE, size 6400 pages:

    dbmcli on TESTDB>param_addvolume 1 LOG DISKL0001 F 6400

    OK

  11. Transfer the database to the ADMIN operational state:

    dbmcli on TESTDB>db_admin

    OK

  12. 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

    Load the system tables:

    dbmcli on TESTDB>load_systab

    OK

    0,OK: everything works fine

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

    Removing obsolete objects

    Installing Loader tables

    Installing messages and help

    ...

    ...

    ...

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

    Installation successfully finished

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

Result

The database TESTDB has been created based on the parameter file of DEMODB, and the values of the parameters specified in the scenario have been changed.

TESTDB is in the ONLINE operational state.