Trying to create a job in job library
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Trying to create a job in job library

  1. #1
    Join Date
    Jul 2017
    Posts
    1

    Trying to create a job in job library

    Hello All,
    I am trying to create a simple job in OEM 12c job library and I need to pass a parameter for username. username changes and it cannot be fixed value. How do i pass this as a parameter

    WHENEVER SQLERROR EXIT FAILURE;
    select username, account_status from dba_users where username = '&USERNAME';

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,156
    It would help if you explained how you know what username to pass in. When you schedule a job you can pass in parameters, but as far as I know, those parameters are static. You could create a table and populate it with usernames, then have your job read the table and act of every username that is in there. You might want to have a column populated by a sequence, then read the sequence and username into a PL/SQL collection. You would then iterate through the collection acting on each username and deleting the record from the table once you act on it.
    this space intentionally left blank

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