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

learn more… | top users | synonyms

1
vote
1answer
20 views

How does Sybase store datatime information?

We have a Sybase database that currently stores datetime values in some of the tables. If we move that server with the Sybase database to another country which is in another time zone, will the ...
0
votes
0answers
8 views

Does mariadb provide a Type 2 driver?

I could not find any details about mariadb type 2 driver. Does db support type 2 driver? I'm asking this for learning purposes.
1
vote
1answer
86 views

MySQLSyntaxErrorException on ALTER TABLE … CONVERT TO … in MySQL Connector/J

Running Ubuntu 14.04 with mysql-connector-java-5.1.28 installed. Let's create a table: CREATE TABLE mytable (value1 VARCHAR(32000), value2 TEXT, value3 VARCHAR(1000), value4 VARCHAR(32000)) ...
0
votes
0answers
10 views

JDBC , make connection static to improve performance [migrated]

I'm dealing with JDBC these days, I found it's really slow and i try to figure out some ways to improve the performance, I've noticed that it's slow to get the Connection object, so I'm thinking ...
3
votes
1answer
386 views

How to separate out individual sql statements from Oracle SQL script for execution from java code

I have Oracle DB 11g Enterprise Edition and I want to execute sql script from my java code. I am reading this sql script from a .sql file and the script contains statements such as create table, ...
0
votes
2answers
849 views

java.sql.SQLException: Login failed for user 'sa'

I am having trouble connecting to my Microsoft SQL Server database through a jTDS connection: Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433 ...
0
votes
1answer
53 views

No such column error jdbc

Suppose I have a table: SERVICE={SID,NAME,PORT} and with the help of a Java program, I want to select the SID of the known port with the help of a SQL query: Select SID from SERVICE ...
3
votes
1answer
47 views

Does it make sense to upgrade to a newer PostgreSQL JDBC driver?

I would like to know if it could be possible to gain any performance benefits from upgrading the default PostgreSQL JDBC drivers from applications like Confluence or JIRA. Assume that you cannot ...
5
votes
2answers
1k views

Session in “Sql*net message from client”, but is active

I've Googled around, and my impression is that Sql*net message from client suggests the Oracle DBMS is waiting for the client to send new commands to the DBMS, and therefore any time spent in ...
0
votes
1answer
25 views

monitoring sql execution perfomance of an application that makes use of SP_prepare

we have an application that makes heavy use of sp_prepare and sp_execute and we would like to start monitoring the execution plans of the sql. but this is made difficult by the use of sp_prepare ...
0
votes
0answers
83 views

ORA-12516 but max_utilization not reaching limit

Our app began to raise ORA-12516, TNS:listener could not find available handler with matching protocol stack errors, and I'm trying to diagnose why. The workload has not changed, so I think we might ...
4
votes
0answers
101 views

Postgresql JDBC Table Valued Parameters [closed]

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent in PostgreSQL, if ...
1
vote
0answers
42 views

Is there a way to detect if there is an uncommitted transaction in H2?

I am using an H2 database with JDBC to create a connection with setAutoCommit(false). I am currently programatically checking whether or not there is an uncommitted transaction, but I was wondering ...
0
votes
3answers
154 views

How to IFNULL or COALESCE rewrite in a SQL query?

I there a way to rewrite a SQL query, so I can avoid IFNULL or COALESCE, because the HXTT DBF JDBC driver (supports SQL92) throws the following error.: Caused by: java.sql.SQLException: The aggregate ...
0
votes
0answers
23 views

How Oracle DB maintains client identification

I know in 'dedicated server' mode we have one user process for each client and pool of user process in 'shared server' mode. in either case How oracle maintains the client identification ? Please ...
0
votes
0answers
104 views

Is it possible for JDBC thin client connection to use DNS autodiscovery to identify LDAP server?

I've set up an OpenLDAP server for Oracle Net Service Name resolution. This is working well for both Oracle client connections, as well as JDBC thin client connections. In the case of Oracle client ...
0
votes
0answers
155 views

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure when executing Large queries

i am using hibernate 3.0 in my web application and using Mysql as the database. everything is working fine in normal circumstances, but the problem arises when i am trying to execute a large query ...
0
votes
3answers
80 views

prepared statements are not inserted

i am new to JDBC and trying following code. Could not find the error in it try{ Connection con = ConnectionProvider.getCon(); stmt=con.prepareStatement("insert into ...
0
votes
2answers
70 views

Improve performance on write-only table?

I am using MySQL 5.5 with innoDB. The basis of my server is Netty, JDBC and BoneCP. I have a log table that contains user inputs(HTTP header, request body etc). This table will only be read very ...
0
votes
0answers
194 views

SSPI handshake failed with error code 0x80090308 connection to Sql Server 2008 R2

I have a cross domain situation where the SQL Server 2008 R2 server sits in one domain and the client in another. There is a one-way trust between the domains. The SQL Server runs on a domain account. ...
0
votes
1answer
48 views

Can I write a Select query to update the data too

Can I write a Select query under a jdbc connection ,having a resultset object and which would update the records on just passing the select query them in my sql.
1
vote
1answer
296 views

postgres+JDBC: fire trigger with non autocommit transaction

i have a jdbc client that make an two INSERT query on database whitout autocommit, and a trigger on database that fires when a insertion is done on a certain table public foo() throws MyException { ...
2
votes
0answers
216 views

Insert Speeds for large batches

In my application, my INSERTs seem to be taking a major chunk of the time. I have a large number of objects in memory (~40-50,000) which i want to insert into a table. Lets take a sample table ...
0
votes
0answers
104 views

How to enable SSL in MySQL on Windows?

I'm a student doing a project which uses JDBC and MySQL (on Windows). I have an application with connects to a MySQL server on a remote host. To have a secure connection, I found this : ...
0
votes
0answers
25 views

Secure the jdbc and remote MySQL(windows) server connection [duplicate]

I'm a student doing a project which uses jdbc and mysql(on windows). I have an app with connects to mysql server on remote host. I just this connection to be a little secure. I found this : ...
2
votes
0answers
342 views

To what extent is MariaDB Java client a perfect replacement for MySQL JDBC (Connector/J)?

Premise: I ship a Java application which will make a JDBC connection to a MySQL database. (At the time of this writing it could be 5.1 or 5.5, but hopefully the question and answer don't rely heavily ...
0
votes
1answer
1k views

How to retrieve data from Postgresql index using java

I am writing an application for searching, using text search of Postgresql. I am a beginner in Database. I created a Gin index and i am trying to get data from it. My code is import ...
1
vote
1answer
245 views

Is there any way to retrieve “Messages” in SQL Server through JDBC?

By "Messages" I mean the Messages tab in the following figure, which includes "Warning", "n rows affected" and in the figure below, the execution time. In JDBC, ResultSet class is used to retrieve the ...
0
votes
2answers
4k views

Why decrease the wait_timeout configuration parameter in MySQL?

Question I'm working on an application that uses a connection pool in Apache Tomcat to communicate with MySQL. I was wondering why would you want to use a smaller wait_timeout than the default of ...
2
votes
0answers
77 views

Wanted: Android versions of JDBC drivers for common RDMBSes

I've got a Java-based application library I'm trying to port to Android. The package presently supports: Oracle Informix DB2 Postgres Sybase ...And can easily be configured to use any other SQL92 ...
4
votes
4answers
697 views

Oracle 11g delete by unique key slow

We have been plagued by a deadlock issue for quite some time that relates to deletes and inserts on the same table. It happens sporadically, but had been increasing in frequency. It would manifest ...
0
votes
1answer
31 views

Why isn't my includeThreadNamesAsStatementComment JDBC parameter working?

The JDBC API lists a includeThreadNamesAsStatementComment parameter that seems to indicate it will prefix all queries with the Java thread ID. I thought this would be useful in tying back DB activity ...
2
votes
1answer
198 views

LoadBalancing JDBC DataSource Connect without URL

When using JDBC I like the new DataSource-way to establish the connection. Further I like the isolated set-Methods for the properties like setUser, setPassword, setDriverType, setServerName, ...
1
vote
2answers
5k views

Connect to Postgresql 9.2 from Eclipse Data Tools Platform

GOAL: My goal is to write sql code within Eclipse to query a Postgresql database. The reason I want to write my queries within Eclipse is to then write R or Python code to perform statistical analysis ...
1
vote
1answer
1k views

Retrieving data from inner join using LIMIT and OFFSET

These are my two tables: table1 qid[PK] |gid[PK] |abcd | xyz | date ---------------+---------+---------+------+------------ 00001 | qwe | 54 | a | 1994-11-29 00002 ...
1
vote
2answers
1k views

jdbc+mysql: “Deadlock found when trying to get lock; try restarting transaction”

After recovering from a disk-full problem, I started getting these errors in my logs: java.sql.BatchUpdateException: Deadlock found when trying to get lock; try restarting transaction at ...
2
votes
2answers
1k views

java.sql.SQLException: Login failed for user 'sa'

I am having trouble connecting to my SQL Server database through a jtds connection: Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/MnA;instance=SQLEXPRESS", ...
0
votes
1answer
387 views

jdbc: does setAutoCommit(true) commits past executions?

I would like to execute some statements, and commit the entire batch at the end. I've tried the following approach: connection.setAutoCommit(false); // Don't commit for each statement ...
1
vote
2answers
393 views

Derby/SQL - How to increase performance when left joining and retrieving varchar columns

Through trial and error I found that if I do a left join such as: SELECT firsttable.id, secondtable.id, secondtable.varcharColumn FROM firsttable LEFT JOIN secondtable ON ...
0
votes
1answer
254 views

Sybase ASE doing showplan for all requests

We have a strange situation where we are seeing showplan information in packets returned from a Sybase ASE 12.5 database server to a JDBC client. ie using tcpdump we see showplan output being sent ...
6
votes
4answers
13k views

Why does MySQL say I'm out of memory?

I was trying to execute a fairly large INSERT...SELECT in MySQL with JDBC, and I got the following exception: Exception in thread "main" java.sql.SQLException: Out of memory (Needed 1073741824 bytes) ...
10
votes
1answer
403 views

Disable explicit commits in JDBC, detect them in SQL, or put the database in a readonly state

Background: I'm working on http://sqlfiddle.com (my site), and am trying to prevent one avenue of abuse possible there. I'm hoping that by asking about a problem I'm currently addressing, I don't ...
1
vote
1answer
235 views

Postgres shared_buffers and pooled processes

I have read several articles (including Postgres docs) that suggest setting the shared_buffer's config value to 25% of your total physical memory. Using my 4 GB memory as an example... If I ...
1
vote
2answers
811 views

Oracle 11. Updating BLOB field. Db file sequential read inappropriately slow?

I've and Oracle (11 Enterprise) schema with a table CREATE TABLE USER.WSP_BUNDLE ( NODE_ID RAW(16) NOT NULL, BUNDLE_DATA BLOB NOT NULL ); CREATE UNIQUE INDEX USER.WSP_BUNDLE_IDX ...
3
votes
1answer
4k views

Oracle 11g hunting down the deadlock, maybe foreign key?

I am trying to understand why a deadlock occurs in my database. The trace tells me that two updates on the same table are locking. In table is the first table to be written to in an transaction, only ...
0
votes
1answer
3k views

What is the JDBC URL for Oracle's Data Guard Fast-Start Failover?

Currently I have... url= " jdbc:oracle:thin:@ ( DESCRIPTION= ( ADDRESS_LIST= (LOAD_BALANCE=OFF) (FAILOVER=ON) ( ADDRESS= (PROTOCOL=TCP) ...
2
votes
1answer
606 views

Are there any good database management applications for JDBC/Java databases?

I am working with an Apache Derby/JavaDB database via JDBC. Before have I been working with MySQL and used phpMyAdmin as a good Database Management tool. Is there any good desktop application for ...