You can access utility commands through "java -jar"
.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar <command>
This appendix contains the following information on the commands:
java -Xmx256m -Xms256m -jar KVHOME/lib/kvstore.jar makebootconfig [-verbose] -root <rootDirectory> -host <hostname> -harange <startPort,endPort> -store-security [none | configure | enable] -port <port> [-admin <adminPort>] [-runadmin] [-config <configFile>] [-storagedir <directory path>] [-capacity <n_rep_nodes>] [-num_cpus <ncpus>][-memory_mb <memory_mb>] [-servicerange <startPort,endPort>] [-hahost <haHostname>] [-secdir <security dir>] [-pwdmgr {pwdfile | wallet | <class-name>}] [-kspwd <password>] [-param <param=value>]* [-mgmt {snmp|jmx|none}] [-pollport <snmp poll port>] [-traphost <snmp trap/notification hostname>] [-trapport <snmp trap/notification port>] [-force]
where:
-admin <adminPort>
The port on which the web-based Admin Console
is contacted. It only needs to be free on the
node which runs the admin process. The value
defaults to "0", which means that there will
be no admin on this node.
-capacity
<n_rep_nodes>
The total
number of Replication Nodes a Storage Node can
support. The value defaults to "1".
-config <configFile>
Only specified if more than one Storage Node
Agent process will share the same root
directory. This value defaults to
"config.xml".
-force
Optionally specified to force generating the boot configuration files
even if boot config verification finds any invalid parameters.
-hahostname
<hostname>
Can be used to
specify a separate network interface for store
replication traffic. This defaults to the
hostname specified using the -host flag.
-harange
<startPort,endPort>
A
range of free ports which the Replication
Nodes use to communicate among themselves.
These ports should be sequential and there
must be at least as many as the specified
capacity for this node.
-host <hostname>
Identifies a host name associated with the
node on which the command is run. This
hostname identifies the network interface used
for communication with this node.
-kspwd<password>
For script-based configuration you can use this
option to allow tools to specify the keystore
password on the command line. If it is not
specified, the user is prompted to enter the
password.
-memory_mb
<memory_mb>
The total
number of megabytes of memory that is
available in the machine. If the value is 0,
the store will attempt to determine the amount
of memory on the machine, but the value is
only available when the JVM used is the Oracle
Hotspot JVM. The default value is "0".
-num_cpus <ncpus>
The
total number of processors on the machine
available to the Replication Nodes. If the
value is 0, the system will attempt to query
the Storage Node to determine the number of
processors on the machine. This value defaults
to "0".
-port <port>
The
TCP/IP port on which Oracle NoSQL Database
should be contacted. Sometimes referred to as
the registry port. This port must be free on
the node on which this command is run.
-pwdmgr [ pwdfile | wallet ]
Indicates the password manager mechanism used to hold passwords that are needed for access to keystores, etc.
where -pwdmgr can have the following options:
-pwdmgr pwdfile
Indicates that the password store is a read-protected clear-text password file. This is the only available option for Oracle NoSQL Database CE deployments. You can specify an alternate implementation.
-pwdmgr wallet
Specifies Oracle Wallet as the password storage mechanism. This option is only available in the Oracle NoSQL Database EE version.
-root <rootDirectory>
Identifies where the root directory should
reside.
-secdir <security dir>
Specifies the name of the directory within the KVROOT that will hold the security configuration. This must be specified as a name relative to the specified secroot. If not specified, the default value is "security".
-servicerange
<startPort,endPort>
A
range of ports that may be used for
communication among administrative services
running on a Storage Node and its managed
services. This parameter is optional and is
useful when services on a Storage Node must
use specific ports for firewall or other
security reasons. By default the services use
anonymous ports. The format of the value
string is "startPort,endPort." The value
varies with the capacity of the Storage Node.
-storagedir <path>
Specify a path to the directory to be used for
a Replication Node. This flag may be used more
than once in the command to specify multiple
storage directories, but the number should not
exceed the capacity for the node. If no
storage directory is specified, Replication
Nodes use a directory under the root
directory.
The use of the -storagedir argument must be coordinated with the use of the capacity argument. For example, if your Storage Node hosts four disks, you would specify a capacity of four and have four -storagedir arguments.
-store-security [none | configure |
enable]
Specifies if security
will be used or not. If
-store-security none
is
specified, no security will be used. If
-store-security
configure
is specified, security
will be used and the security configuration
utility will be invoked as part of the
makebootconfig process. If
-store-security enable
is specified, security will be used. You will
need to configure security either by utilizing
the security configuration utility or by
copying a previously created configuration
from another system.
Creates a configuration file used to start a not-yet-deployed Storage Node to be used in an instance of Oracle NoSQL Database. The file must not already exist. You only need to specify the admin option(the Admin Console port) on the node which hosts the initial Oracle NoSQL Database administration processes. To create the initial "boot config" file used to configure the installation see Installation Configuration.
OracleNoSQL Database allows Java Management Extensions (JMX) or Simple Network Management Protocol (SNMP) agents to be optionally available for monitoring, in addition to the native monitoring provided by the Admin CLI and the Admin Console. In order to enable JMX or SNMP in the storage node's boot configuration file, you can use the -mgmt, -pollport, -traphost and -trapport options. See Standardized Monitoring Interfaces for more information.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar start [-verbose] -root <rootDirectory> [-config <bootstrapFileName>]
Starts the Oracle NoSQL Database Storage Node Agent (and if configured, store) in the root directory.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar stop [-verbose] -root <rootDirectory> [-config <bootstrapFileName>]
Stops the Oracle NoSQL Database Storage Node Agent and services related to the root directory.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar restart [-verbose] -root <rootDirectory> [-config <bootstrapFileName>]
Stops and then starts the Oracle NoSQL Database Storage Node Agent and services related to the root directory.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar runadmin [-verbose] -host <hostname> -port <port> [single command and arguments]
Runs a utility which provides a command line interface (CLI). It is used to perform store configuration.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar load [-verbose] -source <backupDir> -host <hostname> -port <port> -store <storeName> -username <user> -security <security-file-path> [-load-admin] [-force] [-status <pathToFile>]
where:
-load-admin
Loads the store metadata from the snapshot to the new
store. In this case the -source
directory
must point to the environment directory of the admin node from
the snapshot. The store must not be available for use by users
at the time of this operation.
This option should not be used on a store unless
that store is being restored from scratch. If -force
is specified in conjunction with -load-admin
,
any existing metadata in the store, including tables and
security metadata, will be overwritten.
-host <hostname>
identifies the host name of a node in your
store.
-port <port>
identifies the registry port in use by the
store's node.
-security <security-file-path>
identifies the security file used to specify properties
for login.
-source <backupDir>
identifies the on-disk location where the
snapshot data is stored.
-status <pathToFile>
is an optional parameter that causes the
status of the load operation to be saved in
the named location on the local machine.
-store <storeName>
identifies the name of the store.
-username <user>
identifies the name of the user to login to the
secured store.
Program used to restore a store from a previously
created snapshot. By using this tool, you can restore
the store to any topology, not just the one that was
in use when the snapshot was created.
Load
should be used only to
restore to a new, empty store. Do not use this with an
existing store because it only writes records if they
do not already exist. See Using the Load Program for more information.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar ping [-verbose] [-json] -host <hostname> -port <port>
Attempts to contact a store to get status of
running services. By using the ping
command, you can ensure that the Oracle NoSQL Database
client library can contact the Oracle NoSQL Database
Storage Agent(SNA). You can use the -host option to
check an SNA on a remote host.
If the -json
flag is specified,
then output will be displayed in JSON format.
java -Xmx256m -Xms256m \ -jar KVHOME/lib/kvstore.jar generateconfig [-verbose] -host <hostname> -port <port> -sn <StorageNodeId> -target <zipfile>
Generates configuration files for the specified storage node. The generateconfig command creates the target zipfile which contains the required configuration to re-create the storage node. The top-level directory in the zipfile is the store's root directory.