Questions tagged [mssql-jdbc]

1

votes
0

answer
65

Views

Data not inserted in ms sql database from android studio app

I had developed an android application connected with ms sql database when I try to insert data it does'n show any error but on sql data is not inserted. Please help me. I used androidstudio 3.0.1, Ms-sql R2 database, jtds 1.3.1.jar for jdbc connectivity. Please help me to insert data in the databas...
Fox star
1

votes
2

answer
497

Views

Connect to Sql Server on liberty using mssql-jdbc

I'm trying to connect to a Sql Server database from a liberty server. Doesn't work as I'm getting a 500 from the liberty server and the logs give me this error message: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: SQL Server...
mTv
1

votes
0

answer
347

Views

Grails 3.3.3 Using SQL Server Datasource and Hibernate 4.5.0.6

I cannot find a proper guide to include the jdbc driver for sql server in Grails 3.3.3. When I was in Grails 2.3.11, I was able to just place a jar in the lib directory and then I found the actual settings for Datasoure.groovy on the web so I copied and pasted and it worked. Now for Grails 3.3.3 and...
Bmoe
1

votes
2

answer
984

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
Tomasz Filipek
1

votes
0

answer
147

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 hosted on Azure. However, once I upload the code to to an Azure Web App I get the following error: No suit...
SideraMaris
1

votes
0

answer
43

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 (Express Version) database in the background. But the queries only return empty result sets. What I've...
progreasy
1

votes
0

answer
273

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/SQLServerConnectionPoolDataSource, offset=6 my environment and configuration: WebSphere 8.5.5.13 JDK 1.7_64 JDBC driver: sqljdbc41...
Heinz
1

votes
0

answer
349

Views

SQL Server stored procedure with dbeaver

I need to create a stored procedure in SQL Server using the Dbeaver software and I am wondering if you have any experience with creating one with this software since I am using Mac and I am not able to install SQL Server Management Studio. The case is that I will need to update the field for one use...
Preki
1

votes
2

answer
337

Views

AWS glueContext read doesn't allow a sql query

I want to read filtered data from a Mysql instance using AWS glue job. Since a glue jdbc connection doesnt allow me to push down predicate, I am trying to explicitly create a jdbc connection in my code. I want to run a select query with where clause against a Mysql database using jdbc connection as...
Nikhil S
1

votes
1

answer
59

Views

JBoss Wildfly application server not able to connect to SQL Server

I am trying to connect my application server (wildfly) with database server (MSSQL Server). The things which I have already done: Enabled TCP/IP Using dynamic port Database engine connected and running on dynamic port which is mentioned in TCP/IP properties SQL Server configuration manager services...
Praveen Gupta
1

votes
0

answer
46

Views

How to connect to sql server from google sheet by Jdbc.getConnection

I am trying to connect to sql server database in google sheet by a function. When I use sql server management studio, I use 'windows authentication' to login to the server to access database. Hence, there is no password to access database. This is my function code: function readsql() { var confirm =...
kuml
1

votes
1

answer
57

Views

SQL Statement in Java not pulling back same information as in MSSQL

I am trying to get some information out of my database from Java. String sql_get_Tot = ' SELECT dbo.table1.Quantity * dbo.table2.CostPerIndivdual AS QC FROM dbo.table1 INNER JOIN dbo.table2 ON dbo._IISJoin.ItemID = dbo.table2.ItemID WHERE dbo.table1.SupplierID = 2 AND dbo.table1.ItemID = 1 A...
user3342176
1

votes
1

answer
1.1k

Views

How do I deploy Activiti to Tomcat to use an MSSQL database and update the schema on startup?

I am attempting to host an Activiti database in MSSQL 2012 via the MS JDBC sqljdbc4.jar driver. I have setup Activiti 5.14 in JBoss, got fed up, and am starting over with 5.15.1 in Tomcat 7. So upon deployment and start up of the activiti-explorer.war, it is attempting to upgrade the database sche...
Greg
1

votes
1

answer
3.1k

Views

Connecting to remote MS sqlserver in java using windows authentication

I am using sqlserver with Windows authentication, with a Windows server. I am trying to connect to a remote MS SQLSERVER on my local network using java eclipse but keep getting this error: Error : com.microsoft.sqlserver.jdbc.SQLServerException: The port number 64038 databaseName = Data is not valid...
user3799636
1

votes
3

answer
1.1k

Views

Mule JDBC endpoint causing exception while executing SQL query

I got a Strange issue in Mule .. I have a webservice exposed in Mule that perform simple CRUD operation.. Now the issue is there is a SQL query :- if not exists (select * from sysobjects where name='getData' and xtype='U')create table getData (ID int NOT NULL, NAME varchar(50) NULL,AGE int NULL,DES...
Anirban Sen Chowdhary
1

votes
1

answer
30

Views

Oriental character with FreeTDS, MSSQL

I am with problem to insert an Oriental nvarchar in database using MSSQL and FreeTDS. When I inserted it was like this in database: é­é建議æç»æª¢.
Deiwys
1

votes
1

answer
1k

Views

How to get all constraint on table?

I want to store tables metadata into other table.So how to get all constraint and its type like whether it primary , unique or foreign key in MS SQL server. table_name constraint_name constraint_type user pk_user_id PRIMARY_KEY user_role fk_role...
Shankar Modi
1

votes
1

answer
412

Views

JDBC execute big T-SQL query

I have big SQL script with creating temp tables and inserting data in them from selecting data from another tables, many inserts, like SET @EndDate = DATEADD(dd, -1, @EndDate); DECLARE @EndDatePlusOneDay SMALLDATETIME SET @EndDatePlusOneDay = DATEADD(dd, 1, @EndDate); CREATE TABLE #cntrs ( Contract...
Arthur
1

votes
1

answer
207

Views

How can to run .sql-file from other .sql-file in MS SQL Database (Microsoft SQL Server)?

I have some .sql-files with creates tables (MS SQL Database): table_1.sql: IF OBJECT_ID (N'my_schema.table1', N'U') IS NOT NULL DROP TABLE my_schema.table1; CREATE TABLE my_schema.table1( id int IDENTITY PRIMARY KEY, nameTable1 varchar(255) NOT NULL UNIQUE ); and table_2.sql: IF OBJECT_ID (N'my_sche...
Paushchyk Julia
1

votes
2

answer
5.6k

Views

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “Server key”

I gave up! Tried everything and failed. Every time I try to deploy that .ear file (as in title of this post), I get that error: Caused by: java.security.spec.InvalidKeySpecException: Unknown KeySpec type: java.security.spec.ECPublicKeySpec I include a stack trace below: [#|2015-08-11T14:47:30.185+0...
Pawel
1

votes
2

answer
17

Views

how can I search data only in column between ID's a to b

How can I search data only in column between ID's a to b. I'm using the following statement but it seems the search runs at the entire table $statement = mysql_query('SELECT * FROM mylist where `categ` between 300 and 399 && `name` LIKE '%'.$searchVal.'%' || `street` LIKE '%'.$searchVal.'%' ||...
user1377921
1

votes
1

answer
208

Views

Same prepared statement, multiple databases, same schema

I have multiple ms sql server databases x1, x2, x3, ... xn, effectively all the same schema type and one database y that is different and holds management data. I am using jdbc prepared statements and there are occasions when the same prepared statement needs to be executed on multiple x databases...
hardya
1

votes
1

answer
643

Views

Prepared statement using Timestamp needs more nanoseconds

I am using the following statement to obtain a timestamp from my SQL DB: stmt.setTimestamp(i++, new java.sql.Timestamp(example.getExampleDate().getTime())) Which works just fine and returns: 2013-02-22 12:27:34.0 Now it happens that I need it to be more precise, like this: 2013-02-22 12:27:34.000...
bngschmnd
1

votes
1

answer
167

Views

MSSQL & SQL data type alternatives?

I have to work on a project connecting to a SQL Server DB, while working with PHP and a Laravel framework. My issue is with the data types and where I would be able to change them into fully functional and more 'conventional' SQL data types. So let's take NVARCHAR for example, would I be able to cha...
DudeOfLayers
1

votes
1

answer
387

Views

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver or com.microsoft.jdbc.sqlserver.SQLServerDriver

I have to query MSSQL. I tried every solution but did not work. I tried both com.microsoft.sqlserver.jdbc.SQLServerDriver and com.microsoft.jdbc.sqlserver.SQLServerDriver. Where the problematic part may be ? Thanks. That's my repo. And the database service String connectionString = ''; String JDBC_...
s.aslan
1

votes
1

answer
270

Views

Change Sqoop's Date Format in Incremental Import from SQL Server

TL;DR - Is it possible to change the date format Sqoop uses? I am importing data from a SQL Server using Sqoop (version 1.4.6) and am specifying a datetime column as my --check-column. Sqoop is querying the database using dates in the format yyyy-MM-ddd hh:mm:ss.SSS. However, since SQL server is con...
Breandán
1

votes
2

answer
627

Views

MS SQL Server on Linux: set password using script

I have installed MSSQL Server 2017 on Ubuntu 16.04. Now, I must change password. I know that I can change password using the following commands: sudo systemctl stop mssql-server sudo /opt/mssql/bin/mssql-conf set-sa-password But! I need to change password via script. Ok. To solve this problem, I had...
compasses
1

votes
1

answer
804

Views

How to log/trace mssql jdbc driver from java?

I would like to log all actions(especially the connectivity related ones) from my mssql-jdbc driver. I tried to follow these instructions, but without luck. I tried to create a new logger.properties file on my desktop included -Djava.util.logging.config.file=C:\Users\myUser\Desktop\logging.propertie...
mTv
1

votes
1

answer
260

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 JMeter 4.0 with Java 9 I got issue in log : 2018-04-17 17:10:54,825 ERROR o.a.j.JMeter: Uncaught excepti...
Badtestor
1

votes
1

answer
187

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_] ' + '( [Entry No_], [Record ID], [Posting Date], [Resource No_], [Job No_], [Work Type], [Quantity], [Unit of Measure], [Des...
en Peris
1

votes
1

answer
806

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 version of Springboot and Java 10. Development Enviroment: -Spring Boot 2.0.3.RELEASE -JDK / JRE 10...
JVz
1

votes
1

answer
64

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 foreign key which has a significant amount of rows for each and it is partitioned by foreign key value. Sa...
Nishanthd
1

votes
1

answer
98

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 response: 500 Request { 'address' => [ ('subsystem' => 'datasources'), ('data-source' => 'MyDataSource'...
noise
1

votes
1

answer
76

Views

DBI::dbSendQuery fails with RJDBC::JDBC for SQL SERVER

When I run the insert statement with odbc driver everythings fine. drv
stakowerflol
1

votes
1

answer
0

Views

What's the equivalent of JTDS properties in Microsoft JDBC?

I am changing my JTDS connection to Microsoft JDBC, and I see some properties that exist on http://jtds.sourceforge.net/faq.html that do no exist in Microsoft JDBC https://docs.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-2017. Specifically, I am wondering a...
Steve
1

votes
2

answer
661

Views

Error :Exception in thread “AWT-EventQueue-0” java.lang.ClassCastException:

My code is : try { Class.forName('com.microsoft.sqlserver.jdbc.SQLServerDriver'); String connectionUrl = 'jdbc:sqlserver://localhost:1433;' + 'databaseName=Java-Test;user=sa;password=199088037635;'; link = (Connection) DriverManager.getConnection(connectionUrl); } catch (ClassNotFoundException e) {...
user3802201
1

votes
3

answer
180

Views

SQL Server looping execution takes too much time

I have a table #TrackPlayedInformation upon which I am looping. Sample data of #TrackPlayedInformation is as follows: ProfileTrackTimeId JukeBoxTrackId ProfileId EndTime SessionId StartTime 14 52 33 2014-08-16 05:47:19.410 23424234 20...
M14
1

votes
1

answer
357

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: Validation failed for parameter 'Immagine'. Invalid buffer. How Can I Solve it? async function Reg(...
riki
1

votes
1

answer
260

Views

Loopback mmsql aggregation,groupby

I am using Loopback mssql connector in nodejs Question: is there anyway to get aggregation, count function available in loopback ORM instead sql raw query?
Nasir Sayed
1

votes
2

answer
128

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 JRE7 support. Scenario Retrieving data from a table as multiple rows but NOT at once. It's simply a l...
Anddo

View additional questions