Connect Command

The connect command connects to the database specified by ConnectionURLString. It connects by issuing a getConnection request with the specified URL, using java.sql.DriverManager or javax.sql.DataSource to set the current connection to that URL.


CONNECT ConnectionURLString  [ AS Identifier ]


The URL of the database. Note that this URL typically includes connection parameters such as user name, password, or security options.


The optional name that you want to assign to the connection.

If the connection succeeds, the connection becomes the current one and all further commands are processed against the new, current connection.

Example 1: Connecting on a Cluster

If you are running Splice Machine on a cluster, connect from a machine that is NOT running an HBase RegionServer and specify the IP address of a regionServer node, e.g.

splice> connect 'jdbc:splice://regionServer:1527/splicedb';

This example includes a user ID and password in the connection URL string:

splice> connect 'jdbc:splice://;user=splice;password=admin';

And this example includes specifies that SSL peer authentication will be enabled for the connection:

splice> connect 'jdbc:splice://;user=splice;password=admin;ssl=peerAuthentication';

You can only connect with SSL/TLS if your administrator has configured this capability for you.

Example 2: Connecting to the Standalone Version

If you’re using the standalone version of Splice Machine, specify localhost instead.

splice> connect 'jdbc:splice://localhost:1527/splicedb';

Here is an example that includes a user ID and password in the connect string:

splice> connect 'jdbc:splice://localhost:1527/splicedb;user=joey;password=bossman';