Copying a Parameter File from a Data Backup

Use

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

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. The backup template name is freely selectable; the data carrier (device/file) property must refer to the location at which the complete data backup of the source database was saved.

You use the command recover_configand specify the newly-defined backup template to import the data backup from the source database to the target database.

Now change individual database parameters if you so desire.

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

To read the prerequisites, see Database Manager CLI, service_connect, recover_config, service_release

See also:

Backup

Creating and Configuring a Database Instance

Changing the Values of Database Parameters

Concepts of the Database System, Configuration Files, Database Parameters

Scenario

You have done a complete data backup of DEMODB on computer GENUA and saved it 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 instance 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 set the parameter RUNDIRECTORY to the value  C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\TESTDB and change 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

Procedure

...

       1.      Call the Database Manager CLI and create the new database instance TESTDB, 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 the Database Manager CLI in session mode, log on as operator DBM with the password DBM, connect to the database instance TESTDB.

>dbmcli -u DBM,DBM -d DEMODB

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                  BERD00146827A.ber.sap.corp

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 instance to the ADMIN operational state:

dbmcli on TESTDB>db_admin

OK

   10.      Initialize the new database instance 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 instance 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 instance, 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.