Below are some basic HCL OneDB commands which might help you get familiar with the database.
- oninit -vy
oninit -vy is to start the engine where ‘v’ means in verbose mode and ‘y’ is for yes. There are many other options to start the engine in different modes. You can explore the options using oninit – command for help
2. onmode -kuy
onmode -kuy is used to stop the engine where ‘k’ means kill, ‘u’ means user sessions and ‘y’ means yes. There are many options where onmode utility is used. You can run onmode – for the utility help
3. onstat –
The onstat – command displays only the output header and the value that is returned from this command indicates the database server mode.
The header takes the following form:
Version–Mode (Type)–(Checkpnt)–Up Uptime–Sh_mem Kbytes
Product name and version number
Current operating mode
If the database server uses High-Availability Data Replication, it indicates whether the type is primary or secondary. If the database server is not involved in data replication, this field does not appear. If the type is primary, the value P appears. If the type is secondary, the value S appears.
If it is set, the header might display two other fields after the mode if the timing is appropriate:
Indicates that a user thread has requested a checkpoint.
Indicates that a checkpoint is in progress. During the checkpoint, access is limited to read only. The database server cannot write or update data until the checkpoint ends.
Indicates how long the database server has been running.
If the system time is manually changed to the past and the server start-up time is later than the current system time, the uptime is not available. In this situation, the header displays the text Uptime Unavailable.
The size of database server shared memory expressed in kilobytes
A sample header for the database server follows:
If the database server is blocked, the onstat header output includes an extra line.
4. onstat -m
Use the onstat -m command to display the 20 most recent lines of the system message log. You can use the onstat -m command option with the database server in any mode, including offline.
Output from this command lists the full pathname of the message log file and the 20 file entries. A date-and-time header separates the entries for each day. A time stamp prefaces single entries within each day. The name of the message log is specified as MSGPATH in the ONCONFIG file.
5. onstat -d
Use the onstat -d command to show information about chunks in each storage space
6. onstat -l
Use the onstat -l command to display information about the physical logs, logical logs, and temporary logical logs.
7. onstat -u
Use the onstat -u command to display a profile of user activity.
8. Onstat -g sql
Use the onstat -g sql command to display SQL-related information about a session.
onstat -g sql session_id
Displays SQL information for a specific session
9. Onstat -g ses
Use the onstat -g ses command to display information about the session.
onstat -g ses
Displays a one-line summary for each session
onstat -g ses session_id
Displays information for a specific session
10. onstat -g ckp
Use the onstat -g ckp command to print checkpoint history and show configuration recommendations if a suboptimal configuration is detected.
For more options and other OneDB utilities please visit below URL: