SQL Relay Configuration Reference

Example

The SQL Relay configuration file is usually located at /usr/local/firstworks/etc/sqlrelay.conf

Additional configuration files may be created under the configuration directory, usually /usr/local/firstworks/etc/sqlrelay.conf.d

Files in the configuration directory may be given any name, but it is conventional to give them a .conf suffix.

Each configuration file may define any number of SQL Relay instances.

A fairly comprehensive example follows.

<?xml version="1.0"?>
<instances>

	<instance id="example" enabled="yes" dbase="oracle"
		port="9000" socket="/tmp/example.socket"
		connections="3" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" softttl="0"
		maxsessioncount="1000" endofsession="commit" sessiontimeout="600"
		runasuser="nobody" runasgroup="nobody" cursors="5" maxcursors="10" cursors_growby="1"
		authtier="connection" sessionhandler="process" handoff="pass" deniedips="" allowedips=""
		maxquerysize="65536" maxbindvars="256" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680"
		idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no"
		fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed"
		ignoreselectdatabase="no" waitfordowndatabase="yes">
	       <users>
		      <user user="user1" password="password1"/>
		      <user user="user2" password="password2"/>
		      <user user="user3" password="password3"/>
	       </users>
	       <session>
		      <start>
			     <runquery>alter session set nls_date_format='MM-DD-YYYY HH24:MI:SS'</runquery>
		      </start>
		      <end>
			     <runquery>alter session set nls_date_format='DD-MON-YYYY'</runquery>
		      </end>
	       </session>
	       <connections>
		      <connection connectionid="db1"
			string="user=exampleuser1;password=examplepassword1;oracle_sid=EXAMPLE1;"
			metric="1" behindloadbalancer="no"/>
		      <connection connectionid="db2"
			string="user=exampleuser2;password=examplepassword2;oracle_sid=EXAMPLE2;"
			metric="3" behindloadbalancer="no"/>
		      <connection connectionid="db3"
			string="user=exampleuser3;password=examplepassword3;oracle_sid=EXAMPLE3;"
			metric="5" behindloadbalancer="no"/>
		      <connection connectionid="db4"
			string="user=exampleuser4;password=examplepassword4;oracle_sid=EXAMPLE4;"
			metric="6" behindloadbalancer="no"/>
	       </connections>
        </instance>

</instances>

Tags

Attributes

Below is a description of the attributes for each tag.



Connect String Options

For oracle databases, the connect string syntax is "user=USER;password=PASSWORD;oracle_sid=ORACLE_SID;oracle_home=ORACLE_HOME;nls_lang=NLS_LANG;autocommit=yes/no;fetchatonce=FETCHATONCE;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;faketransactionblocks=yes/no;droptemptables=yes/no;globaltemptables=TABLELIST;lastinsertidfunction=LASTINSERTIDFUNCTION;stmtcachesize=0;rejectduplicatebinds=yes/no;disablekeylookup=yes/no;identity=ID"


For freetds databases, the connect string syntax is "sybase=SYBASE;user=USER;password=PASSWORD;server=SERVER;db=DATABASE;charset=CHARSET;language=LANGUAGE;hostname=HOSTNAME;packetsize=PACKETSIZE;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;identity=ID"


For sap (or sybase) databases, the connect string syntax is "sybase=SYBASE;lang=LANG;user=USER;password=PASSWORD;server=SERVER;db=DATABASE;charset=CHARSET;language=LANGUAGE;hostname=HOSTNAME;packetsize=PACKETSIZE;fetchatonce=FETCHATONCE;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;identity=ID"


For db2 databases, the connect string syntax is "user=USER;password=PASSWORD;db=DB;autocommit=yes/no;faketransactionblocks=yes/no;timeout=TIMEOUT;fetchatonce=FETCHATONCE;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;maxoutlobbindsize=MAXOUTLOBBINDSIZE;identity=ID"


For informix databases, the connect string syntax is "user=USER;password=PASSWORD;informixdir=INFORMIXDIR;servername=SERVERNAME;db=DB;autocommit=yes/no;faketransactionblocks=yes/no;timeout=TIMEOUT;fetchatonce=FETCHATONCE;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;maxoutlobbindsize=MAXOUTLOBBINDSIZE;identity=ID"


For mysql databases, the connect string syntax is "user=USER;password=PASSWORD;db=DB;host=HOST;port=PORT;socket=SOCKET;fakebinds=FAKEBINDS;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;charset=CHARSET;sslmode=sslmode;tlsversion=tlsversion;sslkey=keyfile;sslcert=certfile;sslcipher=cipherlist;sslca=cafile;sslcapath=cafilepath;sslcrl=crlfile;sslcrlpath=crlfilepath;foundrows=yes/no;ignorespace=yes/no;identity=ID"


For postgresql databases, the connect string syntax is "user=USER;password=PASSWORD;db=DB;host=HOST;port=PORT;sslmode=SSLMODE;options=OPTIONS;typemangling=MANGLING;fakebinds=FAKEBINDS;charset=CHARSET;lastinsertidfunction=LASTINSERTDFUNCTION;identity=ID"


For firebird databases, the connect string syntax is "user=USER;password=PASSWORD;db=DATABASE;dialect=DIALECT;autocommit=yes/no;maxselectlistsize=MAXSELECTLISTSIZE;maxitembuffersize=MAXITEMBUFFERSIZE;charset=CHARSET;faketransactionblocks=yes/no;droptemptables=yes/no;globaltemptables=TABLELIST;lastinsertidfunction=LASTINSERTIDFUNCTION;identity=ID"


For sqlite databases, the connect string syntax is "db=DB;identity=ID"


For odbc databases, the connect string syntax is "user=USER;password=PASSWORD;dsn=DSN;autocommit=yes/no;timeout=TIMEOUT;odbcversion=ODBCVERSION;identity=ID"


For mdbtools databases, the connect string syntax is "db=DATABASE;identity=ID"