There are NitrosBase distributions for the following operating systems:
There are the following ways to connect to NitrosBase:
Respective libraries and drivers are included in the distributions. Runtime environments needed for these librariers to function should be deployed on a machine where NitrosBase is installed.
Otherwise, one has to use the
testsql utility (included in the distributions for both Windows and Linux).
See also the «Connectors and APIs» document for more details.
NitrosBase distributions are portable. It is sufficient to unpack the archive anywhere in the file system.
Linux and Windows distributions are almost equivalent structurally and functionally unlike otherwise stipulated explicitly.
Unpacked distribution contains the following folders:
Unlike the Linux NitrosBase distribution, the Windows one contains the ODBC driver. In order to install the driver, run Windows shell (cmd.exe) as an administrator, then change directory to
bin and run
In order to uninstall the driver, run
Execute two shell files consequently
.sh files under Linux, .bat files under Windows).
After that, the server will be started and the
sntest1 database will be created.
sntest1 database will be filled with data.
Now one can check workability using the
echo select name,lastname,age from person limit 10 | testsql.exe -m speed -t nb -d sntest1 -H 127.0.0.1 -P 3020 -i -v
The NitrosBase server maintains the database and handles requests to it. A single server maintains a single database. In order to maintain multiple databases, one should start multiple servers.
server.exe -c create|open|close -d <dbname> [-p <datapath>] [-n <cluster_node>] [-m worker|watchdog] [-b] [-P <port>] [-N nodes..] [-R <restorepath>] --help или -h -- help --command=<action> -c <command> -- command: create - create new database and start server for it open - start server for database specified close - stop server of database specified --dbname=<dbname> -d <dbname> -- database name (see also notes about cluster mode) --dbpath=<path> -p <path> -- path to directory with database files --clusternodes=<nodes> -N <nodes> -- (cluster mode) number of cluster nodes --node=<cluster_node> -n <cluster_node> -- (cluster node) node number (from 0 to cluster_nodes-1); that number will be added to the database name from the <dbname> parameter; after e.g. -n 1 -d dbfoo the database name will be dbfoo1. --mode=<mode> -m <mode> -- working mode: supervisor - watchdog mode, restarts server automatically every time failure occurs (default) worker - no restart after failure --background -b -- process will be started in background mode --port=<port> -P <port> -- TCP port listened by server --restorepath=<restorepath> -R <restorepath> -- path to directory with backups
Thus, the server has three commands (create, open, close) and two modes (supervisor, worker):
testsql utility is used as a client (the utility also may be used as a client of other DBMSs).
testsql -h testsql -m compare -t dbtype1 (-c connstr1|-d dbname1 -h host1 -u user1 -p pw1 -P port1) -t dbtype2 (-c connstr2|-d dbname2 -h host2 -u user2 -p pw2 -P port2) (-q query|-i) [-v] testsql -m speed|shell -t dbtype (-c connstr|-d dbname -h host -u user -p pw -P port) (-q query|-i) [-v] -h -- help -m compare|speed|shell -- mode: compare - compares query execution against different DBMSs speed - profiles query execution speed shell - interactive mode -t odbc|mysql|pgsql|nb -- DBMS, "nb" for NitrosBase -d dbname -- database name -H hostname -- database host name -u username -- database user name -p password -- database user password -P port -- server TCP port -c <connstr> -- connection string, instead of -H -u -p -P -d -q <query> -- query to execute -n <iterations> -- repeats query N times -i -- reads query from standard input -v -- outputs query results; always on in compare 'compare' and 'shell' modes