[20180412]手工拷貝檔案到另外主機.txt
[20180412]手工拷貝檔案到另外主機.txt
--//討論連結:http://www.itpub.net/thread-2101193-1-1.html
--//自己測試是否可以拷貝成功.
--//理論講很難實現,主庫一個路徑如何放到dataguard2個目錄路徑,我的觀點僅僅保留一個.
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.測試:
rlwrap rman target sys/oracle@book auxiliary sys/oracle@bookdg
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
new RMAN configuration parameters are successfully stored
--//執行如下:
RMAN>
backup as copy reuse
datafile 5 auxiliary format "/tmp/example01.dbf"
datafile 6 auxiliary format "/home/oracle/tea01.dbf" ;
Starting backup at 2018-04-12 09:34:07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=80 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=94 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/mnt/ramdisk/book/example01.dbf
channel ORA_DISK_2: starting datafile copy
input datafile file number=00006 name=/mnt/ramdisk/book/tea01.dbf
output file name=/home/oracle/tea01.dbf tag=TAG20180412T093408
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:03
output file name=/tmp/example01.dbf tag=TAG20180412T093408
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 2018-04-12 09:34:24
--//在備庫檢查:
# ls -l /tmp/example01.dbf /home/oracle/tea01.dbf
-rw-r----- 1 oracle oinstall 41951232 2018-04-12 09:34:10 /home/oracle/tea01.dbf
-rw-r----- 1 oracle oinstall 363077632 2018-04-12 09:34:14 /tmp/example01.dbf
--//可以發現檔案已經拷貝過來.檢查:
$ dbv file=/tmp/example01.dbf
DBVERIFY: Release 11.2.0.4.0 - Production on Thu Apr 12 09:35:49 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
DBVERIFY - Verification starting : FILE = /tmp/example01.dbf
DBVERIFY - Verification complete
Total Pages Examined : 44320
Total Pages Processed (Data) : 6603
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 1149
Total Pages Failing (Index): 0
Total Pages Processed (Other): 2844
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 33724
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Total Pages Encrypted : 0
Highest block SCN : 392059041 (3.392059041)
--//在備庫檢查:
RMAN> list copy of database;
specification does not match any datafile copy in the repository
--//在備庫控制檔案沒有記錄.
--//補充我想到一個變通的方法:
我想到一種變通的方法,就是通過連結ln
在主庫那邊建立:
ln -s /oradata/orcl /oradata/orcl2
這樣備庫db_file_name_convert引數可以寫成:
'/oradata/orcl','/data1','/oradata/orcl2','/data2'
這樣就不需要一一對應了.以後建立資料檔案使用/oradata/orcl,就放在/data1,
而建立資料檔案使用/oradata/orcl2,就放在/data2.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2152836/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 將一臺伺服器上的日誌檔案拷貝到另外一臺上伺服器
- linux採用scp命令拷貝檔案到本地,拷貝本地檔案到遠端伺服器Linux伺服器
- [20180718]拷貝資料檔案從dg庫.txt
- Golang命令列拷貝檔案Golang命令列
- [java IO流]之檔案拷貝Java
- 檔案操作(二進位制拷貝)
- [20191202]加快scp拷貝速度.txt
- 遠端桌面時怎麼拷貝不了檔案到伺服器?伺服器
- Java IO 流之拷貝(複製)檔案Java
- 淺拷貝&深拷貝
- python 指標拷貝,淺拷貝和深拷貝Python指標
- 淺拷貝和深拷貝
- 深拷貝和淺拷貝
- 淺拷貝與深拷貝
- 檔案太大不能拷貝到U盤怎麼辦 win10檔案過大無法複製到U盤Win10
- Windows 複製 xcopy 檔案到另外一個 目錄Windows
- 踩坑PHP複製檔案到另外資料夾PHP
- jquery之物件拷貝深拷貝淺拷貝案例講解jQuery物件
- 一文搞懂Java引用拷貝、淺拷貝、深拷貝Java
- C++拷貝建構函式(深拷貝,淺拷貝)C++函式
- 徑拷貝到裡面就完
- JS深拷貝與淺拷貝JS
- iOS深拷貝和淺拷貝iOS
- js 深拷貝和淺拷貝JS
- python深拷貝與淺拷貝Python
- JavaScript淺拷貝和深拷貝JavaScript
- Java深拷貝和淺拷貝Java
- Python淺拷貝與深拷貝Python
- 物件深拷貝和淺拷貝物件
- JavaScript深拷貝和淺拷貝JavaScript
- javascript 淺拷貝VS深拷貝JavaScript
- JavaScript 深度拷貝和淺拷貝JavaScript
- js 淺拷貝和深拷貝JS
- 淺談深拷貝與淺拷貝?深拷貝幾種方法。
- go slice深拷貝和淺拷貝Go
- js之淺拷貝和深拷貝JS
- ECMAScript-淺拷貝和深拷貝
- C++淺拷貝和深拷貝C++