oracle

Labeling connections using Oracle Universal Connection Pool (UCP) doesn't seem to work

I'm evaluating the Oracle Universal Connection Pool (UCP) included with their 11.2 JDBC driver, but cannot get the labeling functionality to work properly (which I'd like to use to minimize the amount of ALTER SESSION statements). I'm basically following their sample code to implement the ConnectionLabelingCallback interface. The callba...

Sql Max() function on an rownum condition

I saw something like the following in our production code: select max(col_val) from table_name where --set of conditions here --AND rownum=1; This looked strange to me. Would the above code execute with the intended purpose?(selecting a max value from a set of values). Won't this select always return a single record from which the co...

Filter on count(*) in oracle

I have a grouped query, and would like to filter it based on count(*) Can I do this without a subquery? This is what I have currently: select * from (select ID, count(*) cnt from name group by ID) where cnt > 1; ...

have we limitation in submit some query in c# to oracle

Can I send this query from my C# connection to my oracle connection? "Select Object_name,status from object_name where object_type='function';" or "Select Object_name,status from object_name where object_type='Procedure';" or because as I remember, I have this problem when I write a program to connect to Access with java,those day...

problem in connecting to oracle database :((

Dear friends I try to connect to oracle 11g but I have problem and receive the below error.the error show I must have problem in my sql syntax but I run it in oracle sql developer.the query is right Please help me to solve this problem Thanks. try { string oradb = "Data Source=(DESCRIPTION=" + "(ADDRESS_LI...

Are there good ERP systems running on Oracle DB

Guys, Apart from Oracle Financial and SAP are there other good/highly customizable ERP's running on oracle database? ...

Work manager using thread.sleep or delay doesn't work

Hi all, I used Spring framework and oracle weblogic 10.3 as a container. I used workmanager for manage my thread, I already made one thread that managed by workmanager. Fortunately spring provide the delegation class for using workmanager, so I just need to put it on applicationContext.xml. But when I put the "while" and TimeUnit for sl...

Oracle - UPSERT with update not executed for unmodified values

I'm using following update or insert Oracle statement at the moment: BEGIN UPDATE DSMS SET SURNAME = :SURNAME WHERE DSM = :DSM; IF (SQL%ROWCOUNT = 0) THEN INSERT INTO DSMS (DSM, SURNAME) VALUES (:DSM, :SURNAME); END IF; END; This runs fine except that the update statement performs dummy update if the ...

Inserting asyncronously into Oracle, any benefits?

I am using ODP.NET for loading data into Oracle. I am bulking inserts into groups of a 1000 rows each call. Is there any performance benefits in calling my load method asynchronously? So say I want to insert 10000 rows, instead of making 10 calls synchronously I make 10 calls asynchronously. My database is using ASSM right now but oth...

Alternatives to LIMIT and OFFSET for paging in Oracle

Hello, I'm developing a web application and need to page ordered results. I normaly use LIMIT/OFFSET for this purpose. Which is the best way to page ordered results in Oracle? I've seen some samples using rownum and subqueries. Is that the way? Could you give me a sample for translating this SQL to Oracle: SELECT fieldA,fieldB FROM t...

Date comparison in Oracle database

I have two variable TO_DATE and FROM_DATE. My table has two fields DOJ and DOL. I want to select all the records whose DOJ < TO_DATE and DOL > FROM_DATE. How can i write an SQL query in for this?? ...

Why does Perl's DBI complain about "failed: ERROR OCIEnvNlsCreate" when I try to connect to Oracle 11g?

I am getting the following error connecting to an Oracle 11g database using a simple Perl script: failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at The script is as follows: #!/usr/local/bin/perl use strict; use DBI; if ($#ARGV < 3) { print "Usage: perl te...

Global temporary tables getting data from different session in Oracle

We have a stored procedure in Oracle that uses global temporary tables. In most of our other stored procedures, first thing we do is delete data from global temporary tables. However, in few of the stored procedures we do not have the delete's. Are there any other options other than adding the delete statements? Can something be do...

Oracle/c#: How do i use bind variables with select statements to return multiple records?

I have a question regarding Oracle bind variables and select statements. What I would like to achieve is do a select on a number different values for the primary key. I would like to pass these values via an array using bind values. select * from tb_customers where cust_id = :1 int[] cust_id = { 11, 23, 31, 44 , 51 }; I then bind a...

Persist data when the table was not mapped (JPA EclipseLink)

I need some help in persisting data into a table that has not been mapped. Our database has a table in which all of its columns are foreign keys so by mapping the whole database all of the tables are correctly mapped. However that table called "category" is not mapped. We browse the data by passing for the table I mentioned using the...

Oracle Database Requires Manual Restart Occasionally

Let me begin by saying my Oracle knowledge is minimal. We have a proprietary application that stores data into a Oracle 9.2 database, which works great. I only work with this software and thus Oracle every 3 months or so. The problem is, and it seems due to inactivity, I'll have to startup the database/instance using the following c...

how to excute a simple query use sqlapi++ with oracle

here is the code: cmd1.setCommandText("select * from lp.human_tb_meta_sex"); cmd1.Execute(); while (cmd1.FetchNext()) { SAString sas=cmd1.Field("id").asString(); cout<<"sas id:"< it gave me ORA-00932 error...I dont know why..? ...

Retrieving Oracle Cursor with JDBC

I have been experiencing some frustrations trying to make a simple Oracle cursor retrieval procedure work with JDBC. I keep on getting an error of "[Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number or types of arguments in call to 'GETNAME'", but I cannot figure out what I am doing wrong. Here is my code in Java: CallableStatement s...

Remove a character from a given position on Oracle

Is there anyway to remove a character from a given position? Let's say my word is: PANCAKES And I want to remove the 2nd letter (in this case, 'A'), so i want PNCAKES as my return. Translate doesnt work for this. Replace doesnt work for this. Regex is damn complicated... Ideas? ...

What is the best way to connect to an Oracle database to build my own IDE?

before answer me plz thinking about the futures of these kind of program and answer me plz. I wanna get some data from oracle server like: 1-get all the function,package,procedure and etc for showing them or drop them & etc... 2-compile my *.sql files,get the result if they have problem & etc... becuz I was beginner in oracle first o...