Products Support Documentation Download
Connecting rdm-sql to a remote server

The steps outlined above used rdm-sql as a standalone SQL client by using a local SQL server embedded in it. Like the other client-server database systems, RDM SQL allows rdm-sql to connect to a remote SQL server (called rdm-tfs).

Note
rdm-tfs can also be embedded directly into an application. Refer to the rdm-tfs Getting Started section for details.

Start a remote server first. Navigate to your working directory, where you have the bicycle_db database, and type the following command.

On UNIX/Linux:

$ rdm-tfs --start

On Windows:

C:> rdm-tfs --start

The product banner will be displayed, indicating the server is ready for client connections.

Transactional File Server
Raima Database Manager 14.1.2 Build 3053 [7-11-2018] http://www.raima.com/
Copyright (c) 2018 Raima Inc., All rights reserved.
rdm-tfs: Info: Started successfully
$

On Windows, the command will automatically start the server in a separate command-line terminal, giving the control of the original terminal to you.

Connect to the remote server by typing the following command.

$ rdm-sql --connect tfs:/// --database BICYCLE_DB

On Windows:

C:> rdm-sql --connect tfs:/// --database BICYCLE_DB

The terminal for rdm-tfs should display the following lines, indicating a successful connection.

[2018-07-23 11:07:48] URL='AllocConnectEx'
[2018-07-23 11:07:48] 0=rdm_sqlAllocConnectEx(0x7f79df0fc508, defaultOpenMode=SHARED;autoCommit=false;optimizeParameters=true)
[2018-07-23 11:07:48] URL='SetEncrypt'
[2018-07-23 11:07:48] 0=rdm_sqlSetEncrypt(0x7f79df0fc508, (nil))
[2018-07-23 11:07:48] URL='Connect'
[2018-07-23 11:07:48] 0=rdm_sqlConnect(0x7f79df0fc508, @:0, 'BICYCLE_DB', 0)
[2018-07-23 11:07:48] URL='AllocStmt'
[2018-07-23 11:07:48] 0=rdm_sqlAllocStmt(0x7f79df0fc508, 0x7f79df0d5c08)
[2018-07-23 11:07:48] URL='AllocStmt'
[2018-07-23 11:07:48] 0=rdm_sqlAllocStmt(0x7f79df0fc508, 0x7f79df0d4488)
[2018-07-23 11:07:48] URL='AllocStmt'
[2018-07-23 11:07:48] 0=rdm_sqlAllocStmt(0x7f79df0fc508, 0x7f79df0d3c08)
[2018-07-23 11:07:48] URL='AllocStmt'
[2018-07-23 11:07:48] 0=rdm_sqlAllocStmt(0x7f79df0fc508, 0x7f79df0d3388)
[2018-07-23 11:07:48] URL='AllocStmt'
[2018-07-23 11:07:48] 0=rdm_sqlAllocStmt(0x7f79df0fc508, 0x7f79df07c0b8)

You should now be able to work with the bicycle_db database managed under rdm-tfs.

rdm-sql: SELECT * FROM bicycle;
ID| MAKE | MODEL | TYPE
--------------------+---------------------+---------------------+-----------
1| Trek | Domane | Road
2| Trek | FX | Hybrid
3| Cannondale | Synapse | Road
*** 3 row(s) returned

For the detailed usage of rdm-sql, refer to the rdm-sql section of the RDM User Guide.