gpclient
Manage Greenplum databases from command line
TLDR
Connect to a GlobalProtect VPN using a portal server
Disconnect from the currently connected VPN server
Launch the graphical user interface (GUI) for VPN management
Use OpenSSL workaround to bypass legacy renegotiation errors
Ignore TLS errors during connection
Display version
Display help for any command
SYNOPSIS
gpclient [options] [database_name]
PARAMETERS
-d database_name
Specifies the database to connect to. Overrides the default database specified in the configuration file.
-f config_file
Specifies the path to the configuration file containing connection parameters.
-n connection_name
Specifies the named connection from the configuration file to use.
-q query
Executes the specified SQL query directly from the command line. The results are printed to standard output.
-v
Enables verbose output, providing more details about the connection and execution process.
-h
Displays help information about the command's usage.
DESCRIPTION
The `gpclient` command is a command-line utility that allows users to interact with a Greenplum Database (GPDB) system. It provides a straightforward way to execute SQL queries, manage database objects, and perform other administrative tasks directly from the Linux terminal. It simplifies the process of connecting to a GPDB instance by encapsulating the necessary database connection parameters. This eliminates the need to manually specify parameters such as host, port, user, and database with each connection. It uses configuration files and environment variables to manage connection settings. By utilizing `gpclient`, users can automate routine database operations through scripting. This utility abstracts away some of the complexities of working directly with `psql` or other database tools when connecting to Greenplum, making database interaction more accessible to both developers and administrators. Its simple interface allows quick connections to Greenplum, especially for querying and administration tasks.
CAVEATS
The `gpclient` command relies on a configuration file to store connection parameters. Ensure this file is properly configured and secured. Misconfiguration can lead to connection errors or security vulnerabilities. It depends on Greenplum client tools to be properly installed and configured on the system. User must configure connection file before using gpclient.
CONFIGURATION FILE
The configuration file is typically located in the user's home directory or in a system-wide directory. It contains connection parameters such as hostname, port, username, and database name.
Example entry:
[connection_name]
host = hostname
port = 5432
user = username
dbname = databasename
ENVIRONMENT VARIABLES
Important environment variables influencing `gpclient`:
$GPCLIENT_CONFIG: Specifies the path to the configuration file.
The tool reads from this file if the -f flag isn't used.
HISTORY
The `gpclient` command was specifically developed to simplify database administration and interaction with Greenplum Database systems. It provides a user-friendly interface for connecting to and executing queries against Greenplum. Its development was driven by the need to abstract away the complexity of managing connection parameters directly, facilitating easier scripting and automation of Greenplum tasks. It's actively used for testing and production interaction with Greenplum clusters.
SEE ALSO
psql(1)