將linux資料庫用rman備份到遠端win共享目錄

YallonKing發表於2012-09-21
將win下的共享目錄掛載到linux下即可

#掛載windows共享目錄
mount -o rw,uid=oracle,gid=oinstall,username=yallonking,password='oraking' //192.168.137.1/back_dir /tmp/back_dir

如果出現
[root@OELx64 ~]# mount -o rw,uid=oracle,gid=oinstall,username=yallonking,password='oraking' //192.168.137.1/back_dir /tmp/back_dir
mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

是因為檔案過大導致,可以採取以下措施
1、將備份指令碼修改,拆分備份檔案

可採取以下備份指令碼
run {
allocate channel c1 type disk maxpiecesize=512m;
allocate channel c2 type disk maxpiecesize=512m;
backup as compressed backupset database format '/tmp/back_dir/db_full_%U_%p_%T_%s.bak' tag 'dbl0';
backup current controlfile format '/tmp/back_dir/contorlfile_%T_%U_%s.ctlbak';
release channel c1;
release channel c2;
}

2、設定win下的登錄檔項(win7 用samba或者cifs)

Set “HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” to “1″.
Set “HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” to “3″.
Restart the “server” service.

#解除安裝共享目錄
umount /tmp/back_dir

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26143577/viewspace-744773/,如需轉載,請註明出處,否則將追究法律責任。

相關文章