call scripts sql from a trigger

I use Oracle Data Miner 11 g in Windows 8. I want to create a trigger that will instantiate some sql scripts when it is executed (that is, whenever I try to insert update a record)
Relaxation where will call sql scripts. The whole purpose of this is to make some process when I add tuple in the table. Can someone please help me with the correct syntax for it?
Thank you! ~

I'm doing some data on my set of data mining techniques. I want to run the data mining process every time I add a new tuple (i.e. record) or update.  For the data extraction process, a script is called that makes data mining and stores the result in a table. That's why I came up with a solution to trigger which in my opinion; would be the perfect way to launch the script and perform the tasks of trigger (on the infeed table) too. The goal is to automate the script to data mining.  Here's my clear understanding?

No - your 'understanding' is NOT clear or correct.

1. a trigger runs as PART of a transaction. It was NOT what happens in the trigger and my never be, committed in the database.

2. that means that the session LIKE NO other can see that data and a script will not be able to access these data until it was committed.

3. a trigger and the transaction can be rolled back and restarted several times, or can be rollbacked and terminated without a commit never happening.

4. If all the data your script would be given mine must already exist in the database BEFORE your races and even trigger.

So these scripts must be a completely separate WORK that run AFTER any validation occurs and the data you want to "mine" actually exist.

NONE of this is appropriate to be initialized by a trigger, because as I said above, the relaxing activity may not even engaged.

You must create some PL/SQL (or other) code that controls the steps that must be taken

1 insert/update data - including your stuff to trigger if there is

2 validate this transaction

3 run a DBMS_SCHEDULER job to run if necessary batch files/scripts.

Tags: Database

Similar Questions

  • SQL workshop: Possibility to download scripts SQL from a URL (DropBox)

    Hello
    I'm under Oracle APEX in the Amazon Cloud and access it through an iPad. the iPad (on devices not jail-broken) browsers have not access to local files. Is there a way workshop SQL can access scripts by using a URL such as a SQL pointing to DropBox? Or would that be an enhancement request?

    Thank you

    Bo

    You can build the URL with just the name of the file.

    I think that the Dropbox URL will always be the same (until the name of the file).

    Something like this:

    declare
         u_rl varchar2(100):= 'http://dl.dropbox.com/u/1234/';
         content_clob CLOB;
    begin
         u_rl := u_rl || :P44_FILE_NAME;
         select httpuritype(u_rl).getclob() into content_clob dropbox from dual;
    end;
    

    Published by: taepodong on July 30, 2012 19:22

  • make sure that the procedure, called pl/sql from apex DURATION

    Hi gang,.

    I was wondering what the thoughts of the people where assuring him a packaged procedure is called in a session of runtime Apex, as opposed to sql * more or elsewhere.

    For example, how apex_mail.send to validate and output the following if executed from sql * more:
    ORA-20001: this procedure must be called from a session of the application.

    A simple call to check v ('APP_USER') wouldn't is not null enough?

    See you soon,.

    ScottWE

    Hello

    I think you could use the APEX_CUSTOM_AUTH.IS_SESSION_VALID function
    http://download.Oracle.com/docs/CD/E14373_01/apirefs.32/e13369/apex_auth.htm#BABHDFII

    Example of

    CREATE OR REPLACE PROCEDURE my_procedure(p_poaram1 VARCHAR2)
    AS
    BEGIN
    IF APEX_CUSTOM_AUTH.IS_SESSION_VALID THEN
     -- do stuff here when session is valid
    
    ELSE
     raise_application_error(20001,'Session is not valid');
    END;
    

    BR, Jari

  • A simple way to call PL/SQL from javascript?

    Hello
    I have a page with 2 fields and a button. In both areas, the user put 2 different customer numbers and when they click the button must call a PL/SQL procedure that will merge the customer News #1 in the #2 client.
    I would like to show the user a before confirmation dialog box accepts eventually merge the two clients.

    How can I do?

    Thanks in advance...

    AJAX is fine if you don't need to refresh the page, but if you just need a simple process you can build as simply a page process runs under condition based on a certain application (such as FUSION). Then have your button call the javascript and call doSubmit in it - as follows:

    
    

    You put the code above in the header, and then set the redirect URL on your button to call:

    javascript:merge();
    
  • call a script sql with one parameter of another

    I would like to call a sql script that takes a single parameter (& 1)... but it doesn't.
    It looks like (first.sql):
    begin
    for cv in (select table_name from all_tables where owner='IBIS') loop
            @my_script.sql cv.table_name;
    end loop;
    end;
    but when I run it, I got an error:
    @first.sql;
    old   9: spool &1..cob replace
    new   9: spool cv.table_name.cob replace
    old  10: select '       05 DBUFF-' || '&1' || '-1.' from dual;
    new  10: select '       05 DBUFF-' || 'cv.table_name' || '-1.' from dual;
    old  12: from all_tab_cols where table_name='&1' and substr(column_name,1,3)<>'SYS';
    new  12: from all_tab_cols where table_name='cv.table_name' and substr(column_name,1,3)<>'SYS';
    old  13: select '          05 ' || '&1' || '-ROWID          PIC X(18).' from dual;
    new  13: select '          05 ' || 'cv.table_name' || '-ROWID          PIC X(18).' from dual;
    What is missing?

    Kind regards...

    Hello

    The trick is to generate a sql script with all your calls to internal scripts and their parameters.

    For example, my script is internal countTableIndex.sql :

    select 'Table &1 has got '||count(*)||' indexes.' from user_indexes where table_name='&1';
    

    And here's my script outside coutnIndex.sql :

    set serverout on pages 0 lines 100 feed off time off verify off define on tab off trimspool on trimout on termout on termout off
    spool cmd.sql
    begin
    for cur in (select table_name tab from user_tables) loop
         dbms_output.put_line('@countTableIndexes.sql '||cur.tab);
         null;
    end loop;
    end;
    /
    spool off
    set termout on
    @cmd.sql
    exit;
    

    As you can see, it generates a file cmd.sql containing internal script calls and ultimately calls the script cmd.sql.
    In my example schema scott after the execution, the cmd.sql file contains:

    @countTableIndexes.sql DEPT
    @countTableIndexes.sql EMP
    @countTableIndexes.sql BONUS
    @countTableIndexes.sql SALGRADE
    @countTableIndexes.sql TOTO
    

    Here is the result of my machine:

    [oracle@Nicosa-oel test19_parameterizedSqlScripts]$ sqlplus -s scott/tiger@my11g @countIndex.sql
    Table DEPT has got 1 indexes.
    Table EMP has got 1 indexes.
    Table BONUS has got 0 indexes.
    Table SALGRADE has got 0 indexes.
    Table TOTO has got 0 indexes.
    
  • call PL/SQL procedure from javascript

    Hello!

    How can I call PL/SQL procedure from JavaScript code?


    Thank you!

    Nihad

    Nihad,

    What APEX version do you use? Dynamic actions in 4.0 make is much easier than it was in previous versions of APEX...

    Kind regards
    Dan

  • Calling web services from PL/SQL

    Hello

    We have a requirement where we need to call a WebService from PL/SQL.
    I believe that we have an API of PL/SQL, which allows you to use external web services.

    I was looking for other possible options as to consume the web Service of PL/SQL.

    The one you suggest other options, and what option is best to consume the web service.


    Thank you
    AB

    Hello

    I used the http of the utl package.
    Apart from this you can also use java stored procedure. I haven't used this approach, but I found a blog for the same:

    http://technology.AMIS.nl/Blog/348/consuming-Web-services-from-PLSQL-part-i-using-Java-stored-procedures

    Kind regards

    Ketan

  • How to call a Java method, pl/SQL from within ApEx

    I want to call a Java method, which I intend to use to add members to a collection at the ApEx of another source of data.



    How does one call a Java from ApEx method?



    Thank you

    Gregory


    Hello

    Curious, the link works fine for me.

    Anyway, here is another, a thread on AskTom site that addresses the basic concepts you need-

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:952229840241

    Hope this helps,

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    AWARDS: Don't forget to mark correct or useful posts on the forum, not only for my answers, but for everyone!

  • Call a procedure from javascript

    Hello

    I would like to help on the following please.

    I have a JavaScript in page region 'function and Global Variable declaration ':
    function openUrl(pUrl) {
      window.open(pUrl,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=1024, height=768");
    }
    In the same page one have a number of standard reports. A number of columns in each of these reports sets a link. The binding for all the columns settings are defined as follows:
    Target: URL
    URL: javascript:openUrl('http://#SERVERNAME#:9704/xmlpserver/Publications/Dock_Report.xdo?_xpf=&_xpt=0&_xdo=%2FPublications%2FDock_Report.xdo&_xmode=4&_paramsID_USU=#ID_USU#&_paramsIDCR=#IDCR#&_paramsIDCU=#IDCU#&_xt=DPol_Layout&_xf=pdf&_xautorun=true');
    As you see, the user of the application, click on the link on the column of the report and a popup is generated showing the report. It all works very well.

    My requirement is to call a procedure from the augments that are included in the column link that was clicked by the user of the application.
    #ID_USU#
    #IDCR#
    #IDCU#
    My question is how to achieve this as the url is inside a call to javascript?

    Can I use the Javascritp set in the page to extract the details, and then use javascript to call a procedure?

    Any help, pointers, ideas, everything is welcome.

    Request Express 4.0.2.00.07

    Thank you

    Published by: zooid on 4 April 2013 22:47

    Have you seen this javascript API? http://docs.Oracle.com/CD/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#BGBJHEHG

    It has very convenient function: apex.submit (pOptions);

    Specify the target URL as:

    JavaScript:rowClick('#ID_USU#',_'#IDCRM#',_'#IDCU#');

    Then add a function to your page somewhere:

    function rowClick(idUsu, idcrm idcu){
    
      openUrl(/*url*/);
      apex.submit({request: "SOME_REQUEST_VALUE", set: {Px_ID_USU: idUsu, Px_IDCRM: idcrm, Px_IDCU: idcu}});
    
    }
    

    (Where you have page elements for each of the items that you want to set.

    Then you can have a process of PL/SQL page, under condition of request = expression 1, term 1 = SOME_REQUEST_VALUE

    And do you want to ;-)

  • Calling a procedure from a form of Oracle database

    Hello

    I have a question, we will be calling the procedure from a form of Oracle, and through that we can spend as input values from 1000 to this procedure and that we must return values back to the Oracle form also. Here the damaged take two or more parameters. Please advice.

    To receive the input values, we have the input parameter of the procedure as a type object, so that we can receive several parameter values.

    Thanks and greetings
    Srinivas

    user2626293 wrote:
    Hi François,

    Thanks for your response, please suggest me as to how we can achieve the passage of the parameters that can contain multiple values, by a call to the procedure of the form of the Oracle database

    Hi Srinivas,

    Here is an example of how...

    CREATE OR REPLACE PROCEDURE P_GET_SAL (P_EMPID NUMBER, P_SAL OUT NUMBER)
    
    IS
    
    BEGIN
    
         SELECT SALARY
         INTO P_SAL
         FROM EMPLOYEE
         WHERE EMPLOYEE_ID=P_EMPID;
    
    END;
    
    SQL> VAR G_SAL NUMBER;
    
    SQL> EXEC P_GET_SAL(100,:G_SAL);
    
    PL/SQL procedure successfully completed.
    
    SQL> PRINT G_SAL;
    
     G_SAL
    
    ----------
    
          2300
    

    Hope this helps

    Hamid

    If someone answer is useful or appropriate, please mark accordingly. *

  • Huh?  Or, call a procedure from a dynamic page portlet

    I have a procedure which returns the number of records in a table. Works very well.
    I want to call this procedure from a dynamic page portlet in Oracle portal.
    Here is (close to the) the content of the page:
    < HTML >
    < TITLE > example < /title >
    < ORACLE >
    HTP. P (SCHEMANAME. PROCEDURENAME());
    < / ORACLE >
    < / BODY >
    < / HTML >

    I get an error
    ORA-00900 invalid sql statement.
    Could not be parsed as portal_app - HTP. P (SCHEMANAME. PROCEDURENAME()); WWV-08300
    (The procedure has been granted execute privileges to the public and anonymous.)

    So, it is a FUNCTION and not a PROCEDURE that you are trying to call from a dynamic page? Then try something like the following:

    
    DECLARE
    v_test VARCHAR2(4000);
    BEGIN
    v_test := SCHEMA.FUNCTION();
    htp.p(v_test);
    END;
    
    
  • Call PL SQL in SQL?

    Hi guru,.
    Can we call PL SQL in SQL?
    Thank you
    SQL> create function plsqlfunction return number
      2  as
      3  begin
      4    return 1;
      5  end;
      6  /
    
    Function created.
    
    SQL> select plsqlfunction from dual;
    
    PLSQLFUNCTION
    -------------
                1
    
    1 row selected.
    

    So, Yes.

    But not everything will work. Your code must conform to a level of purity, depending on where you use the service. You can read about them here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28425/pl_sql.htm#sthref187

    Kind regards
    Rob.

  • Call the method from another application

    Then. That is my question. Is it possible to call a method from another application, so I can get some data from this app?

    I know that I could also do this with persistent store, but I would like to do it this way.

    Thank you. I'll try with world events and TIME store.

  • ADF Mobile | call web service from Java. non-reflecting values in the AMX page

    Hi all

    I am using JDEv11124 with ADF Mobile extensions39.62.64.

    My use case is as follows.

    1. my application has 2 Pages a. Login home b.

    2. in the user login Page between user name and click on the "submit" button.

    3. on the homepage I displayed the company they joined.

    4. in the "submit" button is clicked, action defined in the support bean method will be called.

    5. by supporting the action bean method, I'll call the method of the Web Service to validate the entered user name, if the entered user name is valid, that I have to post its company name in the home page.

    6. I am moving back from the web service of datacontrol in Home.amx page

    7. calling web services from Java as follows:

    GenericType = result

    (GenericType) AdfmfJavaUtilities.invokeDataControlMethod ("Comp", null, "getCompany",

    pNames, params,

    PTypes);

    System.out.println ("after the call to the service" + result.getAttributeCount ());

    8. in the Java class, I get the response correctly (as the company designating the username entered as 'SOCIETY'), where when I navigate to the home page, I don't see any results for the method return (name of the company that dropped like OutputText in Home.amx)

    Did I miss something for this. or something more that I need to do to make it work?

    Please suggest.

    Thank you

    Vieira

    Hi all

    I was able to achieve this by executing my method in bean support.

    This code is as follows:

    AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext ();

    MethodExpression me =.

    () AdfmfJavaUtilities.getMethodExpression

    "#{bindings.retreiveLocationInformation.execute}".

    (, Object.class, Class [] {}) new;

    me. Invoke (adfELContext, new Object [] {});

    Thanks to Luc Bors WebLog Luc Bors Weblog: ADF Mobile: implementation of "Pull to refresh" model

    Kind regards

    Vieira

  • Calling a SQL function to send all page

    In an APEX application, is it possible to call a SQL function so that the application be submitted instead of 'action SQL INSERT'. This function takes 2 parameters user entering the page of the application.

    Send page has essentially two text fields and a "submit" button
    Version and Patch Info

    The SQl function has 2 parameters like this, start_new_env (oracleversion IN VARCHAR2, opatchinfo IN CLOB)

    Any help will be much appreciated.

    Thank you

    Published by: Rajesh on November 17, 2009 08:49

    Please mark it as answered and mark it as correct...
    Thank you

Maybe you are looking for

  • Why does my toolbar on the bottom suddenly disappear all the time?

    The inferior plate which has all my other applications stay in place. My browser is not set to mode full screen. They tend to stay on the bottom.

  • HP 10bII +: wrong number of displayed digits

    If you want your 10bII + to display two digits for example, and you want to calculate the following: 1.1234 [/] 100 [=] You expect the answer displayed to be: 0.01 because you set your 10bII + to display two digits. But in fact the 10bII + poster 0.0

  • How can I create a new power scheme?

    I managed to remove the default power scheme in power options, now there is no option to create a new. A last I got still works, but I have no way to change the settings. The drop-down list for the power management shows an empty box of blue, but wil

  • LaserJet 2100TN: Laserjet 2100n - failed to get the status of the printer

    You just bought a few new computers Mac - one is a Macbook Air running Yosemite and one is a trash Pro Mac also running Yosemite. I installed the printer laserjet 2100 on the Macbook Air with no problems. BUT, when I installed the same printer on my

  • Unable to display .jpg or .pdf files

    Problem with images of Microsoft When I try to open a .jpg or .pdf file - is no longer able to do this.  I just get a screen that shows all the photos I recently looked online.  How can I fix?  I have Windows Vista as operating system.