connect
Encapsulates commands that connect to the specified host and registry port to perform administrative functions or connect to the specified store to perform data access functions.
The current store, if any, will be closed before connecting to another store. If there is a failure opening the specified KVStore, the following warning is displayed: "Warning: You are no longer connected to KVStore".
The subcommands are as follows:
connect admin
connect admin -host <hostname> -port <registry port>
[-username <user>] [-security <security-file-path>] Connects to the specified host and registry port to perform administrative functions. An Admin service must be active on the target host. If the instance is secured, you may need to provide login credentials.
where:
-
-host <hostname>Identifies the host name of a node in your store.
-
-port <registry port>The TCP/IP port on which Oracle NoSQL Database should be contacted. This port should be free (unused) on each node. It is sometimes referred to as the registry port.
-
-username <user>Specifies a username to log on as in a secure deployment.
-
-security <security-file-path>In a secured deployment, specifies a path to the security file. If not specified in a secure store, updating the sn-target-list will fail.
connect store
connect store [-host <hostname>] [-port <port>] -name <storename>
[-timeout <timeout ms>]
[-consistency <ABSOLUTE(default) | NONE_REQUIRED>]
[-durability <COMMIT_SYNC(default) | COMMIT_NO_SYNC | COMMIT_WRITE_NO_SYNC>]
[-username <user>] [-security <security-file-path>] Connects to a data store to perform data access functions. If the instance is secured, you may need to provide the log in credentials.
Use the timeout, consistency and durability flags to override the default connect configuration.
where:
-
-host <hostname>Identifies the host name of a node in your store.
-
-port <port>The TCP/IP port on which Oracle NoSQL Database should be contacted. This port should be free (unused) on each node.
-
-name <storename>Identifies the name of the store.
-
-timeout <timeout ms>Specifies the store request timeout in milliseconds.
-
-consistencySpecifies the store request consistency. The read operations are serviced either on a master or a replica node depending on the configured value. For more details on consistency, see Consistency Guarantees. The following policies are supported. They are defined in the
Consistencyclass of Java APIs.If you do not specify this value, the default value ABSOLUTE is applied for this session.- ABSOLUTE - The read operation is serviced on a master node. With ABSOLUTE consistency, you are guaranteed to obtain the latest updated data.
- NONE-REQUIRED - The read operation can be serviced on a replica node. This implies, that if the data is read from the replica node, it may not match what is on the master. However, eventually, it will be consistent with the master.
For more details on the policies, see Consistency in the Java Direct Driver API Reference Guide.
-
-durabilitySpecifies the store request durability. This value defines the durability policies to be applied for achieving master commit synchronization, that is, the actions performed by the master node to return with a normal status from the write operations. For more details on durability, see Durability Guarantees.
If you do not specify this value, the default value COMMIT_SYNC is applied for this session.- COMMIT_NO_SYNC - The data is written to the host's in-memory cache, but the master node does not wait for the data to be written to the file system's data buffers or subsequent physical storage.
- COMMIT_SYNC - The data is written to the in-memory cache, transferred to the file system's data buffers, and then synchronized to a stable storage before the write operation completes normally.
- COMMIT_WRITE_NO_SYNC - The data is written to the in-memory cache, and transferred to the file system's data buffers, but not necessarily into physical storage.
For more details on the policies, see Durability in the Java Direct Driver API Reference Guide.
-
-username <user>Specifies a username to log on as in a secure deployment.
-
-security <security-file-path>In a secured deployment, specifies a path to the security file.
For example:
$KVROOT/security/user.security