connect peer

Using the JDBC GemFire XD peer client driver, connects to a GemFire XD member with specified boot and connection property values.

Syntax

CONNECT Peer 'property=value*' [ AS connectionName ]

Description

Using the JDBC GemFire XD peer client driver, connects to a GemFire XD member with specified boot and connection property values. Optionally, specify a name for your connection. Use the set connection to switch between multiple connections. If you do not name a connection, the system generates a name automatically.

If the connection requires a user name and password, supply those with the optional properties.

If the connect succeeds, the connection becomes the current one and gfxd displays a new prompt for the next command to be entered. If you have more than one open connection, the name of the connection appears in the prompt.

All further commands are processed against the new, current connection.

Example

This example creates a peer client accessor (using host-data=false) connection to a distributed system that uses multicast for discovery:
gfxd> connect peer 'mcast-port=12333;host-data=false' as peerClient;
gfxd(PEERCLIENT)> show connections;
CLIENTCONNECTION -      jdbc:gemfirexd://localhost:1527/
PEERCLIENT* -   jdbc:gemfirexd:
* = current connection
gfxd(PEERCLIENT)> 
This example creates a a peer client accessor connection to a distributed system that uses a locator for discovery:
gfxd> connect peer 'locators=mylocator[1334];host-data=false' as peerClient;