TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Recover Incompleto Com O RMAN

Artigos Científicos: Recover Incompleto Com O RMAN. Pesquise 862.000+ trabalhos acadêmicos

Por:   •  22/3/2014  •  9.816 Palavras (40 Páginas)  •  513 Visualizações

Página 1 de 40

Incomplete Recovery with a BACKUP CONTROLFIE :

RollForward through “future” ArchiveLogs :

Every once in a while we come across questions about Database Recovery posed by new DBAs. Furthermore, DBAs “experienced” with RMAN only might wonder how Oracle can apply ArchiveLogs which are not included in RMAN BackupSets (eg created since the last RMAN backup but yet available on disk) to continue a database recovery as far as possible.

How does the RECOVER command know which ArchiveLog , which SCN generated at which time is required to be applied when rolling forward using a Backup Controlfile ?

Knowledge of ArchiveLogs would be available if you are using a current controlfile or an RMAN Repository (the RMAN Repository still doesn’t know the ArchiveLogs generated after the last backup which updated the repository). What if you have neither ?

The Backup Controlfile could be either of :

a. A binary backup controlfile that was older then the ArchiveLogs, so information about the ArchiveLogs generated after the backup is not available in the controlfile

b. A trace backup from which I run a CREATE CONTROLFILE. This would have no information whatsoever about ArchiveLogs – even of those generated before the trace backup was executed.

There are 3 components to the manner in which the RECOVER command prompts us for the Archive Log files :

1. Log_Archive_Dest

2. Log_Archive_Format

3. Log Sequence Numbers, SCNs, Timestamps

For example, if I restore to another server and use a different directory for the Log_Archive_Dest in the initora/spfileora when I STARTUP MOUNT, the RECOVER command would use this new path to prompt me for the ArchiveLogs to be applied. If my Log_Archive_Format is different, it uses this new format to construct the file names. What about the Sequence,SCN,Timestamp ? We’ll come back to these later.

Here’s how I build my “proof” that the RECOVER command can work without prior knowledge of ArchiveLogs.

{Note : In the RMAN listings the date/timestamp appears in the format “09_FEB_08_23_21_50” because I explicitly set NLS_DATE_FORMAT in the environment when I run RMAN commands}.

SCENARIO A : With a Binary Backup Controlfile

Step 1: I take a backup of the database, using RMAN’s “BACKUP DATABASE”.

This goes, by default, to my db_recovery_file_dest (the FlashRecoveryArea), configured in 10gR2.

Spooling started in log file: RMAN_Backup_of_DB.Log

Recovery Manager10.2.0.1.0

RMAN>

connected to target database: OR10G2DB (DBID=138573118)

RMAN>

Starting backup at 09_FEB_08_23_21_46

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=60 devtype=DISK

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

input datafile fno=00001 name=C:\OR10G2DB\SYSTEM01.DBF

input datafile fno=00003 name=C:\OR10G2DB\SYSAUX01.DBF

input datafile fno=00002 name=C:\OR10G2DB\UNDOTBS01.DBF

input datafile fno=00004 name=C:\OR10G2DB\USERS01.DBF

input datafile fno=00005 name=C:\OR10G2DB\EXAMPLE01.DBF

channel ORA_DISK_1: starting piece 1 at 09_FEB_08_23_21_50

channel ORA_DISK_1: finished piece 1 at 09_FEB_08_23_24_15

piece handle=C:\OR10G2DB_FLASH\OR10G2DB\BACKUPSET\2008_02_09\O1_MF_NNNDF_TAG20080209T232148_3TVK8HRF_.BKP tag=TAG20080209T232148 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:26

Finished backup at 09_FEB_08_23_24_15

Starting Control File and SPFILE Autobackup at 09_FEB_08_23_24_16

piece handle=C:\OR10G2DB_FLASH\OR10G2DB\AUTOBACKUP\2008_02_09\O1_MF_S_646269856_3TVKF1SW_.BKP comment=NONE

Finished Control File and SPFILE Autobackup at 09_FEB_08_23_24_19

RMAN>

Recovery Manager complete.

I also take a separate binary backup of the controlfile.

SQL> set echo on

SQL> alter database backup controlfile to 'C:\ORACLE_EXERCISES\cntrlfile_bak.dbf';

Database altered.

SQL> spool off

Step 2: I run some transactions on the database to ensure that a number of log switches and SCN changes occur.

SQL> set linesize 130

SQL> set pages60

SQL>

SQL> col name format a45

SQL> col First_Time format a19

SQL>

SQL> select to_char(sysdate,'DD-MON-RR HH24:MI') from dual;

TO_CHAR(SYSDATE

---------------

09-FEB-08 23:32

SQL>

SQL> select group#, sequence#, first_change#, status from

...

Baixar como (para membros premium)  txt (37.7 Kb)  
Continuar por mais 39 páginas »
Disponível apenas no TrabalhosGratuitos.com