You can create the HOTELDBdatabase instance in the Database Manager CLI using the DBM commands listed below.
You then load the data for the procedures described in the SQL tutorial to the HOTELDB database instance using the ltutorial.py python script. This script is part of the MaxDB software package as of version 7.6.
See also:
· You have the authorizations of an operating system user for the server on which the database instance is to be created.
· As of version 7.5, to create a database instance on UNIX, you must be logged on as operating system user root, sdb, or as a member of the sdba operating system user group (see UNIX: Special Operating System Users and User Groups).
· To create a database instance on a remote server running Microsoft Windows, you must also have administrator authorizations for the database server and the log on as batch job authorization. For information about maintaining operating system users, see your operating system documentation.
· If several versions of the database software are available on the database server, you must specify the path of the version to which this database instance is to be assigned when registering the database instance. To do so, use the option –R (installation directory of the database software) when you call the Database Manager CLI.
...
1. Enter the DBM command for creating a new database instance and specify HOTELDB as the name of the database instance and the first DBM operator for this database instance with the user name DBM and password DBM:
dbmcli db_create HOTELDB DBM,DBM
There are several alternatives to this step:
· If several versions of the database software are installed on your server, use the option -R <dependent_path_7.6> to specify the software version to be used (the <dependent_path_76> is the path you defined when installing version 7.6 for storing the server software for the database version):
dbmcli -R <dependent_path> db_create HOTELDB DBM,DBM
· If you want to create the database instance on a remote host, specify the remote host by also entering the option -n <database_server> and identifying yourself as an operating system user on this host:
dbmcli -n <database_server> db_create HOTELDB DBM,DBM <os_user>,<os_user_password>
·
UNIX systems do not distinguish between
communication with a local host and a remote host. For this reason, you always
have to identify yourself as an operating system user. If you want to create
the HOTELDB database instance locally, you can skip this step
by specifying the option
-s:
dbmcli -s db_create HOTELDB DBM,DBM
2. Start the Database Manager CLI in session mode:
dbmcli -d HOTELDB -u DBM,DBM
dbmcli on HOTELDB>
3. Then execute the following DBM commands (choose the relevant commands for your operating system) consecutively.
Command sequence on Microsoft Windows:
param_startsession
param_init
param_put _UNICODE YES
param_put SESSION_TIMEOUT 0
param_put MAXUSERTASKS 20
param_put CACHE_SIZE 2500
param_put MAXDATAVOLUMES 64
param_checkall
param_commitsession
param_addvolume 1 DATA "C:\Documents and Settings\All Users\Application Data\sdb\HOTELDB\data\DISKD0001" F 32768
param_addvolume 1 LOG "C:\Documents and Settings\All Users\Application Data\sdb\HOTELDB\log\DISKL0001" F 16384
db_admin
db_activate DBA,DBA
load_systab
exec_load DBA,DBA ltutorial.py
Command sequence on UNIX/Linux:
param_startsession
param_init
param_put _UNICODE YES
param_put SESSION_TIMEOUT 0
param_put MAXUSERTASKS 20
param_put CACHE_SIZE 2500
param_put MAXDATAVOLUMES 64
param_checkall
param_commitsession
param_addvolume 1 DATA "/var/opt/sdb/data/HOTELDB/data/DISKD0001" F 32768
param_addvolume 1 LOG "/var/opt/sdb/data/HOTELDB/log/DISKL0001" F 16384
db_admin
db_activate DBA,DBA
load_systab
exec_load DBA,DBA ltutorial.py
The HOTELDB database instance has been created as a UNICODE database with a data area of 256 MB (32768 pages) and a log area of 128 MB (16384 pages). Both volumes are of the type "file".
The maximum number of data volumes is 64; the cache size is 2500 pages. The database instance has a maximum of 20 user tasks.
The name of the database system administrator is DBA with password DBA.
The database instance was filled with the data used in the SQL tutorial.
The operational state of the database instance is now ONLINE.