Questions tagged [mssql-jdbc]

For specific questions on Microsoft's JDBC driver for their SQL Server product.

1
vote
1answer
6 views

JVMCFRE003 bad major version; class=com/microsoft/sqlserver/jdbc/SQLServerConnectionPoolDataSource, offset=6

I am trying to create a JDBC data source in WebSphere. Testing the connection returns the error message: JVMCFRE003 bad major version; class=com/microsoft/sqlserver/jdbc/...
1
vote
1answer
17 views

JBoss EAP6 - Failed to create JDBC Datasource (Microsoft SQL Server)

I'm trying to create a JDBC Datasource, pointing to a Microsoft SQL Server 2008 database, on a JBoss EAP6 instance. During the tests I always end up getting the same error message: Unexpected HTTP ...
1
vote
1answer
55 views

Does query execution time differs based on different query param value with huge table?

We are using spring boot, SQL server and Azure cloud. The goal is to update the 2000 records batch by batch in a table which has 52 million rows without using a native query. The table has one ...
-2
votes
0answers
12 views

JDBC BatchupdateException : string or binary data would be truncated but data on batch size 10000 in SQL Server

**JDBC BatchupdateException : string or binary data would be truncated on batch size 10000 **
2
votes
0answers
26 views

SQLServerBulkCopy PostgreSQL to MS-SQL Server for NVARCHAR

I am trying to use SQLServerBulkCopy for migrating data from PostgreSQL to MS-SQL Server. I am facing problem for non-English characters (Unicode). To store these data, in PostgreSQL text datatype and ...
-1
votes
1answer
30 views

Android MsSQL/MySQL Database connection in Efficient way

I want to build an android app which will take users request and provide requested data from (MsSQL/MySQL) server. Number of users may be 1000/2000 or more. Few days ago I had built an app with JDBC ...
1
vote
2answers
40 views

How to store map geometry object to MS-SQL geometry column in Java?

I am trying to store a geometry object into my MS-SQL database which has a table with a geometry column. I get geometry in JSON format. Here I got the latest MSSQL-JDBC version which had datatype '...
0
votes
0answers
28 views

spring integration jdbc lock registry - delete from INT_LOCK query has timed out

I'm using Spring integration 4.3.14, Spring batch 3.8.0 and mssql driver 6.1.0. I have multiple process running in parallel (2 pods) and all goes to aggregator backed with jdbc message store and lock ...
0
votes
1answer
34 views

Kafka connect many to many tables in MSSQL

I'm currently looking into Kafka Connect to stream some of our databases to a data lake. To test out Kafka Connect I've setup a database with one of our project databases in. So far so good. Next ...
0
votes
0answers
48 views

JDBC connection problems

I am trying to use the jdbc driver for Microsoft SQL server to connect to my database i manage to establish a connection with the server, however some weird stuff happens. Here is my Dconnector class: ...
2
votes
1answer
47 views

Executing a long SQL script on Microsoft SQL Server 2017

I need to execute a SQL script (~5000 lines) with DDL and DML commands on a new instance of a Microsoft SQL Server 2017 through a Java application, already with connection pools and data sources ...
1
vote
1answer
33 views

When making JDBC Authentication in Spring Boot, do i have to use the default 'users' table?

I am trying to make JDBC Authentication in Spring Boot, I am trying to use a different table than the default 'users'. But with this method ` @Override protected void configure(...
-1
votes
1answer
54 views

How to connect private RDS from aws lambda

I am making JDBC connection to access AWS RDS from Lambda function, RDS accessibility is private, which allows to access to my EC2 public IP, so i am able to connect in EC2 instance but when my lambda ...
2
votes
0answers
51 views

SQL Server with JDBC - Could not find prepared statement with handle X

While running an application that accesses SQL Server using the SQL Server JDBC driver (version 4.0) using connection pool backed by C3P0, we are running into a weird error that happens about once a ...
2
votes
1answer
56 views

MSSQL PreparedStatement for smalldatetime returns wrong result

I have a table in my mssql database with one of the column as smalldatetime datatype. smalldatetime datatype does not have seconds precision. As per its documentation: ss is two digits, ranging ...
0
votes
1answer
20 views

mssql jdbc connection for .exe not working

So I have a situation where I compile the code in IDE and it works, when I run it as .jar, it works as expected but when I create a .exe installer and install it on the same system the application ...
1
vote
0answers
36 views

Empty Resultset, using JDBC with MSSQL

I have a Java application which already works with a MySQL database. I also want that it is compatible with Microsoft SQL Server, so I added an alternative connection opportunity with a SQL Server (...
0
votes
4answers
28 views

How to query the last N Parent rows with that had the most recent children created? in ruby

I have 2 models, Device and HealthRecord with the basic relationship of: device has_many health_records health_records belong_to device. I want to get the LAST 10 devices that has the most recently ...
0
votes
1answer
39 views

How to fix a MZNG repository migration to MS SQL?

I'm trying to change the MashZone NG (v. 10.1) Repository from Derby DB to MSSQL in Azure. The database is up and running, the SQL scripts were executed and commited. My driver is JTDS 1.3.1 (it's ...
0
votes
1answer
51 views

Hibernate with sql server retrieving data Encountered unexpected unknown token

Using c3p0 0.9.2.1, hibernate 4.2.21, JBoss AS 7.1.1 and connecting with Microsoft SQL Server 2014 - 12.0.2000.8 (X64). mssql-jdbc 6.2.2 (I tested 6.4.0 for doubt but we are using 6.2.2) is used for ...
3
votes
1answer
69 views

java.lang.NoSuchMethodError: com.microsoft.sqlserver.jdbc.SQLServerBulkCopyOptions.setAllowEncryptedValueModifications(Z)V

I am trying to utilize the bulkCopyToSqlDB function for the microsoft sql server jdbc driver with the sql spark connector found here. This is the syntax to launch the spark shell: spark-shell --...
0
votes
1answer
26 views

MS SQL & PHP to return table from database but it is returning random letters

I have been trying to show tables from my MS SQL into my browser using the following php code but it is returning table with random letters please see screenshots and code below this is the code I ...
1
vote
1answer
228 views

Springboot 2.0 unable to access SQL Server Database

Please some help with an issue I'm getting on the latest Springboot (2.0.3.RELEASE) I'm getting the following error when trying to access the database. It was working before migrating to the mentioned ...
0
votes
1answer
75 views

Call MS SQL Stored Procedure from Laravel PHP

I want to call MS SQL Stored Procedure from PHP code of .Net is shown in screenshot I want to call same stored procedure in PHP I didn't do something like this before. Here is what I have done on ...
0
votes
1answer
20 views

Self Join table and sum same column with difference criterea (SQL Server)

Seeking help with showing me how I may join the below queries together but also sum together the results for issues and transfers in a new column. I have tried to do them as sub queries as well as ...
0
votes
1answer
31 views

How to use jruby/activerecord-jdbcmssql-adapter to a brand new rails app (preferrably rails 5+)

I am trying to create a new rails app using jruby, and my gemfile is below. source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless ...
2
votes
3answers
172 views

LocalDateTime and SQL Server JDBC 4.2 driver

I'm trying to use new java.time classes with most recent version of Sql Server JDBC driver. As I read it should just work with methods: PreparedStatement.setObject() and ResultSet.getObject(). So I ...
0
votes
0answers
24 views

Failed to load the sqljdbc_auth.dll in Jetty Maven Plugin

I try to build a webapp with Vaadin and Jetty 9. I use the Jetty Maven Plugin to rebuild and reload the application on the fly. It worked fine until I used Windows Authentication with sqljdbc_auth....
0
votes
1answer
242 views

How to convert jdbc template query result to JSON Array in java?

I am converting software from Delphi to Spring boot. I have lots of queries in an existing SQL Server database, and I want to display them. For every query, I have to create entity class, that ...
0
votes
0answers
118 views

RequestError: Validation failed for parameter- Invalid buffer

Hi I have an error with mssql on node.js, I have to insert a string containing a file in base64 in a database sql server 2014, but when I insert the code below I have the following error:RequestError: ...
0
votes
2answers
59 views

SQL Server query runs - but no data is returned

Although the following query runs, no data is being returned. The query splits columns into JudgmentMonth, Consumer and Commercial. My knowledge of SQL Server is not great but I'm guessing no date ...
0
votes
0answers
44 views

In typescript, how to sort exactly like MSSQL's 'order by' clause for special characters like * , + - etc

I have a Angular5 based front-end which needs to show a list of persons. A similar list is shown at the back-end application. Both lists need to be sorted exactly the same. The back-end list is ...
0
votes
0answers
25 views

Connections to AlwaysOn secondary AG with ReadWrite applicationIntent

I have two SQL Server 2016 AlwaysOn availability groups (AG) in different data centers. These two groups then form a distributed availability group for purposes of DR. At any point in time, an ...
4
votes
0answers
134 views

mssql-jdbc MS SQL Server JDBC driver prepared statement cache performance issue with Hikari CP

We have been converting our server from using Hibernate 4.2 to Hibernate 5.2. Hibernate 5.2 requires JDBC 4.2 (Java 8), which requires us to switch to Hikari CP connection pool which is a branch from ...
0
votes
1answer
386 views

Using TLSv1.2 with Microsoft JDBC driver and Oracle JRE 7

There is an application which runs on Oracle JRE 7 and exchanges data with Microsoft SQL Server using standard Microsoft jdbc driver. It worked fine until the company where this application is ...
3
votes
6answers
60 views

SQL - Return a default value when my search returns no results along with search criteria

I am searching with a query --Code Format SELECT COLA,COLB,COLC from MYTABLE where SWITCH IN (1,2,3); If MYTABLE does not contain rows with SWITCH 1,2 or 3 I need default values returned along ...
1
vote
0answers
68 views

'No suitable driver found for jdbc:sqlserver' error occurs when Java application is uploaded as an Azure Web App

I've worked on this for a few days whenever I have time and I'm still stumped on why the error occurs. In the IDE everything works beautifully and I'm able to get a response from the SQL server ...
1
vote
1answer
78 views

insert varbinary value from hex literal in Microsoft SQL Server

I have a SpringBoot app, where I use jdbcTemplate to insert a row to a mssql int numOfRowsAffected = remoteJdbcTemplate.update("insert into dbo.[ELCOR Resource Time Registr_] " + "( [...
0
votes
1answer
38 views

DriverManager.getConnection(connectionString) - Method threw 'com.microsoft.sqlserver.jdbc.SQLServerException' exception

I am trying to connect to my database using JDBC driver. I have to use my another windows domain credential to connect and getting login failed error. Thought of testing it with my actual windows ...
0
votes
0answers
38 views

Connecting JDBC to Sql server, TCP/IP error

I am trying to connect JDBC to SQL server 2014, but I'm keep getting the following error. com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host PC-CH, port 1434 has ...
1
vote
2answers
406 views

Knowage BI - SQL Server DataSource

I have a question about knowage (opensource BI software - www.knowage-suite.com). Can anyone tell me how create DataSource with a SQL Server connection? Regards, Tomasz
0
votes
2answers
35 views

Unique constraint on two foreign keys to always be a different combination

I have a table named Followers which contains one PK column and two FK columns which will store integers of the table named User. However i dont want to have replicated values in columns - the ...
0
votes
1answer
40 views

java jdbc and odbc bridge how to stablish in linux

this is my code in Java and i am using Linux mint i have installed mysql in mu Linux OS and then i try to run that program, program run accurate but database did not change i do not know why .. ...
1
vote
3answers
69 views

Where do I specify the database name in the getTables() method.

The getTables() method is not returning any results for a table that exists in the database. I think the trouble is that is doesn't know which database to look at on the ip. How do I specify which ...
0
votes
1answer
38 views

msssql-jdbc: APPARENT DEADLOCK when running integration tests

My application is a spring boot application and using mssql-jdbc (6.1.0.jre8) to connect to an Azure SQL Database. However, when I run the integration tests I get the following error: com.mchange....
1
vote
1answer
166 views

Error with JDBC using Java 9 and JMeter 4.0

I added following plugins to the JMeter : mysql-connector-java-5.1.46.jar mssql-jdbc-6.4.0.jre9.jar When I try to execute JDBC Connection to the [com.microsoft.sqlserver.jdbc.SQLServerDriver] via ...
0
votes
1answer
19 views

MYSQL Sorting Using Order by

Hi I need help in sorting mysql query. I have a column, where it contains the data like R_5_TP(6), R_5_TP(7), R_5_TP(8), R_6_TP(1), R_6_TP(10), R_6_TP(6), R_50_TP(1), R_7_TP(1), I need to write a ...
2
votes
3answers
909 views

ms sql server datasource java config in spring boot

I am trying to use java config for my ms sql server, but unable to find any information regarding how to define it as Bean in config class. I have used Oracle earlier and it was very easy to configure ...
0
votes
0answers
85 views

springboot tomcatjdbc datasoucre couldn't handle exception: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed

I am currently facing issue with springboot application with database connection exception. I am using springboot 1.5.7 and database Microsoft SQL Server 2014 Issue is whenever database connection ...
0
votes
0answers
23 views

Error in event log While connecting mssql database to java

While connecting the mssql database to java using the sqlserver i am getting the error as the below in Eclipse IDE Cannot open database "TestDataBase" requested by the login. The login failed. ...