Wednesday, September 14, 2016

EXPDP Backup scheduling other then oracle user [ACL ,SUDO]

EXPDP Backup scheduling other then oracle user  [username - TESTUSER]

1) Remount filesystem using ACL

update /etc/fstab
mount -o remount,acl /u01/oracle/
mount -o remount,acl /exports/MYDB/

2)  Give the write permission on Directory

setfacl -m u:TESTUSER:rwx /u01/oracle/general/logs/
setfacl -m u:TESTUSER:rwx /exports/MYDB/

3)  Change permission to gzip the file (gzip: *.dmp: Permission denied)

root@Host:/etc/sudoers.d# cat sudoers_TESTUSER
User_Alias TESTUSER=TESTUSER
Defaults:TESTUSER !requiretty
Cmnd_Alias TESTUSER _CMD = /bin/chmod  644 /exports/MYDB/*
TESTUSER ALL=(ALL) NOPASSWD:TESTUSER_CMD