Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    9

    Thumbs up Unanswered: Want create trigger on v$session

    HI every body I want create trigger on SYS schema ON V$session table to kill session which are not doing any transaction in last 2 hour.

    when i tried to create trigger on v$session it gives error can not create trigger
    on Own by sys schema.

    any body can help me?
    is there any other way to create trigger on v$session in sys shema?


    TIA


    SALIM_DBA

  2. #2
    Join Date
    Jan 2004
    Location
    Hyderabad, India
    Posts
    37
    Hi,

    Its not recommened to create / alter any objects in SYS schema.

    For your case, you can create a profile with idle_time set to 2 hrs and assign it to the users. If you are not sure about the users, then you can change the DEFAULT profile to have this limit. If you change the DEFAULT profile, then it will impact all the users in the database.
    Regards
    Suneel

  3. #3
    Join Date
    Jan 2004
    Posts
    9
    Originally posted by suneel.kumar
    Hi,

    Its not recommened to create / alter any objects in SYS schema.

    For your case, you can create a profile with idle_time set to 2 hrs and assign it to the users. If you are not sure about the users, then you can change the DEFAULT profile to have this limit. If you change the DEFAULT profile, then it will impact all the users in the database.

    Thanks for reply

    for the testing purpose
    i have applied 2 minitue for idle time but it is not doing any thin what exactly it does?
    it is not kiling session for that user.

  4. #4
    Join Date
    Jan 2004
    Location
    Hyderabad, India
    Posts
    37
    Hi,

    Check parameter RESOURCE_LIMIT. It should be false to enforce profile limits to the users. By default this parameter value will be false. So change this parameter dynamically / in init.ora and bounce the database.

    Then create a profile like

    create profile test limit idle_time 2;

    Then assgin it to a user,

    alter user scott profile test;

    now connect to database using scott and execute a query. and then wait for 2 mins.. Session should get disconnect.
    Regards
    Suneel

  5. #5
    Join Date
    Jan 2004
    Posts
    9
    Originally posted by suneel.kumar
    Hi,

    Check parameter RESOURCE_LIMIT. It should be false to enforce profile limits to the users. By default this parameter value will be false. So change this parameter dynamically / in init.ora and bounce the database.

    Then create a profile like

    create profile test limit idle_time 2;

    Then assgin it to a user,

    alter user scott profile test;

    now connect to database using scott and execute a query. and then wait for 2 mins.. Session should get disconnect.

    Thanks my dear
    I got it.

    thamks again
    by take care

Posting Permissions

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