Invalid Synonym on Database Package

I have recently modified a database package spec and package body for the first time since our upgrade to Oracle 10.2.0.4.0. Once I ran my code to modify the package spec and package body, the synonym became invalid. I've read that this is a new feature in Oracle 10g. I'm just wondering how I get the synonym valid again. I have tried recompiling the package spec and body again and I've also tried executing the package. The package executes fine, but the synonym still has a status of Invalid. If anyone can help I would greatly appreciate it!!
Shellie

Straight from the Oracle documentation:
"To create a PUBLIC synonym, you must have the CREATE PUBLIC SYNONYM system privilege."
So the user that you want to be able to create a public synonym has to have this done by a privileged database user:
GRANT CREATE PUBLIC SYNONYM TO <the_user>;

Similar Messages

  • Editing and Compling a Database Package from a file

    Hi,
    I'd like to know if there is a way to open and edit a database specification and body source code file from the filesystem, and also be able to compile this is SQL Developer.
    Currently I am able to open the .pks and .pkb files and I get 'Compile' and 'Compile for Debug' icons. However, when I hit these buttons they appear to do nothing. No messages are displayed to say if the package is compiled successfully or unsuccessfully. What I have noticed though is that the code is executed and the package is created on the database but there is no feedback. If I 'complile' a package that I know is invalid, the package becomes invalid in the database and vice versa. But I have no way of knowing this until I check the package on the database.
    If I am doing something wrong or there is another way to do this, then please let me know. I really want to be able to work on these files from the filesystem rather than the database.
    SQL Developer 1.5.1 on Windows 2000.
    Cheers,
    Jon.

    Jon,
    The current SQL Dev support for file based development in this area isn't wonderful. However, the output of "compiling" a PL/SQL file with the compile button (ie running as script) is shown in the Script Output tab of the Log dockable window. If you have the window docked and the Script Output tab selected, then it will normally display the following where the package body is invalid:
    Warning: execution completed with warning
    PACKAGE BODY MY_PACKAGE_PKG Compiled.
    To show the errors there, you will need to use something like after the CREATE OR REPLACE PACKAGE BODY statement:
    SHOW ERRORS PACKAGE BODY MY_PACKAGE_PKG
    The output doesn't always appear and the treatment of compilation errors is nowhere near as good as when compiling directly in the database where you can jump to the error location with a double click.
    theFurryOne

  • Invalid Objects in Database

    Hi sawwan,
    we have one one year old apps environment R12.0.5 and db 10.2.0.2, we are getting daily invalid objects in database,we have not applied any patches and we have not made any changes recently ,
    daily we used to compile all invalids at night time, before starting our work hrs in morning we can see some of invalids objects,
    normally why we get invalids even we just running some scheduled concurrent requests in database but we have not got before such invalids now we are getting invalids in database.

    Sawwan,
    here are invalid objects , i can see lot of invalid objects are system /public user.
    PUBLIC DBA_HIST_FILESTATXS SYNONYM
    PUBLIC DBA_HIST_SQLSTAT SYNONYM
    PUBLIC DBA_HIST_SQLBIND SYNONYM
    PUBLIC DBA_HIST_SYSTEM_EVENT SYNONYM
    PUBLIC DBA_HIST_WAITSTAT SYNONYM
    PUBLIC DBA_HIST_LATCH SYNONYM
    PUBLIC DBA_HIST_LATCH_MISSES_SUMMARY SYNONYM
    PUBLIC DBA_HIST_DB_CACHE_ADVICE SYNONYM
    PUBLIC DBA_HIST_ROWCACHE_SUMMARY SYNONYM
    PUBLIC DBA_HIST_SGASTAT SYNONYM
    PUBLIC DBA_HIST_SYSSTAT SYNONYM
    PUBLIC DBA_HIST_SYS_TIME_MODEL SYNONYM
    PUBLIC DBA_HIST_OSSTAT SYNONYM
    PUBLIC DBA_HIST_PARAMETER SYNONYM
    PUBLIC DBA_HIST_SEG_STAT SYNONYM
    PUBLIC DBA_HIST_ACTIVE_SESS_HISTORY SYNONYM
    PUBLIC DBA_HIST_TABLESPACE_STAT SYNONYM
    PUBLIC DBA_HIST_SERVICE_STAT SYNONYM
    PUBLIC DBA_HIST_SERVICE_WAIT_CLASS SYNONYM
    SYSTEM EMP SYNONYM
    SYSTEM DEPT SYNONYM
    SYSTEM MLOG$_EMP SYNONYM
    SYSTEM RUPD$_EMP SYNONYM
    SYSTEM EMP_SNAPSHOT SYNONYM
    SYSTEM WF_LOCAL_ROLES_STAGE SYNONYM
    READONLY EMP SYNONYM
    READONLY DEPT SYNONYM
    READONLY MLOG$_EMP SYNONYM
    READONLY RUPD$_EMP SYNONYM
    READONLY EMP_SNAPSHOT SYNONYM
    READONLY WF_LOCAL_ROLES_STAGE SYNONYM

  • Report fails with " Invalid argument for database." error.

    Hi All,
    Several of my reports deployed on Crystal Reports Server 2008 server fails everyday with the following error.
    Error in File ~tmp121c5dc747685036.rpt: Invalid argument for database.
    The error is not consistent, if report A fails today, it is Report B the next day. When I reschedule the reports, they run just fine. They fail only when the daily schedules run at 2:00 AM in the morning. 100 + reports are run at this time and some of the reports that fail run many times with different parameters. Is this error due to scheduling reports many times or is it something else? Appreciate any help with this.
    Thanks
    Bin

    Hi,
    can you please check under <BOBJ installation directory>\BusinessObjects Enterprise 12.0\logging in the log files created by the crystal reports job server for additionaly error messages?
    Regards,
    Stratos
    PS: Do you run CRS 2008 V0 or V1?

  • Generate report with data from database package

    Hi
    Is it possible to generate a report where the values come from an oracle database package instead of from an sql query declared in the report itself?
    If yes, how is it done?
    Appreciate any help. Thx.

    Hi,
    You can use REF CURSORs to generate reports from a database package.
    For information about REF CURSORs, please see Chapter 40 'Building a Paper Report with REF CURSORs' of the Oracle Reports Building Reports manual.
    This chapter is at:
    http://download-uk.oracle.com/docs/html/B13895_01/orbr_refcur.htm#i1011693
    Hope this helps.
    Regards,
    Panna

  • Running report from database package

    Hi,
    I have a database package and it gets soem details and submits the report using SRW. It has submitted successfully. But the report is not outputed but there is file with extension eps. Can the package pass the user variables??
    The package code follows:-
    PROCEDURE p_submit_copy_invoices(
    par_organization_id1           IN     system_users.organization_id%TYPE,
    par_batch_no1               IN     ds_invoice_headers.batch_no%TYPE,
    par_invoice_date IN ds_invoice_headers.creation_date%type,
    par_user_code          IN     system_users.user_code%TYPE,
    par_err_msg               OUT     VARCHAR2) IS
    replist SRW_PARAMLIST;
    repindent SRW.job_ident;
    repstatus SRW.STATUS_RECORD;
    par_customer_code_from ds_invoice_headers.customer_code%type;
    par_organization_id number;
    par_batch_no number;
    CURSOR GET_CUST_CODE IS
    SELECT DISTINCT dih.CUSTOMER_CODE,dih.batch_no,NO_OF_INVOICE_COPIES
    FROM DS_INVOICE_HEADERS DIH, DS_CUSTOMER_SITES DCS
    WHERE dih.ORGANIZATION_ID = par_organization_id1
    AND TRANSACTION_TYPE = 'IN'
    AND TRUNC(dih.CREATION_DATE) = par_invoice_date --'16-SEP-04' --TO_DATE(:DUAL.INVOICE_DATE)
    and DIH.ORGANIZATION_ID = dcs.ORGANIZATION_ID
    AND DIH.CUSTOMER_CODE= DCS.CUSTOMER_CODE
    AND dih.CUSTOMER_SITE_CODE = DCS.CUSTOMER_SITE_CODE
    AND NO_OF_INVOICE_COPIES > 0;
    BEGIN
    dbms_output.put_line('before');
         FOR CURR_REC IN GET_CUST_CODE
         LOOP
         --v_user_params :=  ' par_organization_id1 ='||:GLOBAL.organization_id
         --                    || ' par_customer_code_from ='||CURR_REC.customer_code
         --                    || ' par_batch_no = '||CURR_REC.batch_no;
         dbms_output.put_line('inside loop -'||curr_rec.customer_code);
    replist := SRW_PARAMLIST(SRW_PARAMETER('',''));
         srw.start_debugging;
         SRW.ADD_PARAMETER(replist,'GATEWAY','http://seikoapps.seiko.com.au:7777/reports/rwservlet');
         SRW.ADD_PARAMETER(replist,'REPORT','/u02/app/dis/dev/reports/rdf/dsinvprt.rdf');
         SRW.ADD_PARAMETER(replist,'SERVER','repseikoapps2');
         SRW.ADD_PARAMETER(replist,'USERID','dis/[email protected]');
         SRW.ADD_PARAMETER(replist,'DESTYPE','FILE');
         --SRW.ADD_PARAMETER(replist,'DESNAME','itgenicom');
         dbms_output.put_line(' before desformat ');
         --SRW.ADD_PARAMETER(replist,'DESFORMAT'.'lst');
         SRW.ADD_PARAMETER(replist,'DESTINATION','/u02/app/dis/dev/reports/rep/dsinvprt.pdf');
         SRW.ADD_PARAMETER(replist,'BLANKPAGES','no');
         SRW.ADD_PARAMETER(replist,'COPIES',CURR_REC.NO_OF_INVOICE_COPIES);
         --SRW.ADD_PARAMTER(mplist,DESTINATION,
         dbms_output.put_line(' before MODE');
         SRW.ADD_PARAMETER(replist,'MODE','Bitmap');
         SRW.ADD_PARAMETER(replist,'ORIENTATION','Landscape');
         SRW.ADD_PARAMETER(replist,'PARAMFORM','no');
         dbms_output.put_line(' user defined variable ');
         SRW.ADD_PARAMETER(replist,par_organization_id,par_organization_id1);
         SRW.ADD_PARAMETER(replist,par_customer_code_from,CURR_REC.customer_code);
         SRW.ADD_PARAMETER(replist,par_batch_no,CURR_REC.batch_no);
         dbms_output.put_line(' before runrepoert ');
         repindent := srw.run_report(replist);
         repstatus := SRW.REPORT_STATUS(repindent);     
         dbms_output.put_line(' status of the report - '||repstatus.statuscode);
         --srw.stop_debugging;
         END LOOP;
    END p_submit_copy_invoices;
    I have turned the dubugging on :-
    * WELCOME TO EVENT-BASED-REPORTING API *
    * API-Version : 9i *
    * (C) Oracle Corporation, 2000 - 2002 *
    * Debugging turned ON **************************
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://seikoapps.seiko.com.au:7777/reports/rwservlet
    *** Length of Paramlist : 2
    OK : Parameter added : REPORT=/u02/app/dis/dev/reports/rdf/dsinvprt.rdf
    *** Length of Paramlist : 3
    OK : Parameter added : SERVER=repseikoapps2
    *** Length of Paramlist : 4
    OK : Parameter added : USERID=dis/[email protected]
    *** Length of Paramlist : 5
    OK : Parameter added : DESTYPE=FILE
    before desformat
    *** Length of Paramlist : 6
    OK : Parameter added : DESTINATION=/u02/app/dis/dev/reports/rep/dsinvprt.pdf
    *** Length of Paramlist : 7
    OK : Parameter added : BLANKPAGES=no
    *** Length of Paramlist : 8
    OK : Parameter added : COPIES=1
    before MODE
    *** Length of Paramlist : 9
    OK : Parameter added : MODE=Bitmap
    *** Length of Paramlist : 10
    OK : Parameter added : ORIENTATION=Landscape
    *** Length of Paramlist : 11
    OK : Parameter added : PARAMFORM=no
    user defined variable
    *** Length of Paramlist : 12
    OK : Parameter added : =129
    *** Length of Paramlist : 13
    OK : Parameter added : =250000D
    *** Length of Paramlist : 14
    OK : Parameter added : =100104
    before runrepoert
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built : http://seikoapps.seiko.com.au:7777/reports/rwservlet?REPORT=%2Fu02%2Fapp%2Fdis%2Fdev%2Freports%2Frdf%2Fdsinvprt%2Erdf&SERVER=repseikoapps2&USERID=dis%2Fseikodis%40dis%2Eseiko%2Ecom%2Eau&DESTYPE=FILE&DESTINATION=%2Fu02%2Fapp%2Fdis%2Fdev%2
    *** Submitting HTTP Request
    *** using URL :http://seikoapps.seiko.com.au:7777/reports/rwservlet?REPORT=%2Fu02%2Fapp%2Fdis%2Fdev%2Freports%2Frdf%2Fdsinvprt%2Erdf&SERVER=repseikoapps2&USERID=dis%2Fseikodis%40dis%2Eseiko%2Ecom%2Eau&DESTYPE=FILE&DESTINATION=%2Fu02%2Fapp%2Fdis%2Fdev%2Fr
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding = 'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <job id="842" queueType="past">
    <name>/u02/app/dis/dev/reports/rdf/dsinvprt.rdf</name>
    <type>report</type>
    <st
    OK : Request submitted - Length of stream : 678
    *** XML-Parsed - Following Structure discovered :
    *** Checking elements!
    serverQueues ()
    *** Checking attributes!
    job ()
    *** Checking attributes!
    __id = 842
    __queueType = past
    name (/u02/app/dis/dev/reports/rdf/dsinvprt.rdf)
    *** Checking attributes!
    type (report)
    *** Checking attributes!
    status (Finished successfully)
    *** Checking attributes!
    __code = 4
    owner (RWUser)
    *** Checking attributes!
    server (repseikoapps2)
    *** Checking attributes!
    destination ()
    *** Checking attributes!
    desType (FILE)
    *** Checking attributes!
    desFormat (unknown)
    *** Checking attributes!
    file (71106787.eps)
    *** Checking attributes!
    timingInfo ()
    *** Checking attributes!
    queued (1/10/2004 15:02:18)
    *** Checking attributes!
    started (1/10/2004 15:02:18)
    *** Checking attributes!
    finished (1/10/2004 15:02:18)
    *** Checking attributes!
    *** Finished Parsing XML
    Getting value for element: job
    *** Requesting value for Attribute job.id [842]
    Getting value for element: server
    *** Requesting value for TAG server [repseikoapps2]
    Getting value for element: job
    *** Requesting value for Attribute job.type []
    Getting value for element: job
    *** Requesting value for Attribute job.queueType [past]
    Getting value for element: name
    *** Requesting value for TAG name [u02/app/dis/dev/reports/rdf/dsinvprt.rdf]
    Getting value for element: status
    *** Requesting value for Attribute status.code [4]
    Getting value for element: status
    *** Requesting value for TAG status [Finished successfully]
    Getting value for element: owner
    *** Requesting value for TAG owner [RWUser]
    Getting value for element: desType
    *** Requesting value for TAG desType [FILE]
    Getting value for element: desName
    *** Requesting value for TAG file [71106787.eps]
    Getting value for element: queued
    *** Requesting value for TAG queued [1/10/2004 15:02:18]
    Getting value for element: started
    *** Requesting value for TAG started [1/10/2004 15:02:18]
    Getting value for element: finished
    *** Requesting value for TAG finished [1/10/2004 15:02:18]
    Getting value for element: parentJob
    *** RUN REPORT BY URL - Processing finished
    JobID : 842
    StatusCode : 4
    StatusText : Finished successfully
    ================================================
    TimeStamp : 10/01/04 02:22 PM
    ================================================
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://seikoapps.seiko.com.au:7777/reports/rwservlet
    *** Length of Paramlist : 2
    OK : Parameter added : SERVER=repseikoapps2
    *** Length of Paramlist : 3
    OK : Parameter added : JOBID=842
    *** Length of Paramlist : 4
    OK : Parameter added : AUTHID=
    *** Building URL (showjobid)
    Added jobid to URL
    Added Server to URL
    Added statusformat to URL
    OK : URL built : http://seikoapps.seiko.com.au:7777/reports/rwservlet/showjobid842?Server=repseikoapps2&statusformat=xml
    *** Submitting HTTP Request
    *** using URL :http://seikoapps.seiko.com.au:7777/reports/rwservlet/showjobid842?Server=repseikoapps2&statusformat=xml
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding = 'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <job id="842" queueType="past">
    <name>/u02/app/dis/dev/reports/rdf/dsinvprt.rdf</name>
    <type>report</type>
    <st
    OK : Request submitted - Length of stream : 678
    *** XML-Parsed - Following Structure discovered :
    *** Checking elements!
    serverQueues ()
    *** Checking attributes!
    job ()
    *** Checking attributes!
    __id = 842
    __queueType = past
    name (/u02/app/dis/dev/reports/rdf/dsinvprt.rdf)
    *** Checking attributes!
    type (report)
    *** Checking attributes!
    status (Finished successfully)
    *** Checking attributes!
    __code = 4
    owner (RWUser)
    *** Checking attributes!
    server (repseikoapps2)
    *** Checking attributes!
    destination ()
    *** Checking attributes!
    desType (FILE)
    *** Checking attributes!
    desFormat (unknown)
    *** Checking attributes!
    file (71106787.eps)
    *** Checking attributes!
    timingInfo ()
    *** Checking attributes!
    queued (1/10/2004 15:02:18)
    *** Checking attributes!
    started (1/10/2004 15:02:18)
    *** Checking attributes!
    finished (1/10/2004 15:02:18)
    *** Checking attributes!
    Getting value for element: job
    *** Requesting value for Attribute job.id [842]
    Getting value for element: server
    *** Requesting value for TAG server [repseikoapps2]
    Getting value for element: job
    *** Requesting value for Attribute job.type []
    Getting value for element: job
    *** Requesting value for Attribute job.queueType [past]
    Getting value for element: name
    *** Requesting value for TAG name [u02/app/dis/dev/reports/rdf/dsinvprt.rdf]
    Getting value for element: status
    *** Requesting value for Attribute status.code [4]
    Getting value for element: status
    *** Requesting value for TAG status [Finished successfully]
    Getting value for element: owner
    *** Requesting value for TAG owner [RWUser]
    Getting value for element: desType
    *** Requesting value for TAG desType [FILE]
    Getting value for element: desName
    *** Requesting value for TAG file [71106787.eps]
    Getting value for element: queued
    *** Requesting value for TAG queued [1/10/2004 15:02:18]
    Getting value for element: started
    *** Requesting value for TAG started [1/10/2004 15:02:18]
    Getting value for element: finished
    *** Requesting value for TAG finished [1/10/2004 15:02:18]
    Getting value for element: parentJob
    *** JOB STATUS - Processing finished
    JobID : 842
    StatusCode : 4
    StatusText : Finished successfully
    =============================================
    TimeStamp : 10/01/04 02:22 PM
    =============================================
    Can any one help me why the file is not created.
    Thanks
    Bain

    The file is created, but as an eps file (post script printer file). That is because you have not specified a desformat (e.g. PDF).

  • Accessing database package variables from Forms

    I have a database package that populates a table of values, i.e.
    type t_route_list is table of rt_route.RTR_ID%type;
    route_list t_route_list
    route_list gets populated by a package function and I want to access route_list in the Form.
    While I can access other package variables by writing a function that returns the variable, Forms doesnt seem to like functions that return a user defined datatype as above. I have also tried using a procedure with an OUT param instead of a function but it also fails with same error.
    i.e.
    declare
    v_route_list pkg_bulk_route_replace.t_route_list;
    begin
    pkg_bulk_route_replace.init;
    pkg_bulk_route_replace.get_route_list(v_route_list);
    message(v_route_list(1));
    end;
    This will not compile, but removing the index (1) from the last line makes it compile but crash with ORA-0600.
    The code above with message replaced with dbms_out.put_line works fine on TOAD.
    So my question is......
    Can my database package return a plsql table to a form and if so, how?!

    Actually I've got this to work now!
    Thde main culprit appears to be a difference in the version of sql or pl/sql used on forms (version 5) and the database (8.1.7).
    I had defined my table as a nested table. By redefining this as a indexed table, simply by adding on 'index by binary_integer' on my server package, I am suddenly able to access the elements of the table on my form. Fortunately this did not break the server code either - the table was populated using bulk collect and that still works.
    Still got a bit of coding to do, but things are looking up now.

  • The dreaded frm-92101 when executing a database package :-(

    Hiya gang! Forms 10g on WIN2K hitting oracle database 10g.
    We have a database package with a function that calls the oracle dbms_ldap functions to do an ldap lookup in order to verify an ID. I can run it from SQL/Plus and it returns just fine.
    Connected with the same ID in forms causes frm-92101 (forms server failure) to happen. I know this is a catch-all error (which drives me nuts, this is a tool written for developers, by developers, we need more info to troubleshoot errors for crying out loud!) but I'm hoping someone out here will have run across this. Here's the code just in case:
            rc PLS_INTEGER;
         rc := ldap_security.ldap_login_verify(:control.login, :control.passwd);
         if rc = 1 then
              message('verified',acknowledge);
         else
              message('verification failed',acknowledge);
         end if;Now I don't believe its the function itself, as it runs just fine from SQL/Plus. It's got to be something to do with calling it from forms.
    I put it up on the app server (solaris) and I get the same error there as when running it from my PC.
    Has anyone had success with validating via ldap from forms?
    Thanks for any info,
    Gary
    Message was edited by:
    Gary

    DOH!
    Just before the call to the ldap_security function, I issue a logon statement. The trouble was, I had originally coded an on_logon trigger with the text of "null;" when I created the form and promptly forgot about it.
    When logon was called, control went to the on-logon trigger which just exits. It bombed because I wasn't really logged in! You mean to tell me forms could not tell me I wasn't logged in but just gave the frm-92101 error!?
    If you issue a select without being logged in, you get a "not connected to Oracle" message. If you try to run a database function inside a package, you get the frm-92101 error.
    Anyway, I deleted the on-logon trigger and all is good.
    Gary
    Message was edited by:
    Gary

  • Local Procedures Calling Database Packages

    I have a procedure in a form which is calling a procedure in a database package. There are various parameters being sent to the package. The package is not executing. If I copy the same code of the package in to the form procedure, the same code is executing.
    One of the paramters being passed to the package is null. Is it that you cannot pass a null value to a database package or is there some other thing that I need to check?

    Definitely, the cause of the problem isn4t the null parameter. I frequently do this and it works. Analyze your package better.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Pushpak:
    I have a procedure in a form which is calling a procedure in a database package. There are various parameters being sent to the package. The package is not executing. If I copy the same code of the package in to the form procedure, the same code is executing.
    One of the paramters being passed to the package is null. Is it that you cannot pass a null value to a database package or is there some other thing that I need to check?<HR></BLOCKQUOTE>
    null

  • Are ADF BC4J based on database package procedures?

    Hi all!
    Is it possible to create ADF BC4J components base on database package procedures like building ORACLE FORMS blocks on case generated module api?
    If yes, how can I achieve this? In the wizards I only see tables, views an so on!
    regards

    Read capital "26.4 Basing an Entity Object on a PL/SQL Package API" in "Oracle® Application Development Framework
    Developer’s Guide For Forms/4GL Developers"

  • SSO Userid required from database package/trigger

    I've done a search but cannot find the answer to my problem.
    If I log into a Forms application using SSO I can get the SSO userid and database USER.
    How do I get the SSO Userid from a database package or trigger that is called from Forms. Is there a database function that will return the SSO Userid?
    Thanks
    Stewart

    Rosario,
    Yes, I know how to retrieve the information but do I have to populate it first.
    E.g. 'SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') Returns an identifier that is set by the application through the DBMS_SESSION.SET_IDENTIFIER procedure'
    Do I have to call 'DBMS_SESSION.SET_IDENTIFIER' from my application before
    calling SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER')?
    Thanks
    Stewart
    Message was edited by:
    stewartdawson
    Message was edited by:
    stewartdawson

  • Database package (stored procedure) seems to be hanging

    Hi,
    Our application seems to be hanging after executing a database package repeatedly. It happens after 5-10 invocations of the same package in a loop. Any ideas why this happens?
    Thanks in advance,

    Narayana,
    Your really going to have to give more detail than "it hangs and we don't know why". I always use a program called TOP SESSIONS in OEM to monitor a running process. It's a good place to start. If you don't have that query v$session and find the session that is running that package. Normally good coders have trace tables they write debug into (with a debug flag on every proc), so that when you run a procedure/function/package it begins recording that it's doing so you can monitor it's process. It sound like you don't have any kind of tracing going on so you have no idea what's happening. Even use DBMS_OUTPUT.PUT_LINE to show where it is at in the code.
    Also in regards to that top sessions program (OEM 1.6), there is one called lock manager. The newer OEM might have this I don't know, I don't use it. But the initial process your running might be opening locks and keeping them open, thus other packages fire and are still waiting for the first one to let go. Are you killing the first session BEFORE firing off the next?
    Try and get some monitoring tools, many are free to download like Oracle's OEM, so you can monitor what's going on. However but you really need to record some kind of trace in your code so when it runs you can see what step it is at when it does hang. Also check for TRACE files that progress might be making and the alert log as well (both on the server's operating system).
    Hope this helps a little.
    Tyler D.

  • Forms 11gR1 with Database Package

    Hi everyone,
    I'm asking this here, i need to know what i'm doing wrong.
    I have a database package that contains pipiled record.
    I want to use it in a form with forms builder.
    if i do
    select * from table(mypackage.myfunction());
    in PL/SQL Developper, i get all what i except (list of record)
    if i try to use this select in a CURSOR inside my form, i get error about SQL type not authorised
    with my from table();
    but if i use it with a populate_group_with_query, everything works perfectly.
    So, there's a way i can use my package inside a form program unit?
    Thanks for your help.

    No, working with collection is not like the POPLUATE_GROUP_WITH_QUERY built-in because you have to write the code to process the rows and columns of the collection.  A collection, in Oracle, is essentially an Array.
    To work with a collection, you have to create an object in your trigger PL/SQL to store the collection.  To do this you create a user defined TYPE and then create an object based on this type.  Take a look at the article, https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-procedure-based-block for an example of how to write a database package the uses a collection as the source of data for a Forms data block.
    Base on this article, in your Forms trigger you would then create an object typed off of the package type T_EMPLOYEE.  Next, you call your database package and assign the collection to your trigger object.  Finally, you loop through the collection to perform the needed action on each row.  Here is an example of the basic code using the article above as an example:
    /* sample code - for demonstration purposes */
    /* code is untested */
    DECLARE
      rec_employees   EMPLOYEE.T_EMPLOYEE;
    BEGIN
      EMPLOYEE.EMP_SELECT(rec_employees);
      FOR idx in 1 .. rec_employees.COUNT LOOP
        -- now do something with each column in the row...
        rec_employees(idx).empno ...
        rec_employees(idx).ename ...
        rec_employees(idx).job ...
        etc...
      END LOOP;
    END;
    Hope this helps.
    Craig...

  • How to declare synonym for a package function with a DBLink

    Hi,
    I have a PL/SQL package 'pkg'
    and a function in the package 'func'
    at another db using a dblink.
    How to I create the correct syntax to create the synonym for this package and function.
    create synonym --- for ---@dblink
    Thanks.

    CREATE SYNONYM <name> FOR <OWNER>.<OBJECT>@<DB_LINK>
    {code}
    the object in this case would be pkg.func
    Edited by: Tyson Jouglet on Sep 25, 2008 5:12 PM                                                                                                                                                                                                                                                                                                                                               

  • Error in File ~tmp81c59e23760a10.rpt: Invalid argument for database

    When trying to run the report via Crystal Reports Server, we get the following error:
    Error in File ~tmp81c59e23760a10.rpt: Invalid argument for database.
    Opening the report in Crystal Reports 2008 and running a verify database, confirms that everything is working. Yet when we run it through Crystal Reports Server it errors every time.
    We are using a Progress ODBC driver which works fine when running reports via Crystal Reports 2008
    Can you please shed some light on this.
    I have already checked to see if there was a service pack or any other hot fixes available.

    Hi Brett,
    I believe I have the same error. ie
    Invalid Argument provided.
    Error in File xxxxx {C8F4D455-6B45-4859-B1B0-3E77619E5AD0}.rpt:
    Invalid argument for database."
    Have you managed to resolve the issue yet?
    We're running Crystal Reports 2008 Basic on MS SQL Server 2005.
    The Crystal Report works fine, when run on the server (and/or in terminal server session), but if it is run from a desktop client, which connects to the server, it gives the error above.
    So in my case, it must permissions or component related (ie something not loaded, that should be).
    I found the following on the internet:
    u201DIDataReader supports only one table by default
    When you view a report that has tables with the data source set to
    IDataReader for each one, and many of the tables are linked together, you
    may see the following error message: "Invalid database argument." Calls
    made to SetDataSource() from an IDataReader are supported only for
    reports that contain one table.
    Workaround
    To use an IDataReader with multiple tables, create a report with one
    command table that selects the necessary fields.u201C
    From researching in SAP BOBJ Notes I found somethings to try, or look at, but can't quite tackle them yet. I'll let you know how it goes.
    Best Regards,
    George

Maybe you are looking for