分类信息
各地考试

当前位置:首页 » Oracle认证 » 专用技术 » 正文

Oracle认证性能调优:rman备份恢复命令之switch2


时间:2013-10-22 来源:Oracle认证考试网 浏览次数:224  【华夏培训网:中国教育培训第一门户

例二 用switch tablespace name to copy更新表空间所有数据文件位置和名字 RMAN backup as copy tablespace pos format '/oracl


     例二 用switch tablespace name to copy更新表空间所有数据文件位置和名字
    RMAN> backup as copy tablespace pos format '/oracle/%N%f.dbf';
    (%N为表空间名、%f为数据文件绝对文件号)
    Starting backup at 2013-02-22 10:55:49
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00005 name=/oracle/CRM/pos.dbf
    channel ORA_DISK_2: starting datafile copy
    input datafile file number=00009 name=/oracle/CRM/pos2.dbf
    output file name=/oracle/POS9.dbf tag=TAG20130222T105549 RECID=18 STAMP=808052153
    channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:07
    output file name=/oracle/POS5.dbf tag=TAG20130222T105549 RECID=19 STAMP=808052179
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:36
    Finished backup at 2013-02-22 10:56:25
    Starting Control File and SPFILE Autobackup at 2013-02-22 10:56:25
    piece handle=/backup/c-3599153036-20130222-03 comment=NONE
    Finished Control File and SPFILE Autobackup at 2013-02-22 10:56:28
    RMAN> sql 'alter tablespace pos offline';
    sql statement: alter tablespace pos offline
    RMAN> switch tablespace pos to copy;
    datafile 5 switched to datafile copy "/oracle/POS5.dbf"
    datafile 9 switched to datafile copy "/oracle/POS9.dbf"
    RMAN> report schema;
    Report of database schema for database with db_unique_name CRM
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    ---- -------- -------------------- ------- ------------------------
    1 750 SYSTEM *** /oracle/CRM/system01.dbf
    2 540 SYSAUX *** /oracle/CRM/sysaux01.dbf
    3 100 UNDOTBS3 *** /oracle/CRM/undotbs3.dbf
    4 1742 USERS *** /backup/users01.dbf
    5 0 POS *** /oracle/POS5.dbf
    6 100 ERP *** /oracle/CRM/erp.dbf
    7 5 USER01 *** /oracle/CRM/user01.dbf
    8 0 TEST *** /oracle/CRM/test.dbf
    9 0 POS *** /oracle/POS9.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    ---- -------- -------------------- ----------- --------------------
    1 218 TEMP 32767 /oracle/CRM/temp01.dbf






       Oracle认证

推荐图文

热门点击排行

©2015 hxpx.com All Rights Reserved 滇ICP备13002816号-1
华夏培训网唯一网址www.hxpx.com