Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Ordering by a Long

Re: Ordering by a Long

From: Peter Sharman <psharman_at_us.oracle.com>
Date: Mon, 08 Mar 1999 09:38:41 -0800
Message-ID: <36E40B21.B580DA4A@us.oracle.com>


Oh, how quickly they forget! Was it only two years ago that every woman's magazine was considered incomplete without an article on Diana?

Sorry, I couldn't resist!

DIANA is an Oracle supplied package that is basically an abstract syntax tree for PL/SQL: it's the output from the "front end" of the PL/SQL compiler (the parser and semantic analyzer).

The committees that created Ada also created Diana, and any conforming Ada compiler is supposed to generate Diana. PL/SQL Diana is a modified version of the Ada Diana, because PL/SQL includes SQL functionality not present in Ada. "Diana" is actually an acronym (something like "Dynamic Intermediate Attributive <Nsomething> for Ada") that includes the word "Ada".

The error message means:

Cause: A lock conflict prevented the generation of diana for an object. Action: Check the syntax.

        If no syntax errors are found, report this error to Oracle World Wide
        Support.

HTH. Pete

Doug Cowles wrote:

> Actually, I just tried this on Personal Oracle 7.2 and got the following message:
> select constraint_name , get_search_cond('DOUG',constraint_name)
> *
> ORA-04028: cannot generate diana for object SYS.CDEF$
>
> I tried you example in the literal sense and got the same thing. I'll try this
> on the big box in a couple of minutes...but what on earth or who on earth
> is Diana? ..in the Oracle sense...I think I've heard this reference once before...
>
> Thomas Kyte wrote:
>
> > A copy of this was sent to Doug Cowles <dcowles_at_i84.net>
> > (if that email address didn't require changing)
> > On Sat, 06 Mar 1999 16:47:29 -0500, you wrote:
> >
> > >Using Oracle 7.3 -
> > >I want to order on a long column, but get a message that it
> > >is illegal use of the type.
> > >What I am trying to do is an extract of user_constraints that
> > >will be comparable to a similar extract from another schema on
> > >another database on another box.
> > >I have been instructed to verify the constraints between these two
> > >places and make sure they are ok.
> > >I use decode to drop the system generated portion of the constraint
> > >names,
> > >but I can't get around the delete_rule being a long column, and that's
> > >where
> > >the extracts are differing. I really want to be able to use a Unix diff
> > >command
> > >to verify the constraints are all the same.
> > >Does anyone have a work around for ordering by a LONG??
> > >
> >
> > the following method will work given the following constraints:
> >
> > o your search_conditions (not delete_rule) are all 32k or less. this is
> > probably the case.
> >
> > o sorting by the first 2000 characters will be sorted enough for you. SQL can
> > only deal with 2000 byte columns in 7.x (4000 in 8.x).
> >
> > SQL> create or replace function get_search_cond( p_owner in varchar2,
> > 2 p_constraint_name in varchar2 )
> > 3 return varchar2
> > 4 as
> > 5 l_str long;
> > 6 begin
> > 7 select search_condition
> > 8 into l_str
> > 9 from user_constraints
> > 10 where owner = p_owner
> > 11 and constraint_name = p_constraint_name;
> > 12
> > 12 return substr( l_str, 1, 2000 );
> > 13 end;
> > 14 /
> >
> > Function created.
> >
> > SQL>
> > SQL> column sc format a20
> > SQL> select constraint_name, owner, get_search_cond(owner, constraint_name) sc
> > 2 from user_constraints
> > 3 order by 3
> > 4 /
> >
> > CONSTRAINT_NAME OWNER SC
> > ------------------------------ ---------- --------------------
> > SYS_C00781 TKYTE x is not null
> >
> >
> > Thomas Kyte
> > tkyte_at_us.oracle.com
> > Oracle Service Industries
> > Reston, VA USA
> >
> > --
> > http://govt.us.oracle.com/ -- downloadable utilities
> >
> > ----------------------------------------------------------------------------
> > Opinions are mine and do not necessarily reflect those of Oracle Corporation

--

Regards

Pete


Peter Sharman                              Email: psharman_at_us.oracle.com
WISE Course Development Manager            Phone: +1.650.607.0109 (int'l)
Worldwide Internal Services Education               (650)607 0109 (local)
San Francisco

"Controlling application developers is like herding cats." Kevin Loney, ORACLE DBA Handbook
"Oh no it's not! It's much harder than that!" Bruce Pihlamae, long term ORACLE DBA


Received on Mon Mar 08 1999 - 11:38:41 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US