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

learn more… | top users | synonyms

0
votes
0answers
17 views

Elasticsearch missing nested data

I'm trying to set up my river with nested data, however I'm facing some issues. My _river query looks like this: { "type" : "jdbc", "jdbc" : { "driver" : ...
0
votes
0answers
21 views

Mysql connections not closing

I have a web application running on Tomcat7 that connects to MySQL 5.5. I have two servers running the identical code: Ubuntu Red Hat The Ubuntu one runs fine maintaining a steady 8-16 ...
2
votes
3answers
149 views

Transaction Isolation level different threads massive number of Writes

I have a lot of threads that writing to DB some data in two tables. tbl_raw_data and tbl_parsed_data where tbl_parsed_data have foreign key to tbl_raw_data. I also need the writing to be superfast. ...
1
vote
2answers
89 views

Configuring sqlnet.ora and tnsnames.ora on the client side

I have an application server talking to an Oracle database, using the Oracle instant client. We are troubleshooting a specific bug, and it was asked if I could add the following flags to to my ...
1
vote
2answers
40 views

SET ROLE via parameterized query

In the very helpful response I received to a previous question, I am trying to write some JDBC code that first sets the role to a specific user before executing subsequent queries. On the safe side I ...
1
vote
1answer
47 views

Proxy authentication for PostgeSQL

The following seems likely to be a fairly common situation, but I haven't seen any solutions. I have a PostgreSQL database containing views that are specific to the $user, in order to restrict data ...
0
votes
0answers
54 views

Install JDBC driver 4.0 for SQL Server

How can I confirm that JDBC is running and properly configured/registered in the system? I followed the installation instructions but I believe there has to be more to it than what the instructions ...
0
votes
0answers
20 views

OEM SQL Server plugin - Discovering targets

I am trying to configure OEM to work with SQL Server using the plugin. I have the agent installed on the Windows Server, and the system is being monitored just fine. But when it comes to adding ...
2
votes
0answers
38 views

Unable to Update on SQL Server 2008 R2

This is a bit strange so bear with me please. After installing a new SQL Server 2008 R2 on a new server (Windows 2012 Standard) just like the production one, I tried to connect my web aplication ...
0
votes
0answers
31 views

JDBC to IBM AS400 with SymmetricDS

I'm having trouble configuring SymmetricDS v3.6.6 to work with an IBM AS400 database. Using the jtopen_8_3 library: db.driver=com.ibm.as400.access.AS400JDBCDriver When I try this: ../bin/symadmin ...
0
votes
0answers
26 views

What is LDAP JDBC url with username and password to connect using DriverManger.getConnection

I want to connect to LDAP server using JDBC with username and password using DriverManager.getConnection method. I have all the credentials using which I am able to connect to LDAP from Sql * Plus. ...
0
votes
2answers
80 views

Does Postgresql support different transaction isolation per connection?

I just discovered that H2 doesn't support concurrent connections using different transaction isolation levels. Meaning, changing the transaction isolation of one connection affects all other ...
1
vote
1answer
189 views

PostgreSQL 9.3 - Performance Issue: Counting table entries slower with jdbc postgres driver

I'm using PostgreSQL 9.3 and want to ask if it is possible to improve the performance of my queries based on the following database schema: CREATE TABLE "entities" ( "id" BIGSERIAL, "type" INT ...
1
vote
1answer
148 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
15 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
130 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)) ...
3
votes
1answer
65 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 ...
0
votes
1answer
41 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
333 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
250 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 ...
0
votes
1answer
140 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 ...
1
vote
0answers
52 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
233 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
181 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
56 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
654 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
85 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 ...
3
votes
1answer
723 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
122 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
270 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
51 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
404 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
469 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
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 : ...
0
votes
0answers
152 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 : ...
3
votes
1answer
500 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
2k 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
412 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 ...
2
votes
0answers
91 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 ...
0
votes
2answers
6k 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 ...
4
votes
4answers
962 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
32 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
290 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
1answer
2k 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
7k 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 ...
0
votes
1answer
607 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
607 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 ...
1
vote
2answers
2k 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 ...
0
votes
2answers
1k 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 ...
2
votes
2answers
2k 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", ...