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
16 views

Accurate PG database size for comparing representations

I have a Java/JDBC program that takes a sample file and imports the data into the database, shredding it across multiple relations. The program does this multiple times for several different ...
0
votes
0answers
17 views

HELP - removing JDBC boilerplate code with java 7 and up [migrated]

Online examples of JDBC exhibit fair amount of code-clutter, compared to RAII/C++ or Python DB. Don't we all want something less verbose? :) So, in the spirit of trimming things a little, is the ...
0
votes
0answers
13 views

JDBC - accessing a query, then querying that query

Sorry if the way I phrased that is confusing. I'm writing a program that acts kind of like a filter - it retrieves an answer to a query, counts the rows, then I want to do a slightly more narrow ...
1
vote
1answer
10 views

JDBC prepared statement - make a token null

So, I have an insert statement in a Java program I'm writing. Under some conditions, I want it to insert some values as null. However, before I can execute the statement, I have to set all of the ...
1
vote
1answer
84 views

Syntax error using preparedstatements with postgresql

I have a Java application connecting to a PostgreSQL database. Using straightforward code like: ps = con.prepareStatement(sql); if (dataTypes != null && dataTypes.size() ...
1
vote
1answer
67 views

Dealing with single quotes in a dynamic query [closed]

I'm building a query as a string in my application layer to be executed over jdbc. The string is constructed as follows: "SELECT COUNT(DISTINCT ROOT_ID) as rows1 FROM DANIEL.UNIQUE_PHYSICIAN " ...
1
vote
2answers
33 views

Causing ORA errors in a program using JDBC. How can I find what's causing them?

So I'm building a java app to interface with the company's database. Whenever it causes an ORA error, it just prints something like the following to system output: ORA-00911: invalid character Is ...
1
vote
0answers
19 views

oracle DB connection - hostdef extension doesn't exist

I am trying to connect to an Oracle DB through ERwin, yet I keep getting this error message: I know that the DB exists, as my coworkers are accessing it. The Username and Password are also correct, ...
1
vote
2answers
19 views

How to populate another column with a sequence value generated for an identity column?

I have a table that has a column that is determined by a sequence using the identity column thing, so after a record is inserted (or during, I'm not sure how it works behind the scenes, only that it ...
-1
votes
0answers
11 views

Connect Oracle cloud Database using JDBC java [migrated]

I have database username and password to access oracle db and also have service url like https://X-X.X.X.oraclecloudapps.com/apex/. Can anybody know how to connect this db using JDBC connection. I ...
1
vote
1answer
37 views

Driver properties for db2jcc in Squirrell and MON_GET_CONNECTION table function

I'm trying to set driver properties like: clientAccountingInformation clientApplicationInformation clientProgramId clientProgramName in Squirrell 3.6 (http://squirrel-sql.sourceforge.net/). See ...
0
votes
1answer
21 views

Access operator added by extension inside a schema

I am writing an application that uses postgres. Each microservice uses its own schema inside the database. So connect to the database schema I use this jdbc string: ...
0
votes
0answers
21 views

PostgreSQL updates hang when two servers involved

I have an update statement that works fine when only a single server is involved, but never completes when it comes from two servers. I'm connecting with JDBC 9.1-902 to a 9.3 database on CentOS 6.6. ...
0
votes
1answer
59 views

JDBC local MSSQL Server connection string

I have installed open source database management tool "dbeaver" and want to use it instead of Sql Server Management Studio. But there is a problem. I searched from the internet but somehow I could not ...
0
votes
2answers
96 views

No suitable driver found Orientdb jdbc driver

I have some problems with Orientdb driver for jdbc. i´m using Netbeans, i have include the library JDBC+OrientDB libraries (orientdb-jdbc-2.0.8-all.jar) in the directory and in netbeans, i have also ...
5
votes
1answer
109 views

MySQL overhead of calling a Stored Procedure

Within Java, we access MySQL (v5.5.40) via JDBC -- a prepare statement, setting parameters then calling the stored procedure. It appears that every execute() has the overhead of 4 meta-calls (per ...
0
votes
0answers
17 views

Tool for browsing JavaDB

I have bought a Java web based application which uses a JavaDB to store data. In the application files, there are 2 .db files named ff.h2.db and ff.trace.db where "FF" being the abbreviation of the ...
0
votes
1answer
84 views

jdbc connection string ORACLE , integrated security

we are trying to configure Spotfire to use JDBC connection to ORACLE. We would like it to use integrated security (I call it Active Directory, TIBCO seems to like integrated security). Here is the ...
0
votes
0answers
48 views

HSQLDB like datasource to JAVAEE APP on JBOSS 7 FAIL

I am having problems while starting a sample app on JBoss server 7.0. Below follow piece of start log: 12:19:10,156 ERROR [org.jboss.as] (MSC service thread 1-7) JBoss AS 7.0.0.Final "Lightning" ...
0
votes
0answers
77 views

Thousands of the same weird syntax error after 9.4 upgrade

We moved our production database from 9.1 to 9.4.1 and started seeing the following errors all throughout the logs: ERROR: syntax error at or near "''" at character 1 STATEMENT: '' LOG: statement: ...
1
vote
0answers
162 views

MySQL SSL using MariaDB JDBC Driver

We have the following setup: Ec2 instance running a jboss server with mariadb (1.1.7) datasources setup to connect to an rds instance running MySQL 5.6.21. We would like to turn on SSL on for this ...
0
votes
0answers
60 views

sql taking < 1 sec to run in sql developer, 37 on the application side

As the title says, we have a big discrepency between a sql query we're running from our java application (jdbc thin client) and the same query run in sql developer. I clear the cache of the query ...
2
votes
1answer
90 views

how can optimize this sql query for being faster than superman

this my sql query: SELECT * FROM (SELECT * FROM ClassifiedAd WHERE city_id = :city AND currency = :currency AND price > 100) UNION DISTINCT (SELECT c.* ...
2
votes
2answers
226 views

Database-agnostic stored procedure call passing array of name/value pairs

Background Looking to pass a set of name/value pairs into a stored procedure in a database-agnostic way, using JDBC. A database structure is defined as follows: CREATE TYPE array_parameters AS ( ...
0
votes
0answers
23 views

Getting exception in Servlet due to ODBC

I am getting exception which is as follow - Exception[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifiedjava.sql.SQLException: [Microsoft][ODBC Driver ...
0
votes
0answers
54 views

DBM_INIT distributed transaction rollback in profiler

SQL Server 2008 R2. WebSphere 7.x Windows 2008 server. Our application is JEE in WebSphere 7.x, and so uses Microsoft JDBC I believe 4.0 to connect to the db server. During one of our batch jobs, ...
1
vote
1answer
122 views

JDBC connection error for SQL Server Database

I have a SQL server names as MS8AT09\AT09. I am able to login to the server through Microsoft SQL server Management studio. While trying to login to same server through JDBC I am facing the error as ...
0
votes
1answer
453 views

Can't find sun.jdbc.odbc package in Java version 8 [closed]

I am trying to connect a database query to my class while I compile the package name sun.jdbc.odbc package but it is not found in Java version 8.
1
vote
1answer
121 views

What do these parameters mean at the beginning of my SQL Server query plan?

I'm looking at query plan in SQL Server Mgmt Studio and I see something like this: (@P0 nvarchar(4000), @P1 nvarchar(4000)) Update... What does the type mean beside the parameters? For this example ...
0
votes
0answers
46 views

MySQL JDBC Driver puts transaction in read only. Why?

Using the MySQL JDBC connector with a MySQL 5.6.22 data source defaults the transaction mode to read only. Anyone know why?
0
votes
1answer
3k views

JDBC pooling Oracle driver Socket read timed out

I run Java EE application on Glassfish server v3 together with Oracle 12 DB on the same machine under Windows Server 2012 64bit. I use latest ojdbc7 driver. Connection pool config: ...
0
votes
0answers
161 views

How do I connect to oracle apex server through JDBC ?

I have got a workspace in apex.oracle.com , Now , I want to connect to that database through JDBC from ubuntu-14.04 machine. please explain the steps , From where should I download the drivers and ...
0
votes
0answers
115 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
224 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. ...
2
votes
2answers
2k 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
232 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
175 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
313 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
48 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 ...
3
votes
0answers
90 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
74 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
144 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
388 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
312 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
582 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 ...
1
vote
1answer
198 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
82 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
71 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 ...
1
vote
1answer
1k 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
371 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 ...