Questions tagged [jdbc]

Java Database Connectivity (JDBC) is a Java standard that provides the interface for connecting from Java to relational databases.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Writing large dataset from spark dataframe

We have a azure databricks job that retrieves some large dataset with pyspark. The dataframe has about 11 billion rows. We are currently writing this out to a postgresql DB (also in azure). Currently ...
Kyle Chamberlin's user avatar
0 votes
0 answers
44 views

JDBC using DataSource, DB2 and Kerberos

I am trying to set up a JDBC using DataSource interface, DB2 database and Kerberos for authentication. I am using IBMs documentation which refers in Kerberos security with no user ID or password link ...
bagb's user avatar
  • 1
1 vote
3 answers
138 views

MySQL Temporary Tables and Connection Pools

This is more of a "please confirm/correct my understanding" question. Background I connect to MySQL using JDBC, the connection pool has around 250 connections, most of which seem ...
DSZ's user avatar
  • 125
1 vote
0 answers
111 views

is it possible to set specific timezone for session in mariadb connector/j

I 'm trying to use timezone setting with mariadb connector/J version 3.x. In the documentation,in Timezone consideration, it says: 'a timezone': connector will set connection variable to value. ...
SkyKnight's user avatar
0 votes
0 answers
39 views

Why, MariaDB user allowed host IP address also allows a virtual machine on the host with NAT network adapter

The MariaDB user specifies an allowed IP address in the Host column of the mysql.user table. So, it only allows logging in from the host with the specified IP address. And MySQL has the same design. ...
James's user avatar
  • 149
0 votes
0 answers
97 views

JDBC connection to MariaDB over SSL/TLS

I have an application that I'm trying to connect to MariaDB with a JDBC driver over SSL. I have set the following parameters in the custom.cnf of my MariaDB server: ssl_ca=/certs/ca-cert.pem ssl_cert=/...
D Edwards's user avatar
1 vote
1 answer
224 views

Can JDBC Oracle file stream blob inserts be speeded up?

I have these four different ways by which I am inserting some file data into an Oracle database using JDBC and PreparedStatements. Approach A ps.setBytes(1, fileDataInByteArray); Approach B Blob ...
Raster R's user avatar
0 votes
1 answer
237 views

Execute Permission Denied on Stored Procedure using Microsoft JDBC Driver and Windows Authentication

I have a Microsoft SQL Server database that I use Stored Procedures to read/write data to through a Integration Engine in this case InterSystem IRIS. Originally I was using a local server user to do ...
sroth79's user avatar
0 votes
0 answers
79 views

MySQL Connection String settings

I'm using the following options in my connection string: autoReconnect true autoReconnectForPools true cacheCallableStmts true cachePrepStmts true useCompression true useSSL true ...
Kevin Huntly's user avatar
0 votes
1 answer
862 views

Java PostgreSQL library seems to convert dates to local time zone automatically

PostgreSQL 14.6 Ubuntu 22.04 I am using postgresql-42.5.4.jar which I downloaded from pgJDBC. I use this library to get data from a database and display it on a website running locally. The web server ...
Zephyrus's user avatar
  • 301
0 votes
1 answer
43 views

Oracle CACHE and STORAGE IN ROW behaviour

We have a Java Spring boot application that writes 20 million plus rows in a table with 2 blob columns in a batched manner into an Oracle 21c DB. We are using JDBC batch insert for fast inserts. ...
humbleCoder's user avatar
0 votes
1 answer
3k views

Unable to connect with JDBC after MySQL upgrade from 5.7 to MySQL 8.0

We use java application client to transfer database table data to a third party server. With MySQL 5.7 it was working fine. After upgrade to MySQL 8, it started to show errors. First thing we did was ...
Amit Sedai's user avatar
1 vote
0 answers
457 views

Oracle 19c: Sql.Recovarable.Exception [Error 17410]

We get an exception while making this call from our backend to the database: select f.* from T t inner join CATEGORY Category on Category.ID1 = t.ID1 where Category.ID2 = ? and t.ID3 = ? and Category....
Tennie's user avatar
  • 11
0 votes
1 answer
59 views

NDB Cluster Read and Write Process multiple Access

When using the MySQL NDB Cluster distributed database, the following general problem has arisen: To insert a new Record / Row, the last row in the database should be read, see if it is compatible with ...
programmer_13's user avatar
0 votes
1 answer
538 views

Why does my JDBC keep setting session variables?

I'm looking at the Performance Insights for MySQL Aurora on AWS and among the top queries I see: SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ SET SESSION TRANSACTION ISOLATION LEVEL READ ...
Johnny's user avatar
  • 140
1 vote
0 answers
893 views

Debugging connection leak in postgres instance in RDS

Trying to debug a connection leak in postgres database instance in RDS SELECT * FROM pg_stat_activity; Running the above query shows around 500 sessions, but all of them have wait_event_type Client ...
1987frank's user avatar
  • 111
1 vote
0 answers
105 views

Metadata retrieval query executed for every invocation of ResultSet.updateRow in PostgreSQL JDBC driver

I'm using an updatable ResultSet, where I want to update the columns directly in the ResultSet and commit (for performance and avoiding complex rollback logic). For this, I do the following - Create ...
Richard Kodamanchili's user avatar
1 vote
1 answer
2k views

Accessing Firebird Database Remotely using JDBC

I would like to access a Firebird database remotely using DBeaver and have had little success. DBeaver utilises the FirebirdSQL JDBC driver. We have been presented with the following error message: ...
Tom Dickson's user avatar
0 votes
2 answers
892 views

Postgres deadlock on sharedlock

I'm having a problem where a couple UPDATE sql statements are locking up on a particular table in a database. For some reason these statements seem to be requiring access to a "ShareLock" ...
Cody Herbst's user avatar
0 votes
2 answers
874 views

JDBC oracle listener random port

I have an issue with our listener trying to assign random ports to JDBC connections. We have a 19c oracle db running on a RHEL server with two ports opened 1523 and 1524. When application tries to ...
user avatar
1 vote
0 answers
46 views

How to Enable TLS 1.2 on MS SQL Server 2012 SP1? [duplicate]

im having trouble connecting to MS SQL Server 2012 SP1 with regards to TLS Handshake. as stated by microsoft, SP1 only supports TLSv1 to TLSv1.1, if i'm not mistaken. I have been developing a spring/...
friedSyntax's user avatar
0 votes
1 answer
2k views

Unable to connect to an Oracle 12c Docker container

I'm working on a project with Oracle, and using a Oracle XE 11 container for testing. But recent developments have ended up with me running up against a brick wall: I need larger table names. ...
Mason Wheeler's user avatar
1 vote
1 answer
190 views

What could be the reason for running rollback after a commit?

I am trying to understand why there are so many rollback queries being issued by Jira and is equal to the number of commits. MySQL log reveals the following: 2021-04-29T14:55:58.364468Z 42059 ...
GP92's user avatar
  • 155
0 votes
1 answer
157 views

how do I use sa to access local sql server database with jdbc

I have a new local sql server database, running hypothetically on port 48000. In SQL Server Management Studio under the name of the computer\MSSQLSERVER01, Security, Logins I clicked sa, properties ...
Chris94's user avatar
  • 101
0 votes
0 answers
1k views

Slow insert on conflict do nothing for Postgres 13

I'have rather odd case. I have a "cache" table in Postgres and I need to insert 100K - 1M records in parallel from different sources. Sources can try to insert duplicated data (by Primary ...
Capacytron's user avatar
1 vote
1 answer
4k views

Can Microsoft JDBC Driver 4.0 connect to SQL Server 2019 and perform DML without issue?

The SQL version compatibility BOL article advises that the minimum compatible JDBC driver version for SQL Server 2019 is 7.4. Can an older JDBC driver still connect to SQL Server 2019? Or can only the ...
Pixelated's user avatar
  • 1,434
0 votes
1 answer
138 views

does SELECT with implicit transaction prevent VersionStore cleanup?

The JDBC driver usually sets the implicit transaction on in every query executed by the client. I found many SELECT statements in suspended state with implicit transaction set to ON using Version ...
Gio's user avatar
  • 107
0 votes
1 answer
937 views

How to reset session context/variables in JDBC pooled connections - MySQL / Oracle

In my application I have multithreads that needs to access database and I am using apache.tomcat.jdbc.pool.DataSource as a JDBC connection pool. In some cases users execute stored procedures that ...
Selim Alawwa's user avatar
0 votes
1 answer
46 views

Connecting to “foreign” database on the same DBMS

I am somewhat surprised to see that JDBC allows me to transparently SELECT from a table in a "foreign" database, on the same DBMS, for which I have the requisite privileges, without ...
Xin's user avatar
  • 3
0 votes
1 answer
7k views

FATAL: database does not exist in postgresql for jdbc

I create a database by installing Postgres on my ubuntu 20.04 machine and used the following commands to create it: sudo su - postgres psql CREATE USER preopus WITH PASSWORD 'admin222'; CREATE ...
Lambda Banquo's user avatar
0 votes
1 answer
295 views

Creating external tables from SQL Server using JDBC Drivers

I am trying to query Hive tables AND Kylin tables from SQL Server 2019. I was doing some research and found that MSSQL provide PolyBase as a form of interface to Hadoop storage. However, the examples ...
user859385's user avatar
0 votes
1 answer
136 views

Enabling TLS and TLS-MA simultaneously for different clients of a Oracle DB

We have a requirement where we want to enable TLS-MA for some of the clients connecting to a specific Oracle database while the other clients can continue to use TLS with server certificate. We are ...
NoviceProgrammer's user avatar
2 votes
1 answer
6k views

How to configure TCPS in JDBC thin client for oracle

An Java Application running with JDBC thin wtih TCP connection, Now require is to convert in TCPS for encryption transmission from application to database. String url = "jdbc:oracle:thin:@(...
Nullpointer's user avatar
0 votes
1 answer
2k views

postgresql prepared statements with JSONB containment

I'm trying to write a prepared statement using a date held in JSONB. A prepared statement doesn't allow the containment operator @> so I used the function name itself jsonb_contains which executes,...
user172940's user avatar
0 votes
1 answer
1k views

Implementation of JDBC DataSource in MySQL Connector/J 8

In the MySQL Connector/J 8.0 Developer Guide (JDBC driver for MySQL), I have not found any mention of an implementation for the DataSource interface in JDBC. To quote the DataSource Javadoc: An ...
Basil Bourque's user avatar
0 votes
2 answers
4k views

Unable to connect to Mysql via JDBC but works fine with Mysql

I have a mysql server running locally to which I am able to connect using mysql -h localhost -u root It does not require a password. But when I try to connect with the same attributes (jdbcurl = "...
Ashwin's user avatar
  • 272
0 votes
1 answer
696 views

Informix JDBC login fails, local login succeeds

I'm troubleshooting a "sudden" issue on our somewhat old Informix server (11.50.UC9GE). After years of running without issue (and connecting w/o issue), suddenly today we can't connect to the server ...
MT.'s user avatar
  • 101
0 votes
1 answer
763 views

Disable nestloops into the Postgresql JDBC connection

I'd like to disable nested loops for a specific JDBC connection string (batch java application), using the PostgreSQL community driver Is it possible to do so? I tried this way, in vain: jdbc:...
Thomas B's user avatar
  • 103
2 votes
1 answer
575 views

Deadlock troubleshooting in SQLServer

Edit: In case it is relevant, we are connecting to the database via JDBC in a java webapp. We use autocommit=off for all of these operations, and deadlocks mean the job thread is not committed. I am ...
Mirrana's user avatar
  • 224
0 votes
1 answer
58 views

Correct table quoting

I want to generically use any SQL database(I'm using jdbc, it works if the driver and the URL are provided). It seems, that different DBMS use different quoting for table names. For example, I have ...
dan1st is crying's user avatar
3 votes
1 answer
2k views

How to set IP segment and connection string with IPv6?

For this PostgreSQL configuration example: https://repmgr.org/docs/4.4/quickstart-authentication.html local replication repmgr trust host replication ...
rawmain's user avatar
  • 309
1 vote
0 answers
410 views

JDBC can't use the current primary database by setting multiple hosts

node1: 192.168.0.1 as primary node1: 192.168.0.2 as standby The JDBC string is setting as this: <url>jdbc:postgresql://192.168.0.1:5432,192.168.0.2:5432/mydb</url> Using repmgr doing ...
rawmain's user avatar
  • 309
1 vote
1 answer
4k views

How to do automatic failover for PostgreSQL with application automatic switch?

There are two ways to try. Method 1 Use JDBC connect the PostgreSQL cluster (primary, standby 2 servers only): jdbc:postgresql://192.168.0.1:5432,192.168.0.2:5432/jiradb But failed: The ...
rawmain's user avatar
  • 309
1 vote
0 answers
176 views

Support for JDBC 4.2?

As far as I can tell, the jcc driver shipped with 11.5 (https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads) still uses JDBC 4.1. Any rumours of, if a later fixpak will switch to ...
Lennart - Slava Ukraini's user avatar
0 votes
2 answers
732 views

Is there a way to check connection properties of an active SQL Server connection?

The context: I have a Java application that's using HikariCP for its connection pooling solution. While lightning-fast, HikariCP doesn't have a lot of configuration options, by design, and that's all ...
Octavio Kidd's user avatar
1 vote
1 answer
365 views

Oracle save mandarin characters with we8iso8859p1

Im trying to save Mandarin characters into Oracle instance database 11g. Field datatype - NVARCHAR2 ; NLS_LANG - AMERICAN_AMERICA.WE8ISO8859P1 If I change NLS_LANG, it will affect other data already ...
surm's user avatar
  • 11
0 votes
1 answer
58 views

Java driver dont fire query-start probe in postgres 11

While using SystemTap to trace postgres session on PostgreSQL 11.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit. global livequeries probe process("/usr/...
Aroly7's user avatar
  • 141
1 vote
0 answers
170 views

Is there a way to open an encrypted Oracle Database wallet through weblogic JDBC drivers?

I encrypted a column in an Oracle 12c database using the TDE method, The said column was being used in my application, The column becomes unavailable due to the Database wallet being closed. To open ...
Nibin George's user avatar
1 vote
2 answers
522 views

Connection denied from Java application

I try to connect from my little Java class to Oracle11g database and connection was refused with a SQL error. From client (SQL Developer) connection works. This is the ERROR when I try to run java ...
Federica Forte's user avatar
0 votes
0 answers
3k views

PostgreSQL disconnection session time

I have a simple app which supports just GET & POST using JDBCTemplate, in tomcat configuration (context.xml) is set where it can find the Database like below: <Resource name="jdbc/MYDB" auth="...
GeoCom's user avatar
  • 101