Lianja ODBC Driver on Linux

From Lianjapedia
Jump to: navigation, search

See Also

Lianja ODBC Driver on Windows, Lianja ODBC Manager on Windows, Lianja Server Manager on Linux, Lianja Server Manager on Windows, SQL System Tables


The unixODBC ODBC Driver Manager is required and should be installed before the Lianja SQL Server to allow the Lianja installer to add the Lianja ODBC Driver and the sample LianjaDemo DSN to the Driver Manager's ini files.

The unixODBC isql utility can be used to access the LianjaDemo DSN and any new DSNs you create:

isql -v LianjaDemo

New DSNs should be added to the unixODBC odbc.ini file. The location of the system and current user's odbc.ini file can be obtained as follows:

odbcinst -j

The DSN format is as follows:

[<unique DSN>]
Description = <informative text>
Driver = Lianja
Database = <URL>

Where the <URL> is in the following format:




The following may also be included:


For example

Driver	= Lianja

Driver	= Lianja


  • As an alternative to manually editing the files, the same format can be used to create template files for installation by odbcinst:
$ odbcinst -i -s <-l|-h> -f template_file

Running 'odbcinst' with no parameters gives usage instructions.

  • The <node> can be the hostname or IP address. A '?' can be used to signify the local host.
  • Storing the user and password details in the DSN is optional and careful consideration should be given to security implications. A '?' can be used in place of the user and password for local host connections.

From Lianja v5.0 Lianja Users and Roles are used to authenticate ODBC clients on the Lianja Server.
This means that Row level Security and Dynamic Data Masks are also applied to Lianja data accessed via ODBC.

DSNless Connection

To connect to the Lianja ODBC Driver without creating a DSN, use the following string format:

DRIVER=Lianja;SERVERNAME=<IP or Hostname>;USERNAME=<user>;PASSWORD=<user-password>;DATABASE=<database>

For example:

lcDSNLess="DRIVER=Lianja;" ; 
+ "SERVERNAME=;USERNAME=myuser;PASSWORD=mypassword;DATABASE=southwind"
if lnConnHandle > 0
	sqlexec(lnConnHandle,"select * from shippers")

Managing the Lianja Server Service

Please see Lianja Server Manager on Linux for information on managing the Lianja Server. The Lianja Server listens for requests for both the Lianja SQL Server and the Lianja Cloud Server.