Oracle 10g - Query Is Very Slow In Jdbc But Not In Other Tools

Jan 29, 2013

I'm using PreparedStatement to execute a query with some parameters. in sql developer, it just spends 12 seconds but in jdbc, it's around 140 seconds.

I disabled "_optim_peek_user_binds" parameter already but it didn't work. alter session set "_optim_peek_user_binds"=false;

View 1 Replies


ADVERTISEMENT

Client Tools :: How To Set Connection Property Oracle.jdbc.thinLogonCapability

Sep 25, 2013

how to set connection property "oracle.jdbc.thinLogonCapability"

View 3 Replies View Related

Client Tools :: Cannot Connect Using JDBC Oracle Thin Client With (New Method)?

Feb 21, 2013

The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.

# Host name is vmwwin7634.na.SAS.com
# SID is sting2
# SERVICE_NAME is sting2.na.sas.com

PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2
THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com

I am using SQuirreL Client version 3.4.0

# Here is the tnsnames.ora entry on the server.
STING2 =
(DESCRIPTION =

[code]...

# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.

# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)

# "New Method"
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works)
jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors)
(SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")

View 10 Replies View Related

Client Tools :: Sql Developer Startup Is Slow?

Apr 15, 2013

I am finding Oracle sql developer start up to be very slow.It takes more than 5 - 10 mins to startup.It seems for long startup.Its installed on Windows 7 machine in c: drive. Want to know what is causing it to be too slow.virus scanning, JVM startup.... ?

FYI
---------
Oracle Sql developer Version -- 3.2.20.09
Java(TM) Platform -- 1.6.0_43

View 4 Replies View Related

SQL & PL/SQL :: Version Of Oracle And JDBC Running On A Remote Database?

Jul 28, 2013

How to know the version of Oracle and JDBC of remote databases that is accessing my database through DBLInk.

For example I have a database A , B database is using my database Through a dblink.Now I want to know the version of oracle and jdbc which working on B.

View 4 Replies View Related

SQL & PL/SQL :: Lexical Parameter Slow Down Query?

Feb 16, 2010

All my following query is running fine.

SELECT pd,
vr_date,
x.vr_no,
vr_sn,
cac,
ac,
nar,

[code]....

but problem is that when above query is used or oracle reports then and lexical parameter is used then i slows down more than 100 times

SELECT pd,
vr_date,
x.vr_no,
vr_sn,
cac,

[code]....

above query is copy of top query but differnce is that &P_Unt_Cls lexical parameter is used instead of and Unit in(29,34,35,36,37,38,44,45,60,70,71), I am unable to understand why it slow down query.

View 6 Replies View Related

Server Administration :: Oracle JDBC Classes12.jar File - Unable To Extract

Apr 21, 2010

Upgrading from 10.1.0.2 to 10.1.0.5. Enterprise Manager requires 'newest' version of Oracle JDBC drive.Downloaded what I believe to the correct file (classes12.jar). I'm unclear what to do with this, my readings have pointed me in the following direction:

1) copy to c:oracleproduct10.1.0db_1jre1.4.1in
2) extract

here is the problem...tried:

1) just clicking on it (nothing)

2) c:program filesjavajre1.6.0_03injavaw -jar classes12.jar
Error:
Failed to load Main-Class manfest atrribute from
c:oracleproduct10.1.0db_1jre1.4.1inclasses12.jar

Is my location correct, I've been hunting everywhere..making no progress.

View 4 Replies View Related

Networking And Gateways :: Unable To Connect To ORACLE ODA 11g - JDBC Connection Error

Aug 21, 2013

I am not able to connect to ORACLE ODA 11g. but using sqlplus its getting connected with below credential.

URL------------------- jdbc:oracle:thin:sacblmdbuser/sacblmdbuser@10.66.12.229:1521:OVPINHA
Oracle JDBC driver loaded ok.
Unable to create connection
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186647296)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

View 2 Replies View Related

Client Tools :: Pass Parameters To Oracle SQL Query?

Oct 9, 2012

I am trying to pass the parameters to query and I need to pass few parameters to query. Can I make it like like then I run it, then it come up and ask the parameter like this:

SQL> @text
para1 XXXXX
para2 XXXXX

And then the result of query will come up. I would like to put label for each parameter( likepara1).

View 11 Replies View Related

Performance Tuning :: HIBERNATE Query Runs Slow But Ok In SQLPLUS

Sep 14, 2012

I have a query which takes 5 minutes when run through the java app which uses hibernate. I've cut and pasted the SQL directly from hiberate trace file and run it in sqlplus/sqldeveloper and it runs instantly (0.01 seconds)(uses the index all ok and explain plan looks good - see below.) I don't know how to get the explain plan when it's running through the app or why it should be any different anyway as the query is identical.

My query is as follows:

SELECT /*+ INDEX (SPD SPD_SEQ_CODE) */ SPD.*
FROM SEQ_ADDR_DATA SPD, SEQ_ADDR_LEVELS SPL
WHERE SPD.SPVR_ID = '10'
AND SPL.SPLE_ID = SPD.SPLE_ID
AND SPL.SPLE_LEVEL <= '2' AND SPDA_ID NOT IN
[code]....

View 7 Replies View Related

Slow Import For Oracle 11g R3 On IBM AIX 6.1

Sep 3, 2012

I am migrating a oracle 9i database to 11g r3. I can only use imp. As the database is huge, I have split the exp dump by schemas. In my recent test, i have split the schema into 4 seperate threads to be imported into the new oracle11g database. The 4 thread of imp consist of almost similar sizes of schema (Eg thread 1 - Schema 1, 2 ,3. Thread 2 - Schema 4,5,6 etc)

All the dump files are in the same mount point. When i execute the import (4 threads) together, the total import timing is each thread is between 2.5 days to 3.5 days.

Then i proceed to try only 1 thread, only 2 hrs. So could this be a IO issue or oracle memory problem?

Specs
IBM AIX 6.1, 32GB RAM

Oracle
24GB AMM
Number of processes 500

View 1 Replies View Related

Oracle Database Writing Slow?

Dec 31, 2011

We are using one software it is a test tool for verify the data base posting speed from server to client systems. In windows 2008 R2, database posting speed is very slow when compare to windows 2003 server .

Server configuration is same for both servers ( RAID 5 , RAM 4 GB) how we can improve writing performance in Oracle

View 1 Replies View Related

SQL & PL/SQL :: Function Very Slow After Oracle Upgrade

Oct 11, 2012

We have a function that is called in various other PL/SQL packages, and performance has always been very good. On 29th Sept we upgraded our db to 10.2.0.5.0 and since then, a package that calls the function has gone from ~4mins, to ~2.5hrs to run.

In PL/SQL Developer, a simple select that calls the function has gone from ~0.5secs to retrieve the first 100 rows, to ~12secs. I ran a profile of the main package, which highlighted the where the bottleneck was (a fetch from an explicit cursor). Running an explain plan on the cursor SQL doesn't really show up anything untoward.

However, I found that if I subtly changed the cursor SQL, (so that it did the same thing, but was written differently), it fixed the performance problems.

where ade_start_date between cpDate-cpDays and cpDate-1
/*and ade_start_date < cpDate
and ade_start_date >= (cpDate-cpDays)*/

From this, we thought that there may have been a bad cached execution plan which the change of code forced a recalculation of. However, about 2 hours later, the changed code ran slowly again. So a further subtle change was made, which fixed the issue again. Until this morning, when it was running slowly again.

This feels like it is CBO/stats related potentially, but is out of my area of knowledge unfortunately. We have our DBA investigating this, but there may be things I can test to narrow down the possibilities in the meantime.

View 5 Replies View Related

Oracle 11G - Update Is Very Slow On View?

Dec 7, 2012

I have big trouble with some Update query on Oracle 11G.I have a set of tables (5) of identical structures and a view that consists in an UNION ALL of the 5 tables.None of this table contains more than 20 000 rows.Let's call the view V_INTE_NE. Each of the basic table has a PRIMARY KEY defined on 3 NUMBERS(10,0) -> INTE_REF / NE_REF / INSTANCE.

Now, I get 6 rows in another table and I want to update my view from the data of this small table (let's call it SMALL). This table has the 3 columns INTE_REF / NE_REF / INSTANCE.

When I try to join the two tables :

SELECT * FROM T_INTE_NE T2
WHERE EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE )

I get the 6 lines in 0.037 seconds

When I try to update the view (I have an INSTEAD OF trigger that does nothing (just return for testing even without modifying anything), I execute the following query :

UPDATE T_INTE_NE T2
SET INTE_STATE = -11 WHERE
EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE )
The 6 rows are updated (at least TRIGGER is called) in 20 seconds.
However, in the execution plan, I can't see where Oracle takes time to achieve the query :
Plan hash value: 907176690

[code]....

Predicate Information (identified by operation id):

2 - access("T2"."INTE_REF"="T1"."INTEREF" AND "T2"."NE_REF"="T1"."NEREF" AND
"T2"."INTE_INST"="T1"."INSTANCE")

Note- dynamic sampling used for this statement (level=2)

Statistics
-----------------------------------------------------------
3 user calls
0 physical read total bytes
0 physical write total bytes
0 spare statistic 3
0 commit cleanout failures: cannot pin

[code]....

I get exactly the same execution plan (when autotrace is ON).Furthermore, if I try to do the same update on each of the basic tables, I get the rows updated instantaneously.

View 10 Replies View Related

DB Performance Is Slow Using Oracle 11gR2 On Windows Server

May 25, 2013

I am using 11gR2 on windows server. This is the query that runs many times a day and effect badly the performance of database. I don't have much idea about this query.

SELECT TO_CHAR(current_timestamp AT TIME ZONE 'GMT', 'YYYY-MM-DD HH24:MI:SS TZD') AS curr_timestamp, COUNT(username) AS failed_count
FROM sys.dba_audit_session
WHERE returncode != 0 AND TO_CHAR(timestamp, 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(current_timestamp - TO_DSINTERVAL('0 0:30:00'), 'YYYY-MM-DD HH24:MI:SS')

View 1 Replies View Related

Performance Tuning :: Oracle (HP-UX) Connection Very Slow From Windows Client?

Jun 18, 2012

I have an Oracle database (9.2.0.7) installed on a HP-UX server.When trying to access this database from another HP-UX or Linux server, connection is fine. But when trying to connect from a Windows based client, connection is very slow (almost 1 minute to return the result of a 'select count(*)' like query, which is immediate from the Linux client).

Here are some facts I can add :

- Clients and servers are on the same network segment (it is not a network matter)

- No matter which client version I use, there no difference

- I tried to know what happens on the Oracle server when performing my sample query using tusc command : the result is that the server is performing exactly the same actions when sending my query from a Linux client or a Windows client

- The only relevant difference seems to be the client OS

View 13 Replies View Related

Client Tools :: Tools For Load Testing On Oracle - J2EE Application?

Jan 5, 2012

which are recommended Tool for load testing (for performance) on Oracle-J2EE, 3 Tier applications?

Is 'Oracle Application Test Suite' the best for such test where we can simulate numbers of users and their various actions?

Does it come with Oracle Database license or we have to buy it separately?

View 1 Replies View Related

Client Tools :: Basic Tools For Oracle Version Control

Aug 26, 2011

I'm looking for 3 simple things.

1) A reverse engineering tool that I can point to an Oracle schema and get a "baseline" script to re-create that schema from scratch, with decently formatted DDL files (1 per object) neatly organized in a directory tree (by object type) and called in the correct order. Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to populate (insert) those tables as part of the script.

2) a diff tool that I can point to a pair of Oracle instances (source and target) containing a given schema and get a "delta" script to alter the target schema so that it becomes identical to the source schema. If data loss occurs on the target instance (i.e. drop a column) I would like to find a warning comment inserted in the script (e.g. "-- Attention: data migration DML needed here?"). Icing on the cake would be an option to pass the tool a list of tables containing static data and get DMLs to update (delete, update and insert) the data in the target tables to become identical to the contents in the source tables *without* deleting and re-inserting all rows (or dropping, recreating and repopulating the table).

3) I would like the above two tools (that, as you will have recognized, are basic to putting your database design under version control) to be open-source, with a command-line interface and a vibrant community backing them.

View 9 Replies View Related

V$session And Jdbc?

Dec 23, 2009

I am connecting to Oracle 9i using JDBC in my JSP/Servlets web pages. I am closing all my connections in Finally blocks.

Everything works great during the day with JDBC and Oracle.But after a Web crawler runs through our web server at 3 AM the next morning a v$session check shows several lines of JDBC Thin Client inactive status. find exactly what sql statement or program that could be causing the JDBC Thin Client to show up?

View 1 Replies View Related

NL Exception Trying To Connect To 10g RAC With JDBC

Jan 11, 2005

I'm trying to connect to multiple Oracle 10g databases (failover) over the JDBC thin client, and when I run the following, I get: java.sql. SQLException: Io exception: NL Exception was generated

connection = DriverManager.getConnection("jdbc:oracle:thin:@DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = dbdev) (PORT = 1521))) (CONNECT_DATA = (INSTANCE_NAME = orcldev)))", "scott", "tiger");

I eventually want to put multiple ADDRESSes in that string, but right now I'm trying to get it to work with just one! I've tried multiple variations of this, like changing INSTANCE_NAME to SID or SERVICE_NAME, and using the internal IP address for the HOST dbdev (see below). Here's the tnsnames.ora file used by SQL*Plus on the same client machine:

ORCLDEV.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.132)(PORT = 1521))
(CONNECT_DATA =
(SID = orcldev)
)
)

View 7 Replies View Related

Connect To Database Through JDBC?

Jul 17, 2013

have a problem while i am trying to connect to database through JDBC here is my code,i am using oracle11g express edition import java.sql.

Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.sql.Statement;    public class connectiontoDB {    public static void main(String[] args) throws Exception {  // TODO Auto-generated method stub  try{  Class.forName("oracle.jdbc.driver.OracleDriver");  Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","citi","citi");        Statement stmt=con.createStatement();        stmt.executeUpdate("create table user(id number(10))");        System.out.println("connected to database successfully");  }  catch(Exception e){       e.printStackTrace();

View 1 Replies View Related

RAC & Failsafe :: JDBC Connection To A 10g Database?

Mar 30, 2005

The problem i mentioned in my last posting "CRS installation/PRIF-10: failed to initialize the cluster registry" was due to the fact i was using Redhat Linux 9 that seems to have some missing packages. I installed White Box RH 3 and everything worked fine.

if it's possible to connect to a 10g RAC database using the jdbc java thin client. the java thin client requires an ip, and database sid. I am running a two node cluster and i have two ip's and a service name that uses TAF option.

View 5 Replies View Related

TimesTen In-Memory :: JDBC Connection - Is It TCP/IP?

Jul 18, 2012

I connection to TimesTen as follow:

String url = "jdbc:timesten:direct:dsn=my_ttdb";
String username = "ADMINISTRATOR";
String password = "";
Connection connection = DriverManager.getConnection(TestTT.url, TestTT.username, TestTT.password);

I wonder if this JDBC Connection is a TCP/IP connection on the backend? If this is not a TCP/IP connection, how can I make a connection with TimesTen via TCP/IP protocol?

dsn:my_ttdb configuration likes:
[my_ttdb]
Driver=/home/tttest/TimesTen/tt1122/lib/libtten.so
DataStore=/home/tttest/ttdata/database/my_ttdb
LogDir=/home/tttest/ttdata/logs
PermSize=40
TempSize=32
DatabaseCharacterSet=ZHS16GBK
OracleNetServiceName=orcl

View 12 Replies View Related

Use Scan Name In Tnsfile - Not Able To Connect To DB Through JDBC Connection?

Aug 4, 2010

I have installed 2 node RAC -11gR2 on ORACLE VM Server 2.2.1.now, I want to give tnsentry to my dev team to use this RACDB going forward.I am using scan name in tnsnames.ora file. Also I have make scan name entry in /etc/hosts not in the DNS.

I have below entry in RACDB server...
RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = RWCORA-cluster-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
)

now just for testing purpose, I added this tnsentry in my machine to check the connectivity.I have to add scan name with IP address in /etc/hosts --. and try to connect sqlplus sys@rwcdb as sysdba --> not workingI have to add scan name with IP address , and two RAC VIPs (of both nodes) in /etc/hosts -- and try to connect sqlplus sys@rwcdb as sysdba --> then its working...but again SQL*Developer is not able to connect.

I have make below entry in my machine's /etc/hosts file:

10.40.0.51 RWCORARAC1-vip
10.40.0.52 RWCORARAC2-vip
10.40.0.50 RWCORA-cluster-scan

perfect link through which I can connect OCI, JDBC connection from client side.

View 4 Replies View Related

JVM :: JDBC Driver DatabaseMetaData.getCrossReference Contract Not Respected?

Jul 29, 2013

Since JDK 6, DatabaseMetaData.getCrossReference contract is :Retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table). But the Oracle JDBC Driver executed query is :

SELECT
  NULL AS pktable_cat,
  p.owner as pktable_schem,
  p.table_name as pktable_name,
  pc.column_name as pkcolumn_name,
 
[code]...

View 0 Replies View Related

Trigger - Delete Account Through A Java Interface Using JDBC - Get Error?

Dec 10, 2012

Here are the relevant tables to the triggers I'm having trouble with.

create table profile
(
userID number(10),
uname varchar2(64),
email varchar2(32),
password varchar2(32),
date_of_birth date,

[code]...

Here's the triggers I currently have that doesn't work.

create or replace trigger DropAccount
after delete on profile
FOR EACH ROW
BEGIN
delete from groupMembership where (userID = :old.userID);
END;

The DropAccount trigger's purpose is to delete all the records from groupMembership that contains the userID of the person deleting his/her own account. It appears to work when I run the following statements in sqlplus:

delete from profile where (userID = '1');
select * from groupMembership where (userID = '1');

But when I try to delete an account through a java interface using JDBC I get the following error:

Machine Error: java.sql.SQLException: ORA-04091: table *****.GROUPMEMBERSHIP is mutating, trigger/function may not see it
ORA-06512: at "*****.DROPACCOUNT", line 2
ORA-04088: error during execution of trigger '*****.DROPACCOUNT'

The java function basically just executes a delete statement.

View 1 Replies View Related

SQL & PL/SQL :: Error Occurred During Execution Of Simple JDBC Program In Eclipse

Jun 27, 2013

java.sql.SQLException: ORA-04054: database link GMAIL.COM does not exist

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1615)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1580)
at com.jdbc.pack.Lab1.main(Lab1.java:31)

View 7 Replies View Related

Client Tools :: How To Substitute Value From A Query In Sqlplus

Apr 2, 2012

I need generate a script like this.

spool loadvalues.sql
INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM TABLE_NAME;
spool off;

I would like to substitute TABLE_NAME with each value from the following query;

select table_name from user_tables
where table_name like 'SALES%'

so there are about 45 SALES tables ex: SALES_IDAHO,SALES_MICHIGAN etc.so my spool file(loadvalues.sql) should look like this ex:

INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM SALES_IDAHO;

sales_michingan should have script like

INSERT INTO SALES(column1, column2, column2) SELECT( COLUMN1, COLUMN2, COLUMN3) FROM SALES_MICHIGAN;

View 2 Replies View Related

Client Tools :: How To Query Tablename That Don't Exist And Not Get Any Error

Oct 24, 2012

Here is the query I want to be able to run...

select * from NonExistingTableName

I want the query above to be ignored and return no results (rather than generating an error) when the tablename does not exist.

View 14 Replies View Related

Client Tools :: Possible To Write Select Query O/p In HTML Tag?

Jan 24, 2011

is it possible to write select query o/p in html tag?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved