Showing posts with label Post Refresh privs execution after refreshing the environment. Show all posts
Showing posts with label Post Refresh privs execution after refreshing the environment. Show all posts

Monday, 20 July 2020

Post Refresh privs execution after refreshing the environment

ORAENV_ASK=NO
export ORACLE_SID=$1
. oraenv -s
ORAENV_ASK=YES
sqlplus "/as sysdba" <<EOF
set echo on
set head on
set feedback on
set verify on
set time on
CREATE  PROFILE REFRESH_TEMP LIMIT
COMPOSITE_LIMIT             UNLIMITED
SESSIONS_PER_USER           UNLIMITED
CPU_PER_SESSION             UNLIMITED
CPU_PER_CALL                UNLIMITED
LOGICAL_READS_PER_SESSION   UNLIMITED
LOGICAL_READS_PER_CALL      UNLIMITED
IDLE_TIME                   UNLIMITED
CONNECT_TIME                UNLIMITED
PRIVATE_SGA                 UNLIMITED
FAILED_LOGIN_ATTEMPTS       10
PASSWORD_LIFE_TIME          UNLIMITED
PASSWORD_REUSE_TIME         UNLIMITED
PASSWORD_REUSE_MAX          UNLIMITED
PASSWORD_LOCK_TIME          1
PASSWORD_GRACE_TIME         7;
spool user_create.log
@user_create.sql
spool off
spool password.log
@pass_profile.sql
spool off
spool privileges.log
@privs.sql
spool off
drop profile REFRESH_TEMP ;
spool synonyms.log
@synonyms.sql
spool off
exit
EOF

echo " COMPLETED "

Add Data file

 ************************************************** Database status Tablespace Usage ASM Disk Group Usage(RAC) Backup Filesystem Usage Alert...