Windows平臺RMAN備份到網路對映驅動器(ORA-19504 ORA-27040 OSD-04002)
在Windows平臺執行RMAN備份到透過網路對映的Z盤,收到ORA-19504 ORA-27040 OSD-04002的報錯,下面是現象及解決方法。
一.現象:
二.參考METALINK文章,文章號:ID 145843.1
Oracle Server - Personal Edition
Oracle Server - Enterprise Edition - Version: 9.0.1.0 and later [Release: 9.0.1 and later]
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit) - OS Version: 7
Microsoft Windows x64 (64-bit) - Version: 2008 R2
Microsoft Windows (32-bit) - OS Version: 7
Microsoft Windows x64 (64-bit)
Microsoft Windows Itanium (64-bit)
z*OBSOLETE: Microsoft Windows 2000
三.重啟資料庫服務後執行RMAN備份。
--end--
一.現象:
C:\Users\LIUBINGLIN>rman target /
恢復管理器: Release 11.2.0.1.0 - Production on 星期三 5月 16 00:42:53 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
連線到目標資料庫: ORCL (DBID=1290386656)
RMAN> backup device type disk format 'z:\%U' datafile 4;
啟動 backup 於 16-5月 -12
使用目標資料庫控制檔案替代恢復目錄
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=24 裝置型別=DISK
通道 ORA_DISK_1: 正在啟動全部資料檔案備份集
通道 ORA_DISK_1: 正在指定備份集內的資料檔案
輸入資料檔案: 檔案號=00004 名稱=D:\APP\ORACLE\ORADATA\ORCL\USERS01.DBF
通道 ORA_DISK_1: 正在啟動段 1 於 16-5月 -12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 05/16/2012 00:43:22 上) 失敗
ORA-19504: 無法建立檔案"Z:\0SNB36L8_1_1"
ORA-27040: 檔案建立錯誤, 無法建立檔案
OSD-04002: 無法開啟檔案
O/S-Error: (OS 3) 系統找不到指定的路徑。
二.參考METALINK文章,文章號:ID 145843.1
How to Configure RMAN to Write to Shared Drives on Windows NT/2000/2003 [ID 145843.1] | |||||
修改時間 29-JUN-2011 型別 BULLETIN 狀態 PUBLISHED |
Applies to:
Oracle Server - Standard EditionOracle Server - Personal Edition
Oracle Server - Enterprise Edition - Version: 9.0.1.0 and later [Release: 9.0.1 and later]
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit) - OS Version: 7
Microsoft Windows x64 (64-bit) - Version: 2008 R2
Microsoft Windows (32-bit) - OS Version: 7
Microsoft Windows x64 (64-bit)
Microsoft Windows Itanium (64-bit)
z*OBSOLETE: Microsoft Windows 2000
Purpose
Following are step-by-step instructions for configuring RMAN to write to mapped (shared/networked) drive(s) on Windows platfomsScope and Application
RMAN users who are familiar with basic RMAN functionality as well as database configuration on the Windows Platform.How to Configure RMAN to Write to Shared Drives on Windows NT/2000/2003
WRITING FILES TO A MAPPED DRIVE WITH RMAN
----------------------------------------------------------------------------
The problem of backing up to a mapped network drive using the SYSTEM account is a security issue. By default, Oracle requires the SYSTEM user to have privileges to write to the drives. Microsoft considers granting SYSTEM owned service access to a shared drive a security issue.
However, there is a workaround that allows Oracle to access a shared drive.
The Oracle services are originally configured to log on using the SYSTEM account. The SYSTEM account should not be granted access to the shared drive, therefore the Oracle services for the TARGET DB need to be reconfigured to logon using an Administrator account (preferably a Domain Administrator).
THE STEPS NEEDED TO RESOLVE THIS ISSUE
----------------------------------------------------------------------------
1. On the machine where you wish to write the files to, create a shared drive granting the user 'Administrator' FULL Control.
Note: For reference below, this Administrator will use the password 'test', this will be referred to as the "Destination" machine.
2. On the machine with the TARGET DB, verify the Administrator user has the same password of the user that shared the drive on the destination machine. In the example here, the password would be 'test'.
3. Map a network drive on the TARGET machine to the shared drive on the destination machine. When mapping this drive, use the Administrator user with the password 'test'.
4. On the TARGET machine, BOTH the OracleTNSListener Service and the OracleServiceservices must be configured to start using the Administrator/test account.
(As discussed above, Oracle uses the Local System account by default.)
a. Go to the Control Panel and then open up the Services panel.
b. Double click on the appropriate service (TNSListener or OracleService).
c. Change the "Log on as" user from the "Local System Account" to "This Account".
d. Specify the service to log on as the Administrator user.
c. Click on "OK".
5. Shutdown the TARGET database and stop and start the services on the Target machine. Restart the TARGET database.
6. You should now be able to use RMAN from the Catalog machine to copy the datafiles. In the RMAN script, specify the drive letter that you mapped in step 3.
Special Windows 2003/2008/XP/7/Vista Update :
As Windows has a changed access behavior, the solution is a little restrict :
Don't use local drive letters for mapping network shares.
Workaround is to use UNC locations directly, e.g. backup to
Since this is in fact an absolute location this is always the same for any node in the network.
So whether accessed from node A or node B, is always the shared location on B.
FINAL NOTES
----------------------------------------------------------------------------
It is recommended to use the Domain Administrator account to ensure that passwords are the same across the various machines. If there is no domain, use the local Administrator account and ensure that the passwords are the same for this account across all of the machines.
If your backups are to be automated using the AT command, it is best to start up the SCHEDULE service under the same Administrator account that the OracleServiceand the OracleTNSListener services use.
In the event that you HAVE to use a user account for the Oracle Services, rather then using the SYSTEM account, you can create a batch file that reconnects the shared drives at system startup. The batch file runs automatically as a service when the server starts and would establish the connection to the shared drives, regardless of which user logs into the system. This process of creating the batch file is outlined in the Microsoft's Knowledgebase Article ID: 243486 - "How to Run a Batch File Before Logging on to Your Computer." The batch file is not supported by Oracle and is only mentioned here as an alternative way to reconnect the shared drives.
COMMON MISTAKES
----------------------------------------------------------------------------
If the OracleServiceand OracleTNSListener services are not configured to use the same account as the shared drive, you can expect the following errors:
RMAN-10035: exception raised in RPC: ORA-19504: failed to create file
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file O/S-Error: (OS 5) Access is denied.
ORA-19600: input file is datafile
ORA-19601: output file is datafile-copyto be created
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.COPYDATAFILE
If the mapped drive is created on the CATALOG machine and NOT on the TARGETmachine, you can expect the following errors.
RMAN-10035: exception raised in RPC: ORA-19504: failed to create file
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
ORA-19600: input file is datafile 1
ORA-19601: output file is datafile-copy 0 < path and file name of file> to be created
RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.COPYDATAFILE
三.重啟資料庫服務後執行RMAN備份。
RMAN> exit
RMAN-06900: 警告: 無法生成 V$RMAN_STATUS 或 V$RMAN_OUTPUT 行
RMAN-06901: 警告: 禁止更新 V$RMAN_STATUS 和 V$RMAN_OUTPUT 行
來自目標資料庫的 ORACLE 錯誤:
ORA-03113: 通訊通道的檔案結尾
程式 ID: 2896
會話 ID: 150 序列號: 4
恢復管理器完成。
C:\Users\LIUBINGLIN>rman target /
恢復管理器: Release 11.2.0.1.0 - Production on 星期三 5月 16 01:04:57 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
連線到目標資料庫: ORCL (DBID=1290386656)
RMAN> backup device type disk format 'z:\%U' datafile 4;
啟動 backup 於 16-5月 -12
使用目標資料庫控制檔案替代恢復目錄
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=141 裝置型別=DISK
通道 ORA_DISK_1: 正在啟動全部資料檔案備份集
通道 ORA_DISK_1: 正在指定備份集內的資料檔案
輸入資料檔案: 檔案號=00004 名稱=D:\APP\ORACLE\ORADATA\ORCL\USERS01.DBF
通道 ORA_DISK_1: 正在啟動段 1 於 16-5月 -12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 05/16/2012 01:05:11 上) 失敗
ORA-19504: 無法建立檔案"Z:\0TNB37U6_1_1"
ORA-27040: 檔案建立錯誤, 無法建立檔案
OSD-04002: 無法開啟檔案
O/S-Error: (OS 3) 系統找不到指定的路徑。
RMAN> backup device type disk format '\\192.168.4.100\My Documents\%U' datafile 4;
啟動 backup 於 16-5月 -12
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在啟動全部資料檔案備份集
通道 ORA_DISK_1: 正在指定備份集內的資料檔案
輸入資料檔案: 檔案號=00004 名稱=D:\APP\ORACLE\ORADATA\ORCL\USERS01.DBF
通道 ORA_DISK_1: 正在啟動段 1 於 16-5月 -12
通道 ORA_DISK_1: 已完成段 1 於 16-5月 -12
段控制程式碼=\\192.168.4.100\MY DOCUMENTS\0UNB37V6_1_1 標記=TAG20120516T010542 註釋=NONE
通道 ORA_DISK_1: 備份集已完成, 經過時間:00:00:07
完成 backup 於 16-5月 -12
啟動 Control File and SPFILE Autobackup 於 16-5月 -12
段 handle=D:\ORCL\AUTOBACKUP\2012_05_16\O1_MF_S_783392750_7V537HO9_.BKP comment=NONE
完成 Control File and SPFILE Autobackup 於 16-5月 -12
RMAN>
--end--
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-729877/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-19504 ORA-27040 RMAN Linux備份至windows掛載問題LinuxWindows
- NAS對映網路驅動器如何操作?
- Windows10系統如何新建網路對映驅動器Windows
- 怎麼設定對映網路驅動器?在電腦上設定對映網路驅動器的方法
- 關於WINDOWS平臺下RMAN備份移植Windows
- serv-u中如何對映網路驅動器
- 如何在win10系統中對映網路驅動器_win10電腦對映網路驅動器的方法Win10
- 如何SQL Server中檢視對映網路驅動器NASQLServer
- win10怎麼取消網路對映_w10對映網路驅動器怎麼關閉Win10
- Domino從UNIX平臺到windows平臺的遷移及備份Windows
- rman 自動備份指令碼-windows指令碼Windows
- CentOS虛擬機器如何設定共享資料夾,並在Windows下對映網路驅動器?CentOS虛擬機Windows
- windows下rman自動備份指令碼Windows指令碼
- Oracle Windows平臺自動排程備份指令碼OracleWindows指令碼
- vista登入指令碼無法對映網路驅動器問題指令碼
- 註解驅動的控制器,將請求對映到處理器
- windows rman備份指令碼Windows指令碼
- 使用Network Recycle Bin啟用對映網路驅動器上的回收站
- ORACLE expdp備份到windows網路共享檔案目錄(NFS)OracleWindowsNFS
- RMAN備份報錯ORA-27040: skgfrcre: 建立錯誤,無法建立檔案
- Windows下RMAN備份指令碼Windows指令碼
- Windows下RMAN備份程式碼Windows
- win10備份到網路怎麼操作_win10如何備份到網路Win10
- Linux 平臺下 RMAN 全備 和 增量備份 shell 指令碼Linux指令碼
- win10網路卡驅動怎麼備份_win10網路卡驅動備份操作方法Win10
- RMAN備份之備份多個備份集到帶庫(三)
- RMAN備份之備份多個備份集到帶庫(二)
- RMAN備份之備份多個備份集到帶庫(一)
- RMAN備份恢復——備份到帶庫的效能
- RMAN備份恢復典型案例——跨平臺遷移pdb
- 使用RMAN實現異機備份恢復(WIN平臺)
- 區域網內RMAN異機備份(windows系統):Windows
- mysql xtrabackup在windows平臺的備份測試MySqlWindows
- windows主機下使用rman恢復備份到不同主機Windows
- rman備份資料庫後到另一臺機器上恢復的例子資料庫
- RMAN備份到帶庫被阻塞
- RMAN備份恢復——備份到帶庫的效能(二)
- Windows 10開啟預設網路驅動器訪問Windows