jdbc-driver

How to obtain the list of Oracle's SIDs

I have the host, port, user id and password but missing SID for connecting to Oracle DBMS. How can I find the list of SIDs on that server? ...

tomcat oracle (9.2i) oci pool connection server.xml and usage syntax

I've been searching for a good example of how to configure a Oracle OCI pool connection in tomcat's server.xml (defining a JNDI resource) and subsequently how to use it. Here's what I have now in conf\server.xml: <Context docBase="ips" path="/ips" reloadable="true"> <Resource name="jdbc/IPS_DB" auth="Container" ...

Migration of Java App Oracle 9i R2 database from 32 bit Windows to 64 bit Linux

We will be migrating our Oracle 9i R2 database from 32 bit Windows to 64 bit Linux (maintaining same Oracle version). Our Java (jdk 1.5) apps running on Linux 32 bit use the jdbc thin client ojdbc to connect to the db. While we don't as yet anticipate any issues for the Java app's connectivity and operation, we are working on a risk ass...

SQL Server JBDC Driver comparison

Currently we use jtds for connecting to our SQL Server databases. I've always taken it for granted that we use it due to performance and reliability reasons, however, it's usage pre-dates my employment. All of that being said, we are now playing with the idea of moving to SQL Server 2008, which jtds has limited support for. Initial tes...

PgSQL Exception: column name not found.

Hi, I am using postgresql-8.3-603.jdbc4.jar with jdk 1.6 in my application to do the db operations. I am getting the below exceptions at sometimes and doing restart helps to avoid this exceptions temporarily. org.postgresql.util.PSQLException: The column name sender_id was not found in this ResultSet. at org.postgresql.jdbc2.A...

How to Make JDBC Driver Work in Java 5 & 6?

Java 6 comes with JDBC 4, which is not backward compatible with JDBC shipped with previous versions of Java. We have a JDBC driver which must support both Java 5 and Java 6. If I implement the new interfaces in the driver, it doesn't work in Java 5 because the interfaces also uses new classes. So we have 2 versions of the driver. Is the...

What purpose does Class.forName() serve if you don't use the return value?

I've seen this line in a sample application for using a commercial JDBC driver: Class.forName("name.of.a.jcdb.driver") The return value is not used. What purpose does this line serve? ...

How to make Java work with SQL Server?

I know this is a basic question, but I can't seem to find an answer and I apologize, if this question is way too stupid, but here we go: I am supposed to work with SQL Server (no problem so far) and with Java (love java, so no problem here either), but now: What am I supposed to do to make the combination work? I got: JRE 1.6 and the sq...

JDBC Thin Connection

Hi All, I have installed NetBeans 6.5 with JDK1.6. And I want to connect between oracle with java in NetBeans 6.5. The question is: How do I configure JDBC to java 1.6? Thanks, Sopolin ...

Is there an alternative to ParameterMetaData that can tell you valid parameter names

MSSQL has an interesting JDBC inconsistency. Regarding the parameters on a stored procedure, when you access their names, they are referenced with an @ sign in front of them (the way they are declared in the stored procedure). When you use a callable statement to set parameters by name, however the Microsoft JDBC driver requires you to ...

can oci driver for 11g (odbc5.jar) work with 10g client ?

Hi, I need to connect to Oracle9,10 and 11 in my java application.The client will always be present where the app will be run and I want the app to just work with username,password and instance (specified in tnsnames.ora).Hence I would like oci drivers with a connection string of type : jdbc:oracle:oci:@testora .Im using the driver: ora...

Oracle ResultSetMetaData getPrecision/getScale

I'm using Oracle's JDBC thin driver (10.2.0.3) for connecting to an Oracle 10g database. I'd like to get information about the database columns, so I use ResultSetMetaData. The most important information I need is the type of the column and the length, so I use getColumnType, getPrecision, and getScale methods. It works for a simple que...

ResultSetMetaData returning BigDecimal insted of int

Need some help regarding jdbc metadata. I am using ResultsetMetaData to get metadata of columns of a table on Oracle10g. I am using ojdbc14.jar. There is a field in table ID declared as Number . This field is being read with jdbc at runtime to get its metadata attributes. ResultSetMetaData.getColumnClassName() is returning java.math.BigD...

How to make JDBC SQLExceptions for DB2 more descriptive?

How to make SQLExceptions thrown by DB2 JDBC driver more descriptive? Currently I am getting this kind of exceptions. It is cumbersome to work with these cryptic SQLCODE and SQLSTATE numeric values. Is there a way where to make the SQL exception to contain code description. Caused by: com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLC...

How to execute .sql script file using JDBC

I have an SQL script file which contains 40-50 SQL statements. Is it possible to run this script file using JDBC? ...

Connecting to Progress database from Mac OSX

Does anyone know how to connect to a Progress 9.1E database from a Mac (or even from Linux)? I can connect successfully from Windows but the JDBC driver requires that the Progress install directory and it's bin directory are in the path. It seems to be one product that is firmly under Google's radar. OpenLink has an OSX driver but it i...

ClassNotFoundException com.mysql.jdbc.Driver

This question might have asked here number of times . After doing some google search for the above error and doing some update, I can't understand why I'm still getting that error. I've already put my driver-- mysql-connector-java-5.1.5-bin in the classpath: Java_Home\jre\lib\ Java_Home\jre\lib\ext\ Java_Home\lib and the code which I'...

Recommendation for JDBC SQL client tool

Can someone recommend a good, open source, standalone developer tool for querying SQL databases using JDBC and exporting the results to a file? I know a lot of database vendors provide their own tools, but I need one that will allow me to plug in my own custom JDBC driver and work against any database. A GUI is preferable, but not requir...

What is Type 4 XA driver?

In our application when we create the Datasource, we select the Database Name DB2 Driver: BEA Type 4 XA DB2 But what i know is, there are only 4 types of Driver. Then what is Type 4 XA driver? ...

Jdbc call to oracle 11.1.0.7.0 db blocked

The Jdbc call blocks and does not return back .. below is the stack trace Oracle server = 11.1.0.7 Oracle thin driver used @ client Would appreciate your help .... at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:140) at oracle.net.ns.Packet.receive(Pack...