DEV Community

mmllllzcn
mmllllzcn

Posted on

GBase Database Reinstallation: 6 Steps to Clean Up the Old Environment

Summary: Learn how to prepare for a clean GBase Database(GBase 8s) reinstallation by checking the old instance, temporary files, installation directory, environment variables, and port configuration.

Reinstalling GBase Database(GBase 8s) doesn't always resolve the original problem. Errors such as “version already exists” or port conflicts may persist if remnants of the previous installation remain.

Before reinstalling, follow these six steps to inspect and clean up the old environment safely.

1. Stop the Old Database Instance

If the old instance is still running, identify it and shut it down using the appropriate procedure.

onstat -
ps -ef | grep '[o]ninit'
Enter fullscreen mode Exit fullscreen mode

After confirming the target instance, you can use the appropriate shutdown command, such as:

onmode -ky
Enter fullscreen mode Exit fullscreen mode

Caution: Confirm the instance and its impact before shutting it down. This command can interrupt database services.

2. Inspect Temporary Files Under /tmp

Installation attempts may leave temporary files behind. Inspect relevant files associated with the previous installation and remove only those confirmed to be safe to delete.

Don't clear the entire /tmp directory indiscriminately, especially on a shared or production server.

3. Verify the Old Installation Directory

Check the installation directory:

ls -ld /opt/GBASE/gbase
Enter fullscreen mode Exit fullscreen mode

If the previous installation is no longer needed, confirm the path before removing it:

rm -rf /opt/GBASE/gbase
Enter fullscreen mode Exit fullscreen mode

If you used a custom installation path, verify and use that path instead. Make sure no other instance or application depends on the directory.

4. Review Old Environment Variables

Inspect the relevant user's shell profile and remove or update obsolete settings, including:

  • GBASEDBTDIR
  • ONCONFIG
  • GBASEDBTSQLHOSTS

The exact variables depend on your installation configuration. Avoid removing settings that are still required by other instances.

Open a new shell or reload the updated profile, then verify the environment before reinstalling.

5. Check Whether the Database Port Is Available

If the configured port is 9088, check whether a process is listening on it:

ss -tlnp | grep 9088
Enter fullscreen mode Exit fullscreen mode

Replace 9088 with the actual port configured for your instance.

If a process still owns the port, identify it before taking action. A port conflict may involve another database instance or an unrelated service.

6. Reinstall GBase Database

Once the old environment has been inspected and the necessary cleanup is complete, run the installer according to your chosen installation method.

For an interactive installation, the command may be:

sh ids_install
Enter fullscreen mode Exit fullscreen mode

Follow the installation prompts and verify the resulting instance configuration, ownership, locale, and connection settings.

Final Checklist

Before starting a fresh GBase Database installation, confirm that:

  • The intended old instance is stopped.
  • Relevant temporary files have been reviewed.
  • The old installation directory has been handled safely.
  • Obsolete environment variables have been updated.
  • The required port is available.
  • The new installation settings are correct.

A clean reinstall starts with a verified environment—not indiscriminate deletion. Documenting these steps in your operations handbook helps make GBase Database reinstallation safer, more repeatable, and easier to troubleshoot.

What's the most persistent reinstallation issue you've encountered?

Top comments (0)