Rem  Copyright (c) Oracle Corporation 2014. All Rights Reserved.
Rem
Rem    NAME
Rem      ords_rem_temp_privs.sql
Rem
Rem    DESCRIPTION
Rem      Removes temporal privileges from Oracle REST Data Services (ORDS_METADATA) user.
Rem      Do not invoke this script directly.  If you are doing a manual installation, use ords_manual_install.sql
Rem
Rem    NOTES
Rem      Assumes user with SYSDBA privilege is connected.
Rem
Rem    Arguments:
Rem      1  : Oracle Rest Data Services (ORDS) owner
Rem
Rem
Rem    MODIFIED   (MM/DD/YYYY)
Rem     josmende   02/25/2015 - Removing temporal privilege needed to create jobs
Rem

set define '^' 
set verify off

define ORDSUSER   = '^1'

whenever sqlerror exit sql.sqlcode

alter session set current_schema = SYS;

prompt INFO: Removing temporal privileges from ORDS owner

--
-- Removing installation temporal privileges
--
revoke create job               from ^ORDSUSER;

prompt INFO: Completed removing temporal privileges
