Category Archives: Rman

IBM Tivoli restores using dsmc

As root dsmc or, for more complex configurations, specify an optfile: dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm-ora.opt List backup files: tsm> q backup “/oracle/*” -subdir=yes -inactive Restore: tsm> restore “/oracle/mydb/*” /oracle/ -subdir=yes -pick Note how the second mention of directory path ommits the lowest … Continue reading

Posted in Linux, Rman | Leave a comment

Find delete old files

# Delete files older than 15 minutes find /ORA_DISK/redoarch/ -name ‘arch_*.dbf’ -mmin +15 -delete #Delete files older than 2 days 50 8 * * * find /ORA_DISK/redoarch/ -name ‘arch_*.dbf’ -mtime +2 -delete Old versions of unix find do not have … Continue reading

Posted in Linux, Rman, Scripts | Leave a comment

RAC alter database archivelog

Switch a RAC database into archivelog mode: alter system set log_archive_dest_1=’location=/ORA_DISK/redoarch/arch_’ scope=both sid=’*’ ; alter system set cluster_database=false scope=spfile sid=’mydb1′; srvctl stop database -d mydb startup mount alter database archivelog ; alter system set cluster_database=true scope=spfile sid=’mydb1′; shutdown immediate srvctl … Continue reading

Posted in RAC, Rman | Leave a comment

Tivoli Storage Manager simple restore

Sample restore from command line Tivoli Storage Manager. Run as root. ps -ef | grep dsm #here look to see if ‘optfile’ is set cd /mydir dsmc -optfile=/opt/tivoli/tsm/client/ba/bin/dsm-ora.opt tsm> restore /mydir/*.dbf -inactive -pick tsm> 1 #here choose which file number … Continue reading

Posted in Linux, Rman | Leave a comment

RMAN set until time recover

run { set until time “to_date(’21-OCT-2010 14:45:00′,’DD-MON-YYYY HH24:MI:SS’)”; restore database ; recover database ; alter database open resetlogs ; } (H/t Stefan Knecht)

Posted in Rman | Leave a comment

Data block corruption cleared with alter system flush buffer_cache

So I had: ORA-08103: object no longer exists being reported on SQL affecting one application table. But that table existed ok in dba_tables, could be described ok, and selects restricted to its indexed columns returned data ok. Suspicion was some … Continue reading

Posted in Bugs, Rman | 2 Comments

Data Guard today

Today had noticed that redo logs were not being applied to standby. Checking live database alert log showed errors like:

Posted in Rman | 2 Comments

Clone a database

The below SQL generates a SQL script that can be used to clone a database, putting tablespaces into hot backup mode one at a time. Run it on the source database, and edit the output to specify new target file … Continue reading

Posted in Rman, Scripts | Leave a comment

NID to fix RMAN-20035: invalid high recid

For errors like: RMAN-03014: implicit resync of recovery catalog failed RMAN-06004: ORACLE error from recovery catalog database: RMAN-20035: invalid high recid You can switch the catalog over to a previous incarnation (before an open resetlogs): RMAN> list incarnation of database … Continue reading

Posted in Rman | 1 Comment

rman crosscheck archivelog all

If archived redo logs are (wrongly) deleted/moved/compressed from disk without being backed up, the rman catalog will not know this has happened, and will keep attempting to backup the missing archived redo logs. That will cause rman archived redo log … Continue reading

Posted in Rman, Scripts | 4 Comments