Calling executable from Oracle?

Trying to call executables within Oracle, is this possible? & how.
(i.e. when a value of a column changes would like to call an executable code written in C++, I could see that a change in a value of a column could fire a trigger but then what?)
Thanks

say you write some c++ code...
in the header export atleast one func using
extern "C"
foo()
to avoid name mangling
now in oracle simply create library as
'/home/oracle/foo'
(look up the syntax)
& in pl/sql simply call the function:)
its dead easy to implement
null

Similar Messages

  • Calling reports from oracle forms 9i

    Hi
    I succeded to call reports from oracle forms but for I have a problem for only one report so I can't call it. this a part of the code I'm using :
    declare
         pl_id2 ParamList;
         pl_name2 VARCHAR2(30) := 'liste2';      
    v_rep VARCHAR2(100);
         rep_status VARCHAR2(20);
    begin
    pl_id2 := get_parameter_list(pl_name2);
    if (Id_Null(pl_id2) )THEN     
    pl_id2 := Create_Parameter_List(pl_name2);
    IF NOT Id_Null(pl_id2) THEN     
         add_parameter(pl_id2,'mois',TEXT_PARAMETER,:mois);
    END IF;
    end if;
    IF NOT Id_Null(pl_id2) THEN
    if(:mois is not null) then
    v_rep := RUN_REPORT_OBJECT('My_report',pl_id2);
    message(v_rep);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
    ELSE      
    message('Error when running report');
    END IF;
    end;
    the problem I've remarqued is that the function message(v_rep) is always returning the value :'repserver_0'.
    so when I execute the previous code I'm getting the 2 messages : 'repserver_0' and 'Error when running report'.
    Rq: the report my_report is running very well in report builder.
    does someone see where is the problem so can help me??
    thanx.

    Hi,
    This usually happens when the report fails on the report server. To obtain details on why a particular report has failed, use the showjobs page :
    http://server.domain:PORT/reports/rwservlet/showjobs?server=repserver
    and check the detailed error occured.
    This is logged as Bug:3017948. It is marked to be fixed in version 9.0.4 (Reports 10g) and also has one-off patches for version 9.0.2.3 on Windows platforms. If you need further assistance about patches, please raise a Service Request (SR) with Support via Metalink (http://metalink.oracle.com).
    Regards,
    -Bulent

  • Calling Report from Oracle form 11g

    I am new to Forms 11g, trying to call report from Oracle forms 11g .
    I want to call report from oracle forms, but its giving error.
    Below is the code
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    repid := FIND_REPORT_OBJECT('empreport'); -- report node in forms builder
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, BATCH);
    set_report_object_property ( repid, report_filename, 'empreport.rdf' ); -- report name
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'RptSvr'); -- report server name
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    if
    rep_status = 'FINISHED'
    then
    WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/dtd/rwservlet/getjobid='||v_rep||'?server='||'RptSvr','_blank');
    else
    message ( 'error while running reports-object ' || error_text );
    message ( ' ' );
    clear_message;
    end if;
    end;
    Above code giving following error :
    Unable to connect to report server RptSvr
    I think my report servername is wrong
    Where to find report server name in 11g.
    I am Using weblogic server, so can i give weblogic server name
    Thanks in advance.
    Edited by: parapr on Aug 17, 2012 1:52 AM
    Edited by: parapr on Aug 17, 2012 3:21 AM

    Hi,
    You have to have the report server
    a. Installed and configured
    b. Running.
    See
    http://docs.oracle.com/cd/E21764_01/bi.1111/b32121/pbr_strt001.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_verify004.htm
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_conf003.htm#i1007341
    If you are using rwservlet then you will find the name from the Configuration file referred to in the last link.
    Cheers,

  • Calling Report From Oracle Forms

    Hi
    I am calling this one report from oracle forms, I am using global temporary table to run that report. I am first inserting data into the temporary table through oracle form and then i am calling report in that form to view the data in that temporary table. The problem is, we can not view the data of an other session if we are using temporary table. When i call report from that form a new session get created due to which i can not see the data. Is there any method of calling report from oracle form that a same session is used to run the report?
    Thanks.

    As you mention Forms and Reports do not share the database session. I had the same problem and resolved it using record groups and DATA_PARAMETER to transfer data from Forms to Reports. You could also read the Note 110495.1 on Metalink to find useful information regarding this issue.
    Adi

  • XML Error while calling webservice from oracle function.

    I am getting an error while I am trying to call webservice from oracle function. Any ideas? Thanks.
    select get_new_string ('proxy:80', 'http://xxx/PatternVariations/SourceTest/WebMethods','Scott') from dual
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "H4" does not match start-element tag "P"
    Error at line 9
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at "DORSBP00.DEMO_SOAP", line 82
    ORA-06512: at "DORSBP00.GET_NEW_STRING", line 11

    The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call

  • Error calling BLS from oracle database

    Hi Experts,
    We have a scenario in which we are calling BLS from oracle database using trigger. The call is made using the following URL:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&Prodline=PROD&Quantity=QTY&Start_Date=DAT&Start_Time=TIM&Status=STAT&UOM=UOM1&User_name=USER&OutputParameter=*
    This used to work fine in 11.5 but when we upgraded to 14.0 it is not working. We have maintained server details in \etc\host file.
    We were getting error in file 'Error 1 Text.txt'. "A possible Cross-Frame Scripting attack has been prevented. Please contact your system administrator or refer to" this was the last error message. We checked this on SCN and based on the search results we have implemented SAP note 1651004 wherein setting in netweaver is required to be changed. After note was implemented we are getting another error text ('Error 2 Text.txt') "This will happen if the browser running the page tha". We tried a few ways but could not capture the full message coming.
    Has anybody of faced similar problem? I would highly appreciate any hint which could help in solving this problem.
    System Information:
    NW 7.31 SP 10
    Oracle 11.2.0.4
    MII 14.0 SP5 patch 7
    Regards,
    Darshan

    Hi Christian/Anushree,
    I have now modified the URL by adding Illum login name and password:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&…
    When i run the url in browser it gives me the expected results but when i try to trigger it from Oracle i am still getting the error as below:
    "<script>
      var inPortalScript = false
      var webpath = "/logon_ui_resources/"
    </script>
    <html>
    <head>
    <BASE target="_self">
    <link rel=stylesheet href="/logon_ui_resources/css/ur/ur_ie5.css">
    <title>User Management, SAP AG</title>
    <script language="javascript">
    var originWindowName=window.name;
    window.name="logonAppPage";
    function restoreWindow() {
    try{
    window.name=originWindowName;
    } catch(ex){}
    </script>
    <script language="JavaScript">
    function putFocus(formInst, elementInst) {
      if (document.forms.length > 0) {
        document.forms[formInst].elements[elementInst].focus();
    function setValuesAutoCreation() {
    var form = document.getElementById('logonForm');
    form.j_username.value="";
    form.j_password.value="";
    form.automaticAccountCreation.value="true";
    function submitForm() {
    var form = document.getElementById('logonForm');
    form.submit();
    function clearEntries() {
      document.logonForm.longUid.value="";
      document.logonForm.password.value="";
    function setFocusToFirstField() {
    myform = document.logonForm;
    try{
       for (i=0; i<myform.length; i++) {
        elem = myform.elements[i];
        if (!elem.disabled) {
          elemType = elem.type;
          if (elemType=="text" || elemType=="password") {
           if (!elem.readOnly) {
              elem.focus();
              break;
          if (elemType=="select-one" || elemType=="select-multiple" || elemType=="checkbox" || elemType=="radio") {
            elem.focus();
            break;
    } catch(ex){
    function addTenantPrefix() {
      return true;
    </script>
    </head>
    <body class="urBdyStd" bgcolor="#F7F9FB" onLoad="setFocusToFirstField()" onUnload="restoreWindow()">
    Thanks,
    Darshan
    <script language="JavaScript">
    var blockPage = false;
    </script>
    <script language="JavaScript">
    try {
      if (top.document.domain != self.document.domain) {
      blockPage = true;
    } catch (error) {
      // This will happen if the browser running the page tha"

  • Error when calling webservice from oracle function.

    Hi,
    I am getting following error when i am trying to call webserivce from oracle function. Please can anyone suggest the required solution. Below is the error obtained.
    Thanks.
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00225: end-element tag "UL" does not match start-element tag "P"
    Error at line 15
    ORA-06512: at "SYS.XMLTYPE", line 54
    ORA-06512: at "SCOTT.DEMO_SOAP", line 87
    ORA-06512: at "SCOTT.WEB_SERVICE", line 17

    The error message implies that the web service is returning something that is not well formed xml. Can you verify what is being returned by the web service call

  • Urgent: Calling Reports from Oracle Forms 10g (10.1.2.0.2) fails

    Problem displaying a report from within Oracle 10g forms.
    After a lot of work, we are able to access and actually display a report directly from Internet explorer and view the report from the report server as well.
    The successful url was:
    http://york.vrc.virginia.gov:7778/reports/rwservlet
    ?report=/u01/app/oracle/produ ct/vrcmidtier/reports/vrc/pmw41051.rdf
    &userid=vrcpr/vrcpr@vrctest&destype=cache&desformat=HTML
    The form displays correctly back to the screen
    When executing from within the form, however, the report runs but does not display back to the screen.
    Forms Steps so far:
    created a report object called pmw41050
    static parameters are:
    file name: /u01/app/oracle/product/vrcmidtier/reports/vrc/pmw41051.rdfination format
    execution mode: batch
    communication mode: synchronous
    destination name; null
    destination format: HTML
    reportserver:: vrc_york_midtier
    Built a when button pressed trigger as follows:
    declare
    l_report_file varchar2(200);
    l_report_id REPORT_OBJECT;
    l_report_status varchar2(200);
    begin
    -- capture the report
    l_report_file := 'pmw41051';
    l_report_id := find_report_object(l_report_file);
    -- set the parameters for this output
    set_report_object_property(l_report_id, REPORT_EXECUTION_MODE, BATCH);
    set_report_object_property(l_report_id, REPORT_COMM_MODE, SYNCHRONOUS);
    set_report_object_property(l_report_id, REPORT_DESTYPE, CACHE);
    set_report_object_property(l_report_id, REPORT_DESFORMAT, 'PDF');
    set_report_object_property(l_report_id, REPORT_SERVER, 'rep_york_vrcmidtier');
    set_report_object_property(l_report_id, REPORT_OTHER, 'PARAMFORM=NO');
    set_report_object_property(l_report_id, REPORT_DESNAME, 'DESNAME');
    -- and run the report
    l_report_status := run_report_object(l_report_id);
    -- monitor progress
    while l_report_status in ('RUNNING', 'OPENING_REPORT', 'ENQUEUED') loop
    l_report_status := report_object_status(l_report_status);
    end loop;
    message('back from the report'); -- test message for return
    end;
    The report executes without error (as indicated by the message on the last line) but does NOT display back to the screen
    checking the rwservlet/showjobs verifies the report completed and the reportcan be displayed from there.
    So, bottom line: how to make a 10g form call report and display it on the screen?

    Thanks MIke for your feedback...
    Will this surfice?
    Procedure Test_Report Is
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    BEGIN
    repid := find_report_object('report5');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'html');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:dept.deptno);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://<YourServerName:8888/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
    ELSE
    message('Error when running report');
    END IF;
    END;

  • Calling workbook from oracle application 11.03

    hi,
    i want to call one report of discoverer from oracle application 11.03 request set.if any one has done this ever or have any idea how should i do this,please reply back.
    thanks in anticipation
    null

    hi,
    this will help u in solving the problem.
    This can be simply achieved via the following steps:
    Add a 'Push Button' to an existing form, where you wish Discoverer to be run from.
    Add a standard 'WHEN_BUTTON_PRESSED' trigger to this button.
    Edit the trigger to insert the HOST command referencing the Discoverer executable(including the full path), plus the command line options you require. An example of this is shown below:
    HOST('C:\ORAWIN95\DISCVR31\DIS31USR.EXE /CONNECT SCOTT/TIGER /OPENDB TESTQUERY1 /SHEET ALL');
    In this example, command line options have been appended to the Discoverer executable to first connect as a specific user, then open a Workbook that has been saved to the database, and then run all the sheets in the workbook. These command line functions are optional and there are others that can be used to perform various functions. For more information on the complete Command Line options available, see Chapter 13, section 13.3, of the Discoverer 3.1 Administration Guide or see the following WebIV Note copy of the same:
    Note.68739.1 - Complete Command Line Options for Discoverer 3.1(Admin & User Edition)
    Other references
    For command line options available with the 3.0.8 release of Discoverer(which were only available for the 'User Edition' in this release), see the following note:
    Note.44841.1 - Command Line Parameters With Discoverer 3.0 User Edition
    bye
    raj

  • How to configure and call Jasperreport from Oracle Forms 10gr2

    Dear All
    Please help me in configuring Jasperreport with Oracle Forms 10gr2 or AS.
    And also tell me how to call a report from Oracle Forms.
    Thanks

    I have a pro*c precompiled program on unix server (unix environment) and I want to execute or running it from oracle forms, release 4.5 on MS Windows.
    how do i execute or running it from oracle forms, release 4.5 ? please tell me what the command (syntaxs) is and all about it ?you can mail me at [email protected]
    thank's

  • Problem calling WebService from Oracle Forms created by JDeveloper

    Hi All,
    I am trying to call a Webservice from Oracle Form using JAVA Class created by Oracle JDeveloper.
    The Java Function (in JDeveloper) is as follows:
    public Vector GetPIValue(String TagName, String ReadingTime) throws Exception
    URL endpointURL = new URL(endpoint);
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    requestBodyEntries.addElement(TagName);
    requestBodyEntries.addElement(ReadingTime);
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.send(endpointURL, "http://tempuri.org/GetPIValue", requestEnv);
    Envelope responseEnv = msg.receiveEnvelope();
    Body responseBody = responseEnv.getBody();
    return responseBody.getBodyEntries();
    When this Class is Imported into Oracle Forms the Function is converted into the following PL/SQL code:
    FUNCTION GetPIValue(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    Message('param passed: '||a0||' - '||a1);
    cls := JNI.GET_CLASS('oracle/forms/demos/webservice/ConnectToPIStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'GetPIValue', '(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    Message('I am Here');
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;
    When I am calling this Function from Within Forms and Passing into it the Parameters, I am displaying some Debugging Messages. When the Code reaches "JNI.CALL_OBJECT_METHOD" there is NO RESPONSE from the Webservice and nothing is moving forward after this Point...
    A similar Webservice that can be Tested is:
    http://www.webservicex.com/CurrencyConvertor.asmx
    with WSDL file:
    http://www.webservicex.com/CurrencyConvertor.asmx?wsdl
    Kindly note that this Webservice is running properly from the Web Browser but the call from Oracle Forms is not Succeeding!!!! :-((
    Any help is much appreciated.
    Regards,
    Baz

    Hi,
    Yes, you need to compile your source files with JDK 1.3 (since JInit 1.3.x.x uses JDK 1.3).
    Other solution would be to use JRE 1.5 (instead of JInitiator).
    Check out [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=550563] on how to use JRE1.5
    -Arun

  • Call APEX from Oracle*Forms

    My first APEX
    I have "built" a APEX-Application to upload and download documents (APEX advanced tutorial).
    It works as a stand-alone-solution.
    Now I want to call this APEX-Form from Oracle*Forms (web.show_document(url))
    I found that I can call a specific Apex-Page by application-id and page-Number.
    But APEX still asks for Username/ Password. And I want to transfer some other parameters to apex.
    The url I could hide. I also think about encryption/ time-stamp mechanism.
    I think there should be a standard-mechanism.
    But now I am in doubt: Is this possible at all?

    hi Scott.
    i actually developed a javabean to communicate with a mikrotik router and it works very nice on Oracle forms 10g !
    but i need to develop an mobile interface for users , so i am using apex to accomplish this task, but i will need to call the javabean from apex.
    thanks

  • Call flash from oracle 10 or 11g

    hello,
    Am using the forms of Oracle fusion middleware.
    plz can anyone help me on how to call a flash(swf) file from oracle 10g.
    thank you in advance.
    regards, jihad

    If its ok for you to run the file outside the forms-window, you could do the following (assuming you use Web-Forms and have configured WEBUTIL)
    CLIENT_HOST('cmd /c start "c:\temp\myfile.swf"');

  • Calling executables from java

    hi guys, I'm looking for a way to calla executable programs from java under unix-like operating systems...
    ..can anyone help me???
    p.s.:I already know a system to make this under windows, but I'm not sure it will work with linux too...

    try {
       Process proc = Runtime.getRuntime().exec(new String[]   {"myprog", "arg1"});
       int res = proc.waitFor();
    catch(IOException e) {
    catch(InterruptedException e) {

  • Call Discoverer from Oracle Applications

    I need to view the discoverer workbooks from Oracle Applications
    menu. Sombody know how?

    We ran into the same issue when we upgraded Disco to 10g (do not recall exact version) about 18 months ago - unfortunately, we are off till the new year and I will not be able to determine what the resolution was until then.
    Pl see if any of these MOS Docs can help -
    788706.1 - Error Unable To Connect To Oracle Applications Database 'afscpgcs' After Cloning An APPS Instance & Changing APPS Passwords
    306235.1 - Launching A BIS Workbook Gives Unable To Connect To Oracle Applications Database (afscpgcs) Error
    459941.1 - Secure Ticket Connection Fails From e-Business Suite
    784358.1 - Connecting to Oracle EBS with Discoverer Fails with ORA-01017 Invalid Username/Password Error
    Try enabling tracing as noted in 370800.1 (How To Create An E-Business Suite Connection Trace For Discoverer 10g (10.1.2) Plus / Viewer) to see if you can find more details about the error.
    HTH
    Srini

Maybe you are looking for