When you call a command line program, you choose an operating mode. You can call the following command line programs in various operating modes:
· Database Manager CLI
· SQLCLI
The Loader also has several operating modes. However, they are different than the operating modes described here.
Operating Mode
Name |
Description |
Command mode |
Together with the program call, you enter any options and then exactly one command. The command is executed. Then the session and the program are ended. |
Session mode |
First you just call the program and establish the connection with the database instance. You can now enter and execute commands in succession without the program or the connection to the database instance being ended. To exit session mode, you end the program. This also closes the connection to the database instance. |
Script mode |
You enter the name of a script file that contains the commands to be executed when you call the program. The program executes the script in the background. |
Database Manager CLI, Calling the Database Manager CLI
SQLCLI, Executing Commands
Loader, Calling the Loader
The following examples use the database instance DEMODBand the DBM operator OLEG with the password MONDAY.
Transferring the database instance to the ONLINE operational state:
dbmcli –d DEMODB –u OLEG,MONDAY db_online
Calling the Database Manager CLI in session mode:
dbmcli –d DEMODB –u OLEG,MONDAY
dbmcli on DEMODB>
Transferring the database instance to the OFFLINE operational state:
dbmcli on DEMODB> db_offline
Transferring the database instance to the ADMIN operational state:
dbmcli on DEMODB> db_admin
Exiting the Database Manager CLI:
dbmcli on DEMODB> exit
Executing the script C:\tmp\testscript:
dbmcli –d DEMODB –u OLEG,MONDAY –i "C:\tmp\testscript"