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.
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.
You can find the prerequisites under Database Manager CLI, param_copy
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
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>
Open a parameter session:
dbmcli on TESTDB>param_startsession
OK
Copy the parameter file from DEMODB:
dbmcli on TESTDB>param_copy DEMODB
OK
Change the database parameter CACHE_SIZE to the value 1000:
dbmcli on TESTDB>param_put CACHE_SIZE 1000
OK
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
Check all database parameters:
dbmcli on TESTDB>param_checkall
OK
Confirm the changes to the database parameter file:
dbmcli on TESTDB>param_commitsession
OK
Create data volume no. 1 with name DISKD0001, type FILE, size 32768 pages:
dbmcli on TESTDB>param_addvolume 1 DATA DISKD0001 F 32768
OK
Create log volume no. 1 with name DISKL0001, type FILE, size 6400 pages:
dbmcli on TESTDB>param_addvolume 1 LOG DISKL0001 F 6400
OK
Transfer the database to the ADMIN operational state:
dbmcli on TESTDB>db_admin
OK
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
==================================
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.
Creating and Configuring a Database
Changing the Values of Database Parameters
Database Administration, Configuration Files, Database Parameters
Glossary, Run Directory