I have oracle installed on a solaris system. Follwing is the problem we are facing and i couldn't find a good solution anywhere:
We need to execute some commands in oracle to take oracle database backups. For that it is required to be logged in as an oracle user. I want these backups to be automated and the most probable solution is using cron jobs. But the problem is that the oracle command which i want to execute under root login does not executed. Displays an error message for the command, because root does not have access to those commands. Is there a way to execute oracle commands without logging into oracle and without typing in password and simply execute as root. I will need a simple script file to do something like below
<All this is under root, the script file is stored under root>
<there is no prompt for password>
< backup command>
mailx -s "job done"
Does su -oracle -c <backup command> work in this case?