33,363 questions
Best practices
0
votes
9
replies
58
views
Is resultSet.getMetaData() too expensive to call each row?
Is it okay to call getMetaData() on each ResultSet row? How expensive is the call? Maybe, not expensive at all?
I'd like to keep the parameter list for this method as short as possible, without ...
-7
votes
0
answers
101
views
JDBC try-with-resource more than one statement or mixed statements allowed? [duplicate]
I have a question to the possible use-cases of try-with-resources.
try(Connection conn = DatabaseConnection.getConnection();
Statement stmt = conn.createStatement();
PreparedStatement pstmt =...
-1
votes
0
answers
37
views
TDengine 3.3.8.0 Becomes Unavailable After Running for a Period of Time (JDBC Connection Failure, Containerized Linux Deployment) [closed]
Problem Description
In my production environment, TDengine 3.3.8.0 (single-node, containerized deployment on Linux) works normally initially but becomes inaccessible after running for some time. When ...
0
votes
1
answer
68
views
Spring Boot PostgreSQL Connection Failing on Render with UnknownHostException - jdbc:postgresql URL Format Issue
I'm deploying a Spring Boot application to Render with a PostgreSQL database (also hosted on Render). The application was working fine yesterday, but after updating my application.properties to change ...
1
vote
2
answers
431
views
PostgreSQL Connection Error via DBeaver: FATAL: invalid value for parameter "TimeZone": "Asia/Calcutta" [closed]
I have a PostgreSQL database server running on my VPS. I am currently working from my local machine using an SSH connection and would like to view the database tables and data graphically for better ...
0
votes
1
answer
108
views
Connect to SAS server from R via SAS JDBC - dbConnect Error
I am trying to connect to work SAS server from R, to extract datasets for further processing/analysis in R.
Due to corporate constraints, the only solution available is SAS JDBC type of connection, ...
3
votes
0
answers
77
views
Why don't my MySQL usernames match when I use them in JDBC? [duplicate]
I’m having trouble understanding how MySQL users actually work.
When I run:
SELECT USER(); MySql shows: root@localhost .
But my username when i log in is ade. so when I to set a connection using ...
0
votes
3
answers
90
views
How to connect to a Postgres accessible under a pathname via JDBC?
I have a Postgres on a server which is available under https://somethig.my.domain/postgres on port 5432.
I'm trying to connect via DataGrip which uses a JDBC driver. But I cannot figure out the ...
0
votes
1
answer
86
views
Oracle UCP stale connections cleanup / maxConnectionReuseTime
Environment
Oracle server v19c
Using jdbc driver and ucp from com.oracle.database.jdbc:ojdbc10-production:19.29.0.0
Tomcat10/Java17/SpringBoot3.5 application
UCP logging enabled with oracle.ucp.level ...
0
votes
1
answer
126
views
Connecting to Oracle database is fast with C# ADO.NET, but slow with Java JDBC
Here is the Java test code I wrote. It takes about 40 seconds to connect to the Oracle database using JDBC, but similar code in C# using the OracleConnection.Open method completes in less than 1 ...
1
vote
1
answer
82
views
Spark JDBC reading wrong character encoding from PostgreSQL with server_encoding = SQL_ASCII
I'm reading data from a PostgreSQL 8.4 database into PySpark using the JDBC connector.
The database's server_encoding is SQL_ASCII.
When I query the table directly in pgAdmin, names like SÉRGIO or ...
0
votes
1
answer
110
views
How to run a SQL script in Java NOT on startup?
I have a Spring application which is multi-tenant (uses JdbcTemplate for data access). There are several tables creates for each tenant, and I want to keep this SQL code in a separate init_tenant.sql ...
2
votes
2
answers
141
views
javax.sql.rowset.serial.SerialClob cannot be cast to oracle.sql.CLOB while using preparedStatement.setClob
I'm trying to insert a java.sql.Clob to an Oracle DB table with a clob column and it fails with the following exception
javax.sql.rowset.serial.SerialClob cannot be cast to oracle.sql.CLOB
at ...
0
votes
1
answer
120
views
SQL Server and Sybase driver conflicts
I need to extract data from a Sybase source and then use this data to extract values from an SQL Server source.
I am using these drivers:
// Database drivers
// https://mvnrepository.com/...
1
vote
1
answer
88
views
How to use FIXED_LIST instead of MULTICAST in griddb using jdbc driver
The GridDB server has been configured to use FIXED_LIST instead of MULTICAST and is functioning correctly. While the c_client and Java samples within GridDB operate as intended, the samples for JDBC ...