26.2. Connecting to a Remote Server with the Metadata Catalog #
If the metadata catalog is configured on a remote server, you must connect to this server before reading metadata.
26.2.1. Connecting Directly Using psql #
You can get the connection parameters from the Postgres Pro DBMS administrator.
Execute the following command:
psql -h IP_address -p port -U username -d database
Where:
IP_address: The IP address of the remote server with the metadata catalog.port: The Postgres Pro DBMS port on the remote server with the metadata catalog.username: The username for the Postgres Pro DBMS on the remote server with the metadata catalog.database: The name of the remote server database where metadata tables are stored.
After executing this command, enter the password for the Postgres Pro DBMS on the remote server with the metadata catalog.
Example 26.3. Executing the Command
psql -h 192.168.23.150 -p 5555 -U my_company -d db_axe
26.2.2. Connecting Over an SSH Tunnel #
An SSH tunnel provides a more secure connection by forwarding the local port to the remote port.
You can get the connection parameters from the Postgres Pro DBMS administrator.
To connect over an SSH tunnel:
Create an SSH tunnel:
ssh -Llocal_port:localhost:remote_portSSH_login@IP_address-NWhere:
local_port: The local port that the SSH tunnel forwards to the remote port.remote_port: The Postgres Pro DBMS port on the remote server with the metadata catalog.SSH_login: The SSH login for the remote server with the metadata catalog.IP_address: The IP address of the remote server with the metadata catalog.-N: Specifies that no remote shell session is opened. Only the port forwarding is configured.
Connect to the remote server with the metadata catalog:
psql -h localhost -plocal_port-Uusername-ddatabaseWhere:
local_port: The local port forwarded by the SSH tunnel.username: The username for the Postgres Pro DBMS on the remote server with the metadata catalog.database: The name of the remote server database where metadata tables are stored.
Example 26.4. Executing the Commands
ssh -L 5454:localhost:5555 my_company_ssh@192.168.23.150 -N
psql -h localhost -p 5454 -U my_company -d db_axe
26.2.3. Connecting Using a Database GUI #
You can connect to the remote server with the metadata catalog using one of the following database GUIs:
pgAdmin.
For more information, refer to the official pgAdmin documentation.
DBeaver.
For more information, refer to the official DBeaver documentation.
DataGrip.
For more information, refer to the official DataGrip documentation.