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 。

  • 相关阅读:
    length()
    matlab mod()&rem()
    tf调试函数
    64位win7+PCL1.6.0+VS2010,64位win10+PCL1.6.0+VS2010
    pcl 1.8 + VS 2010 在win7 x64下的配置
    Qt在vs2010下的配置
    VS2010 win7 QT4.8.0,实现VS2010编译调试Qt程序,QtCreator静态发布程序
    [POI2012]ROZ-Fibonacci Representation (贪心)
    CF 666C & 牛客 36D
    数位dp练习
  • 原文地址:https://www.cnblogs.com/keanuyaoo/p/3359963.html
Copyright © 2011-2022 走看看