Таких блогов миллиарды, и что бы не рыскать в гугле, и вспоминать как там было, я для себя пишу маленькие комментарии.

понедельник, 10 декабря 2012 г.

Восстанавливаем ORACLE из RMAN

[oracle@isvpdb ~]$ rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Mon Dec 10 17:16:55 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area    1603411968 bytes

Fixed Size                     2226912 bytes
Variable Size                419431712 bytes
Database Buffers            1174405120 bytes
Redo Buffers                   7348224 bytes

RMAN> restore controlfile from '/home/oracle/20121206/cl_WPSBAZA_20121206_cf_D-WPSBAZA_id-3655181439_ians5lhf';


Starting restore at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=156 device type=DISK

channel ORA_DISK_1: copied control file copy
output file name=/u01/app/oracle/oradata/wpsbaza/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/wpsbaza/control02.ctl
Finished restore at 10-DEC-12

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> CATALOG START WITH '/home/oracle/20121206/';


Starting implicit crosscheck backup at 10-DEC-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=156 device type=DISK
Crosschecked 200 objects
Finished implicit crosscheck backup at 10-DEC-12

Starting implicit crosscheck copy at 10-DEC-12
using channel ORA_DISK_1
Crosschecked 400 objects
Finished implicit crosscheck copy at 10-DEC-12

searching for all files in the recovery area
cataloging files...
no files cataloged

searching for all files that match the pattern /home/oracle/20121206/

List of Files Unknown to the Database
=====================================
File Name: /home/oracle/20121206/bk_WPSBAZA_20121206_icns5lk5_1_1
File Name: /home/oracle/20121206/cl_WPSBAZA_20121206_cf_D-WPSBAZA_id-3655181439_ians5lhf
File Name: /home/oracle/20121206/bk_WPSBAZA_20121206_ibns5lhq_1_1
File Name: /home/oracle/20121206/al_WPSBAZA_20121206_idns5lkg_1_1

Do you really want to catalog the above files (enter YES or NO)? yes
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /home/oracle/20121206/bk_WPSBAZA_20121206_icns5lk5_1_1
File Name: /home/oracle/20121206/cl_WPSBAZA_20121206_cf_D-WPSBAZA_id-3655181439_ians5lhf
File Name: /home/oracle/20121206/bk_WPSBAZA_20121206_ibns5lhq_1_1
File Name: /home/oracle/20121206/al_WPSBAZA_20121206_idns5lkg_1_1

RMAN> restore database;

Starting restore at 10-DEC-12
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/wpsbaza/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/wpsbaza/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/wpsbaza/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/wpsbaza/users01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_ICMLFQ32_01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_ICMLNF32_01.dbf
channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_ICMSFQ04_01.dbf
channel ORA_DISK_1: restoring datafile 00008 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_ICMVFQ04_01.dbf
channel ORA_DISK_1: restoring datafile 00009 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_CMBINV04_01.dbf
channel ORA_DISK_1: restoring datafile 00010 to /u01/app/oracle/oradata/wpsbaza/data/wpsbaza_ICMLSNDX_01.dbf
channel ORA_DISK_1: reading from backup piece /home/oracle/20121206/bk_WPSBAZA_20121206_ibns5lhq_1_1
channel ORA_DISK_1: piece handle=/home/oracle/20121206/bk_WPSBAZA_20121206_ibns5lhq_1_1 tag=TAG20121206T064617
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 10-DEC-12

RMAN> recover database;
(зафейлилась)

Starting recover at 10-DEC-12
using channel ORA_DISK_1

starting media recovery

unable to find archived log
archived log thread=1 sequence=1003
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/10/2012 17:23:58
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1003 and starting SCN of 33832035

RMAN> recover database until sequence 1003;
RMAN> alter database open resetlogs;
RMAN> quit;

Комментариев нет:

Отправить комментарий

Примечание. Отправлять комментарии могут только участники этого блога.