学习oracle技术,每天学一点,每天进步一点
没有控制文件怎么恢复数据库dbms_backup_restore包 英文文档
上一篇 / 下一篇 2008-06-10 09:56:36 / 个人分类:rman备份与恢复
How to extract controlfiles, datafiles, and archived logs fromITPUB个人空间c'd$R_`[$CCA
SMR backupsets without using RMAN
$tDML/G tX0ITPUB个人空间O]"` @7v*{Q[
/_?iD$}KmH0Introduction:
rW!W;N#L?`0ITPUB个人空间 yni(@!FpF
When using RMAN to restore objects (datafiles, controlfiles, or archivelogs)ITPUB个人空间t p sV |a@
from backupsets, the object restore can be driven from the recovery catalogITPUB个人空间y%O1m%k8^1Q5]x(E
or the target database controlfile. This note explains how to extract
,w1z!Zu x}.X0 objects from backupsets when the recovery catalog and controlfiles have beenITPUB个人空间BOL7^^;ch
lost. In this scenario, you effectively perform. the RMAN functions throughITPUB个人空间;k `5l9pF
PL/SQL procedure callsITPUB个人空间v VdY3A,@
ITPUB个人空间*~Cmk(a-v9v's*O u:\
ITPUB个人空间m!m4|0E Zk q
Contents:ITPUB个人空间,E&H)N/Sic.e ?
\o]$g]v7J2?0 1. PrerequisitesITPUB个人空间TXR2N1QOO K
2. Extracting the controlfile from a backupsetITPUB个人空间4f,B!yo'e+w;Y {O+l
3. Extracting datafiles from a backupsetITPUB个人空间-T&?(T+x)R efI
4. Applying incrementals
:i;nh1M2d!`0 5. Extracting archivelogs from a backupsetITPUB个人空间 ^+}}%?2fWx
6. A typical scenario ITPUB个人空间 nCX)I BZ${Ft
7. Errors
Du'{#{Hl'IC0 8. Things to be done
6X1qATB+LBZ%KFw[0
&w h0p/? e {Q-CN;xU0
:zi'o'F:b(e01. PrerequisitesITPUB个人空间4i%t#s{u!A
;Z"^!v weJ%aZ0 The customer must have a knowledge of the contents of backupsets i.e. whatITPUB个人空间6h*](_.q-u!}U
they contain, when the backups were created, and the type of backups. IdeallyITPUB个人空间$vR'h)J_hE"UH
they should have logs of the RMAN backup sessions that produced the
'YbE-{P0 backupsets.ITPUB个人空间zN~'t0SLLZ f
ITPUB个人空间7a?T(m0mHgm2Ox r
Note that the following anonymous PL/SQL blocks are run on the instance of
q g.s{A0 the database being recovered (the 'target'). The instance must be at least
,b0CKe9c HT~-X'}0 started (once the controlfile has been restored the database can also be
"B(h w3qQ0 mounted). Anonymous blocks can be executed in this manner as long as theyITPUB个人空间q A/r8B%i4BWD
call only 'fixed' packages. The DBMS_BACKUP_RESTORE packages are fixed.ITPUB个人空间 A!pmLQ+ut0w v
y$ajX} u6d4U0 IMPORTANT: All the anonymous blocks must be executed by SYS or a user
z%y8Yg&`I@0 who has execute privilege on SYS.DBMS_BACKUP_RESTORE
"`pZPQ7i$zc9\0
(Y/tDln6TdH0
9`:IyR(P D#vt02. Extracting the controlfile from a backupset
3C!AIQ!x0ITPUB个人空间9Um4a OA6?.uP
The first stage is to extract the controlfile from a backupset. This is
%a CM,}vu3M Z0 achieved by making use of the following SYS.DBMS_BACKUP_RESTORE packagedITPUB个人空间Hsmy"[m`)c
functions & procedures:
i ON AW0ITPUB个人空间p/}xp"j+o|f
FUNCTION deviceAllocate - allocates a device for sequential I/OITPUB个人空间zl3Aw-o+]
PROCEDURE restoreSetDataFile - begins a restore conversationITPUB个人空间)Fm3Qh+w f&` `8D
PROCEDURE restoreControlfileTo - specifies the controlfile destinationITPUB个人空间 @/y_;p'r B(`G7Kc+]
PROCEDURE restoreBackupPiece - performs the restore
SMR backupsets without using RMAN
$tDML/G tX0ITPUB个人空间O]"` @7v*{Q[
/_?iD$}KmH0Introduction:
rW!W;N#L?`0ITPUB个人空间 yni(@!FpF
When using RMAN to restore objects (datafiles, controlfiles, or archivelogs)ITPUB个人空间t p sV |a@
from backupsets, the object restore can be driven from the recovery catalogITPUB个人空间y%O1m%k8^1Q5]x(E
or the target database controlfile. This note explains how to extract
,w1z!Zu x}.X0 objects from backupsets when the recovery catalog and controlfiles have beenITPUB个人空间BOL7^^;ch
lost. In this scenario, you effectively perform. the RMAN functions throughITPUB个人空间;k `5l9pF
PL/SQL procedure callsITPUB个人空间v VdY3A,@
ITPUB个人空间*~Cmk(a-v9v's*O u:\
ITPUB个人空间m!m4|0E Zk q
Contents:ITPUB个人空间,E&H)N/Sic.e ?
\o]$g]v7J2?0 1. PrerequisitesITPUB个人空间TXR2N1QOO K
2. Extracting the controlfile from a backupsetITPUB个人空间4f,B!yo'e+w;Y {O+l
3. Extracting datafiles from a backupsetITPUB个人空间-T&?(T+x)R efI
4. Applying incrementals
:i;nh1M2d!`0 5. Extracting archivelogs from a backupsetITPUB个人空间 ^+}}%?2fWx
6. A typical scenario ITPUB个人空间 nCX)I BZ${Ft
7. Errors
Du'{#{Hl'IC0 8. Things to be done
6X1qATB+LBZ%KFw[0
&w h0p/? e {Q-CN;xU0
:zi'o'F:b(e01. PrerequisitesITPUB个人空间4i%t#s{u!A
;Z"^!v weJ%aZ0 The customer must have a knowledge of the contents of backupsets i.e. whatITPUB个人空间6h*](_.q-u!}U
they contain, when the backups were created, and the type of backups. IdeallyITPUB个人空间$vR'h)J_hE"UH
they should have logs of the RMAN backup sessions that produced the
'YbE-{P0 backupsets.ITPUB个人空间zN~'t0SLLZ f
ITPUB个人空间7a?T(m0mHgm2Ox r
Note that the following anonymous PL/SQL blocks are run on the instance of
q g.s{A0 the database being recovered (the 'target'). The instance must be at least
,b0CKe9c HT~-X'}0 started (once the controlfile has been restored the database can also be
"B(h w3qQ0 mounted). Anonymous blocks can be executed in this manner as long as theyITPUB个人空间q A/r8B%i4BWD
call only 'fixed' packages. The DBMS_BACKUP_RESTORE packages are fixed.ITPUB个人空间 A!pmLQ+ut0w v
y$ajX} u6d4U0 IMPORTANT: All the anonymous blocks must be executed by SYS or a user
z%y8Yg&`I@0 who has execute privilege on SYS.DBMS_BACKUP_RESTORE
"`pZPQ7i$zc9\0
(Y/tDln6TdH0
9`:IyR(P D#vt02. Extracting the controlfile from a backupset
3C!AIQ!x0ITPUB个人空间9Um4a OA6?.uP
The first stage is to extract the controlfile from a backupset. This is
%a CM,}vu3M Z0 achieved by making use of the following SYS.DBMS_BACKUP_RESTORE packagedITPUB个人空间Hsmy"[m`)c
functions & procedures:
i ON AW0ITPUB个人空间p/}xp"j+o|f
FUNCTION deviceAllocate - allocates a device for sequential I/OITPUB个人空间zl3Aw-o+]
PROCEDURE restoreSetDataFile - begins a restore conversationITPUB个人空间)Fm3Qh+w f&` `8D
PROCEDURE restoreControlfileTo - specifies the controlfile destinationITPUB个人空间 @/y_;p'r B(`G7Kc+]
PROCEDURE restoreBackupPiece - performs the restore