
Version: 7.06
Last Modified: 2. Oct 2009
The zip file of the driver includes a jar file. The jar file is named like the driver (una.jar, sprinta.jar, opta.jar or merlia.jar). You need to add this jar file to your classpath or extract the jar file in the directory of the application.
Add the driver jar file to the archive attribute of the applet tag, e.g.:
<APPLET CODE="..." Codebase="..." ARCHIVE="Merlia.jar" WIDTH="100%"
HEIGHT="100%">
...
</APPLET>
or extract the jar in the directory of the applet. You need a browser compatible with JDK 1.2.x or higher. Most browsers support JDK 1.1.x, only. A solution is using the Java Plug-In. In this case you need to use the OBJECT tag (IE) or the EMBED tag (NC).
Please note: If you want to employ:
- connection pooling:
You need to download the JDBC 2.0 Optional Package interface (javax.sql.*)
from Sun's website at:
http://java.sun.com/products/jdbc/download.html#binary
- the DataSource interface:
You need to download the JNDI 1.2.1 class libraries (javax.naming.*)
from Sun's website at:
http://java.sun.com/products/jndi/#download
if you do not use the JDK 1.3.x. (J2SE version 1.3).
| Product | minimum required JDK version | JDBC Version |
| UNA | 1.1 | 1.22 |
| SPRINTA | 1.2 | 2.0 |
| OPTA | 1.2 | 2.0 + Optional Package |
| MERLIA |
1.4 |
3.0 4.0 (with Java 6.0) |
All drivers support the following SQL Server Versions:
with all Service Packs (32 bit / 64 bit)
| UNA | SPRINTA | OPTA | MERLIA | |
| JDBC API | 1.22 | 2.0 | 2.0+ | 4.0 |
| PreparedStatement pooling | Yes | Yes | Yes | Yes |
| Scrollable and Updatable ResultSets | - | Yes | Yes | Yes |
| Connection Pooling | - | - | Yes | Yes |
| DataSource | - | - | Yes | Yes |
| Pooled Driver with Internal Pooling | - | - | Yes | Yes |
| Pool Manager i-net PLEXA | - | - | Yes | Yes |
| JDBCRowSet | - | - | Yes | Yes |
| Distributed Transactions (XA) | - | - | Yes | Yes |
| SSL | - | - | Yes | Yes |
| Savepoints on Transactions | - | - | - | Yes |
| Multiple Open ResultSets per Statement | - | - | - | Yes |
| ResultSet Holdability | - | - | - | Yes |
A more complete list can be found at at:
http://www.inetsoftware.de/products/jdbc/mssql/features/
This driver works with Microsoft SQL Servers configured to use the TCP/IP networking protocol. Please verify that your server is currently listening on a TCP/IP port.
If you know that your SQL Server is listening on a TCP/IP port and you know the host name of your SQL Server and the port number you can go to the next chapter. To check or enable the TCP/IP Sockets protocol follow these steps:
Click -SQL Setup- in the MS SQL Server program group. If not selected, select -Change Network Support-, select -TCP/IP- and enter the port number you want to use (default port: 1433). If -Change Network Support- is selected, then cancel the setup.
Click -SQL Server Network Utility- in the Microsoft SQL Server 7.0 program group. On the general property sheet, click -Add- and select -TCP/IP- under Network libraries. Enter the port number and the proxy address (if nesessary) and click OK.
The default port number for the Microsoft SQL Server is usually 1433. However servers can be configured to listen on any port number. To make sure that the RDBMS server is listening on the machine name and port number you specified use:
telnet <hostname or ip address> <port number>
If the connection is refused then the hostname or the port number is incorrect.
The SQL Server supports three authentication types. These are:
Windows authentication will only work from a Windows client from the same domain. It is also required that your program runs with a user account that has access to the SQL Server. If you want to connect from another client or account then you’ll need to use an SQL Server login, in which case you’ll need to enable "SQL Server authentication" or "Mixed authentication". To verify the authentication type:
If you want to use "Windows NT authentication" with i-net software’s drivers then the username must be empty. This only works with SQL Server 7.0 or higher and from a Windows client. Together with Named Pipes connections you can use Windows NT authentication since Java version 1.1.7. Together with TCP/IP connections, you can use it since Java version 1.4.2_03 and driver version 7.01.
The class name of the driver is: com.inet.tds.TdsDriver
The name of the pooled driver is: com.inet.pool.PoolDriver
The pooled driver is only part of OPTA and MERLIA.
The following DataSources are only available in OPTA and MERLIA
| com.inet.tds.TdsDataSource | This is a simple DataSource. Also named JDBC 1 DataSource. |
| com.inet.tds.PDataSource | This is pooled DataSource. |
| com.inet.tds.DTCDataSource | This is an XADataSource. It works in conjunction with the MS DTC (Distributed transaction Coordinator). You need to install the the DTCProxy on the MS SQL Server side. You should use XA only if you it need. Using XA may result in a considerable performance decrease. |
For a list of DataSource Properties look in the API documentation.
| jdbc:inetdae7: .... | support of the SQL Server 7.0 (or higher) feature with unicode data types nText, nVarchar and nChar (the same as ...&sql7=true) |
| jdbc:inetdae7a: .... | support of the SQL Server 7.0 (or higher) feature with ASCII data types Text, Varchar and Char. Use this protocol if using i-net MERLIA and JDBC 4.0 API compliance is required. see character converting JDBC 4.0 API |
| jdbc:inetdae6: .... | SQL Server 6.5 compatible mode (passwords are transfered plainly) |
| jdbc:inetdae: .... | only for compatibility with older versions |
| jdbc:inetpool: .... | pooled driver (only OPTA and MERLIA) |
| jdbc:inetdae7:hostname:portnumber | |
| jdbc:inetdae7:hostname | --> with default port 1433 |
| jdbc:inetdae7:hostname:portnumber?database=MyDb&language=us_english | --> with properties |
| jdbc:inetdae7:hostname/instancename | --> with named instance of MS SQL Server 2000 and 2005, required the UDP port 1434 |
| jdbc:inetdae7://servername/pipe/pipename | --> with named pipes |
| jdbc:inetdae7://servername/pipe/MSSQL$instancename/sql/query | --> named instance |
The pooled driver is only part of OPTA and MERLIA.
Examples:
| database | default is the user default database |
| language | default is "" "" -> SQL Server default language |
| user | |
| password | password of the database user |
| charset | see Character Converting |
| initSQL | This expression is executed once per connection. |
| nowarnings | "true" getWarnings() returns null |
| logging | default is "false" If the value is "true" and the JDBC logging is not enabled then the driver will set it to System.out. |
| sql7 | default is "false" with "inetdae" "true" the new datatypes are supported this property works only with the classic subprotocol "inetdae" |
| secureLevel | default is 1; set the level of security with SSL. |
| prepare | default is "true", PreparedStatements are prepared on the
SQL Server, "false" the driver sends for every call of execute() all data |
| prepareLiveTime | default is 60 Set the time in seconds that an unused PreparedStatement handle is live before it is unprepared. A value of 0 means an unlimited live time. |
| lastUpdateCount | default is "false" If the value is "true" then the method executeUpdate() should return the last update count. This property is helpful if you use PreparedStatements on tables with triggers. In this case the first update count is the count of the trigger. With this property you can receive the last update count which is ever the count of your UPDATE or INSERT expression. This property make problems with expression that return multiple update counts. In this case you receive also only the last update count. |
| loginTimeout | override the value from DriverManager.getLoginTimeout() |
| queryTimeout | default is 5 * loginTimeout. Set the default query timeout for all Statements. |
| JAVA_OBJECT | default is "true" The method getObject() converts valid Java serialized data in IMAGE columns to a Java Object. This is required to implement the type JAVA_OBJECT but it can be fatal if you implement your own Object serialization. If you use your own Java serialization then the best solution is to use getBytes() and not getObject(). |
| appname | Application name (only Application and Enterprise licenses) |
| WSID | Workstation ID. The default value is the host name of the local computer. With the WSID you can set the return value of the transact SQL method HOST_NAME(). |
| useCursorsAlways | default is "false" "true" the method executeQuery always uses server cursors. |
| resultSetType | default is "1003" (ResultSet.TYPE_FORWARD_ONLY)
A list of valid values can find in chapter Scrolling Cursor Types. |
| useInsteadOfTrigger | default is “false” “true” - in a query with multiple tables all are updated in one step with updateRow(). You need a INSTEAD OF trigger. |
| impltran | with Driver the default is "true" for compatibility with
the JDBC-ODBC bridge. with DataSource the default is "false" to reduce deadlock problems If the value is true then the method setTransactionIsolation() will call setAutoCommit( false ) implicitly and start a transaction. |
| fulltran | default is "true", creates always a transaction with
setAutoCommit( false ); "false" only if needed With the option fulltran=true the method setAutoCommit() uses "BEGIN TRAN" and "COMMIT TRAN". If the flag auto commit is set then there will always be a running transaction. With fulltran=false the method setAutoCommit() uses "SET IMPLICIT_TRANSACTIONS ON" and "SET IMPLICIT_TRANSACTIONS OFF". If the flag auto commit is set then the transactions will only start if needed. More information on these SQL expressions and their behaviour can be found in the MS SQL Server Online Manual. |
| dstsave | default is true Effects the way timezone offset is calculated. The ways differ in speed and safety. If true the slower way is used, but this way is bug free. If false, the faster way is used (2-3 times faster), but this way has a Java bug for some time zones at the day the day saving time switches. The bug there is a time displacement of one hour for some hours of the day. |
| statusRequest | Set the mode with which the API requests the status of a connection.
There are 2 possible modes:
|
| fastbatch | default is true Control if executeBatch() should use one round trip or execute every command as a single command. If fastbatch=true then the resulting update counts can be wrong if every single command does not produce a single count. This can occur with triggers. If you need an exact update count then you should use fastbatch=false. |
| fetchsize | i-net UNA only, the method executeQuery() always uses server cursors with this fetch size. The other drivers can use Statement.setFetchSize(). |
| host | override the value in the JDBC URL |
| instance | override the value in the JDBC URL, required the UDP port 1434 |
| port | override the value in the JDBC URL |
| failover | see chapter "Failover on getConnection()" |
| mars | Enables ("true") or disables ("false") the MARS (multiple active resultsets) mode. In this mode the data of ResultSets will be fetched on demand and not alltogether. This property can be used when connecting to SQL Server 2005 only. |
| mode | Only for DataSources. The value is equals to the JDBC sub protocol. See the API documentation for more details. |
| typeMapping | default is jdbc4 Which data type constant should be used from the driver. Available options are jdbc3, jdbc4 and odbc. Since driver version 7.0 jdbc4 is the default value. Before it was odbc. The difference between the options are the new data type of JDBC4 like NCHAR and NVARCHAR. |
There are three ways to put the properties to the driver:
You need to enable "Mixed Authentification" and enable the TCP/IP network
protocol if you do not want to use named pipes. For example, you can use the
following line for the setup of the MSDE:
setup SAPWD="password" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0
Comments of the switches:
SAPWD="password"
Set the password for the sa account. This is required for Windows Server 2003.
SECURITYMODE=SQL
Set the Authentfication to "Mixed Mode". This is required to connect via TCP/IP
with a non Windows program like Java.
DISABLENETWORKPROTOCOLS=0
Enable the TCP/IP protocol
Eight examples are included in the download file.
An example to demonstrate how to connect and use the driver with the JDBC
1.22 interface.
(This driver requires the JDBC 2.0 interface and a JDK 1.2 or higher)
This example shows the use of the PoolDriver. A driver with internal
connection pooling.
How to create a connection with a datasource.
How to use the PooledConnection of the driver.
This demonstrates the use of the PoolManager i-net PLEXA(tm). i-net PLEXA(tm) is an example of a pool manager. i-net PLEXAtm) comes with i-net OPTA(tm).
How to use the JDBCRowSet from i-net software (i-net OPTA(tm)).
This demonstrates the use of a DataSource with a JNDI directory.
This demonstrates the use of a ConnectionPoolDataSource with a JNDI directory and the PoolManager (i-net PLEXA(tm)).
A sample with EJB and a XADataSource.
Another solution to connect to the SQL Server are named pipes. Named pipes work only in the Java VM 1.1.7 or higher. Named pipes are equal to files with a UNC path. We have tested named pipes only with the Win32 VM from Sun. If you want to use named pipes from another platform, you have to install SMB (server message block) on the client or you must install NFS (network file system) on the SQL server.
The default pipe of the SQL server is "/sql/query", but you can change this pipe name in the server network manager.
The driver implements all escape clauses as follows:
{d 'yyyy-mm-dd'}
{t 'hh:mm:ss[.fff]'}
{ts 'yyyy-mm-dd hh:mm:ss[.fff]'}
{call storedProcedures('Param1'[,'Param2'][,?][...])}
{? = call storedProcedures('Param1'[,'Param2'][,?][...])}
examples:
st = con.createStatement();
st.execute("{call MyProc('value')}");
pr = con.prepareStatement("{call MyProc('value')}");
pr.execute();
pr = con.prepareStatement("{call MyProc( ? )}");
pr.setString("value");
pr.execute();
Numeric Functions
{fn ABS(number)}
{fn ACOS(float)}
{fn ASIN(float)}
{fn ATAN(float)}
{fn ATAN2(float1,float2)}
{fn CEILING(number)}
{fn COS(float)}
{fn COT(float)}
{fn DEGREES(number)}
{fn EXP(float)}
{fn FLOOR(number)}
{fn LOG(float)}
{fn LOG10(float)}
{fn PI()}
{fn POWER(number, power)}
{fn RADIANS(number)}
{fn RAND(integer)}
{fn ROUND(number, places)}
{fn SIGN(number)}
{fn SIN(float)}
{fn SQRT(float)}
{fn TAN(float)}
Time and Date Functions
{fn now()}
{fn curdate()}
{fn curtime()}
{fn DAYNAME(datetime)}
{fn DAYOFMONTH(datetime)}
{fn DAYOFWEEK(datetime)}
{fn DAYOFYEAR(datetime)}
{fn HOUR(datetime)}
{fn MINUTE(datetime)}
{fn MONTH(datetime)}
{fn MONTHNAME(datetime)}
{fn QUARTER(datetime)}
{fn SECOND(datetime)}
{fn WEEK(datetime)}
{fn YEAR(datetime)}
{fn TIMESTAMPDIFF(interval, count, datetime)}
{fn TIMESTAMPADD(interval, datetime, datetime2)}
interval may be one of the following:
SQL_TSI_FRAC_SECOND, SQL_TSI_SECOND, SQL_TSI_MINUTE,
SQL_TSI_HOUR, SQL_TSI_DAY, SQL_TSI_WEEK, SQL_TSI_MONTH,
SQL_TSI_QUARTER, or SQL_TSI_YEAR
{oj table1 LEFT OUTER JOIN table2 ON table1.id =
table2.id}
{oj table1 RIGHT OUTER JOIN table2 ON table1.id = table2.id}
{encrypt N'password'}
By default character converting is disabled. To use character converting in the driver you need to append "charset=YourCharSet" to the url.
for example: "jdbc:inetdae:localhost:1433?charset=Cp1250"
or "jdbc:inetdae:localhost:1433?charset=" +
sun.io.ByteToCharConverter.getDefault().getCharacterEncoding();
or "jdbc:inetdae:localhost:1433?charset=" + System.getProperty("file.encoding");
or "jdbc:inetdae:localhost:1433?charset=" + (new
java.io.InputStreamReader(in)).getEncoding();
TIP: The property charset is case-sensitive in JAVA. The name of the character
set is also
case-sensitive.
You can test the availability of a character set with:
"test string".getBytes( charset );
If this line executes correctly the character set is available in the current
VM.
The parameter charset is ignored on columns with nchar, nvarchar, and ntext. To
save
national characters with this columns you need to use the character N.
Example: "INSERT INTO myTable(ntext field) VALUES( N'national text' )"
JDBC 4.0 API is supported with i-net Merlia driver running in Java 6
environment. With JDBC 4.0 comes new functions to set unicode strings explicit,
e.g. PreparedStatement.setNString(int,String). All previous functions like
PreparedStatement.setString(int,String) are reduced to support ASCII characters
only. If you need this compatibility then you have to use "inetdae7a"
subprotocol.
If you want all String setter functions support unicode characters, use
"inetdae7" subprotocol.
The SQL server 7.0 and 2000 supports new datatypes, i.e. nchar, ntext, nvarchar, bigint, variant, varchar larger than 255 characters.
You can use the new datatypes if you use the jdbc url "jdbc:inetdae7:..." or set the property sql7=true.
If you set the property sql7=true you will not be able to connect to the SQL Server 6.5.
If you want use the ASCII data types Text, Varchar(8000) and Char(8000) then you should use the subprotocol inetdae7a.
The latest version of the ODBC-JDBC-Bridge returns the type value Types.OTHER for this data types. This is not helpful. That's why our driver returns the original SQL99 that the SQL Server sends. The old version of the ODBC-JDBC-Bridge returns also this values.
SQL Server 2005 supports the following new data types:
and the enhanced data types:
Only i-net Opta and i-net Merlia provide full support of new data types. For using the new or enhanced data types of the SQL Server 2005(Yukon) you don't need to use a new sub protocol or set a special property.
If connecting to a SQL Server 2005, the driver switches to the new communication protocol and the new data types will be enabled automatically internal.
When two expressions of different data types are combined by an operator, the data type precedence rules specify which data type is converted into the other. The data type with the lower precedence is converted to the data type with the higher precedence.
This is the precedence order for the MS SQL Server data types:
If you use the set methods of a PreparedStatement then you will have the following mapping:
| Method | MS SQL Data Type with protocol inetdae7 | MS SQL Data Type with protocol inetdae7a |
| setBoolean | BIT | .. |
| setByte | TINYINT | .. |
| setShort | SMALLINT | .. |
| setInt | INT | .. |
| setLong | BIGINT | .. |
| setFloat | REAL | .. |
| setDouble | FLOAT | .. |
| setBigDecimal | DECIMAL | .. |
| setString | <= 4000 NVARCHAR > 4000 NTEXT |
<= 8000 VARCHAR > 8000 TEXT |
| setAsciiStream | <= 8000 VARCHAR > 8000 TEXT |
.. |
| setClob | <= 4000 NVARCHAR > 4000 NTEXT |
<= 8000 VARCHAR > 8000 TEXT |
| setCharacterStream | <= 4000 NVARCHAR > 4000 NTEXT |
<= 8000 VARCHAR > 8000 TEXT |
| setDate | DATETIME | .. |
| setTime | DATETIME | .. |
| setTimestamp | DATETIME | .. |
| setBytes | <= 8000 --> VARBINARY > 8000 --> IMAGE |
.. |
| setBinaryStream | IMAGE | .. |
| setBlob | IMAGE | .. |
If you use a set method that map to a data type with a higher precedence then the MS SQL Server will convert the value in the database column and not the parameter. The MS SQL Server can't use an existing index because it was created for a different data type. The execution will be slow.
A simple statement can be faster because the MS SQL Server needs to use the execution plan only once. In this case the MS SQL Server can detect that it can convert downward the static parameter.
Solutions:
1.) Use the correct set method.
2.) Use a cast around the parameter to inform the MS SQL Server that it can
convert the parameter. This looks like:
... cast(? as TINYINT)
3.) Change the data type of the table.
BigDecimal parameter send by driver will processed up to 20% slower. This
happens if parameter definition send by Driver don't match exactly the column
type. For example Driver sends parameter as "decimal(38,36)", the column type is
"numeric (7,0)". It seems that the index for the numeric column won't used with
SP4. With SQL Server 2005 or earlier SQL Server version such a behaviour was not
seen. A workaround for that problem is to cast to column type.
E.g.
"select * from testnumeric where a = CAST(? AS numeric(7,0))"
| id | Description | |
| TYPE_FORWARD_ONLY-1 | Fast-Forward | A forward only cursor with activated optimation. |
| TYPE_FORWARD_ONLY | Forward-only | The fetch functions will allow only a fetchtype of FIRST, NEXT, or RELATIVE with a positive rownum. |
| TYPE_SCROLL_INSENSITIVE | Insensitive keyset cursor | Use a concurrency of CONCUR_READ_ONLY. SQL Server will generate a temporary table, so changes made to the rows by others will not be visible through the cursor. The fetch functions will allow all fetchtype values. |
| TYPE_SCROLL_SENSITIVE | Keyset cursor | The fetch functions will allow all fetchtype values. |
| TYPE_SCROLL_SENSITIVE+1 | Dynamic cursor | The fetch functions will allow all fetchtype values except RANDOM. All position-reporting methods returns always false. |
Concurrency type is one of the following concurrency control options.
| concurrency type | Description |
| CONCUR_READ_ONLY | Read-only cursor. You cannot modify rows in the cursor result set. |
| CONCUR_UPDATABLE | Optimistic concurrency control using timestamp or values. Changes to a row that are initiated through the cursor succeed only if the row remains unchanged since the last fetch. Changes are detected by comparing timestamps or by comparing all nontext, nonimage values if timestamps are not available. |
| CONCUR_UPDATABLE+1 | Intent to update locking. Places an update intent lock on the data page that contains each row as it is fetched. If not inside an open transaction, the locks are released when the next fetch is performed. If inside an open transaction, the locks are released when the transaction is closed. |
| CONCUR_UPDATABLE+2 | Optimistic concurrency control using values. Changes to a row through the cursor succeed only if the row remains unchanged since the last fetch. Changes are detected by comparing all nontext, nonimage values. |
If you set the property failover=true in the JDBC URL or in a DataSource then after an error has occured the driver tries to connect to a failover server. All properties in the JDBC url or DataSource that start with "failover" overwrite the properties from the first connection. All other properties will still be in effect. Therefore you can set all or only some properties (e.g. host, port, instance user, password) for the failover connection.
For example:
jdbc:inedae7:YourHost?database=northwind&failover=true&failoverhost=YourHost2
jdbc:inedae7:YourHost?failover=true&failoverport=1500
To set more than one failover possibility, use the following syntax:
jdbc:inedae7:YourHost?failover=true&host1=AFurtherHost&port1=AFurtherPort&host2=AFurtherHost&port2=AFurtherPort
host[N] and port[N] must form pairs, otherwise they will be ignored.
With the interface FailoverRunnable you have the possibility to write program code that will be executed correctly in the case of a failure of the cluster server, also. You can configure it with the methods setFailoverTimeout() and setFailoverCount(). For more information please refer to the API documentation of the PoolManager.
With the interface FailoverListener it is possible to manage the reconnection
process. The FaloverListener receives an event if the Connection was broken, if
the reconnection process was successful and if an error occured be the try of
reconnect. In depend of the value returned from FailoverListener, a new try of
reconnect will be started or not. The Connection tryes to reconnect to the same
server with the same properties. If reconnection was successful, all Statements,
PreparedStatements and CallableStatements will be restored. The ResultSets won't
be restored. For restore that, you have to executed the Statement again.
For more information see com.inet.pool.PoolManager.addFailoverListener(),
com.inet.pool.FailoverListener, com.inet.pool.FailoverEvent and
sample.MonitoredFailover
There are multiple possibilities about how to configure the Monitored Failover.
It is possible to use the default implementation of the FailoverListener or to
use your own implementation.
The default FailoverListener is similar to the TimedFailoverListener in the
samples package.
To every created Connection automatically an instance of the configured
FailoverListener will be added.
Set a FailoverListener via Connection properties:
| name | default | description |
| useDefaultFailoverListener | false | if set on true, a default FailoverListener will be added automatically to every Connection |
| waitTimeToNextAttempt | 500 | property for the default FailoverListener. Sets the wait time in millis, that will be wait to the next reconnect attempt. |
| totalTimeOfAttempts | 30 | property for the default FailoverListener. Sets the total time in seconds, in that the reconnection process must be finished. |
| failoverListener | - | the class name of your own FailoverListener implentation. This class has to implement the FailoverListener interface AND the default public constructor. This is important to create a new instance of this class via reflection. |
example URLs:
jdbc:inetpool:inetora:localhost?database=orcl&useDefaultFailoverListener=true&waitTimeToNextAttempt=100&totalTimeOfAttempts=10
jdbc:inetpool:inetora:localhost?database=orcl&failoverListener=test.MyFirtsFailoverListener
For more flexibility it is also possible to manage the registered
FailoverListener of a Connection in Java.
A FailoverListener can be only added to a Connection, that implements the
interface TAFConnection.
Those Connection can be received from:
com.inet.pool.PoolDriver,
com.inet.ora.PDataSource,
com.inet.tds.PDataSource,
com.inet.syb.PDataSource and
com.inet.drda.PDataSource.
The interface TAFConnection allows you to add and remove a FailoverListener
to/from the Connection.
example:
//receive a Connection
Class.forName("com.inet.pool.PoolDriver");
Connection con =
DriverManager.getConnection("jdbc:inetpool:inetora:localhost?database=orcl",
"scott", "tiger");
//add a FailoverListener
FailoverListener fl = new
samples.MonitoredFailover.CounteredFailoverListener(99);
((TAFConnection)con).addFailoverListener(fl);
//remove a FailoverListener
((TAFConnection)con).removeFailoverListener(fl);
//remove all FailoverListener
((TAFConnection)con).removeAllFailoverListener();
//get all registered FailoverListener
FailoverListener[] fls = getFailoverListener();
The SQL Server 2005 supports the new transaction isolation level snapshot. This is not a JDBC standard isolation level but you can use it with this driver. There are the following possible solutions:
If you have problems with the driver then you can enable the logging of the driver. There are different solutions.
| Solutions | examples | Comments |
| DriverManager.setLogStream(PrintStream) | DriverManager.setLogStream( System.out ); DriverManager.setLogStream( new FileOutputStream("c:\\driver.log") ); |
This method is deprecated but it work with all JDBC drivers. |
| DriverManager.setPrintWriter(PrintWriter) | DriverManager.setPrintWriter( new PrintWriter( System.out ) ) | work not with JDBC 1.22 driver like i-net UNA |
| Application Server GUI | WebLogic: Enable the JDBC logging in the
server console on the node servers/myserver/logging/JDBC JBoss:
You can set it for every DataSource in the config file with: |
|
| myDataSource.setPrintWriter(PrintWriter) | myDataSource.setPrintWriter( new PrintWriter( System.out ) ) | enable the logging only for connections from this DataSource |
| JDBC URL option "logging=true" | jdbc:inetdae7:localhost?logging=true |
Before you ask our support staff for assistance please check out our FAQ. Thank you very much for your collaboration.
The latest support information are available at: http://www.inetsoftware.de/support/
Support is available per email (replace at with @):
| Licensing, Pricing, Updates, ... | sales at inetsoftware.de |
| i-net UNA | una at inetsoftware.de |
| i-net SPRINTA | sprinta at inetsoftware.de |
| i-net OPTA | opta at inetsoftware.de |
| i-net MERLIA | merlia at inetsoftware.de |
| i-net GATE | opta at inetsoftware.de |
| i-net GATE3 | merlia at inetsoftware.de |
You can find more documentation at:
http://www.inetsoftware.de/products/jdbc/mssql/documentation.htm
If you want to use SSL (Secure Sockets Layer) with i-net JDBC drivers and the MS SQL Server then you need to install:
Note:: You don't need to install a certificate when using SQL Server 2005. The SQL Server 2005 installs a certificate on setup.
WARNING: After you have installed this certificate, connecting via ODBC only works with SSL. The ODBC driver only accepts trusted certificates (from a known agency). If you create your own certificate (not from a public Certificate Authority such as Verisign or Thawty) then you'll need to add it to every ODBC client.
SSL is required for the SQL Server 2005 if you want to use all new features like data types or MARS. The following step by step description is not a public documentation of the Microsoft Certificate technology. There might be some errors in the text or better solutions for working with Microsoft certificates.
This is only needed for SQL Server 2000. This is not required for SQL Server 2005.
This Certificate Request must be sent to a Certification Authority. You can work with a public Certification Authority and pay money for your the certificate or you can use your own certificate server.
This is only needed for SQL Server 2000. This is not required for SQL Server 2005.
This is only needed for SQL Server 2000. This is not required for SQL Server 2005.
This is only possible for SQL Server 2000. This is not valid for SQL Server 2005.
After you have installed the certificate, the SSL encryption is only valid for this login. This means your username and password are encrypted with SSL. The transferred data are not encrypted. You can also enable the SSL encryption for the transferred data. You can do this in the Server Network Utilities. You can enable it for every MS SQL Server instance.
| value | description |
| 0 | Does not use SSL. With the SQL Server 2005 it will work in SQL Server 2000 compatible mode. This means SQL Server 2005 feature are not available. |
| 1 (default) | Uses SSL if the MS SQL Server supports it (MS SQL Server 2000 with installed Certificate). The SQL Server 2005 ever. |
| 2 | Always uses SSL. This will throw an exception if the MS SQL Server does not support SSL. |
| 3 | Always uses SSL and verifies the Certificate. This will throw an exception if the MS SQL Server does not support SSL or if the Certificate was created from a non-trusted Certification Authority |
© 1998 - 2009 by i-net software