Providing a procedure name as argument - is it possible?

I am trying to write a wrapper procedure that would trap certain runtime exceptions and re-run procedures, and was wondering if that is possible in PL/SQL.
I would like to invoke it with a line like this:
MyUtilityPackage.run_proc(a_package.a_procedure, retries => 3, wait_minutes => 2, etc.).
This would be enormously useful to me since I can write a generic procedure to handle things like deadlocks that require intervention, rather than going into many, many programs and adding them in each.
Thanks,
Regards,
Srini

Thanks, but that would not help. I need to add other conditions - for certain conditions, I need to react to certain errors in certain ways.
I noticed that I can use "execute immediate" to do this, but am wondering if it has a steep system overhead. Also, if I use this method, I give the name of the package and procedure as a varchar2, but I would like to know if there is a data type, sort of like a function pointer in C that allows me to define a variable as a function.
Regards,
Srini

Similar Messages

  • Find all Package and their related Procedure Names using a specifc Table

    I have 25 Packages
    Each Package holds 30-35 Procedures
    I need to find out all Packages and Procedures
    Each Procedure handles 5 - 20 Tables as Per The Need of Business Rule.
    I need All Package and Related Procedure Names Where a Specific Table Name Appears(DBA_SOURCE doesn't serve purpose.)
    Early Reply Appreciated.
    Thanks and Regards,

    I tried the solution provided to me, but unfortunately the issue remains the same.
    I was Advised to Execute the SQL utldtree.Sql, and then Execute deptree_fill.
    The output is given by a Table DEPTREE (Columns are: .'NESTED_LEVEL', 'TYPE', 'SCHEMA', 'NAME' and 'SEQ#')
    The output I am getting From the Table DEPTREE is as follows -
    Column TYPE value is PACKAGE; Column NAME Value is ACTUAL PACKAGE NAME
    Column TYPE value is PACKAGE BODY; Column NAME Value is ACTUAL PACKAGE NAME
    This repeats till the count the TABLE Name is found in the same PACKAGE
    Desired Output should be -
    Column TYPE value PACKAGE; Column NAME Value ACTUAL PACKAGE NAME
    Column TYPE value PACKAGE BODY; Column NAME Value ACTUAL PACKAGE BODY NAME
    This should repeat till the count the TABLE Name appears in different PACKAGE BODY of the same PACKAGE
    Warm Regards,

  • How to call a procedure with two arguments

    Hi,
    I have a procedure with two arguments, ie. myprocedure(p1 in number,p2 in number) to display a blob image.
    how can I call out this blob image in url.
    I tried http://127.0.0.1:7777/pls/apex/SCHEMA.myprocedure?p1=1&p2=2 , but it don't work..
    Thanks
    vincent

    Vincent,
    As long as you have been granted the ability to execute the procedure and there are no spaces in the url and you have not misspelled the parameter names then this looks right.
    Here is a link to a procedure to download a file which takes two parameters.
    http://mywebsite.com/pls/htmldev/schema.package.function.download_file?p_session_id=1221970786026206&p_seq_id=724
    Cheers,
    Tyson Jouglet

  • Stored procedure name length

    Hi,
    can any one provide me link or specify what is the limitation for the stored procedures names/function names in Oracle 10G. And variable name lenth limitations.
    Thanks in advance.

    30?
    SQL> desc sys.obj$;
    Name                                      Null?    Type
    OBJ#                                      NOT NULL NUMBER
    DATAOBJ#                                           NUMBER
    OWNER#                                    NOT NULL NUMBER
    NAME                                      NOT NULL VARCHAR2(30)
    NAMESPACE                                 NOT NULL NUMBER
    SUBNAME                                            VARCHAR2(30)
    TYPE#                                     NOT NULL NUMBER
    CTIME                                     NOT NULL DATE
    MTIME                                     NOT NULL DATE
    STIME                                     NOT NULL DATE
    STATUS                                    NOT NULL NUMBER
    REMOTEOWNER                                        VARCHAR2(30)
    LINKNAME                                           VARCHAR2(128)
    FLAGS                                              NUMBER
    OID$                                               RAW(16)
    SPARE1                                             NUMBER
    SPARE2                                             NUMBER
    SPARE3                                             NUMBER
    SPARE4                                             VARCHAR2(1000)
    SPARE5                                             VARCHAR2(1000)
    SPARE6                                             DATE
    SQL> desc user_objects;
    Name                                      Null?    Type
    OBJECT_NAME                                        VARCHAR2(128)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>

  • Bex Designer 3.5: An unexpected 'invalid procedure call or argument' error

    Hi,
    Our Bex environment has both 3.5 and 7.0 queries and objects.
    Recently Bex Query Designer 3.5 started crashing when we expand on the Restricted Key Figures. It works fine in 7.0 designer. And, expanding the Calculated Key Figures works fine in both 3.5 and 7.0
    It only happens on 1 multiprovider, which has more than 100 RKFs.
    The error message is: An unexpected 'invalid procedure call or argument' error occured in wdbrlog.
    On clicking Continue, the next message is: Run-time error '-2147221499 (80040005)'; Fatal Error - Terminating
    The same error is happening in Test, UAT and Production environments for this 1 multiprovider.
    I resinstalled Business Explorer client software, but no change.
    Any suggestions on how to fix or approach fixing this?
    Thanks!

    Problem was resolved by opening a note with SAP. Their response is pasted below:
    "The problem has been solved. The reason for the termination in Query Designer was actually the fact the one Restricted Key Figure somehow has lost it's technical name.
    The problematic object is RKF SAP Plan Value (4L9J85WYTCFK4DEA63PD2R4V7)The user given name of this object was not available in the database table RSZCOMPDIR and was actually required in the Query Designer. The application was not able to create a tree of expanded RKFs having no technical names.
    In general, this error can be fixed by the special check program analyze_rsz_tables which is supposed to try to find out this missing technical name. But in this particular case the repair procedure in the program has failed as no traces or information what this missing name could be was available. Therefore I just fixed this issue manually by entering a new technical name for this object."

  • Error #5 - XMLExporter - Invalid procedure call or argument

    I cannot seem to get past this error:
    Error #5 - XMLExporter - Invalid procedure call or argument C:\temp\Larry1.mdb Database Schema Export did not complete successfully.
    Oracle SQL Developer (3.1.07) Build MAIN-07.42
    Windows XP - 5.1 Build 2600.xpsp_sp3_gdr.111025-1629 Service Pack 3
    Access 2002 (10.4302.4219) SP-2
    Tools > References:
    Visual Basic for Applications
    Microsoft Access 10.0 Object Library
    OLE Automation
    Microsoft DAO 3.6 Object Library
    Microsoft ActiveX Data Ojbects 2.5 Library
    Larry1.mdb is a new MDB created for this test, with one table and nothing else.
    Table: Person
    Columns:
         ID      auto-number, primary key
         Name      text 50
         Age      Number (Long Integer)
    Any suggestions?

    Larry,
    I did some research on this error and can only recommend to read some other forum threads in the hope they give you some help:
    https://kr.forums.oracle.com/forums/thread.jspa?messageID=4176175
    Trying to use MS Access Migration
    Error #5 - XMLExporter - Invalid procedure call or argument.
    If that does not help I suggest you open a Service Request with Oracle Support so that you can upload your mdb file for further investigations.
    Regards
    Wolfgang

  • Oracle SQL Developer  error - "The file-based source procedure Name is not present in the database."

    I recently started working on the Oracle SQL developer. I have 'select' privileges on the QA schema and when tried to execute proc in QA. It is giving the error as 'The file-based source <procedure Name>  is not present in the database.  Was it compiled?'
    instead 'you do not have sufficient privileges to execute this procedure'. Did research on internet but with no luck.What configuration changes needed to be done to make it work.Guide me.

    Sounds like you do not have the correct privileges.  What should have been granted to you by the QA user, or some other user with appropriate privileges, is...
    grant EXECUTE on "QA"."<PROCEDURE_OF_INTEREST>" to "<YOUR_USERID>" ;
    Note that a grant of execute on a procedure has nothing to do with grants of select on some or all of QA's tables and views.
    So, as Vadim suggests, from your connection node in SQL Developer's Connections view, if you expand the Other Users node, then expand QA and look in the Procedures node, do you see the procedure of interest?  If not, you cannot expect to be able to execute it from your userid's connection. And even if you do see it, you may have some other privilege that permits viewing but not executing, like...
    The role SELECT_CATALOG_ROLE
    The system privilege SELECT ANY DICTIONARY
    And even if you do not see it there, then having certain other privileges granted to you could permit executing it in general, like...
    The role EXECUTE_CATALOG_ROLE
    The system privilege EXECUTE ANY PROCEDURE
    Also, note that the 3.0 release is a bit dated nowadays. Upgrading to 4.0.3 production or even the 4.1 EA2 (early adopter) release will, in general, give you a better experience.
    Best wishes,
    Gary

  • Display a file name in th URL instead of the procedure name

    Hi ,
    I’ve created a Portlet that would show a word doc stored in a blob when a user clicks on a link. However only the procedure name that downloads the word document from the BLOB appears in the URL but not the actual file name. Is there a way to show the actual file name in the URL instead of the PL/SQL procedure name ??

    Hi Samer_asn,
    I am trying to do exactly what you did.
    Can you tell me how you could retrieve the word doc from blob and show it in a portlet when a user clicks on a link
    Thanks in advance
    Jay

  • Error occurred in deployment step 'Add Solution': The definition specifies a claim provider with a name already in use.

    Hi,
    When i am trying to deploy sharepoint 2010 application in VS 2010, i am getting the below error:
    "Error occurred in deployment step 'Add Solution': The definition specifies a claim provider with a name already in use."
    How to fix this?
    Thank you

    You can use:
    $provider = Get-SPClaimProvider | where {$_.DisplayName -eq "Provider DisplayName"}
    $mgr = Get-SPClaimProviderManager
    $mgr.ClaimProviders.Remove($prov)
    $mgr.Update()
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Getting Pricing Procedure Name  CRM_COND_COM_BADI- item

    Is there any function module that I can call to get the Pricing Pricedure name used in the order. I want to determine the same in the CRM_COND_COM_BADI - ITEM_COMMUNICATION_STRUCTURE.  So What I have is the irem GUID.
    Thanks,
    Ravi

    Hi Shanto,
                    Thanks for the response.
    But which structure from this FM has the pricing procedure name? can you give me more details to the field and the structure level because I cehceked the structures from this function module and it does have pricing conditions details but I could not find the Pricing procedure name field.
    I might be missing it so it would be great if you could get me the field level deails.
    Ravi

  • This procedure name is not found in the database: wwv_flow.show

    I created an interactive report, which works fine in the APEX developer, using the Application Express Authentication scheme.
    To add it to our Self-Service web system, I change the authentication scheme to a custom scheme that has been working fine for other applications, although I don't know of any other interactive reports using this scheme in Self-Service.
    Anyway, the interactive report is displayed in our Self-Service system using the custom authentication scheme, but if I display the Action menu and click on one of the options (Filter, Sort, Compute...), a pop-up window is displayed saying:
    This procedure name is not found in the database:
    wwv_flow.show
    That error is also displayed when I try to edit the displayed filters.
    Does anyone know why I might be getting that error or have suggestions on things to try to track it down?
    Thanks,
    Laura

    Laura,
    To add it to our Self-Service web systemWhat does that mean? What did it entail?
    I'm thinking maybe you embedded some relative links into a menu system in which the base href was not appropriate, ... or something.
    Scott

  • Hi to all... What is a  XML data provider,stored Procedure, personal data

    Hi to all... What is a  XML data provider,stored Procedure, personal data providers in deski.  when we use these data provider in desk top intelligence.. and use of it.
    Please give detail description of the above...
    Thanks for reply..........

    Hi,
    We can create Desktop Intelligence reports using XML Data Provider, Personal Data Files and Stored Procedure.
    Following is some detailed information about these three.
    Xml data provider:
    Xml data provider is used for the integration of external data sources stored in XML format.
    This is similar to HTML.
    Stored Procedure:
    A stored procedure is a set of SQL commands that has been compiled and stored on the database server.
    Once the stored procedure has been "stored", client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again.
    Stored procedures improve performance by reducing network traffic and CPU load.
    Personal data files:
    u2022     *.prn files
         A PRN file is a special type of file which contains instructions for a printer, it tells the printer what to print on the page and where as well as which paper tray to use, what the paper size is and a number of other controls.
    u2022     *.asc files
          Between the values of a row any number of carriage returns  or blanks are allowed. In any case it is strongly recommended that the data table be stored in such a way that it can be read and edited easily.
           The values may be stored in any format (integer, floating point, exponential notation) and they must be separated at least by one blank. The class information must be of integer type, the row identifiers are interpreted as strings. The lines can have any length and must not contain any comment.
    u2022     *.csv files
    A CSV file is a specially formatted plain text file which stores spreadsheet or basic database-style information in a very simple format, with one record on each line, and each field within that record separated by a comma.
    Regards,
    Pradnya Kokil

  • Extracting package and procedure name in code

    In my exception processing I need to log the package and procedure name that got the exception. How do I obtain these two names without manually coding the names?
    Thanks in anticipiation

    A better option is to get the package name and the line numberA still better option is to utilize pl/scope (when you are in 11g (not sure about 10g)):
    SQL> alter session set plscope_settings='identifiers:all'
    Session altered.
    SQL> set serverout on
    SQL> create or replace package pkg
    as
       procedure p1;
       procedure p2;
    end pkg;
    Package created.
    SQL> create or replace package body pkg
    as
       procedure get_scope (obj varchar2, line int)
       as
       begin
          for c in (select rpad (lpad (' ', 2 * (level - 1)) || name, 20, '.') || ' ' || rpad (type, 20) || rpad (usage, 20) identifier_usage_contexts
                    from user_identifiers t
                    where level != 1
                    start with line = get_scope.line and object_name = obj
                    connect by usage_id = prior usage_context_id)
          loop
             dbms_output.put_line (c.identifier_usage_contexts);
          end loop;
       end get_scope;
       procedure p1
       as
       begin
          null;
       end p1;
       procedure p2
       as
       begin
          get_scope ($$plsql_unit, $$plsql_line);
       end p2;
    end pkg;
    Package body created.
    SQL> exec pkg.p2
      P2................ PROCEDURE           DEFINITION         
        PKG............. PACKAGE             DEFINITION         
        PKG............. PACKAGE             DECLARATION        
    PL/SQL procedure successfully completed.

  • PL SQL File  Download - file name shows up as procedure name?

    Hello,
    I have been following the article below to create a download link to my db blobs, however when downloading the files, the file name appears as the procedure name as opposed to the desired file name.
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/up_dn_files.htm#CIHDDJGF
    any ideas why this is happening?
    Thanks,
    J

    I've been having this exact problem all morning and I haven't found a workaround yet. The example posted by ptjurley doesn't quite clarify it for me. I am trying to play a video located in a table using an embedded windows media player. I'm working off these instructions: http://iadvise.blogspot.com/2007/10/apex-implementing-video-on-your-apex.html
    This is the code for the otherwise blank HTML region on the page:
    <object id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
    <param name="filename" value="#OWNER#.download_video_file?p_file_id=935">
    <param name="Showcontrols" value="True">
    <param name="autoStart" value="True">
    <embed type="application/x-mplayer2" src="#OWNER#.download_video_file?p_file_id=935" name="MediaPlayer" width=720 height=540></embed>
    </object>
    Even when the filename and embed source is left blank like this: <param name="filename" value=""> I get the same error when trying to load the page. How exactly was this problem fixed, if it was resolved? I assume it's something to do with APEX not recognizing that #OWNER# is a variable within the HTML region, but I could be wrong.
    Also, the code for my procedure differs from the example given in the above link, since APEX didn't like the way it was written. This is the download_video_file procedure I am trying to run:
    create or replace PROCEDURE download_video_file(p_file_id IN HOMEPAGE_PHOTOS.id%TYPE) as
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT blob_content, mime_type, dbms_lob.getlength(blob_content) file_length, name
    INTO Lob_loc,v_mime,v_length,v_file_name
    FROM HOMEPAGE_PHOTOS
    WHERE id = p_file_id;
    owa_util.mime_header(v_mime, FALSE);
    htp.p('Content-length: '||v_length);
    htp.p('Content-Disposition: attachment;
    filename="'||replace(replace(substr(v_file_name,instr(v_file_name, '/')+1),chr(10),null),chr(13),null)||'"');
    owa_util.http_header_close;
    wpg_docload.download_file(Lob_loc);
    end download_video_file;
    Edited by: user11293104 on Jun 22, 2009 12:41 PM

  • Package/procedure name

    Hi,
    what is the package/procedure name that helps to run sql statement.
    I hope DBMS_SQL is the package that helps to run sql statemanet in oracle.
    Please correct me if i am wrong....
    Thanks

    Murali wrote:
    Hi,
    I just want to know which package helps to run sql statement in oracle.
    Thanks.There is no package that runs all SQL in Oracle. SQL is executed through the basic Oracle software. DBMS_SQL will run dynamic SQL but dynamic SQL is seldom needed and when it is needed there are usually easier ways to do it - usually reference cursors or EXECUTE IMMEDIATE. For selects DBMS_SQL requires a LOT more work than the other two methods: you have to define the select fields, define the query (the other methods require this step), create variables to hold the results, parse the sql, and execute the SQL.
    Reasons to use DBMS_SQL are when the other methods of dynamic SQL won't work
    * result set from query is unknown at run time (which may be a design problem)
    * generated SQL statements is > 32K, longer than PL/SQL supports for a text value (again, design needs to be considered)

Maybe you are looking for

  • Changing the size of fonts in InDesign's menus and toolbars?

    Is it possible to change the size of fonts in InDesign's menus and toolbars? I'd love for the Control Panel at the top to be a bit easier to read.

  • IPad (3rd gen) losing wifi connection during BBC iPlayer downloads

    Hi, I am having a strange, app-specific problem with my iPad 3rd generation (wifi only, 64GB) running iOS 6.1.3. When I use the BBC iPlayer app (version 2.0.5.33) to download a TV show to watch offline, my iPad almost always loses wifi connection a m

  • Using Macbook On 1080p TV

    I am getting a Sharp 42" 1080p Television. I bought a mini-dvi to dvi adapter. I am about to buy a dvi to hdmi cable. Will the quality be amazing with this combination with true 1080p HD?

  • Calling Multiple BAPI's - LUW problem

    Hi All, I am calling multiple BAPI's in a program. After Executing First BAPI - the database is updated after the commit work . but for the second BAPI the database is not commited. Any Suggestions. Thanks in Update. Rk.

  • Trouble printing to Canon printers with the PRISMAsync controller.

    I've recently upgraded from InDesign CS6 to CC. I haven't had any issues with CS6 when printing to either of my printers. InDesign CC, however, is throwing all kinds of media and size errors on my PRISMAsync controllers! Below is a screen capture of