Execute trigger on login.

Hi,
I need to execute a trigger on login and logout of apex application. Is it possible?
thanks..

Possible, but fraught with errors on logout.. How do you handle a crash in application? User closes browser WITHOUT logging out of your application? Also instead of trigger you could have a process in the login process that does what you need..
Can you explain further what you need/hope to accomplish?
Thank you,
Tony Miller
Dallas, TX

Similar Messages

  • Execute trigger

    Gurus,
    I have a problem .. I have three push buttons in my form ...
    Now I want to write Execute trigger(when button pressed) in my when new block instance ...since I am having 3 push buttons .. and since I have to execute when button pressed for push_button45, how can I achieve this ??
    Regards

    If I understood you correctly, according to your post, you need to execute the WHEN-BUTTON-PRESSED trigger of your push_button45 from your WHEN-NEW-BLOCK-INSTANCE trigger.
    If that's the case then you need to use go item to execute the trigger that relies under a specific item, if you want to execute push_button45's WHEN-BUTTON-PRESSED trigger you need to have the below code in your procedure.
    GO_ITEM('push_button45");
    EXECUTE_TRIGGER('WHEN-BUTTON-PRESSED');{code}
    Tony                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can i execute trigger from procedure

    Hi
    How can i execute trigger when-button-pressed from procedure.
    I knew i have to get the button name and then execute the trigger When-button-pressed.
    but how can i do that.
    Thanks
    null

    how can i execute trigger
    such as When-Button-Pressed on item name "item1"
    and i have more than one trigger with this name on onther
    items
    i know Execute_Trigger('when-button-pressed');
    but any trigger
    for example :
    Execute_Trigger('Item1.when-button-pressed');
    or
    Execute_Trigger('Item2.when-button-pressed');
    or
    other syntax
    i dont know
    please help me
    my email : [email protected]
    Hani

  • Error when executing trigger

    Hi,
    I have written the following trigger:
    create or replace trigger check_pilot_ff
    before insert or update on flight
    for each row
    declare
      ff_date_pilot DATE;
      ff_date_copilot DATE;
      deptdate DATE;
    begin
      select ff_test into ff_date_pilot from pilot where pilot.empno = :new.pilotid;
      select ff_test into ff_date_copilot from pilot where pilot.empno = :new.copilotid;
      deptdate := :new.departuredate;
      if((deptdate-ff_date_pilot)>365) then
         RAISE_APPLICATION_ERROR(-20002, 'The pilot is not fit');
      end if;
      if((deptdate-ff_date_copilot)>365) then
         RAISE_APPLICATION_ERROR(-20003, 'The copilot is not fit');
      end if;
    end;Whenever, I execute a insert statement I get the following error message. I know that the error 20002 is the one that I "throw" when something invalid is entered but what are the other errors?
    ERROR at line 1:
    ORA-20002: The pilot is not fit
    ORA-06512: at "DBCWK.CHECK_PILOT_FF", line 13
    ORA-04088: error during execution of trigger 'DBCWK.CHECK_PILOT_FF'
    How can I fix this problem?
    thanks for the help.

    user5205421 wrote:
    ... Whenever, I execute a insert statement I get the following error message. I know that the error 20002 is the one that I "throw" when something invalid is entered but what are the other errors?
    ERROR at line 1:
    ORA-20002: The pilot is not fit
    ORA-06512: at "DBCWK.CHECK_PILOT_FF", line 13
    ORA-04088: error during execution of trigger 'DBCWK.CHECK_PILOT_FF'
    How can I fix this problem?Hi,
    Fix what problem? Do you want ORA-02002 to appear by itself, without the other errors?
    Error messages are explained in the [Error Messages reference|http://download.oracle.com/docs/cd/B28359_01/server.111/b28278/toc.htm]. The manual often has suggestions for how to solve problems.
    If you still have have a question, say what you need that the manual doesn't provide.

  • How to execute query after login?

    Hi Gurus,
    I'm developing nowadays a small system,that shows every employee his data( attendance time,vacations,execuses..etc),I just want to execute query (pop up data) once the employee logged in,as I get his login name and sysdate and execute the query.
    how could this happen? do I need a process ? what is it?
    How to get the system date?
    thanks in advance
    Pardon me,am just new here and still my terms for Developer 2000.

    You can do it with a process (call it onload) or with a simple sql query mapped to a region in the home page of your application.
    hope this helps

  • Executing  trigger in multiuser enviroment

    i have a table rent
    desc rent
    rent_no
    rent_type
    and i wrote the following trigger
    create trigger test before insert on rent
    for each row
    begin
    select max(active) from status;
    end;
    my question is ,can two users execute the above trigger at the same time??

    The syntax remark - your trigger won't work, you should define the variable
    and use INTO clause:
    create trigger test before insert on rent
    for each row
    declare
    maxv number;
    begin
    select max(active) into maxv from status;
    end;
    The question is why you need such thing in the trigger ?
    This sort of statements can cause the problems in the multi-user environment
    as far as one transaction doesn't see changes of others before they are committed.
    See example below:
    SQL> create table t (id number);
    Table created.
    SQL> create table t1 (id number);
    Table created.
    SQL> create or replace trigger tr_ins
      2  before insert
      3  on t1
      4  for each row
      5  begin
      6   select max(id) into :new.id from t;
      7   update t set id = id + 1;
      8  end;
      9  /
    Trigger created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.Now the first user inserts into t1:
    SQL> insert into t1 values(null);
    1 row created.The second user is doing the same and waiting for the first user transaction commitment. After commit it has:
    SQL> insert into t1 values(null);
    insert into t1 values(null)
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.PK_01) violatedThe second used had not seen the changes made by the first one.
    Rgds..

  • Unable to execute trigger

    I have a trigger written such that data of 2 columns are inserted on table a once other data in other columnsare inserted on the same table, i.e, table a.
    The trigger was firing perfectly all these days. Now all of a sudden I get an error message saying "unique constraint violated".
    If I import the data from this table a and then export the data back to table a, the trigger works fine. But this is not possible, since data is being inserted continuously into this table.
    I need a solution other than import/export of data and the reason as to why the trigger is not firing correctly and why does it fire when I import/export the data.

    Hi,
    could u pls send me the script of ur trigger and ur table structure. would be better if u send it to [email protected] as i'm not a frequent user of this site.
    -Vignesh-

  • [SOLVED] Execute script after login

    Hi,
    I want to execute a script after I logged in, but it fails. There is no problem, when I do this manually.
    My ~/.xsession:
    #!/bin/sh
    ~/bin/select-monitor.sh
    I tried to paste this in .xinitrc, also, but it fails, too.
    What can I do?
    EDIT: Okay, this has solved my problem:
    http://i3wm.org/docs/userguide.html#_au … i3_startup
    Greets
    Steffo
    Last edited by Steffo (2013-01-19 10:52:29)

    /etc/pam.d/common-auth exists only to be included in other, service-specific PAM files, so one can easily change auth mechanisms for all/majority services at once. You don't have it, so probably you have fully separate PAM files, without common include; so you should just apply those common-auth advices to all services you are going to modify. As always with PAM -- BE CAUTIOUS. Especially if your machine sits a few hundred km away

  • How do I use VISA to perform GET (Group Execute Trigger) to three DMMs?

    Hi,
    My systems have about 4 GPIB instruments connecting to my computer via Agilent GPIB-USB Interface card.  I have to use VISA to communicate with the interface and instrument.  I wish I can use NI488,.2 but it does not seem to work with Agilent card.  In NI488.2, I could easily send a command such as X? (to read value from Agilent 3458A) to 3 DMMS at once using sendlist module.  However, I do not know how to do similar parallel poll in VISA.  Can anyone help?  There are three FLUKE8505A on the system.  My goal is to read the three measured values triggered  simultaneously on these three FLUKE DMMs. 
    Sincerely yours,
    Rose

    Hi Rose,
    The How Do I See My Agilent 82357A GPIB-USB Interface in MAX/LabVIEW? knowledgebase article explains how to use an Agilent USB-GPIB with NI-VISA. Using the NI-VISA driver will require you install the Agilent I/O Libraries 14.0 and uninstall the Agilent VISA driver.  Once you get your Agilent GPIB-USB device recognized in MAX, you should be able to control the instruments using LabVIEW. 
    Regards,
    Andy L.
    Applications Engineer
    National Instruments

  • WHEN-NEW-FORM-INSTANCE trigger does not fire

    Hi,
    Does anyone have any idea why code placed in the when-new-form-instance trigger appears to be ignored when the form is executed from one login but runs fine when executed from another? A breakpoint on the first executable line of code in the trigger confirms that the trigger is not being fired.
    Regards,
    Ian Dodds.

    Hi again Duncan,
    I was able to solve it once I ran the form with the Forms Runtime Diagnostics enabled. I had a table in my schema containing old data used to build menu items. This was causing runtime errors to occur during calls to SET_MENU_ITEM_PROPERTY that were not being propagated to the UI so I didn't know they were occuring.
    The upshot was that the WHEN-NEW-FORM-INSTANCE trigger was not firing. Once I corrected the data it worked a treat.
    Thanks very much for pointing me towards FRD, it's the first time I've used it but it won't be the last.
    Cheers,
    Ian.

  • Use of "DBA_OBJECTS" in "AFTER CREATE" Trigger

    Hi,
    We would like to store some extra information about our objects we have in the database. To do so we tought of the idea of creating a 'documenting' table containing an object_id that references to the object_id from the view dba_views.
    Now we want to automatically create a new record in our documenting table when a new object is created, in the first stage this should only contain the object_id
    To accomplish this we are using an 'AFTER CREATE' trigger, but when this trigger fires and the code searches for the new object_id in dba_objects, it does not return any records and generates an error. Likely because when the trigger is executed, the view is not yet updated?
    create or replace
    TRIGGER TRG_TEST
    AFTER CREATE ON SCOTT.SCHEMA
    DECLARE
    tmp VARCHAR2(50);
    BEGIN
    dbms_output.put_line(ora_dict_obj_name);
    select object_id
    into tmp
    from dba_objects
    where object_name = ora_dict_obj_name;
    dbms_output.put_line(tmp);
    END;
    Error report:
    ORA-04088: Fout bij uitvoering van trigger 'SCOTT.TRG_TEST'.
    ORA-01403: Geen gegevens gevonden.
    ORA-06512: in regel 6
    04088. 00000 - "error during execution of trigger '%s.%s'"
    *Cause:    A runtime error occurred during execution of a trigger.
    *Action:   Check the triggers which were involved in the operation.
    It's in dutch, so I'll have a go at translating:
    Error report:
    ORA-04088: Exception while executing trigger 'SCOTT.TRG_TEST'.
    ORA-01403: No data found
    ORA-06512: in rule 6
    04088. 00000 - "error during execution of trigger '%s.%s'"
    *Cause:    A runtime error occurred during execution of a trigger.
    *Action:   Check the triggers which were involved in the operation.
    Does anyone have an idea of how I can accomplish what I'm trying to do here.. Or maybe something I'm doing wrong?
    Thanks in advance!
    Davy

    What is "ora_dict_obj_name" defined as?
    Another option might be to setup a DBMS_SCHEDULER job to run the following insert
    firstly though, create the following table ;
    create document_table as (select * from dba_objects where rownum < 1)and then setup a DBMS_SCHEDULER job to run the following:
    begin
      insert into document_table
      (select dbo.*
       from   dba_objects    dbo
             ,document_Table dtb
       where  dbo.Object_ID = dtb.Object_ID(+)
       and    dtb.Object_ID is null);
       commit;
       exception
        when others then
          rollback;
          -- log a message somewhere with the error, i.e. SQLERRM
    end;
    /Note, I specified all columns, but you'll probably specify explicitly which column you require, in which case the CREATE table would change as well.
    Then you won't have a need for any trigger, and can better manage when you want your documentation to be updated.
    Another option might be to use COMMENT, which can be used on tables, views, materialized views, but won't cover all objects
    to the extent you might want.
    SQL> desc emp2
    Name                                                                                                  
    EMPNO                                                                                                 
    JOB                                                                                                   
    START_DATE                                                                                            
    SAL                                                                                                   
    DEPT                                                                                                  
    END_DATE                                                                                              
    SQL> comment on column emp2.sal is 'Existing Salary of employee as paid at most recent month end';

  • Error -- No Such Trigger('when-button-pressed')

    Hi,
    I am getting the error ""No Such Trigger('when-button-pressed')"",
    when I am executing the code EXECUTE_TRIGGER( 'WHEN-BUTTON-PRESSED' );
    on some item(Key-Next-Item), although WHEN-BUTTON-PRESSED trigger exists.
    What could be the problem ?. It worked till yesterday, giving error from today, I havent
    changed any thing.
    Thanks in Advance
    Devender

    Steve's tip is the only good solution for this case.
    The problem in your case for example is:
    Let's say you have a block-trigger, which fires after your execute-trigger.
    Now a colleague of you, which don't know your code, create a WHEN-BUTTON-PRESSED on an item, then the new code is started and not the block-trigger-code.
    So, don't ever do this. Write your code in a package-function or -procedure and call it from the trigger. So you can re-user the functionality
    Gerd

  • How can I trigger an event from an ABAP Program

    Hi everyone,
    I have a requirement, where I have to create an ABAP program, that has to execute (trigger) an event which belongs to a Process Chain. when I run the program, the Process Chain has to run.
    So, how can I do it?
    Thanks for your help, Federico

    HI ,
    The program can call function module BP_EVENT_RAISE to raise the event. you can create vent in sm64 and sm62 .There you give the parameter of the event same as what you will define in the event of start variant of your process chian ..
    Regards,
    shikha

  • Regarding Procedure & Trigger (Plz Some one Help me... Its Urgent)

    HI,
    I think its a Big Message........ I dont know How many Will have patience in reading this...... Sorry for this Inconvience........
    Iam having 4 tables:
    3 Input table and 1 target table.
    LOgic: Want to Load in the Target table From the input table Based on Some Criteria
    Input Tables:
    Table 1:Tbl_A
    It has ID and Name
    TBL_A
    Ex: ID Name
    201 Anu
    202 Banu
    203 Chitra
    Table 2: Tbl_B
    It has Name and Id
    (The record of Column Name in this table should Contain the same Names of Tbl_A and id should be different from Table a)
    TBl_B:
    ID NAME
    501 Anu
    502 Banu
    503 Chitra
    Table 3: TBL_C
    (It is independent on both Tbl_A and Tbl_b)
    it has this Static records as Follows:
    TBL_C
    ID NAME
    1 A
    2 P
    Output Table:
    TBL_Target: ( It has 3 columns): ID,Source id, and Identifier
    ID SRC_ID IDENTIFIER
    LOgic:
    For Loading data into Target tbl :TBL_Target
    1. Procedure should have 'Name' of TBL_C as input parameter. So input will be
    'A' or 'P'
    *Based on the input Name from TBL_C  the corresponding ID should be taken   
    from TBL_C and inserted into the ID Column of TBL_Target
    EX: IF 'A' Then 1 Should be inserted . IF P means 2 should be inserted
    2. we have to select the IDs from TBL_A and TBL_B based on Their Names as Join condition and insert the ID of TBL_A into IDENTIFIER Column of TBL_Target
    and insert the ID of TBL_B into SRC_ID Column of TBL_Target
    (Note: Actually We have to get the ID'S of all the rows from TBL_A and TBL_B based on their join Condition and load into Target table)
    Out PUt: ( if the input of Procedure is 'A')
    TBL_Target
    ID SRC_ID IDENTIFIER
    1 501 201
    1 502 202
    1 503 203
    Out PUt: ( if the input of Procedure is 'P')
    TBL_Target
    ID SRC_ID IDENTIFIER
    2 501 201
    2 502 202
    2 503 203
    LOgic2:
    I want to Write a Trigger So that Whenever Iam Inserting New Records in TBL_A
    the Trigger should Call the Procedure We have Created
    Thanks......

    Hi,
    I created a Trigger based on After inserting.....
    I called the Procedure inside the Trigger.....
    Trigger is created. But While executing the trigger it Throws an error: Table is Mutating .Trigger or Function May not see it.
    This is the procedure Created:
    CREATE OR REPLACE PROCEDURE Proc_Load (Tblc_Name in Varchar2)
    AS
    -- VARIABLE AND CURSOR DECLARATION:
    V_name Varchar2(100);
    V_id_c number;
    V_id_a number;
    V_id_b number;
    CURSOR cur_name IS SELECT a.id,b.id
    FROM tbl_a a,tbl_b b WHERE TRIM(a.name)=TRIM(b.name);
    begin
    V_name:=Tblc_name;
    SELECT id INTO V_id_c FROM Tbl_c WHERE name=V_name;
    OPEN Cur_name;
    LOOP
    FETCH cur_name INTO V_id_a,V_id_b;
    INSERT INTO tbl_target VALUES (V_id_c,V_id_b,V_id_a);
    COMMIT;
    EXIT WHEN (cur_name %NOTFOUND);
    END LOOP;
    CLOSE Cur_name;
    END;
    Trigger Created:
    CREATE OR REPLACE TRIGGER Trig_name
    AFTER INSERT ON TBL_A
    FOR EACH ROW
    BEGIN
    Proc_Load ('A');
    END;
    If iam Executing trigger Error OCcurs Table is Mutating .Trigger or Function May not see it.
    How to solve it?

  • Username availability in post-login application processes

    Hi there,
    I have a problem with a post-login application procedure that sets session variables. Some of the variables are based on the username of the user that is logging in. I'm using the function htmldb_custom_auth.get_username to return the username. However, it always reports 'nobody' as the username.
    Is there a way to get the username of the logged-in user in a post-login application procedure?
    Robert

    By "post-login application procedure," I mean an application process whose "Process Point" property is set to "On New Session: After Authentication".That firing point means once per session at the point during the rendering of the requested page after the step where the user identity (if any) has been determined. If the first page requested is a public page (which might be the login page specified by your authentication scheme) then the user identity has not yet been established and will be null, 'nobody', 'APEX_PUBLIC_USER', 'ANONYMOUS', or perhaps some other public user name, depending on "how your application works".
    You should put code like I think you have in this process into the authentication scheme's Post-Authentication Process. This block will be executed after the login API has processed the login request and after a session has been created and registered with the authenticated username.
    I'm not sure what you're asking about how my application works.I was looking for a technical description of what you intend to happen in the scenario, e.g., User starts browser -> user requests URL like f?p=100:1, -> user sees login page which is page number 101 in application 100 and is specified as the Session Not Valid Page in the application's authentication scheme -> user enters username and password and presses Login button -> On New Session process should fire after login page is submitted and capture authentication username -> etc.
    Scott

Maybe you are looking for

  • How do I move photos to my External HD

    My iPhoto library has grown to 12,000+ pictures. I bought a 1TB External HD (MyBook) and have backed up my computer with Time Machine. What's the best way for me to move some of my pictures to the External HD in order to save some space on my interna

  • NB305-N440BL getting 0a-0224-0000 file transfer error message using USB Thumbdrive

    Doing total out of the box restore. First off, Toshiba, in their infinite wisdom sends a DVD Rom to you when you order a Recovery Media for a Netbook which has NO DVDROM.  I had to replace the HD after an accident and it is unreadable as a harddrive

  • Zen Vision:M Questi

    Did creative announce that they will release ZVM's with bigger hard dri'ves?and?Is it possible to manually upgrade the harddri've in the 30GB ZVM?

  • How to change the format in shipping point

    Hiii.. When we define shipping point, how to change the format from hours to days for entering loading time & pick pack time. Regards, Jay

  • Link between IT0014 and IT0015

    Hi,    i created one wage type in IT0015 with amount 5000$, So that 5000$ payment made to associate. Now the same i want to recovery as 500$ in 10 installments through IT0014. Can u pls help me how will create the link between IT0014 and IT0015 for t