激情五月天婷婷,亚洲愉拍一区二区三区,日韩视频一区,a√天堂中文官网8

<ul id="buwfs"><strike id="buwfs"><strong id="buwfs"></strong></strike></ul>
    <output id="buwfs"></output>
  • <dfn id="buwfs"><source id="buwfs"></source></dfn>
      <dfn id="buwfs"><td id="buwfs"></td></dfn>
      <div id="buwfs"><small id="buwfs"></small></div>
      <dfn id="buwfs"><source id="buwfs"></source></dfn>
      1. <dfn id="buwfs"><td id="buwfs"></td></dfn>
        始創(chuàng)于2000年 股票代碼:831685
        咨詢(xún)熱線:0371-60135900 注冊(cè)有禮 登錄
        • 掛牌上市企業(yè)
        • 60秒人工響應(yīng)
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補(bǔ)償
        全部產(chǎn)品
        您的位置: 網(wǎng)站首頁(yè) > 幫助中心>文章內(nèi)容

        Oracle ASM實(shí)例同filesystem間的文件傳輸

        發(fā)布時(shí)間:  2012/9/3 16:41:28

        一般來(lái)講,在ASM實(shí)例和文件系統(tǒng)之間傳輸文件,可以采用dbms_transfer_file包和rman實(shí)現(xiàn)外,或者FTP方式,F(xiàn)TP方式需要XML DB支持,目前還沒(méi)有學(xué)會(huì),因而先記錄下前面三種方式…
        1:使用dbms_file_transfer在文件系統(tǒng)和asm實(shí)例間傳輸文件,同樣適用于10g

        SQL> desc dbms_file_transfer;  PROCEDURE COPY_FILE   Argument Name                  Type                    In/Out Default?   ------------------------------ ----------------------- ------ --------   SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN  SOURCE_FILE_NAME               VARCHAR2                IN  DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN  DESTINATION_FILE_NAME          VARCHAR2                IN PROCEDURE GET_FILE   Argument Name                  Type                    In/Out Default?   ------------------------------ ----------------------- ------ --------   SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN  SOURCE_FILE_NAME               VARCHAR2                IN  SOURCE_DATABASE                VARCHAR2                IN  DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN  DESTINATION_FILE_NAME          VARCHAR2                IN PROCEDURE PUT_FILE   Argument Name                  Type                    In/Out Default?   ------------------------------ ----------------------- ------ --------   SOURCE_DIRECTORY_OBJECT        VARCHAR2                IN  SOURCE_FILE_NAME               VARCHAR2                IN  DESTINATION_DIRECTORY_OBJECT   VARCHAR2                IN  DESTINATION_FILE_NAME          VARCHAR2                IN  DESTINATION_DATABASE           VARCHAR2                IN  SQL> select file_name from dba_data_files;   FILE_NAME  --------------------------------------------  +DATA/ogg1/datafile/users.259.773712985  +DATA/ogg1/datafile/undotbs1.258.773712985  +DATA/ogg1/datafile/sysaux.257.773712985  +DATA/ogg1/datafile/system.256.773712985  +DATA/ogg1/datafile/example.265.773713189   SQL> create user transfer_test default tablespace transfer_test identified by 123456 account unlock;  User created.   SQL> create tablespace transfer_test datafile '/u01/app/Oracle/oradata/ogg1/transfer_test01.dbf' size 100M;  Tablespace created.   SQL> create directory  asm_dir as '+DATA/ogg1/datafile';  Directory created.   SQL> create directory  file_dir as '/u01/app/Oracle/oradata/ogg1';  Directory created.   SQL> grant connect,resource to transfer_test;  Grant succeeded.   SQL> create table transfer_test.t1 as select * from dba_source;  Table created.   SQL> analyze table transfer_test.t1 compute statistics;  Table analyzed.   SQL> select count(*) from transfer_test.t1;     COUNT(*)  ----------      633054   SQL> alter tablespace transfer_test offline;  Tablespace altered.   SQL> begin   2  dbms_file_transfer.copy_file('file_dir','transfer_test01.dbf','asm_dir','transfer_test01.dbf');    3  end;    4  /   PL/SQL procedure successfully completed.   [root@oel1 ~]# su - grid  [grid@oel1 ~]$ asmcmd  ASMCMD> cd +data/ogg1/datafile    ASMCMD> ls -l  Type      Redund  Striped  Time             Sys  Name DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    COPY_FILE.267.776809311  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    EXAMPLE.265.773713189  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    SYSAUX.257.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    SYSTEM.256.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    UNDOTBS1.258.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    USERS.259.773712985                                              N    transfer_test01.dbf =>    +DATA/OGG1/DATAFILE/COPY_FILE.267.776809311    SQL> alter database rename file '/u01/app/Oracle/oradata/ogg1/transfer_test01.dbf' to    '+data/ogg1/datafile/transfer_test01.dbf';   Database altered.   SQL> alter tablespace transfer_test online;   Tablespace altered.    QL> select file_name from dba_data_files;   FILE_NAME  --------------------------------------------------------------------------------  +DATA/ogg1/datafile/users.259.773712985  +DATA/ogg1/datafile/undotbs1.258.773712985  +DATA/ogg1/datafile/sysaux.257.773712985  +DATA/ogg1/datafile/system.256.773712985  +DATA/ogg1/datafile/example.265.773713189  +DATA/ogg1/datafile/transfer_test01.dbf  6 rows selected.   SQL> select count(*) from transfer_test.t1;     COUNT(*)  ----------      633054   2: 11g的asm實(shí)例可以直接使用cp命令來(lái)實(shí)現(xiàn),從asm實(shí)例的cp幫助信息上看,已經(jīng)可以直接從本地?cái)?shù)據(jù)庫(kù)直接cp到遠(yuǎn)端數(shù)據(jù)庫(kù)了!

        ASMCMD> cp /u01/app/Oracle/oradata/ogg1/transfer_test01.dbf +data/ogg1/datafile/test01.dbf  copying /u01/app/Oracle/oradata/ogg1/transfer_test01.dbf -> +data/ogg1/datafile/test01.dbf   ASMCMD> pwd   +data/ogg1/datafile  ASMCMD> ls -l  Type      Redund  Striped  Time             Sys  Name  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    COPY_FILE.267.776809311  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    EXAMPLE.265.773713189  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    SYSAUX.257.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    SYSTEM.256.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    UNDOTBS1.258.773712985  DATAFILE  UNPROT  COARSE   MAR 01 20:00:00  Y    USERS.259.773712985                                              N    test01.dbf => +DATA/ASM/DATAFILE/test01.dbf.268.776809913                                              N    transfer_test01.dbf =>    +DATA/OGG1/DATAFILE/COPY_FILE.267.776809311 3:使用rman的convert命令來(lái)實(shí)現(xiàn),同樣適用于10g

        [Oracle@oel1 ~]$ rman target /  Recovery Manager: Release 11.2.0.3.0 - Production on Thu Mar 1 20:44:22 2012  Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.  connected to target database: OGG1 (DBID=3952830770)   RMAN> convert datafile '+data/ogg1/datafile/SYSTEM.256.773712985' format    '/u01/app/Oracle/oradata/ogg1/system01.dbf';   Starting conversion at target at 2012-03-01-20:47:08  using channel ORA_DISK_1  channel ORA_DISK_1: starting datafile conversion  input file name=+DATA/ogg1/datafile/system.256.773712985  converted datafile=/u01/app/Oracle/oradata/ogg1/system01.dbf  channel ORA_DISK_1: datafile conversion complete, elapsed time: 00:01:56  Finished conversion at target at 2012-03-01-20:49:07   RMAN> host "ls -lh /u01/app/Oracle/oradata/ogg1/";   total 821M  -rw-r----- 1 Oracle asmadmin 721M Mar  1 20:49 system01.dbf  -rw-r----- 1 Oracle asmadmin 101M Mar  1 20:17 transfer_test01.dbf  host command complete
         


        本文出自:億恩科技【mszdt.com】

        服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

      2. 您可能在找
      3. 億恩北京公司:
      4. 經(jīng)營(yíng)性ICP/ISP證:京B2-20150015
      5. 億恩鄭州公司:
      6. 經(jīng)營(yíng)性ICP/ISP/IDC證:豫B1.B2-20060070
      7. 億恩南昌公司:
      8. 經(jīng)營(yíng)性ICP/ISP證:贛B2-20080012
      9. 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
      10. 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
      11. 專(zhuān)注服務(wù)器托管17年
        掃掃關(guān)注-微信公眾號(hào)
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問(wèn):河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
          0
         
         
         
         

        0371-60135900
        7*24小時(shí)客服服務(wù)熱線