Run Procedure/Package From APEX

I want to be able to run a procedure/package from within APEX. The procedure is referenced from multiple sources, so I don't want to place it in APEX, it needs to stay in the package. There is no returning data. I have APEX 3.0 and 10g. It goes without saying that I'm very new to APEX, since I'm sure this is not a difficult process to perform. Thanks.

Hi Jari,
Finally got it to work. I created a Button that would trigger the Process. In addition to creating the Process, I had to create a Branch.
So thanks to your direction, it is working.

Similar Messages

  • Error while running SSIS package from Integration service or via Job

    Hi All,
    I encounter the below error while running SSIS Package from Job or integration service. However on execution completes success fully while running from data tools. The issue occurs after migration to 2012 from 2oo5 dtsx. PFB the error.
    SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC02020C4.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by
    the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    A buffer failed while allocating 10485760 bytes.
    The system reports 26 percent memory load. There are 206110765056 bytes of physical memory with 150503776256 bytes.
    free. There are 2147352576 bytes of virtual memory with 185106432 bytes free. The paging file has 208256339968 bytes with 145642921984 bytes free.
    The package also runs successfully from other servers. This happens only in one of our server.seems like issue with some sql configuration.

    Hi ,
    Are you running using SQL Agent Job and Data tools on same server or different?
    If it is executing fine using Data tools and failing with Job it might be User credentials issue.Try
    to run Job with your credentials by using proxy .
    Regards,
    Prathy
    Prathy K

  • Error running child packages from parent package - Error 0xC0011008

    Hey...
    I am running a parent SSIS package (running sp2, 9.0.3042) that calls several child packages.
    On our development server, we now cannot run this because we get 1 or more of these errors:
    "Error 0x80004003 while preparing to load the package. Invalid pointer  .  "
    "Error 0xC0011008 while preparing to load the package. Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.  .  "
    It is not occuring on the same packages.  It varies every time it is run.
    I can run every one of the child packages individually, using the same login ID that the parent is executed under.
    The parent package works fine on my local machine and other servers running the same version of SSIS.  Just not on this server.
    Does anyone have any ideas???
    Thanks
    BobP

    I have the same error with no parent child package relationship. I have changed the "Max Concurrent Executables" in each package from -1 to 10 and got  no change.  My code is below:
    List
    <string> fileList = new List<string>();
    private
    void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
    //this.fileList.Add(checkedListBox1.SelectedValue.ToString().Trim());
    this.fileList.Add("name");
    private
    void button1_Click(object sender, EventArgs e)
    string @fileName;
    foreach (string str in fileList)
    @fileName = str;
    string pkgLocation;
    Microsoft.SqlServer.Dts.Runtime.
    Application app;
    DTSExecResult pkgResults_Sql;
    pkgLocation =
    @"C:\" + @fileName + ".dtsx";
    app =
    new Microsoft.SqlServer.Dts.Runtime.Application();
    Package pkgIn = new Package();
    pkgIn = app.LoadPackage(pkgLocation,
    null);
    pkgResults_Sql = pkgIn.Execute();

  • Run Data Package from custom Menu00F9/VBA macro

    HI guys,
    I have a problem:when creating VBA macro to run Data Package.
    I get the pop-up error "400" . This is the VBA code I'm using:
    Application.Run "MNU_eDATA_RUNPACKAGE(""Opening""; ""/CPMB/Opening_Balances""; ""Company""; ""Financial Processes"")"
    Have you any suggestion for me?
    Thanks
    Marco Uccello

    Hi Marco,
    I'm guessing by prompts you mean user inputs for Entity, Category, Time etc.
    These are controlled by the dynamic script associated with the data package.
    If you go to the menu eData -> Organise Packages then select a package and go through :
    Modify Package -> View Package -> Advanced
    You should get to the Data Manager Dynamic Script window.
    The following is an example of what should be in here. This is taken directly from the SAP How to Guide "How To Pass Dynamic Parameters to script logic.pdf"
    It's the "PROMPT" parts at the start that control the prompts shown to the user (and passed to the data package) :
    PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")
    PROMPT(TEXT,%WS_PERCT%,"Input W/S Percent in decimals",)
    PROMPT(TEXT,%EXP_PERCT%,"Input Exp. Percent in decimals",)
    INFO(%EQU%,=)
    INFO(%TAB%,;)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,TAB,%TAB%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,EQU,%EQU%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SUSER,%USER%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPPSET,%APPSET%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SAPP,%APP%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,SELECTION,%SELECTION%)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,LOGICFILENAME, INCREASEPERCENTAGE.LGF)
    TASK(ZBPC_PROMPT_EXP_RUN_LOGIC,REPLACEPARAM,WS_PERCT%EQU%%WS_PERCT%%TAB%EXP_PERCT%EQU%%EXP
    _PERCT%)
    If you paste that in exactly it will resolve into the right package information which can be seen one step back (via Modify Package -> View Package).
    You can modify the prompts as appropriate for the script you are running - the one above from the how to guide has two inputs for percentages which are used within the associated script logic calculation.
    Hope this helps.
    Thanks.
    Bradley Newcombe.

  • Performance: call packages from APEX is slow

    Hi
    we have a complexe authorization, authentication and policy concept. We have encapsulate a lot of functions into a seperate package. Functions and procedures of this package gets called at different places in three different applications. I know if a package function ie. get's called in a report query it could be very slow because it get's called not one time for one row, it sometimes get's called 5 or 10 times for one row. It's always better to join tables and information into reports.
    Problem is, we have two instances and in one instance, the application is "running". In the other instance, the application is f*****g slow...
    So I read about pinning of packages and problems with session pooling and session cached cursors.
    First question is, what excatly happens if I pin a package into memory and what are the prerequisites to do that? Could this realy improve the performance dramatically?
    Second question is, could there be some problems of session pooling or can we increase the amount of session that could be pooled so that packages get be chached?
    Do you have some more information, links or ideas to increase performance? or caching of packages? or some other tricks like overwriting V(xxx) syntax?
    Thanks in advance!

    Greetings,
    As mentioned in the above post, pinning packages can help with the overhead of packages being loaded and reloaded after being swapped out. If you follow the link and read the blog post, you'll get a good idea of what happens when you Pin a package and how to actually do it.
    But more to the point you need to know where your code is "failing to be performant". Luckily there are a number of things that you can do to pinpoint what portion of the code is slow and why.
    DBMS_PROFILER allows you to get information about the execution of your PL/SQL packages, including how many times a particular line of code was executed and how long it took to run. This is very useful information when trying to diagnose PL/SQL. However DMBS_PROFILER doesn't give you a 100% picture of what is going on, as it lumps the execution of SQL in with the execution of PL/SQL.
    DBMS_HPROF (available on 11g) is similar to DMBS_PROFILER in that it tells you what your code is doing, but it adds the ability to look at the data hierarchically (with parents and children) and to split the execution of PL/SQL from the execution of SQL queries.
    There is an Open Source project called the Instrumentation Library for Oracle (ILO) that allows you to instrument your code and collect data about it's response time as well as capture accurately scoped 10046 trace data. Originally authored at the performance experts at HOTSOS (Where I should say, I used to work), the project is now stewarded by Method-R and continues to be expanded.
    Speaking of 10046 trace, APEX is actually instrumented so that with a small addition to the URL, you can generate a 10046 Level 12 trace of the session that processes and renders a page. Run that through TK-PROF, SQL-DEV or The Method-R/Hotsos Profiler, and you'll see a full accounting of the time taken.
    Another thing you can do is to make sure you're not executing the same code over and over to get the same result. If the result of a particular function or query will be the same for the life of a session, then execute it only once and store the result in a Package Variable. Accessing the package variable is far less overhead than continually executing a query or function even though the result might be cached.
    Although there are myriad approaches to tuning code, it all basically starts with identifying where the problem is. The above methods will definitely help you get to the root cause and once you have something more specific to attack, please let us know and I'm sure many of us would be happy to jump in and help.
    Hope That Helps,
    - Doug Gault -
    http://sumnertech.com/

  • Running SSIS Package from another server and performance

    I've built an SSIS package that integrates data from one SQL Server 2008 database to another SQL Server 2008 database.  However, since I needed to leverage some SSIS 2012 components, I've installed the package on another SQL Server 2012 in the network.
    Is there a performance hit (positive or negative) if I run a SSIS package on a SQL Server that isn't the source or destination server?

    Hi,
    we cannot tell for sure. It depends on so many things, amount of data to be transferred, processing needs to be done, overall capacity of the server, workloads that can be handleld by the servers, etc. The mos important aspect but nt the only one is the
    amount of data to be access / tranformed / processed / transmitted to the destination.
    This is a typical case for a test done representative amount of data in a load test on your side.
    -Jens
    Jens K. Suessmeyer http://blogs.msdn.com/Jenss

  • How to run a update from APEX 2.1 to APEX 2.2???

    I am using version 2.1, and I want to update to 2.2, I downloaded the file from OTN, but after unziping, I found it is not a simple exe file but a bunch of sql and other files, how to run the upgrading, I think it is too diffficult in that way.
    How many files I need to run in the SQL plus?
    Which one is the one I need?
    Puzzled?

    So there will be no upgrading for Oracle DB XB APEX?The way you ask that implies that I said that this will never be possible and that is not what I said.
    If I want to upgrade to 2.2, I need DBs other than XE?Today you have the option of installing Application Express 2.2 in Oracle Database 9iR2 or the SE, SE1, or EE editions of Oracle 10g Database.
    Scott

  • Running SSIS Package from SQL Job - with Set Values, a string containing";"

    Can anybody help with this problem please?
    I’m using “set value” in SQL agent to pass in an email address to my SSIS package, if I put in a value of:
    [email protected]
    It works fine, but if I attempt to input multiple email addresses it fails
    [email protected];[email protected]
    It doesn’t appear to like the “;”.
    Any ideas anyone???
    BoroFC

    Hi Jamie, many thanks for the response.
    If I look at my command line table when Email = [email protected], it looks like:
    /SET "\package.Variables[EmailAddress].Value";"[email protected]" /REPORTING E
    If I change the value to “[email protected];[email protected]”, it looks like:
    /SET "\package.Variables[EmailAddress].Value";"\""" [email protected];"" [email protected] ""\"" /REPORTING E
    But the weird thing is, if I close the job properties window and re-open it again, I lose this line from my set values screen all together!!!
    Help ???
    BoroFC

  • Run info package from an ABAP program

    Hi all,
    I need to run an info-package based on values entered by user in a selection screen.
    How can I implement these values in the info-package using the abap program?
    I've searched the forum and found FM RSSM_SDL_START_INFOPACKAGE and BAPI_IPAK_START but there is no option to enter the selections, also I have found the option to select var type 6 - abap code in the info-package (tab  data selection) but didn't understand if I can connect it to an external abap program.
    Thanks,
    Hagit

    Along with BAPI_IPAK_START, you need to use the FM "BAPI_IPAK_CHANGE"...
    there you have the table with structure BAPI6109SEL, which is used to pass selections to infopackage at the run time...
    Sequence u can use is BAPI_IPAK_START, then BAPI_IPAK_CHANGE and finally BAPI_IPAK_START as per ur requirements...

  • Running SQLPLUS Script From APEX

    Hello.
    I am running APEX 2.x and have a need to invoke a SQLPLUS script (it's a report)
    via an APEX page. I would like to create a button on a page that, when clicked,
    will somehow invoke a SQLPLUS script.
    The script may either be stored within a CLOB column in a table and then SELECTed (via the button press) or be in a .sql file on the UNIX server (presumably, then, I would need to invoke a UNIX shell script that, in turn, runs
    the .sql file).
    I would really appreciate any help on this.
    Thank you in advance.
    Elie

    I did not notice that the cut and paste was poor. It should have read
    SQL> @dm$load.pkb
    SP2-0310: unable to open file "dm$load.pkb"
    SQL> host ls
    dm$load.pkb
    Any ideas will be greatly appreciated.

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • "VS_NEEDSNEWMETADATA" error while running a package created from C# code

    I have gone through most of the answers for similar questions here however none has resolved the issue. We have created a package using C# code which stages data from a source table to destination (ChildPackage.dtsx).
    Source Table : RowKey, Col1, Col2
    Destination Table : RowKey, Col1, Col2, RowID, RunID (RowID is an identity column in destination table and RunID is a derived column whose value is set using a variable)
    This package runs fine when we execute it directly however, we run these packages from a master package (MasterPackage.dtsx). When we are trying to run the package (ChildPackage) from a MasterPackage we get an error:
    [SSIS.Pipeline] Error: "Oledb Destination" failed validation and returned validation status "VS_NEEDSNEWMETADATA".
    We have tried setting DelayValidation to true for the ChildPackage and even tried setting the values for "ValidateExternalMetadata" for the source and destination component as "False" for the data flow task
    of the ChildPackage.
    There is no case difference between column names in source and destination and it runs fine when we run the ChildPackage directly.
    The only additional task that the Master package performs is to generate and set a variable that is used as RunID value by the child package.
    If we hardcode the RunID in the ChildPackage and run it directly, it runs fine.
    The MasterPackage.dtsx is not created from code and has a step to run ChildPackage.dtsx. We generate the ChildPackage.dtsx from code and replace in original solution.
    Any help would be appreciated.
    Gaurav Agarwal

    Where then this RunID is consumed?
    Arthur My Blog
    The RunID is set by the MasterPackage in a parameter, this parameter is used as value of derived column in the data transformation task of the ChildPackage.
    As mentioned ChildPackage has a RunID column.
    Gaurav Agarwal

  • Run Script Logic/Package from a different Application

    Hi Experts,
    I have a scenario here that I need to run a package from a different application. For example, I'm in Finance application and I need to run a package which is in the LegalApp application, is it possible to call that package or perhaps run the logic it was calling without having switch back to LegalApp.
    Thanks,
    Marvin

    To run a package that runs logic on another application, you could copy a package such as "Default Formulas" and put the name of the target application in the new package's name.  Then go to Modify Package --> Advanced.  Edit the package to set the application as below.  The LegalApp (for example) is set on the third Task command.  Default logic is called on fifth.
    PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when running logic.",1,{"Yes, check for work status settings before running logic","No, do not check work status settings"},{"1","0"})
    PROMPT(SELECTINPUT,,,,%CATEGORY_DIM%%ENTITY_DIM%%TIME_DIM%)
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,LegalApp)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,LOGICFILE,)
    TASK(Execute formulas,CHECKLCK,%CHECKLCK%)

  • Start OWB workflow from APEX

    Hi together,
    My challenge is to start an OWB workflow from an apex procedure.
    Procedure:
    declare
    numb number;
    audit_id number;
    begin
    numb := rtruser_blueprint.exec_api.execute('LOC_A014_OWF_MGR', 'PROCESS', 'LOAD_CALM_DELIVERY', ',', 'DELIVERY_ID_IN=6', audit_id);
    end;
    My problem is the following error:
    ORA-06565: cannot execute SET ROLE from within stored procedure
    This error occures at the following row in the execute-Procedure in the package exec_api (standard owb execution package):
    dbms_session.SET_ROLE('OWB_D_rtr10201_blueprint');
    dbms_session.SET_ROLE('OWB_O_rtr10201_blueprint');
    If I run this script directly with sqlplus, the procedure works fine. As a result of this, I assume, the problem has to do with the grants which the apex execution user (APEX_PUBLIC_USER) doesn't have in contrast to the blueprint user (which is schema owner)
    More informations about the environment setup:
    The apex workspace is bound to the database - user: BLUEPRINT.
    BLUEPRINT has the grant to execute the procedure 'EXECUTE' in the package 'EXEC_API'. The 'EXEC_API' package belongs to the user 'RTRUSER_BLUEPRINT'.
    My concrete question is: Which rights / grants does which user need to execute the procedure directly from APEX?
    Thanks for your help!
    Mirco

    What account were you using when you ran the 'execute_api' procedure from SqlPlus ? Also, all SQL and PL/SQL from APEX is executed as the application's parsing schema id and not the schema used by APEX to connect to the database.

  • Calling SSIS package from C# Windows Service Fails

    Hi All.
    I've got an SSIS package that reads from an Excel file and populates a database. The Excel file location gets passed in to the package as a variable. Also the Protection Level of the package is set to EncryptSensitiveWithPassword.
    This all works fine when I run the package from Visual Studio or using DTEXEC. When I try to run it from a C# Windows Service though I get the following exception:
    SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively
    by another user, or you need permission to view and write its data.".
    SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Input Excel Connection" failed with error code 0xC0202009.  There may be error messages posted before this
    with more information on why the AcquireConnection method call failed.
    Dedupe Worksheet failed validation and returned error code 0xC020801C.
    One or more component failed validation.
    There were errors during task validation.
    The windows service runs with LocalSystem account and the following code is used to call the SSIS Package:
                    Application app = new Application();
                    Package package = null;
                    app.PackagePassword = "*******";
                    //Load the SSIS Package which will be executed
                    package = app.LoadPackage(@"C:\Projects\DataDedupeMatch\DataDedupeMatch\DataDedupe.dtsx", null);
                    //Pass the varibles into SSIS Package
                    package.Variables["User::FilePath"].Value = e.FullPath.Replace(@"\\", @"\");
                    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
    I would really appreciate if someone could help me out with this.
    Thanks in advance,
    Deon

    Instead of hosting the SSIS runtime in your service, you should use a separate host process for your SSIS package.  You're using the Office drivers, which aren't designed or supported for running in long-lived unattended processes like a Windows Service. 
    You can use your own SSIS hosting code, or just use dtexec.exe to host your package.  In either case you would start the child process with
    Process.Start. 
    David
    David http://blogs.msdn.com/b/dbrowne/

Maybe you are looking for

  • Variable not defined: '_MR' error when using sub template

    Hi, I am creating a check print report. When I had the check layout and the invoice layout on the same template it worked fine. But when I moved the check layout to a sub template then I started getting the error Variable not defined: '_MR' but I don

  • Error in Adobe Interactive forms

    Hi All, I am implementing MSS/ESS. I created an Adobe Interactive form in my View and mapped it with the corresponding context. I binded the interactive form(in the Right Click->Interactive Form->Edit) also with the corresponding context. But when I

  • Passing SELECT-OPTIONS to smart forms

    hi ,    how can we pass select options from a program to a smart form. Regards Arun

  • Problems with UK 6233 f/w v3.70 (CODE: 0539578)

    I've found a nice bug or two with the above phone ... the worst of which was when my phone refused to accept my security code to unlock the key pad for about 1 hour -- I know the code very well, so I can guarantee you I was keying it correctly. Pulli

  • HT1657 rental movie on iTunes not playing

    I just rented a movie and it wont play...suggestions? I have all the updates done. I tried restarting my computer and nothing...