If you have installed GBase Database(GBase 8s), you have probably seen this command:
oninit -ivy
It is commonly used when initializing and starting a GBase 8s instance. But what do -i, -v, and -y actually mean?
Understanding these options makes it much easier to troubleshoot GBase Database startup problems.
What Does oninit -ivy Mean?
The basic command format is:
oninit [options]
The three options in oninit -ivy have different purposes:
| Option | Meaning | Purpose |
|---|---|---|
-i |
Initialize | Initializes the database server and creates the initial database storage structures when required |
-v |
Verbose | Displays more detailed information during startup |
-y |
Yes | Automatically answers yes to prompts |
So:
oninit -ivy
essentially means initialize, show verbose output, and automatically confirm prompts.
When Should You Use -i?
The -i option is associated with initializing the database server. It should not be treated as a normal option for every restart.
For example, during initial instance setup:
oninit -ivy
After the instance has already been initialized, routine startup normally does not require -i.
For example:
oninit -vy
The exact startup procedure can depend on how your GBase Database environment was created and configured, so avoid repeatedly using initialization options on an existing production instance unless the procedure specifically requires it.
What Does -v Do?
-v enables verbose startup output.
This is particularly useful when troubleshooting GBase Database startup failures, because you can get more information about where the startup process is stopping.
For troubleshooting:
oninit -v
You can also combine it with other options:
oninit -vy
When diagnosing a problem, verbose output is often more useful than simply checking whether the command returned successfully.
What Does -y Do?
-y automatically answers yes to prompts that would otherwise require interactive confirmation.
This makes it useful for scripted or automated startup procedures:
oninit -ivy
However, -y should be used carefully. Automatically confirming a destructive or initialization-related operation is not something you want to do blindly on an existing production instance.
Routine Stop and Restart
A common workflow is to stop the instance and then start it again.
For example:
onmode -ky
oninit -vy
The important distinction is that onmode -ky stops the database server, while oninit starts it again. The -i option is not normally part of a routine restart.
Always verify the instance state after startup:
onstat -
Checking Startup Logs
If GBase Database does not start as expected, check the server messages and online log.
For example:
tail -f $GBASEDBTDIR/tmp/online.log
You can also use:
onstat -m
Depending on the failure, you may see messages related to configuration, shared memory, storage, permissions, or network connectivity.
Typical problems include:
Cannot find onconfig file
Cannot bind to port
Not enough shared memory
Permission denied
The exact error message is usually more useful than the fact that oninit simply failed.
A Simple GBase Database Startup Checklist
When troubleshooting a GBase 8s startup failure, check these items in order:
1. Check the Environment
echo $GBASEDBTDIR
echo $GBASEDBTSERVER
echo $ONCONFIG
echo $GBASEDBTSQLHOSTS
Make sure the variables point to the correct installation, instance, configuration, and sqlhosts files.
2. Check the Configuration
ls $GBASEDBTDIR/etc/$ONCONFIG
If the file cannot be found, fix the environment or configuration path before trying to start the instance again.
3. Check the Instance Status
onstat -
This tells you whether the GBase Database server is online and provides basic instance information.
4. Check the Server Messages
onstat -m
For more detailed information, inspect the online log:
tail -50 $GBASEDBTDIR/tmp/online.log
Don't Treat oninit -ivy as a Magic Command
One common mistake is to memorize:
oninit -ivy
without understanding what it does.
The important part is knowing when initialization is appropriate and when a normal startup is enough.
A useful mental model is:
-
-i→ initialization -
-v→ verbose startup information -
-y→ automatically answer yes
For routine operations, avoid adding initialization options simply because they were used during the first setup.
Key Takeaway
oninit -ivy is a familiar command for GBase Database(GBase 8s) administrators, but each option has a specific purpose.
Understanding -i, -v, and -y helps you choose the right startup command and makes troubleshooting much easier.
When GBase Database fails to start, don't immediately rerun oninit -ivy. First check the environment variables, onconfig, instance status, server messages, and online log.
That small habit can turn a frustrating GBase 8s startup failure into a much faster diagnosis.
Top comments (0)