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-sql
).
rdm-tfs
can also be embedded directly into an application. Refer to the rdm-sql
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 15.2.6 Build 4390 [4-12-2023] http://www.raima.com/ Copyright © 2021, 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.