oracle

Cannot stop Oracle Queue - Could not find program unit being called: "SYS.DBMS_ASSERT"

Cannot stop and drop oracle Queue. Following code BEGIN DBMS_AQADM.STOP_QUEUE ( queue_name => 'TEST_QUEUE'); DBMS_AQADM.DROP_QUEUE( queue_name => 'TEST_QUEUE'); END; / produces following errors: ERROR at line 1: ORA-04068: existing state of packages has been discarded ORA-04065: not executed, altered or dropped stored procedure ...

Merging exists and not exists into one query - oracle magic

Hi, In a WHERE part of query we have SELECT * FROM SomeTable st WHERE NOT EXISTS (SELECT 1 FROM Tab t1 WHERE t1.A = st.A OR t1.B = st.A) OR EXISTS (SELECT 1 FROM Tab t2 WHERE (t2.A = st.A OR t2.B = st.A) AND t2.C IS NULL) Seems like a good candidate for merging... But I'm staring on that for an hour without any idea. Would yo...

insert date to oracle

hi i have 2 Date field's in oracle 10g (MyDate and MyTime) and i need to insert string that contain a date & time strDate = 04/01/2010 00:00:00 strTime = 01/06/2010 17:20:12 how to insert strDate & strTime to field's MyDate & MyTime ...

How to know the alive time for a explicit cursor?

Hi All, After how much time oracle itself closes an explicitly defined cursor? ...

Behaviour of insertion trigger when defining autoincrement in Oracle

I have been looking for a way to define an autoincrement data type in Oracle and have found these questions on Stack Overflow: Autoincrement in Oracle Autoincrement Primary key in Oracle database The way to use autoincrement types consists in defining a sequence and a trigger to make insertion transparent, where the insertion trigger...

Concatenate CLOB-rows with PL/SQL

Hi, I've got a table which has an id and a clob content like: Create Table v_example_l ( nip number, xmlcontent clob ); We insert our data: Insert into V_EXAMPLE_L (NIP,XMLCONTENT) Values (17852,'<section><block><name>delta</name><content>548484646846484</content></block></section>'); Insert into V_EXAMPLE_L (NIP,XMLCONTENT...

Can I chain database links in Oracle?

I have 3 databases. 1 links to 2, 2 links to 3. I'd like to query tables in 3, from 1. I tried third_db_tab@3@2 and it did not work. Wondering if this is possible and if so, what the syntax is. ...

Can PHP and Oracle pass complex types to each other?

I want to pass/bind an array of (key1, key2) to an Oracle PL/SQL stored procedure using PHP. I'm able to bind primitive types and arrays of primitive types, but haven't found a way to pass complex datatypes back and forth. Is this unsupported? So far I've been having to pass along multiple arrays -- one for each subtype in my complex ...

Counting a cell up per Objects

hey i got a problem once again :D a little info first: im trying to copy data from one table to an other table(structure is the same). now one cell needs to be incremented, beginns per group at 1 (just like a histroy). i have this table: create table My_Test/My_Test2 ( my_Id Number(8,0), my_Num Number(6,0), my_Data Varchar2(100)); (...

Axis 2 returns 404 error...sometimes

I have an Axis 2 web service deployed in an Oracle app server. It works as expected most of the time, but sometimes a 404 transport error is returned to the client. If I loop through a request/response cycle, it seems to always happen eventually. My question is, how do I go about debugging a spurious issue like this? Is there something ...

Lifetime of a cursor in Oracle

If I open a cursor and forget to close it, for how long will the cursor exist in Oracle? Are there some settings to configure the lifetime of the cursor? ...

connecting to oracle database from c# asp.net mvc website

I am trying to connect to oracle database. I am able to connect to it through a local SQL Developer tool by sticking something in the oranames.tns file. My question is that i will be deploying this website to a number of places. A few questions: What is the simplest way i can use to connect to this database and do very basic queries...

Loading large amounts of data to an Oracle SQL Database

Hey all, I was wondering if anyone had any experience with what I am about to embark on. I have several csv files which are all around a GB or so in size and I need to load them into a an oracle database. While most of my work after loading will be read-only I will need to load updates from time to time. Basically I just need a good ...

Improving Performance of Crystal Reports using Stored Procedures

Recently I updated a Crystal Report that was doing all of its work on the client-side (Selects, formulas, etc) and changed all of the logic to be done on the server-side through Stored Procedures using an Oracle 11g database. Now the report is only being used to display the output of the stored procedures and nothing else. Everything I h...

Characters spilled over multiple columns in Oracle 11g?

This is related to question: How to store unlimited characters in Oracle 11g? If maximum I need is 8000 characters, can I just add 3 more varchar2 columns so that I will have 4 columns with 2000 char each to get 8000 chars. So when the first column is full, values would be spilled over to the next column and so on. Will this design have...

Invoking a PL/SQL function from EclipseLink

I'm trying to execute a PL/SQL function in EclipseLink which uses Oracle Specific types(eg. Boolean). I've tried using PLSQLStoredProcedureCall which complains that I'm not executing a procedure and I have tried using StoredFunctionCall but that returns PLS-00382: expression is of wrong type Has anyone developed a solution to invoke ...

How to convert full outer join query to O-R query?

I'm converting relational database into object-relational in Oracle. I have a query that uses full outer join in the old one. Is it possible to write the same query for O-R database without explicitly using full outer join? For normal inner join it simple, I just use dot notation together with ref/deref. I'm interested in this in gen...

Java store procedure

I have the following Java store procedure: CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "RetreiveLdap" AS import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Hashtable; import javax.naming.Context; import javax.naming.NamingEnumeration; import j...

Oracle XMLDB's XMLCAST and XMLQUERY incompatible with iBatis?

I've been trying to select a list of values from XMLs stored in an XMLType column but I keep getting the errors which are listed at the tail end of this post. The select id is getXMLFragment , and the relevant subset of the sqlmap.xml is as follows: <select id="getXMLFragment" resultClass="list"> SELECT ...

How can I store large amount of data from a database to XML (speed problem, part three)?

After getting some responses, the current situation is that I'm using this tip: http://www.ibm.com/developerworks/xml/library/x-tipbigdoc5.html (Listing 1. Turning ResultSets into XML), and XMLWriter for Java from http://www.megginson.com/downloads/ . Basically, it reads date from the database and writes them to a file as characters, usi...