Oracle JDBC thin client 64 bit - java

I'd like to know if there is a specific driver for 64-bit systems. I have a 64-bit tomcat server and I need to install the oracle driver. I did not see anything specific in the Oracle download page.

Instant Client Downloads for Microsoft Windows (x64)
http://www.oracle.com/technetwork/topics/winx64soft-089540.html
Does this help?

Related

Oracle client with SSL on Windows 10

We have applications both native (C++) and Java using Oracle client to connect to database. Our Native applications use OCI and our Java applications use JDBC thin client.
When using SSL to connect to a remote database server from a Windows 10 machine, the connection takes alot of time to establish. This is true for both OCI and JDBC and it is the case only when the client is running on a Windows 10 computer. When the clients run on Windows XP, Windows 7, Windows 8 or Windows 8.1, connections are quick.
Does anyone have faced a similar problem or have an idea when the problem might be ?

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

I am trying to run a Java application that connects to a MS SQL Server 2008 database. The application was always worked fine when run from a 32-bit machine. The MS SQL database is and will remain on a 32-bit machine. Only the java code is being moved to a 64-bit machine.
Now I have to migrate the java code to a 64-bit machine. I got by the expected mismatched architecture errors by building the code with the 64 bit Java JVM, and using the 64-bit version of the SQL Native Client data source/driver.
Now, I am left with the error in the title, Microsoft][ODBC Driver Manager] Invalid string or buffer length.
I also installed the 32-bit JVM and SQL Native Client 10 on the 64 bit machine, and tried to run that way, and still a no go.
Will it be a problem, no matter what I do, to try to run a java app from a 64-bit machine that is trying to talk with MS SQL database on a different machine that is a 32-bit?
Thanks!!
Alex
May I know, Which OS are you using?? I hope you are using different OS in those machines. Though java is platform independent, MS SQL server is platform dependent. So that might be a problem.
I may be wrong too.

Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29

I didn't know where to write something about this and decided to do it here.
After loooong time debugging my program I could find out that calling Driver.getConnection(string, string, string) hangs the calling thread. Why(?), I really don't know, but I could find out that this happens with java 1.6.0_29 and not with java 1.6.0_26.
Full enviroment:
OS: Tested on both redhat 6.1 and Windows 2008
Driver: MS SQL Server JDBC Driver version 3.0.1301.101
Java Versions: 1.6.0_26 and 1.6.0_29
As I previously told it works with 1.6.0_26.
Is there anyone that has any idea what's possibly causing this? Maybe some developer? :p
Best regards,
Rui
I encountered exactly the same behaviour:
I use both Oracle XE and MS SQL Server Express on my Windows 7 64bit PC - I upgraded to java 1.6.0_29 from 1.6.0_27 (the x64 version) and was surprised to see that the same programs where able to connect to Oracle XE but not to MS SQL Server...
I traced down the problem to javax.sql.DataSource.getConnection() where it was hanging forever - because this is just an interface, the jdbc drivers raised my suspicion...
I'm using the MS SQL Server JDBC Driver 3.0.1301.202 and I even updated to SQL Server CTP (the "community technical preview") 4.0.1722.1 because my suspicion was that it has to do something with the jdbc driver - but no success: still hanging!
My workaround was to downgrade to 1.6.0_27 and -- bang: everything was fine again!
best regards
Erich
Reproduced:
Problem occurs with combination of
SQL driver 2.0
SQL driver 3.0
SQL driver 4.0 CTP 3
jTDS SQL Driver 1.2.5
SQL server 2008R2
Java 1.6.0_29
Change either SQL server version (tested on 2005 & 2008) or Java version (1.6.0_27, 1.7.0_1), and the problem doesn't occur anymore.
Client / Server OS: Windows 2008R2
Added to the Java Bug Database and is being worked on by Oracle.
Crossposted on Microsoft MSDN Data Access Forum (accepted answer: upgrade to java 7) and Oracle Java JDBC Forums (information that is added here, is also added to the Java Bug Database).
See the solution here
https://forums.oracle.com/forums/thread.jspa?messageID=9954398&tstart=0
http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/97dce8fd-6487-4bca-80b0-492167db3e0d
"Apparently, this is related to SSL use and can be mitigated by replacing the jsse.jar in the jre/lib with that from an earlier version, for instance out of the 1.6.0_27 release. I've been confused by 1.6.0_29 working with MS JDBC and older SQL Server '05 setups which are not doing secure connections. All the newer servers (SQL Server '08 R2) fail as they require SSL and Java 1.6.0_29 does not work using jTDS or MS JDBC in this case."
As an FYI, it appears that there's a new step build #30 in the 1.6 family which fixes the issue:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7103725
I have the same hang problem, and only with java 1.6.0_29. I noticed that if I upgrade to 7.1 the problem goes away
I am so happy that I have found this forum. I had the same problem on upgrade (I actually upgraded from 1.6.0_22 to 1.7.1, then downgraded to 1.6.0_29, when the problem has occurred.
One more thing I have noticed : if I use 1.6.0_29 jre, it fails, but if I use 1.6.0_29 jdk, it works... I spent about a day trying to figure why eclipse (which was using the jre) was failing while myEclipse (which was using the jdk) was working....
How can a bug be introduced to such a late release ? (I am in the process of making a java production version recommendation).
Same problem here (SQLJDBC4, MsSQL 2008 R2, JDK1.6.0.29), but after updating to 1.6.0.30 problem was solved...
So it should be a critical bug in the DriverManager of 1.6.0.29
Upgrading to 1.6.0_30 also worked for me. Microsoft has released a statement announcing the fix in 2012 Q1. It looks like it's a Java vulnerability (BEAST).
I had the exact same issue where jBoss would hang on driver.getConnection(). However, I was using jBoss EAP 5.1, java 1.6.0_37x64, Sql Server 2005, and jtds1.2.5 as my jdbc driver.
The work around I had to use was a jvm setting at startup: -Djsse.enableCBCProtection=false and that resolved it.
I don't consider this a fix, but rather a work-around at this point.
I did find a bug: 7105007 : Microsoft & jTDS JDBC driver broken after update to 1.6.0_29 that was very similar, but had a different cause. What was interesting was that it showed up on both the MS drivers and jtds drivers.

How Do I Access Connection With Java?

I want to access connection on java. But i cant, because it is there odbc problem. Iam useing Windows7 x64. It's not installed odbc driver on windows 7. And is there just System DSN on Odbc Data Source Administator. I want to add but no odbc driver, only sql server.
What can i do?
If you are working on 64 bit version of Windows then you can use 64 bit and 32 bit environment. Such environment consist of Java (JDK or JRE) and database drivers. For Java applications the best way of accessing database is via JDBC driver. Then you need not to worry about 32 or 64 bit environment, you only put .jar file or files in directory that is part of CLASSPATH environment variable.
In case of MS Access you can use JDBC-ODBC bridge that is present by default in Sun (now Oracle) implementations of JRE. But before that you must configure ODBC connection with MS-Access database. This can be done via ODBC Manager or via connect string.
I think connect string is easier, because it looks like:
jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\\Nwind.mdb
all you have to do is to point at your .mdb file. This should work with 32 and 64 bit versions of JRE.
If you want to configure database access in ODBC then do it for both 32 and 64 bit environments using:
c:\windows\syswow64\odbcad32.exe (32 bit)
c:\windows\system32\odbcad32.exe (64 bit)
Then in connect string you can use DSN name you have just created like:
jdbc:odbc:DSN_NAME
You should consider JDBC-ODBC bridge, for example from OpenLink.
The usual way to access a Db with Java is with a JDBC driver. Most databases have JDBC drivers. Click here for the JDBC tutorial

Connection problem in Win2k3 server 64 bit with JDBC

DriverManager#getConnection() returns null when I am deploying my JSP/Servlet package in a Windows 2003 Server environment (64 bit). The database is Microsoft SQL 2005 Enterprise Edition.
The code is:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:calsoft2k","xxx","xxx");
The same code is working without any problems in Windows XP (32 bit) box. I am using Apache Tomcat 6.X server in both production and development environment.
Any pointers?
Use a real JDBC driver instead of the (pardon me) lousy ODBC bridge driver.
Decent DB vendors supplies their own JDBC drivers. The one for SQL2005 can just be found at microsoft.com. This driver is however known not to be very optimal in both the performance and the level of JDBC API support. You could also consider the much faster and better jTDS driver instead.

Categories