Below are some basic HCL OneDB commands which might help you get familiar with the database.

  1. 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.


Checkpoint flag

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:

Comment wrap
Further Reading
Data Management | November 19, 2020
Powering Cloud-Native Apps with OneDB
What is your company's strategy to managing the growing demands of continuous data and support cloud-native app development at today's rate? For many leaders they seek to modernize their data platform strategy to meet these challenges.  OneDB is a feature-rich and equally able to serve as the foundation for cloud solutions, embedded applications, and IoT or edge solutions. Whether you're ready to build brand cloud-native apps, rehost or re-platform applications to take advantage of the destination platform, HCL OneDB will set you at ease with it's multi-model, cloud-native capabilities, one step at a time.  HCL OneDB is well known for its reliability, performance, and simplicity. Whether deployed on premise, public cloud, or private cloud, clients will be able to gain further advantages.  Many of the unique advantages include: Always-on Transactions - Keep data available at all times, including zero downtime for maintenance and unplanned outages.  Increased Productivity - Stable multi-model data management allows you to focus and quickly deliver the right type of data for the business solutions you need.  Detecting Patterns - HCL OneDB is optimized to find anomalies and deviations for predictive analytics in Spatio-temporal data. Ease of Use - OneDB Explore, our modern graphical administration and monitoring tool for HCL OneDB gives you the ability to monitor what is critical, and take action on what is necessary to keep your business running smoothly.  To learn about OneDB's key capabilities visit our website or download our datasheet here. 
Data Management | October 1, 2020
How Open Global Transactions Make Your Secondary Stuck in Fast Recovery And How To Terminate Those Global Transactions
What is Global Transaction? A global transaction is a transaction that involves more than one database server. HCL OneDB database servers support two types of global transactions: TP/XA with a transaction manager and two-phase commit. HCL OneDB uses a two-phase commit protocol to ensure that distributed queries are uniformly committed or rolled back across multiple database servers. Global Transaction needs to be terminated when your secondary server is stuck in Fast recovery mode and is not coming online. So, we need to locate and terminate global transactions. Sometimes, GT can be terminated gracefully or not, based on their FLAGs. Scenario 1: Restarting Updateable secondary after a crash will get stuck in fast recovery mode until all open transactions are processed. Global transaction can be terminated gracefully. In this scenario, your Updateable secondary was crashed due to several reasons and upon starting, it gets stuck in fast recovery mode. The message below is in online.log of sds node: 12:13:04 Started processing open transactions on secondary during startup The secondary will not be operational until all the global transactions were cleared. The message above shows it is incomplete. The secondary will allow new sessions only if you see the completed string in the log. 20:10:05 Finished processing open transactions on secondary during startup. Example In the below example SDS was stuck in FR mode for almost 8 hours. We should look for the output of onstat –G from both primary and secondary. They should have different addresses in memory, but they can be identified by the "data" column. The Flag should have ‘H’ at the 3rd position, which means it was heuristically rolling back or rolled back. We can zap them using onmode –H 0x61fbe988 and onmode -H 0x61fbecf0 on SDS node. Immediately you will see your SDS will be in operational...
Data Management | October 1, 2020
Save Your Money Using Data Compression
What is Compression By minimizing the disk space that is used by your data and indexes, it’s easy to save money Helps improving I/O Ability to store data rows in compressed format on disk Saves up to 90% of row storage space Ability to estimate possible compression ratio Fits more data onto a page Fits more data into buffer pool Reduces logical log usage How IDS Storage Optimization works! By considering the entire row and all its columns IDS looks for repeating patterns and stores those patterns as symbols in a compression dictionary By considering the entire row and all its columns IDS looks for repeating patterns and stores those patterns as symbols in a compression dictionary Creating a compression dictionary Compressing the data in table After creating the dictionary, IDS starts a background process that goes through the table or fragment and compresses the table or fragment rows. The process compresses each row and leaves it in the page where it was compressed. Any new rows that are inserted or updated are also compressed. This compress operation runs while other transactions and queries are occurring on the table. Therefore, IDS performs the operation in small transactions and holds locks on the rows being actively compressed for only a short duration. Reclaiming free space After all the rows have been repacked, the shrink operation removes the unused table or fragment space and returns free space to the dbspace that contains the table or fragment. What we are using behind the scene! Lempel-Ziv (LZ) based algorithm – static dictionary, built by random sampling Frequently repeating patterns replaced with 12-bit symbol numbers Any byte that does not match a pattern is also replaced with a 12-bit reserved symbol number Patterns can be up to 15 bytes long Max possible compression = 90%...
a/icon/common/search Created with Sketch.