• ASM-本地数据拷贝


    从ASM中拷贝归档日志到文件系统:
    
    命令:
    
     rman target /
    
    RMAN> copy archivelog '+ARCH/fhdbca/archivelog/2018_05_09/thread_1_seq_37.384.975668203' to '/oracle/thread_1_seq_37.384.975668203';
    
    从文件系统中拷贝归档日志到ASM:
    
    命令:
    
    RMAN> catalog archivelog '/oracle/thread_1_seq_37.384.975668203';
    
    RMAN> copy archivelog '/oracle/thread_1_seq_37.384.975668203' to '+ARCH/fhdbca/archivelog/2018_05_09/thread_1_seq_37.384.975668203';
    
    RMAN> catalog archivelog '+ARCH/fhdbca/archivelog/2018_05_09/thread_1_seq_37.384.975668203';

    ASMCMD中的cp命令(11g) cp命令是11g新增的命令,使用它可以轻松的把文件从ASM中复制到文件系统中或者反过来。还可以把ASM中的文件复制到网络上的其他服务器的文件系统中。 #从ASM复制到文件系统 [grid@rac1
    ~]$ asmcmd -p --显示路径 ASMCMD [+] > cd data ASMCMD [+data] > cd orcl ASMCMD [+data/orcl] > cd datafile ASMCMD [+data/orcl/datafile] > ls SYSAUX.257.925306091 SYSTEM.256.925306089 UNDOTBS1.258.925306091 UNDOTBS2.264.925306377 USERS.259.925306091 ASMCMD [+data/orcl/datafile] > ls -l Type Redund Striped Time Sys Name DATAFILE UNPROT COARSE MAY 21 11:00:00 Y SYSAUX.257.925306091 DATAFILE UNPROT COARSE MAY 21 11:00:00 Y SYSTEM.256.925306089 DATAFILE UNPROT COARSE MAY 21 11:00:00 Y UNDOTBS1.258.925306091 DATAFILE UNPROT COARSE MAY 21 11:00:00 Y UNDOTBS2.264.925306377 DATAFILE UNPROT COARSE MAY 21 11:00:00 Y USERS.259.925306091 ASMCMD [+data/orcl/datafile] > cp USERS.259.925306091 /home/grid/users.dbf copying +data/orcl/datafile/USERS.259.925306091 -> /home/grid/users.dbf ASMCMD [+data/orcl/datafile] > #查看复制结果 [grid@rac1 ~]$ ll /home/grid/users.dbf -rw-r-----. 1 grid oinstall 5251072 May 21 15:20 /home/grid/users.dbf #从文件系统复制到ASM ASMCMD [+data/orcl/datafile] > cp /home/grid/users.dbf +data/orcl copying /home/grid/users.dbf -> +data/orcl/users.dbf #查看复制结果 ASMCMD [+data/orcl/datafile] > cd +data/orcl ASMCMD [+data/orcl] > ls -l Type Redund Striped Time Sys Name Y ARCHIVELOG/ Y CONTROLFILE/ Y DATAFILE/ Y ONLINELOG/ Y PARAMETERFILE/ Y TEMPFILE/ N spfileorcl.ora => +DATA/ORCL/PARAMETERFILE/spfile.268.925423909 N users.dbf => +DATA/ASM/DATAFILE/users.dbf.271.944580085 cp的详细使用情况可以使用help cp命令获得。
  • 相关阅读:
    Codeforces Round #321 (Div. 2) D. Kefa and Dishes 状压dp
    Codeforces Round #406 (Div. 2) D. Legacy 线段树建模+最短路
    HDU 4897 Little Devil I 树链剖分+线段树
    HDU 5405 Sometimes Naive 树链剖分+bit*****
    HDU 5274 Dylans loves tree 树链剖分+线段树
    BZOJ 2243: [SDOI2011]染色 树链剖分+线段树区间合并
    HDU 5544 Ba Gua Zhen dfs+高斯消元
    HDU 3949 XOR 线性基
    BZOJ 2460: [BeiJing2011]元素 线性基
    Educational Codeforces Round 18 C. Divide by Three DP
  • 原文地址:https://www.cnblogs.com/vmsysjack/p/12578114.html
Copyright © 2020-2023  润新知