33,332 questions
0
votes
0
answers
36
views
Connecting from DBX to SAP HANA to Insert in HANA
I want to upload dataFrame records from DBX to SAP HANA and it fails with DBX 16.4 giving error Could not initialize class com.sap.db.jdbc.Driver . Any solution appreciated
Connect to HANA (hdbcli ...
2
votes
1
answer
103
views
Is it possible to run an Oracle package to create a table via JDBC
I am trying to move a database creation process from SQL plus to JDBC. I need to run a bunch of processes attached to Oracle packages.
BEGIN
ddl.column('table_name', 'column_name', 'type')
END
I ...
0
votes
1
answer
80
views
How can I apply a streaming parameter from Java into an Oracle BLOB?
I want to search an Oracle table by a Blob using streaming. This example runs well in DB2, SQL Server, PostgreSQL, and MySQL, but it fails with an error in Oracle. I have the following table:
create ...
Advice
1
vote
5
replies
152
views
Oracle, PL/SQL and Java
I’m a PL/SQL developer with strong Oracle experience, interviewing for a role in a Java-based team. They’re happy with my database skills but want me to learn few Java skills before the next round.
...
1
vote
3
answers
169
views
Slow performance with SQL Server MERGE using Spring JdbcTemplate batchUpdate for ~14k records
I am experiencing significant performance issues when performing an "upsert" operation on a SQL Server table using Spring Boot's JdbcTemplate.batchUpdate in my Java 17, springboot 3.2.5 ...
6
votes
2
answers
128
views
Cross-vendor BYTEA / BLOB fetch
PSQLException gets thrown when calling resultSet.getBlob(String) (with NumberFormatException as the cause). The column is of type BYTEA since there are no Blobs in Postgres.
Bad value for type long : ...
Best practices
1
vote
2
replies
38
views
jOOQ: Best practice to set up user_id session variables
I'm using PostgreSQL RLS which relies on session variables (current_setting) to find out current tenant/user and filter data accordingly. What is the best way to set these values when using jooq to ...
0
votes
2
answers
107
views
Impossible to connect to a Microsoft Access database in LibreOffice 25.2 with UCanAccess and jdbcDriverOOo 1.6.2
I need to edit the content of a MDB file under Debian Linux 12 with LibreOffice 25.2.
I tried to use the solution mentioned in the documentation (relying on UCanAccess) without success: I added the ...
1
vote
2
answers
133
views
java.lang.UnsatisfiedLinkError: The specified procedure could not be found when trying to use thick (Oracle Instant Client) JDBC connection
Our DBAs want to enable Transparent Application Failover (TAF) in our Oracle databases and we were told to enable this we needed to change from 'thin' JDBC connections to OCI in our Java applications. ...
Advice
0
votes
3
replies
65
views
Statement execution after thread interruption
Will Statement execution be canceled if the thread that is executing it is interrupt()ed (execute() has not yet returned)? For example, after calling swingWorker.cancel(true).
It may be anything:
...
6
votes
1
answer
138
views
How do I confirm that JdbcTemplate is fetching the records into the result set in batches of 1000 when setFetchSize(1000) is set on the statement?
How do I confirm that JdbcTemplate is fetching the records into the result set in batches of 1000 when setFetchSize(1000) is set on the statement?
I am using PostgreSQL JDBC driver here.
Below is my ...
0
votes
2
answers
92
views
Aliasing to prevent ambiguous columns in SQL join
I have a query of the form:
SELECT T1.id, otherT1Column, someT2Column
FROM T1
JOIN T2 ON T1.externalId = T2.id
WHERE <some conditions>
(which is constructed programmatically with JDBC, not ...
0
votes
0
answers
65
views
Spark JDBC insert: 1M rows fast, 2M rows extremely slow, 13M rows fast — same code
I am running a Spark job (AWS Glue / Spark 3.x) that writes data to PostgreSQL via JDBC.
What confuses me is that performance is highly non-linear:
- 1M rows → ~3 minutes
- 2M rows → > 1 hour (...
Best practices
0
votes
9
replies
82
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 ...
2
votes
2
answers
2k
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 ...