zoukankan      html  css  js  c++  java
  • rman进行备份、恢复

        rman备份可以很复杂,但学习需要由浅入深,下面是最常见的几种备份、恢复方式。

    备份数据的路径与大小:

    SQL> show parameter  DB_RECOVERY_FILE_DEST
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_recovery_file_dest                string      E:oracle11gguogang man_backup
    db_recovery_file_dest_size           big integer 10G

    备份:

    C:Documents and Settingsguogang>sqlplus / as sysdba;

    SQL> create tablespace rman_ts datafile 'E:oracle11gguogangorcl man_ts.dbf'   size 150M;
    SQL> create user rman identified by rman
    temporary tablespace TEMP02
    default tablespace rman_ts
    quota unlimited on rman_ts;

    SQL> grant recovery_catalog_owner to rman;

    C:Documents and Settingsguogang>rman catalog rman/rman

    RMAN>create catalog tablespace rman_ts;

    C:Documents and Settingsguogang>rman target rman/rman -- catalog数据库作为RMAN的资料库

    C:Documents and Settingsguogang>rman target  /   --控制文件作为RMAN的资料库

    RMAN> backup database;

    RMAN> list backupset;

    RMAN> backup tablespace USERS;

    RMAN> backup datafile 4;


    恢复:

    SQL> shutdown immediate;

    SQL> startup mount;

    SQL> alter database open;


    C:Documents and Settingsguogang>rman target /

    RMAN> restore database;--恢复整个数据库

    RMAN> recover database;

    RMAN> restore tablespace USERS;--恢复表空间

    RMAN> recover tablespace USERS;

    RMAN> restore datafile 4;--恢复数据文件

    RMAN> recover datafile 4;

         注意的是:在10.2.0.1.0上,建资料库报错,在google上查,是bug,需要升级到10.2.0.4.0 。

  • 相关阅读:
    3.27 课堂 笔记
    第四周 4-2
    3-26
    Java EE期末项目
    条件查询、SQL、JPQL、HQL比较
    J2EE 第八周(04.23-04.29)
    J2EE 第七周(04.16-04.22)
    J2EE 第六周(04.09-04.15)
    J2EE 第五周(04.02-04.08)
    J2EE 第四周(03.26-04.01)
  • 原文地址:https://www.cnblogs.com/keanuyaoo/p/3359963.html
Copyright © 2011-2022 走看看