Questions tagged [sqljdbc]

Microsoft JDBC Driver for SQL Server

Microsoft JDBC Driver

Sql JDBC is the Microsoft JDBC Driver for SQL Server. It is a Java Database Connectivity (JDBC) driver for use with SQL Server, SQL Azure, and Parallel Data Warehouse (PDW). The Microsoft JDBC Driver for SQL Server provides Java Database Connectivity from any Java application, application server, or Java-enabled applet.

This driver is a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs). It has been tested against major application servers such as IBM WebSphere, and SAP NetWeaver.

Related tags:

88 questions
2
votes
2 answers

sqljdbc_auth.dll was not found inside JAR. (under IntelliJ)

I cannot solve this problem: Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: File /x64/sqljdbc_auth.dll was not found inside JAR. at…
2
votes
1 answer

Why is default schema being ignored when using SQL Server integrated security?

I have migrated a web application running on Wildfly 9 from using SQL authentication to using windows authentication. I also need to update a java utility that does some maintenance tasks directly on the database. The web application works fine, but…
2
votes
2 answers

SQL Server 2005 to 2012 com.microsoft.sqlserver.jdbc.SQLServerException: Implicit conversion from data type varbinary to datetime2 is not allowed

We are migrating from SQL Server 2005 to 2012. One of the functionality is failing with this error com.microsoft.sqlserver.jdbc.SQLServerException: Implicit conversion from data type varbinary to datetime2 is not allowed. Use the CONVERT function…
Viggy
  • 65
  • 2
  • 7
2
votes
3 answers

IntelliJ can't find sqljdbc4.jar from Maven even though it resolves?

IntelliJ does not let me import com.microsoft even though Maven resolves the dependency and it appears as a Module in my project settings (thus should be in the classpath). External dependency resolves: Modules: POM file has this:
Boris
  • 566
  • 5
  • 21
2
votes
1 answer

Fetch Resultset of created&filled MSSQL temp table over Java

query5 String query5 ="USE DBTwo\n" + "DECLARE @temp_table table (column1 VARCHAR(60))\n" + "insert into @temp_table (column1)\n" + "select column1 from real_table (nolock)"; query3 String query3 = "USE DBTwo\n" + "select column1…
Black White
  • 700
  • 3
  • 11
  • 31
2
votes
1 answer

Connect to SQL Server using Windows Authentication with different user account in JDBC

I need to connect to SQL Server using Windows Authentication with different user account in JDBC. This is the code I am using: static final String DB_URL = "jdbc:sqlserver://IP:port; databaseName=xyz; integratedSecurity=false;…
2
votes
1 answer

Valid SQL using temp tables returning no result set

I've been searching google and stack overflow for the past several hours, and can't seem to find an exact match on this issue. I'm relatively new to java, so please correct me if I'm just doing something incredibly silly! Issue: When executing a…
2
votes
2 answers

Glassfish/Toplink and sqljdbc.jar retrying forever on broken db-connection

I'm using Glassfish and Toplink together with an MS-SQL-Server, thus sqljdbc4.jar is used for connecting to the database. When the database is not available (DB server is down), the CPU usage rises to 100% and Glassfish keeps on trying to connect…
Bob
  • 5,510
  • 9
  • 48
  • 80
1
vote
2 answers

How is SQL Server's timestamp2 supposed to work in JDBC?

I'm having some trouble trying to use timestamp2 instead of Timestamp in SQL Server 2008. Apparently, rs.getTimestamp has very different behavior between timestamp and timestamp2. However, I can't find any documentation stating that there should…
Pixel
  • 374
  • 5
  • 15
1
vote
1 answer

JDBC Database Connection Failed

For database i am using msql server express and Microsoft sql server management studio. for reporting i am using Jaspersoft studio.for connection of database i used SQL JDBC driver,all drivers are installed but still connection of database showing…
Mayur Satav
  • 985
  • 2
  • 12
  • 32
1
vote
0 answers

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer work on java 1.8.0_161 however not on 1.8.0_202

I am trying to connect to SQL Server in my spring boot application. However, I get below error on Java version 1.8.0_202. I am able to successfully make connection with Java 1.8.0_161. What can be the reason for this? Jar used - sqljdbc42.jar, also…
1
vote
1 answer

org.springframework.orm.ObjectOptimisticLockingFailureException with microsoft driver and not with jtds driver

I am getting ObjectOptimisticLockingFailureException with batch update when I use microsoft sqlserver driver (sqljdbc4.jar). However with the same code, when I switch the driver to Jtds driver, I am able to succesfully do batch update and insert. we…
Megha
  • 11
  • 2
1
vote
1 answer

org.hibernate.MappingException: Unknown entity Main$1

I am new to hibernate. I am trying to generate database tables from annotated entity classes. Tag class: package playground.data.entities; import java.time.Instant; import javax.persistence.*; @Entity public class Tag extends BaseEntity { @Id …
Sayan Pal
  • 4,768
  • 5
  • 43
  • 82
1
vote
1 answer

JDBC availability group connection error

I'm trying to connect to an availability group through sqljdbc driver v4, but I get an error com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host ..., port 1433 has failed. Error: ".... Verify the connection…
cpl
  • 669
  • 6
  • 23
1
vote
1 answer

Derby DB installed, JAR included, where to locate DB for portability of project?

So I'm new to working with Java databases and I've settled on using Apache Derby. I have it installed on my system and have included the derby.jar in the project buildpath. However, I need this project to be portable (including from Windows to…
Brandon Hunter
  • 141
  • 1
  • 11