After installing GBase Database (GBase 8s) using the typical installation option, you may notice that the instance is ready to use, but you're not sure which port it listens on.
In this setup, the port may be assigned automatically. For the instance discussed here, the default port is 30490. But rather than relying on memory, you can verify the actual configuration in two ways.
Method 1: Check the Instance Script and /etc/services
First, find the instance name in the generated instance script:
grep GBASEDBTSERVER /opt/GBASE/gbase/ol_gbasedbt1210.ksh
Then look up the corresponding service entry:
grep ol_gbasedbt1210 /etc/services
If the service is registered there, the output should show its configured port and protocol. The exact entry depends on your installation.
Note: /etc/services maps service names to port numbers and protocols. It does not, by itself, prove that the database is running or listening on that port.
Method 2: Check the sqlhosts File
The instance-specific sqlhosts file is another useful place to check connection settings:
cat /opt/GBASE/gbase/etc/sqlhosts.ol_gbasedbt1210
A typical entry might look like this:
ol_gbasedbt1210 onsoctcp hostname 30490
The fields identify the server name, connection protocol, host, and port. In this example, onsoctcp indicates a TCP/IP connection, and 30490 is the configured port.
Replace hostname with the actual host value shown in your configuration.
For connection troubleshooting, make sure the client uses the correct server name and that the host and port match the instance's actual configuration.
Which Method Should You Use?
Both methods are useful, but the sqlhosts file is a good starting point when you're investigating client connection settings. The instance script and /etc/services provide additional context about the configured server name and service mapping.
If a connection still fails, verify that the instance is running and confirm that the expected port is listening. A configured port alone does not guarantee a successful connection.
Final Takeaway
With GBase Database (GBase 8s), installation scripts may configure values automatically, but you can still inspect them afterward.
Once you've confirmed the instance name and port, document both in your environment notes. This small habit makes connection setup, application configuration, and future troubleshooting much easier.
Have you ever spent time troubleshooting a GBase Database connection only to discover that you were using the wrong port?
Top comments (0)