1. 程式人生 > 實用技巧 >aix上oracle使用rman備份到nfs

aix上oracle使用rman備份到nfs

環境:aix6、oracle10G

1、配置nfs

nfs伺服器上配置nfs
yum -y install nfs-utils 
vim /etc/exports
增加一行
/data   *(rw,sync,no_root_squash,no_all_squash)
systemctl start nfs
systemctl status nfs
檢查對外共享的目錄。使用下列命令:
showmount -e localhost

aix上掛載磁碟
在AIX系統開啟NFS保留埠,命令如下:
nfso -o nfs_use_reserved_ports=1
然後,將共享的/data目錄掛載即可
mount 192.168.1.65:/data /data

2、rman配置備份路徑

RMAN> configure channel 1 device type disk format '/rman/bak/%d_db_%u';
RMAN> configure channel 2 device type disk format '/rman/bak/%d_db_%u';

3、rman進行備份

完全備份:
backup database;

4、錯誤處理

報錯

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 08/30/2007 14:02:03
ORA-19504: failed to create file "/rman/ibudb/arch_IBUDB_31_631980121.rman"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 3
在metalink上找到一個Doc,Note:424785.1。這個問題在10.2的版本中比較普遍。可通過以下三種方式進行解決:

直接執行

alter system set event='10298 trace name context forever,level 32'

再次備份即可