CONNECT
Connects to another Vertica database to enable data import (using the COPY FROM VERTICA statement) or export (using the EXPORT statement). By default, invoking CONNECT occurs over the Vertica private network. Creating a connection over a public network requires some configuration. For information about using CONNECT to export data to or import data over a public network, see Using Public and Private IP Networks.
When importing from or exporting to a Vertica database, you can connect only to a database that uses trusted- (username-only) or password-based authentication, as described in Security and Authentication. SSL authentication is not supported.
Syntax
CONNECT TO VERTICA database USER username PASSWORD 'password' ON 'host',port
Parameters
database |
The connection target database name. |
username |
The username to use when connecting to the other database. |
password |
A string containing the password to use to connect to the other database. |
host |
A string containing the host name of one of the nodes in the other database. |
port |
The port number of the other database as an integer. |
Privileges
No special permissions required.
Connection Details
Once you successfully establish a connection to another database, the connection remains open for the current session. To disconnect a connection, use the DISCONNECT statement.
You can have only one connection to another database at a time, though you can create connections to multiple different databases in the same session.
If the target database does not have a password, and you specify a password in the CONNECT statement, the connection succeeds, but does not give any indication that you supplied an incorrect password.
Example
=> CONNECT TO VERTICA ExampleDB USER dbadmin PASSWORD 'Password123' ON 'VerticaHost01',5433; CONNECT