DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Didn't get information from the LAPTOP

  1. #1
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    25

    Didn't get information from the LAPTOP

    Hi,

    I am using the AFTER LOGON ON DATABASE Trigger in order to get the Users information.
    But When I query the Table “client_history” from my LAPTOP. I didn’t get any information from the “client_history” table.

    I like to say that, my client is on the Laptop and
    the Server too.

    However when I connect to Server via my PC (normal client server connection), I got the data via query the table.

    I am using 8.1.7 version.
    Could some one explain why I didn’t get the rows from laptop?

    Regards

    Chuck






    CREATE OR REPLACE PROCEDURE Login

    as

    v_client varchar2(40);
    v_ausid number;


    BEGIN



    select SYS_CONTEXT('USERENV', 'OS_USER') into v_client from dual;

    select SYS_CONTEXT('USERENV','SESSIONID') into v_ausid from dual;


    INSERT INTO client_history (hclient,hausid,)
    VALUES
    (v_client,v_ausid);

    commit;

    END Login;

    /




    CREATE OR REPLACE TRIGGER logintrig
    AFTER LOGON ON DATABASE
    CALL login

    /

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Why the two-step process? Just create the after_logon trigger as AFTER LOGON TO DATABASE. Absolutely no need to use a procedure.

  3. #3
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    25
    hi Stecall,

    Please read the problem again.I think you didn't understand what I am asking.

    Thanks

    Chuck

  4. #4
    Join Date
    Dec 2000
    Posts
    138
    What stecal says is right. Why the two step process of creating a procedure and then call it from a trigger.

    BTW why do you need a commit?
    Remove the commit and it will work.

    HTH
    -dharma

  5. #5
    Join Date
    Mar 2004
    Location
    INDIA
    Posts
    25

    logging into the wrong database .

    Hi Stecal & Every One,

    with regards to my earlier post,I like to say
    Is that possible that I am logging into the wrong database via Laptop(Oracle server & client on the same LAPTOP)that's why I am not getting rows from Laptop?
    However I am getting rows from PC(Oracle server & client on the same machine).
    I am not sure about it.

    Regards

    Chuck

  6. #6
    Join Date
    Aug 2002
    Location
    Bangalore, India
    Posts
    405
    which tool you are using to connect from laptop to database???
    -nagarjuna

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width