Link to home
Start Free TrialLog in
Avatar of Randy Rich
Randy RichFlag for United States of America

asked on

What is a cannot generate diana error message mean.

I'm running Oracle 7.3.4 , crystal 8.5 and trying to print a crystal report.  When crystal tries to launch the report I get a 534 error which means there is something wrong in the database driver.  When I create an odbc trace log I get the following error.

DIAG [NA000] [Microsoft][ODBC driver for Oracle][Oracle]ORA-04028: cannot generate diana for object SYSDBA.TRANSFER_ACTIVITY (4028)

You can read the entire log at http://www.tradewinds-software.com/up/odbc.log 

My question is, what does it mean "Cannot generate diana" and is that the reason this odbc session is breaking?
ASKER CERTIFIED SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here's some additional information I found regarding this error message:

OCI-04028: cannot generate diana for object stringstringstringstringstring
    Cause: Cannot generate diana for an object because of lock conflict.
    Action: Please report this error to your support representative.

http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10744/ocius.htm

FYI, your link doesn't work - at least not for me...

~Kurt
Avatar of Randy Rich

ASKER

Sorry about the link.  Try this one  http://www.tradewinds-software.com/up/odbc.txt
I saw the information you referenced.  I know my ignorance is showing so please be kind.  What is a diana?

Ok, I checked and the message reads[ODBC driver for Oracle][Oracle]ORA-04028: cannot generate diana for object SYSDBA.TRANSFER_ACTIVITY (4028)

TRANSFER_ACTIVITY is a view based on 2 tables that are being updated but not that much.  I've got tons of reports based on views that are constantly being updated.  I wonder what the difference would be here?
One other think I noticed.  In the sql statement which is listed in the log just prior to the diana message, there is a "\ 0" appended to the end of the statement.  


"SELECT DP_REC_SHIP_SET_VIEW."TRANSACTION_TYPE", DP_REC_SHIP_SET_VIEW."DATE_RECEIVED", DP_REC_SHIP_SET_VIEW."GROWER_LAST_NAME", DP_REC_SHIP_SET_VIEW."CONTRACT", DP_REC_SHIP_SET_VIEW."VARIETY", DP_REC_SHIP_SET_VIEW."WAREHOUSE", DP_REC_SHIP_SET_VIEW."CROP_YEAR", DP_REC_SHIP_SET_VIEW."MILL", DP_REC_SHIP_SET_VIEW."LOT", DP_REC_SHIP_SET_VIEW."USDA_HEAD", DP_REC_SHIP_SET_VIEW."USDA_TOTAL", DP_REC_SHIP_SET_VIEW."SHIPPED", DP_REC_SHIP_SET_VIEW."USDA_HEAD"*DP_REC_SHIP_SET_VIEW."SHIPPED", DP_REC_SHIP_SET_VIEW."USDA_TOTAL"*DP_REC_SHIP_SET_VIEW."SHIPPED", RECEIVED_HEAD(DP_REC_SHIP_SET_VIEW."CROP_YEAR",DP_REC_SHIP_SET_VIEW."VARIETY",DP_REC_SHIP_SET_VIEW."WAREHOUSE"), RECEIVED_TOTAL(DP_REC_SHIP_SET_VIEW."CROP_YEAR",DP_REC_SHIP_SET_VIEW."VARIETY",DP_REC_SHIP_SET_VIEW."WAREHOUSE"), TOTAL_RECEIVED(DP_REC_SHIP_SET_VIEW."CROP_YEAR",DP_REC_SHIP_SET_VIEW."VARIETY",DP_REC_SHIP_SET_VIEW."WAREHOUSE") FROM "SYSDBA"."DP_REC_SHIP_SET_VIEW" DP_REC_SHIP_SET_VIEW WHERE DP_REC_SHIP_SET_VIEW."CROP_YEAR" = 2005 AND DP_REC_SHIP_SET_VIEW."WAREHOUSE" = 'EL' AND DP_REC_SHIP_SET_VIEW."VARIETY" = 'CALROSE' AND DP_REC_SHIP_SET_VIEW."TRANSACTION_TYPE" = 'SHIPMENT' ORDER BY DP_REC_SHIP_SET_VIEW."DATE_RECEIVED" ASC, DP_REC_SHIP_SET_VIEW."GROWER_LAST_NAME" ASC\ 0"
Avatar of Mike McCracken
Mike McCracken

Do you have a way to run the query directly outside the report?  If so, does it run?

I think the \0 signals the end of the string.  \0 is the NULL character which some languages use to mark the end of a string.

mlmcc
That makes sense.  Thanks
Well, thanks to the research done by RCorfman,  I found out that a DIANA was intermediate machine language that is created by PL/SQL.  

PL/SQL is based on the programming language Ada. As a result, PL/SQL uses a variant of Descriptive Intermediate Attributed Notation for Ada (DIANA), which is a tree-structured intermediate language. It is defined using a meta-notation called Interface Definition Language (IDL). DIANA provides for communication internal to compilers and other tools.

At compile time, PL/SQL source code is translated into machine-readable m-code. Both the DIANA and m-code for a procedure or package are stored in the database. At run time, they are loaded into the shared memory pool. The DIANA is used to compile dependent procedures; the m-code is simply executed.

I sill don't understand why the Oracle or ODBC or whatever is having locking trouble with this view.  The report where the error occurs is derived from a view that is a union of a table and another view (i'll call view 2).  It's the view 2 that is causing the problem and it appears to be the result of a locking problem.  

Any ideas?
Interesting - I actually posted what a DIANA was and that post isn't there anymore, hmmm.

My only recommendation would be to speak with your DBA and see if he/she can run some tests to identify the cause of the locks within the View.

Other than that, the error message indicates you should call your Support Representative...

~Kurt
We don't have a dba.  Is there a table somewhere that I can query to see where the lock is?
Unfortunately, I'm not an Oracle DBA - I can create views, functions and procs in Oracle, but that's about it.  Honestly, I think you'll need to find an Oracle specialist - Oracle has kept many of its internal workings tightly controlled.  I'm a little surprised you have an Oracle DB and no DBA.  Oracle can be a handful.

Try posting a variation of this question in the main Oracle forum, omitting the references to Crystal Reports since the SQL is the issue, not the report (and so they don't try to punt you back to the Crystal Forums):

https://www.experts-exchange.com/Databases/Oracle/

~Kurt