SET ECHO OFF
SET AUTOCOMMIT OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET TERMOUT OFF
SET TRIMSPOOL OFF
SET SHOW OFF


-- ESR CR 7885 Cleanup script.
-- Update user permission's active date to 04/15/2008
-- Update user permission's new active date to 03/28/2008

SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.put_line (' ');
   DBMS_OUTPUT.put_line ('ESR CR 7885 Update user permissions active date to 03-28-2009.');
   DBMS_OUTPUT.put_line (' ');
END;
/
SET TERMOUT OFF

update USER_PERMISSIONS set
    ACTIVE_DATE = to_date('03282009', 'mmddyyyy'),
    RECORD_MODIFIED_DATE = sysdate,
    RECORD_MODIFIED_BY = 'APII-UpdateUserPermission',
    RECORD_MODIFIED_COUNT = RECORD_MODIFIED_COUNT + 1
   where PERMISSION_TYPE_ID in (1615351, 1615352)
   and ACTIVE_DATE > to_date('11012008', 'mmddyyyy');
      
SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Updated active dates of user permissions to 03-28-2009');
END;
/
SET TERMOUT OFF

SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Calling uow.sql &1');
END;
/
SET TERMOUT OFF
@@uow.sql &1

SET TERMOUT ON
BEGIN
   DBMS_OUTPUT.PUT_LINE('Done.');
END;
/
SET TERMOUT OFF
-- Reset environment parameters
SET FEEDBACK ON
SET VERIFY ON
SET TERMOUT ON
