13.1.2 Connecting to EDB Ark with the psql Client

Table of Contents Previous Next


13 Database Management : 13.1 Connecting to the Cluster : 13.1.2 Connecting to EDB Ark with the psql Client

After connecting to a server hosted on EDB Ark with the psql client, you can invoke SQL commands or use meta-commands to:
By default, an EDB Ark cluster is only open to connections via port 9999 on the master node. Port 9999 is a good choice if you are connecting for the purpose of querying the database, but if you are modifying database objects, or performing administrative functions, you should connect directly to the server's listener port.
Some administrative functions, if executed over port 9999, may be directed to the incorrect node of a multi-node cluster where they may not have the intended effect, or may return an invalid value.
The listener port number is displayed in the DBPORT column of the Details panel of the Clusters tab.
After installing Advanced Server or PostgreSQL on a local workstation, you can use psql to perform administrative tasks on an EDB Ark cluster.
To open the psql client on an Advanced Server workstation, navigate through the Applications (or Start) menu to the Postgres Plus Advanced Server menu; then, open the Run SQL Command Line menu, and select EDB-PSQL.
To open a psql client on a PostgreSQL workstation, navigate through the Applications (or Start) menu to the PostgreSQL menu, and select SQL Shell (psql).
C:\Users\susan\AppData\Local\Temp\VMwareDnD\9028fe80\Screenshot-Terminal.png
When prompted for a Server, enter the IP address or DNS name of the EDB Ark server. The IP address is displayed in the DNSNAME column on the Details panel of the Clusters tab of the Ark console.
When prompted for a Database, enter the name of the database to which you wish to connect. By default, an Advanced Server cluster is created with a database named edb; a PostgreSQL cluster is created with a database named postgres.
When prompted for a Port, enter the port on which the server is listening. For database queries, you can use port 9999; if you are modifying database objects or performing administrative functions, you should use the server's listener port (5444 for an Advanced Server cluster, 5432 for a PostgreSQL cluster).
When prompted for a Username, enter the role you wish to use when connecting to the server. The name of the database superuser is specified in the Master User field when defining an EDB Ark server cluster. By default, the Advanced Server database superuser is enterprisedb. The default superuser of a PostgreSQL database is postgres.
When prompted for a Password, enter the password associated with that role. The database superuser's password is specified in the Master Password field when defining an EDB Ark server cluster.
ssh -i/path/ssh_key root@host_name
Include the -d option to specify the name of the database to which you wish to connect. The session opens as shown in Figure 13.3.
Screen Shot 2015-06-22 at 1
To exit the psql client, enter \q.
For information about using psql and the psql meta-commands, please see the Postgres documentation at:

13 Database Management : 13.1 Connecting to the Cluster : 13.1.2 Connecting to EDB Ark with the psql Client

Table of Contents Previous Next