Once a day, we issue the following query through cron to see if
RMAN is still running.
select operation,OBJECT_TYPE,ROW_TYPE from $RMAN_STATUS where status='RUNNING' and OPERATION='BACKUP' and OBJECT_TYPE !='ARCHIVELOG';
On some systems, when a full backup is in progress this query sees that a previous instance of RMAN is still running and reports it as
an error when in fact its not because the DB is so big and take a long time to backup.
Is there some table I can query where if I provide a tag for my full backup (ie tag=full_backup) or some other information I can look
to see if that tag is still being backed up. This would be very equivelant to providing a job name to expdp and seeing if that job_name is active
I was considering doing a select count... but that would not work as
we often clone DB's and I beleive this will bring out the same error.
Thanks to all who answer
12-27-2010, 07:34 PM
How do you start this job? DBMS_Scheduler? cron? What platform? I typically use cron and have a script that executes and outputs the results to a log file.
tail -f rman_out.log
ps -ef |grep rman
You can also see RMAN running from the web-based Oracle Enterprise Manager, but doesn't give you a clue as to where it is in the process.
12-28-2010, 08:43 AM
OneDB, thanks for your reply.
As mentioned the job is started through cron on a nightly basis.
I'm not sure how your solution will solve my problem. ps -ef | grep rman will
still find the original RMAN that is running, which is my problem.
Therefore, I am looking for a way to query a table to look for tag that
is being backed up or a way to associate a job name to my rman command. This way I can distinguish the difference.
12-28-2010, 01:13 PM
Originally Posted by BeefStu
...or a way to associate a job name to my rman command. This way I can distinguish the difference.
You can use rman SET COMMAND ID to name your channels - this piece of data will show up on v$session, client_info column.