Difference between revisions of "ODBC: Data Source Configuration"

From Recital Documentation Wiki
Jump to: navigation, search
(Linux)
(Linux)
Line 56: Line 56:
  
 
Note: The '?' can be used for the servername, username and password where the data is on the local server and [[DB_LOCAL_LOGIN]] is enabled.
 
Note: The '?' can be used for the servername, username and password where the data is on the local server and [[DB_LOCAL_LOGIN]] is enabled.
 +
 +
Additional datasources can be added by editing the 'odbc.ini' text file directly, using the following format:
  
 
<pre>
 
<pre>
 +
[<unique DSN>]
 +
Description = <informative text>
 +
Driver = Recital
 +
Database = <URL>
 +
</pre>
 +
 +
Where the <URL> is in the following format:
 +
 +
<pre>
 +
ODBC:RECITAL:SERVERNAME=<node>;USERNAME=<user>;PASSWORD=<password>;DATABASE=<database>;
 +
</pre>
 +
 +
or
 +
 +
<pre>
 +
ODBC:RECITAL:SERVERNAME=<node>;USERNAME=<user>;PASSWORD=<password>;DIRECTORY=<directory>;
 +
</pre>
 +
 +
The following may also be included:
 +
 +
<pre>
 +
Trace = <Yes | No>
 +
TraceFile = <filename>
 +
</pre>
 +
 +
For example
 +
 +
</pre>
 
[southwind]
 
[southwind]
Driver         = Recital
+
Driver = Recital
DATABASE               = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DATABASE=southwind;
+
DATABASE = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DATABASE=southwind;
  
 
[dir_test]
 
[dir_test]
Driver         = Recital
+
Driver = Recital
DATABASE               = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DIRECTORY=/opt/recital/data/odbc_test;
+
DATABASE = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DIRECTORY=/opt/recital/data/odbc_test;
 
+
[odbc_test]
+
Driver          = Recital
+
DATABASE                = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DATABASE=odbc_test;
+
 
</pre>
 
</pre>

Revision as of 14:29, 22 June 2010

Template:YLM to do

Note: CLIENTLOGGING=TRUE;CLIENTLOGFILE=trace.txt;

Windows

Odbc drivers.png

Odbc southwind.png

Odbc add.png

Odbc new driver.png

Odbc new dsn.png

Odbc settings.png

Odbc logging.png


Linux

To determine the location of the configuration files:

# odbcinst -j

Will return output similar to the following:

unixODBC 2.2.11
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /root/.odbc.ini

The Recital Driver information can be seen in the 'odbcinst.ini' file:

[Recital]
Description		= Recital ODBC Driver
Driver		= /opt/recital/drivers/libodbc_recital.so
Setup		= /opt/recital/drivers/libodbc_recital.so
FileUsage		= 1
UsageCount	= 1

The Recital installer also adds the following DSN to the system 'odbc.ini' file:

[Recital ODBC test]
Driver	= Recital 
DATABASE	= ODBC:RECITAL:SERVERNAME=?;USERNAME=?;PASSWORD=?;DATABASE=odbc_test;

Note: The '?' can be used for the servername, username and password where the data is on the local server and DB_LOCAL_LOGIN is enabled.

Additional datasources can be added by editing the 'odbc.ini' text file directly, using the following format:

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

Where the <URL> is in the following format:

ODBC:RECITAL:SERVERNAME=<node>;USERNAME=<user>;PASSWORD=<password>;DATABASE=<database>;

or

ODBC:RECITAL:SERVERNAME=<node>;USERNAME=<user>;PASSWORD=<password>;DIRECTORY=<directory>;

The following may also be included:

Trace = <Yes | No>
TraceFile = <filename>

For example

</pre> [southwind] Driver = Recital DATABASE = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DATABASE=southwind;

[dir_test] Driver = Recital DATABASE = ODBC:RECITAL:SERVERNAME=192.168.1.3;USERNAME=user;PASSWORD=password;DIRECTORY=/opt/recital/data/odbc_test; </pre>