DBMS_JOBS ... static session?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: DBMS_JOBS ... static session?

  1. #1
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448

    Question

    Hello;
    Oracle 8.1.7.3.50-Z/OS

    We have Jobs awaking every 30 seconds; and creating a session. IS ist possible to have only one session without creating always a new one?
    ( Perfomance issue )

    Orca


  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    The simple answer is no. Each job will always spawn a new session. If you absolutely must work in the same session you can simulate this using some code. Basically what you need to do is use a queue:

    http://www.oracle-base.com/Articles/...dQueuing9i.asp

    If your job puts a request onto a queue it can be read from a single session by some code that does something like:

    LOOP
    -- 1) Read from queue with unlimited timeout. This means it will wait forever for a message to appear on the queue.
    -- 2) Do some processing based on contents of the message on the queue.
    END LOOP;

    It's not ideal but it would solve your problem.

    Cheers
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: www.oracle-base.com
    My blog: www.oracle-base.com/blog

  3. #3
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    Hello;
    This seems to be a very good idea!
    Thank you!

    Orca

  4. #4
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by Orca777
    Hello;
    This seems to be a very good idea!
    Thank you!

    Orca
    I haven't see a bad idea from Tim! :-) You can find top quality articles at http://www.oracle-base.com/Articles/9i/Articles9i.asp
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  5. #5
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448
    ok julian : the 'seems' was not against tim, it was against to check if it is possible in the concrete environment/Design.
    But ...
    only THE ONE never failes ... ;-))

    Orca

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