Oracle client with SSL on Windows 10 - java

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 ?

Related

SSAS on SQL Server Docker Linux Container With Java Application

I have start SQL Server Docker Container and i have Java as backend application which communicate with database.
I can do all the JDBC call without any issue.
Now i need to use SSAS to display data in Pivot Table in frontend. I am not sure if this is possible or not. Because most of tutorial says i need IIS server, which is windows specific application, the SQL Server is image on top of Linux OS image.
I got this blog which talks about connecting Java to SSAS (But it require IIS). Since container OS is Linux, and IIS can't work with Linux.
This URL Microsoft says SSAS feature is part of SQL Server 2017 release.
Any Idea if this is possible or not?
Can i use SASS with IIS?
http://www.olap4j.org/ is for JAVA but it required IIS.
SQL Server for Linux doesn't include SSAS, it's only available on the windows version.

Is it possible to connect a Java web app to SQL Server in Virtualbox?

I have a Mac running OS X 10.9 with Java 1.7 using Eclipse Luna. I also have MySQL and MySQL Workbench. However, my programming subject only teaches JDBC using SQL Server. I don't mind learning how to use JDBC with MySQL as the DBMS. But I was wondering if I can connect my app to a virtual machine running Windows 7 with SQL Server 2008 on Virtualbox?
TL;DR:
Java web app (Mac) <---connect---> SQL Server (Virtualbox Windows 7), possible?
Of curse you can.
You will have to configure some port forwarding from your VirtualBox and maybe Windows itself.

Can a Java application running on a Window's Server connect to SQL Server via Windows Authentication

Let me give some background before I ask my question. I’m at a shop that primarily runs Windows. We have several batch applications running on Windows Servers (mostly 2003). Most of these batch applications are written in C# and C++; however we have a handful of applications that are written in Java.
The batch Java applications are connecting to a SQL Server 2005 database using JDBC. Please note we are not using an application server.
Currently we store database connection information (database, username, & password) in the Windows Registry.
Unfortunately these really unfriendly auditors (bad attempt at humor) are not happy with us over the decision to store database connection information in the Windows registry.
We are now updating our batch applications to connect to SQL Server using Windows Authentatication.
Using Windows Authentatication for C# and C++ applications is not a problem; however I’m stuck on the direction to take for the Java applications.
Can anyone advise if it is possible to use Windows Authentatication to connect to a SQL Server 2005 database from a Java batch application running on a Windows server? Again we are not using an application server.
If this is possible what are your recommended approaches?
I have a strategy to simply encrypt the password which will make the auditors happy, however I would prefer to have all of my batch applications connect to SQL Server via Windows Authentatication.
You can connect to SQL Server from Java programs using windows authentication as follows:
Create a windows account for the application that would be used to run your programs. This account's credentials will be used to connect to the server.
Get Microsoft JDBC Driver for SQL Server from here.
Configure the JDBC URL as follows:
jdbc:sqlserver://<hostname>;databaseName=<DBName>;integratedSecurity=true
Configure the launcher that run the Java programs from command line to include the following JVM parameter:
-Djava.library.path="<jdbc driver dll location>"
where the location is the directory where the JDBC driver downloaded earlier is installed or extracted. It was C:\Program Files\sqljdbc_4.0.2206.100_enu\sqljdbc_4.0\enu\auth\x64 in my case. As Luke Woodward mentioned in the comments, the dll should be picked based on the JVM used for running these programs.
With the above configuration, the connection established to SQL Server would use the Windows Authentication Credentials of the domain user running the java program/process.
The first step is to setup ODBC, you can go to Control panel -> Administrative tools -> ODBC. Add a new DSN to connect MS SQL Server using windows authentication account following wizard setup.
The second step is the same as using SQL Server authentication account. But the only change is that the connection string is changed to: jdbc:odbc:dsn-name. There is no need to use username/password anymore, because it is already connected to the server.

Strange performance Issue with SQL Server + Spring JAVA application

I am experience a strange performance issue when accessing data from SQL Server from a Spring based application. In my current setup, the Spring java application runs on a separate machine accessing data from a remote SQL Server DB. I am using NamedParameterTemplate in Spring, which I believe uses Prepared Statement to execute the query. For some reason, some of the query takes a long time to complete (approx. 2 mins). The JAVA app runs on a 64bit machine running 64bit version of Java v1.6, and the SQL Server is MS SQL Server 2008 R2.
The strangeness, is if I run the same java app from my laptop running Windows XP 32bit, running the same version of Java v1.6, the query takes less than a second, accessing the exact same remote DB server (infact, I am connected through VPN)
This shows the issue is not with the Spring framework but may be with the SQL JDBC Driver. I am using Microsoft JDBC Driver 4.0 for SQL Server (sqljdbc.jar)
I am completely clueless, as what could possibly be wrong and not sure where to start my debugging process.
I understand, there isn't much information in my question, so please let me know if you need any specific detail.
Thanks for any help/suggestions.
I think this may be due to the combination of your java version and jdbc driver failing to handshake the connection with the server. See Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29 and http://blogs.msdn.com/b/jdbcteam/archive/2012/01/19/patch-available-for-sql-server-and-java-6-update-30.aspx
If so, switching to 1.6.0 upgrade 30 or higher and applying kb 2653857 ought to fix it.

Connect from Oracle server to MS SQL Server in Java

I have a Java application that is connecting to a MS SQL Server database using the Microsoft JDBC Driver 3.0 for SQL Server (sqljdbc.jar). The Java version this is being compiled to is 1.5.0_12. It is working fine from my local Windows machine, but it is causing all kinds of errors when I try to run it from the Oracle server. Any advice as to how to make that successful connection?
** Withdrawn... Sorry, didn't see the Application Server portion in the initial question

Categories