1.提取控制文件
    前提为知道控制文件名称和备份集名称
    启动数据库到nomount阶段。

    1. declare
    2. deviceType varchar2(256);
    3. done boolean;
    4. begin
    5. devicetype:=dbms_backup_restore.deviceAllocate(type=>'',ident=>'t1');
    6. dbms_backup_restore.restoresetDataFile;
    7. dbms_backup_restore.restoreControlFileto('D:\app\Administrator\oradata\orcl\CONTROL01.ctl');
    8. dbms_backup_restore.restoreBackupPiece('D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2019_09_23\O1_MF_NCSNF_TAG20190923T040853_GRHOB034_.BKP',done=>done);
    9. dbms_backup_restore.deviceDeallocate;
    10. end;
    11. /

    2.提取spfile文件

    1. declare
    2. deviceType varchar2(256);
    3. done boolean;
    4. begin
    5. devicetype:=dbms_backup_restore.deviceAllocate(type=>'',ident=>'t1');
    6. dbms_backup_restore.restoresetDataFile;
    7. dbms_backup_restore.restorespfileto('D:\app\Administrator\product\11.2.0\dbhome_1\database\SPFILEORCL.ORA');
    8. dbms_backup_restore.restoreBackupPiece('D:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2019_09_25\O1_MF_NCSN1_ORA_OEM_LEVEL_0_GRNQ24VO_.BKP',done=>done);
    9. dbms_backup_restore.deviceDeallocate;
    10. end;
    11. /