set serveroutput on declare v_bulk_errors EXCEPTION; errorCount NUMBER; errorCount1 NUMBER ; CURSOR R_STATUS_DATA IS SELECT SCH.SCH_key --,mil.mil_name, usr.usr_key,usr.usr_login FROM SCH , OSI osi, MIL, STA, TOS,PKG, usr,orc WHERE SCH.SCH_KEY =OSI.SCH_KEY AND OSI.MIL_KEY =MIL.MIL_KEY AND SCH.SCH_STATUS =STA.STA_STATUS AND PKG.PKG_KEY = OSI.PKG_KEY AND MIL.TOS_KEY =TOS.TOS_KEY AND PKG.PKG_KEY =TOS.PKG_KEY and osi.orc_key=orc.orc_key and orc.usr_key=usr.usr_key AND PKG.PKG_TYPE = 'Provisioning' AND STA.STA_BUCKET = 'Rejected' AND TO_CHAR(SCH.SCH_CREATE, 'YYYYMMDD') <= '20160406' AND MIL.MIL_NAME= '?' order by SCH.SCH_key; TYPE R_statusArray IS TABLE OF R_STATUS_DATA%ROWTYPE; v_R_statusObject R_statusArray; begin OPEN R_STATUS_DATA; LOOP FETCH R_STATUS_DATA BULK COLLECT INTO v_R_statusObject; EXIT WHEN R_STATUS_DATA%NOTFOUND; end loop; CLOSE R_STATUS_DATA; dbms_output.put_line(' Count -> '||v_R_statusObject.COUNT ) ; FORALL i IN v_R_statusObject.FIRST..v_R_statusObject.LAST SAVE EXCEPTIONS update sch set sch_status='C',sch_update=sysdate,sch_note='Manual Update from Staus R -> C' where sch_status='R' and sch_key=v_R_statusObject(i).sch_key; COMMIT; dbms_output.put_line('Successful Completion' ); EXCEPTION WHEN v_bulk_errors THEN errorCount := SQL%BULK_EXCEPTIONS.COUNT; DBMS_OUTPUT.PUT_LINE('Number of UPDATE statements that failed : ' || errorCount); ROLLBACK; FOR i IN 1..errorCount LOOP errorCount1:= SQL%BULK_EXCEPTIONS(i).ERROR_INDEX; DBMS_OUTPUT.PUT_LINE('Error #' || i || ' Exception occurred during Updating Index #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX ); DBMS_OUTPUT.PUT_LINE('Error message is ' || SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE) ); END LOOP; end; /
Oracle Identity Manager (OIM R2PS2/PS3/12C) is a highly flexible and scalable enterprise identity administration system that provides operational and business efficiency by providing centralized administration & complete automation of identity and user provisioning events across enterprise as well as extranet applications.
SQL Query to Update SCH table / Manual Update for Provisioning Statuses.
Subscribe to:
Posts (Atom)
About OIM
Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...
Popular Posts
-
OIM API's Sample Code : Videos: Massive Gaze Videos Connection Related API's : OIM DB Connection/ Data Source connection ...
-
Videos: Massive Gaze Videos 1. Basic OIM Information 2. MDS Export/Import 3. Steps For R2PS2 / R2PS3 Custom Pre-processor Ev...
-
Videos: Massive Gaze Videos 1. Query to get OIM Provsioned/provisioning Account details 2. Query to get usr keys For Rejected / ...
No comments:
Post a Comment