• [bbk5248] 第118集 第15章 数据库复制 02


    复制数据库两种方式:

    • 采用命令行方式
    • 采用OEM方式

    Ensuring That Backups and Archived Redo Log Files Are Available

    • Backups of all target database files must be accessible on the duplicate host.
    • Backups can be a combination of full and incremental backups.
    • Archived redo log files needed to recover the duplicate database must be accessible on the duplicate host.
    • Archived redo log files can be:
      • Backups on a media manager
      • Image copies
      • Actual archived redo log files

    Allocating Auxiliary Channels

    • Auxiliary channels specify a connection between RMAN and an auxiliary database instance.
    • If automatic channels are not configured,allocate auxiliary channels:
      • Start RMAN with a connection to the target database instance,the auxiliary instance,and recovery catalog if applicable.
      • Allocate at least one auxiliary channel within the RUN block.
    $ rman target sys/oracle_4U@trgt auxiliary sys/oracle_4U@auxdb
    
    RMAN> RUN
    
      {
    
        ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
        ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
        ...
        DUPLICATE TARGET DATABASE to auxdb;...
      }

    Understanding the RMAN Duplication Operation

    When you execute the DUPLICATE command,RMAN performs the following operations:

    • 1A.Create a control files server parameter file for the auxiliary instance(for active and for backup-based duplication with target connection)
    • 1B.Restores from backup(for standby database and for backup-based duplication without target connection)
    • 2.Mounts the backup control file
    • 3.For backup-based duplication:Selects the backups for restoring the data files to the auxiliary instance
    • 4.Restores the target data files to the duplicate database
    • 5.Performs incomplete recovery using all available increamental backups and archived redo log files.
    • 6.Shuts down and restarts the auxiliary instance in NOMOUNT mode
    • 7.Creates a new control file,which then creates and stores the new DBID in the data files
    • 8.Opens the duplicate database with the RESETLOGS option
    • 9.Creates the online redo log files for the duplicate database

    Note:The database duplication process attempts to resume from the point-of-failure upon reexecution.(duplicate database and recovery database are simlar with this)

    Specifying Options for the DUPLICATE Command

    You can specify the following options with the DUPLICATE command:

    Option Purpose
    SKIP READONLY Excludes read-only tablespaces
    SKIP TABLESPACE Excludes named tablespaces
    TABLESPACE Includes named tablespaces
    NOFILENAMECHECK Prevents checking of file names
    OPEN RESTRICTED Enables RESTRICTED SESSION automatically
    REDO

    Signals RMAN that the application of redo logs should be suppressed during recovery

    Must be used with targetless DUPLICATE when target database is in NOARCHIVELOG mode at backup time

    Can also be used to explicitly state that no archived redo log files should be applied

    UNDO TABLESPACE Must be specified when target database is not open and there is no recovery catalog connection so that RMAN does not check the tablespace for SYS-owned objects

      

    Using OEM to clone a database

  • 相关阅读:
    OpenStack 多节点纳管 vCenter 5.5
    OpenStack 多节点纳管 vCenter 5.5
    java.utils.UUID类介绍
    BeanUtils工具类
    Request笔记
    JavaEE_XMind总结
    JavaSE_XMind总结
    完成页面的定时跳转
    使用jsp完成商品列表的动态显示
    Respone笔记
  • 原文地址:https://www.cnblogs.com/arcer/p/3130476.html
Copyright © 2020-2023  润新知