Home » RDBMS Server » Backup & Recovery » RMAN - delete expired archivelog
RMAN - delete expired archivelog [message #265087] Wed, 05 September 2007 07:00 Go to next message
orant1
Messages: 28
Registered: June 2005
Junior Member
Hello,

My shell script looks like this :

. $HOME/.profile
export ORACLE_SID=<your SID>
rman target sys/password nocatalog << EOF
crosscheck archivelog all;
delete expired archivelog all;
Yes
..
..

How should I create script if sometimes ask me 'Do you really want to delete ... (YES is needed)' and sometimes there is nothing to delete (YES is not needed)?


Thanks
Re: RMAN - delete expired archivelog [message #265111 is a reply to message #265087] Wed, 05 September 2007 08:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68652
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
add "noprompt" to the command then it will not ask you.

Regards
Michel
Re: RMAN - delete expired archivelog [message #265135 is a reply to message #265087] Wed, 05 September 2007 08:55 Go to previous messageGo to next message
orant1
Messages: 28
Registered: June 2005
Junior Member
I think that "nopromt" is not a solution.

If there is nothink to delete this command is redundant and I get error in log "RMAN-01008: the bad identifier was: Y".

This command should only be used in case if there is something to delete, because only in that case ask me 'Do you really want to delete...!
Re: RMAN - delete expired archivelog [message #265139 is a reply to message #265135] Wed, 05 September 2007 09:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68652
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why "noprompt" is not a solution?
RMAN> delete expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=137 devtype=DISK
specification does not match any archive log in the recovery catalog

RMAN> delete noprompt expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=137 devtype=DISK
specification does not match any archive log in the recovery catalog

Regards
Michel
Re: RMAN - delete expired archivelog [message #265141 is a reply to message #265087] Wed, 05 September 2007 09:26 Go to previous message
orant1
Messages: 28
Registered: June 2005
Junior Member
it works, thank you.
Previous Topic: Problem with RMAN and TAPE on AIX
Next Topic: RMAN and SYSOPER
Goto Forum:
  


Current Time: Fri May 17 04:06:37 CDT 2024