NBU低级问题请教
环境:
NBU:6.5
oracle: 10g (装在master server上)
OS: windows2003
NBU调用的rman的备份脚本改自NBU模板hot_database_backup.cmd .测试备份时,报错NBU返回status 6, RMAN-03009: failure of backup command on ch01 channel at 06/27/2009 20:56:00
ORA-27206: requested file not found in media management catalog
麻烦指点那里要修改。谢谢。
NBU处理日志如下:
- 2009-6-27 20:53:14 - requesting resource oracle
- 2009-6-27 20:53:14 - requesting resource mastersrv.NBU_CLIENT.MAXJOBS.master
- 2009-6-27 20:53:14 - requesting resource mastersrv.NBU_POLICY.MAXJOBS.oracle-bak
- 2009-6-27 20:53:14 - granted resource mastersrv.NBU_CLIENT.MAXJOBS.master
- 2009-6-27 20:53:14 - granted resource mastersrv.NBU_POLICY.MAXJOBS.oracle-bak
- 2009-6-27 20:53:14 - granted resource MediaID=@aaaab;Path=C:sql;MediaServer=mastersrv
- 2009-6-27 20:53:14 - granted resource oracle
- 2009-6-27 20:53:14 - estimated 0 kbytes needed
- 2009-6-27 20:53:15 - started process bpbrm (4668)
- 2009-6-27 20:53:15 - connecting
- 2009-6-27 20:53:15 - connected; connect time: 00:00:00
- 2009-6-27 20:56:51 - end writing
- the backup failed to back up the requested files(6)
复制代码
hot_database_backup.cmd 条目如下:
- @REM $Header: hot_database_backup.cmd,v 1.3 2005/11/28 19:01:53 $
- @REM bcpyrght
- @REM ***************************************************************************
- @REM * $VRTScprght: Copyright 1993 - 2007 Symantec Corporation, All Rights Reserved $ *
- @REM ***************************************************************************
- @REM ecpyrght
- @REM
- @REM ---------------------------------------------------------------------------
- @REM hot_database_backup.cmd
- @REM ---------------------------------------------------------------------------
- @REM This script uses Recovery Manager to take a hot (inconsistent) database
- @REM backup. A hot backup is inconsistent because portions of the database are
- @REM being modified and written to the disk while the backup is progressing.
- @REM You must run your database in ARCHIVELOG mode to make hot backups.
- @REM
- @REM NOTE information for running proxy backups has been included. These
- @REM information sections begin with a comment line of PROXY
- @REM ---------------------------------------------------------------------------
- @setlocal ENABLEEXTENSIONS
- @REM ---------------------------------------------------------------------------
- @REM No need to echo the commands.
- @REM ---------------------------------------------------------------------------
- @echo off
- @REM ---------------------------------------------------------------------------
- @REM Put output in the same filename, different extension.
- @REM ---------------------------------------------------------------------------
- @set RMAN_LOG_FILE="%~dpn0.out"
- @REM ---------------------------------------------------------------------------
- @REM You may want to delete the output file so that backup information does
- @REM not accumulate. If not, delete the following command.
- @REM ---------------------------------------------------------------------------
- @if exist %RMAN_LOG_FILE% del %RMAN_LOG_FILE%
- @REM ---------------------------------------------------------------------------
- @REM Replace H:oracleora81, below, with the Oracle home path.
- @REM ---------------------------------------------------------------------------
- @set ORACLE_HOME=C:oracleproduct10.1.0Db_1
- @REM ---------------------------------------------------------------------------
- @REM Replace ora81, below, with the Oracle SID.
- @REM ---------------------------------------------------------------------------
- @set ORACLE_SID=ORCL
- @REM ---------------------------------------------------------------------------
- @REM Replace sys/manager, below, with the target connect string.
- @REM ---------------------------------------------------------------------------
- @set TARGET_CONNECT_STR=sys/password
- @REM ---------------------------------------------------------------------------
- @REM Set the Oracle Recovery Manager.
- @REM ---------------------------------------------------------------------------
- @set RMAN=%ORACLE_HOME%binrman.exe
- @REM ---------------------------------------------------------------------------
- @REM PROXY
- @REM For a PROXY backup, uncomment the line below and replace the value.
- @REM
- @REM NB_ORA_PC_STREAMS - specifies the number of parallel backup streams
- @REM to be started.
- @REM ---------------------------------------------------------------------------
- @REM @set NB_ORA_PC_STREAMS=3
- @REM ---------------------------------------------------------------------------
- @REM Log the start of this scripts.
- @REM ---------------------------------------------------------------------------
- @for /F "tokens=1*" %%p in ('date /T') do @set DATE=%%p %%q
- @for /F %%p in ('time /T') do @set DATE=%DATE% %%p
- @echo ==== started on %DATE% ==== >> %RMAN_LOG_FILE%
- @echo Script name: %0 >> %RMAN_LOG_FILE%
- @REM ---------------------------------------------------------------------------
- @REM Several RMAN commands use time parameters that require NLS_LANG and
- @REM NLS_DATE_FORMAT to be set. This example uses the standard date format.
- @REM Replace below with the desired language values.
- @REM ---------------------------------------------------------------------------
- @set NLS_LANG=american
- @set NLS_DATE_FORMAT=YYYY-MM-DD:hh24:mi:ss
- @REM ---------------------------------------------------------------------------
- @REM Print out environment variables set in this script.
- @REM ---------------------------------------------------------------------------
- @echo # >> %RMAN_LOG_FILE%
- @echo RMAN : %RMAN% >> %RMAN_LOG_FILE%
- @echo NLS_LANG : %NLS_LANG% >> %RMAN_LOG_FILE%
- @echo ORACLE_HOME : %ORACLE_HOME% >> %RMAN_LOG_FILE%
- @echo ORACLE_SID : %ORACLE_SID% >> %RMAN_LOG_FILE%
- @echo NLS_DATE_FORMAT : %NLS_DATE_FORMAT% >> %RMAN_LOG_FILE%
- @echo RMAN_LOG_FILE : %RMAN_LOG_FILE% >> %RMAN_LOG_FILE%
- @REM ---------------------------------------------------------------------------
- @REM PROXY
- @REM For a PROXY backup, uncomment the line below.
- @REM ---------------------------------------------------------------------------
- @REM @echo NB_ORA_PC_STREAMS : %NB_ORA_PC_STREAMS% >> %RMAN_LOG_FILE%
- @REM ---------------------------------------------------------------------------
- @REM Print out environment variables set in bphdb.
- @REM ---------------------------------------------------------------------------
- @echo NB_ORA_SERV : %NB_ORA_SERV% >> %RMAN_LOG_FILE%
- @echo NB_ORA_FULL : %NB_ORA_FULL% >> %RMAN_LOG_FILE%
- @echo NB_ORA_INCR : %NB_ORA_INCR% >> %RMAN_LOG_FILE%
- @echo NB_ORA_CINC : %NB_ORA_CINC% >> %RMAN_LOG_FILE%
- @echo NB_ORA_CLASS : %NB_ORA_CLASS% >> %RMAN_LOG_FILE%
- @REM ---------------------------------------------------------------------------
- @REM We assume that the database is properly opened. If desired, this would
- @REM be the place to verify that.
- @REM ---------------------------------------------------------------------------
- @REM ---------------------------------------------------------------------------
- @REM If this script is executed from a NetBackup schedule, NetBackup
- @REM sets an NB_ORA environment variable based on the schedule type.
- @REM For example, when:
- @REM schedule type is BACKUP_TYPE is
- @REM ---------------- --------------
- @REM Automatic Full INCREMENTAL LEVEL=0
- @REM Automatic Differential Incremental INCREMENTAL LEVEL=1
- @REM Automatic Cumulative Incremental INCREMENTAL LEVEL=1 CUMULATIVE
- @REM
- @REM For user initiated backups, BACKUP_TYPE defaults to incremental
- @REM level 0 (Full). To change the default for a user initiated
- @REM backup to incremental or incrementatl cumulative, uncomment
- @REM one of the following two lines.
- @REM @set BACKUP_TYPE="INCREMENTAL LEVEL=1"
- @REM @set BACKUP_TYPE="INCREMENTAL LEVEL=1 CUMULATIVE"
- @REM
- @REM Note that we use incremental level 0 to specify full backups.
- @REM That is because, although they are identical in content, only
- @REM the incremental level 0 backup can have incremental backups of
- @REM level > 0 applied to it.
- @REM ---------------------------------------------------------------------------
- @REM ---------------------------------------------------------------------------
- @REM What kind of backup will we perform.
- @REM ---------------------------------------------------------------------------
- @if "%NB_ORA_FULL%" EQU "1" @set BACKUP_TYPE=INCREMENTAL Level=0
- @if "%NB_ORA_INCR%" EQU "1" @set BACKUP_TYPE=INCREMENTAL Level=1
- @if "%NB_ORA_CINC%" EQU "1" @set BACKUP_TYPE=INCREMENTAL Level=1 CUMULATIVE
- @if NOT DEFINED BACKUP_TYPE @set BACKUP_TYPE=INCREMENTAL Level=0
- @REM ---------------------------------------------------------------------------
- @REM Call Recovery Manager to initiate the backup. This example does not use a
- @REM Recovery Catalog. If you choose to use one, remove the option, nocatalog,
- @REM from the rman command line below and add a
- @REM 'rcvcat <userid>/<passwd>@<tns alias>' statement.
- @REM
- @REM NOTE WHEN USING TNS ALIAS: When connecting to a database
- @REM using a TNS alias, you must use a send command or a parms operand to
- @REM specify environment variables. In other words, when accessing a database
- @REM through a listener, the environment variables set at the system level are not
- @REM visible when RMAN is running. For more information on the environment
- @REM variables, please refer to the NetBackup for Oracle Admin. Guide.
- @REM
- @REM If you are getting an error that the input line is too long, you will need
- @REM to put the RMAN run block in a separate file. Then use the "cmdfile"
- @REM option of RMAN. For more information on the "cmdfile" options please
- @REM refer to the RMAN documentation.
- @REM ---------------------------------------------------------------------------
- @REM ---------------------------------------------------------------------------
- @REM PROXY
- @REM For a PROXY backup, you must use a send command to specify
- @REM the NB_ORA_PC_STREAMS environment variable. For example,
- @REM echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
- @REM echo SEND 'NB_ORA_PC_STREAMS=%%NB_ORA_PC_STREAMS%%';
- @REM
- @REM %BACKUP_TYPE% must also be removed and replaced with the PROXY parameter
- @REM in the RMAN section associated with the data files. For example,
- @REM echo BACKUP
- @REM echo PROXY
- @REM echo FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
- @REM echo DATABASE;
- @REM .
- @REM .
- @REM Note that the controlfiles and archivelogs are not backed up using proxy
- @REM copy method. Rman will initiate non-proxy copy sessions to backup the
- @REM controlfile and archivelogs.
- @REM ---------------------------------------------------------------------------
- @(
- echo RUN {
- echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
- echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
- echo BACKUP
- echo %BACKUP_TYPE%
- echo FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
- echo DATABASE;
- echo sql 'alter system archive log current';
- echo RELEASE CHANNEL ch00;
- echo RELEASE CHANNEL ch01;
- echo # Backup all archive logs
- echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
- echo BACKUP
- echo FILESPERSET 20
- echo FORMAT 'arch-s%%s-p%%p'
- echo ARCHIVELOG ALL;
- echo RELEASE CHANNEL ch00;
- echo }
- ) | %RMAN% target %TARGET_CONNECT_STR% nocatalog msglog '%RMAN_LOG_FILE%' append
- @set ERRLEVEL=%ERRORLEVEL%
- @REM ---------------------------------------------------------------------------
- @REM NetBackup (bphdb) stores the name of a file in an environment variable,
- @REM called STATUS_FILE. This file is used by an automatic schedule to
- @REM communicate status information with NetBackup's job monitor. It is up to
- @REM the script to write a 0 (passed) or 1 (failure) to the status file.
- @REM ---------------------------------------------------------------------------
- @if %ERRLEVEL% NEQ 0 @goto err
- @set LOGMSG=ended successfully
- @if "%STATUS_FILE%" EQU "" goto end
- @echo 0 > "%STATUS_FILE%"
- @goto end
- :err
- @set LOGMSG=ended in error
- @if "%STATUS_FILE%" EQU "" @goto end
- @echo 1 > "%STATUS_FILE%"
- :end
- @REM ---------------------------------------------------------------------------
- @REM Log the completion of this script.
- @REM ---------------------------------------------------------------------------
- @for /F "tokens=1*" %%p in ('date /T') do @set DATE=%%p %%q
- @for /F %%p in ('time /T') do @set DATE=%DATE% %%p
- @echo # >> %RMAN_LOG_FILE%
- @echo %==== %LOGMSG% on %DATE% ==== >> %RMAN_LOG_FILE%
- @endlocal
- @REM End of Main Program -----------------------------------------------------
复制代码
备份后输出错误日志如下:
- ==== started on 2009-06-27 星期六 20:53 ====
- Script name: "C:scripthot_database_backup.cmd"
- #
- RMAN : C:oracleproduct10.1.0Db_1binrman.exe
- NLS_LANG : american
- ORACLE_HOME : C:oracleproduct10.1.0Db_1
- ORACLE_SID : ORCL
- NLS_DATE_FORMAT : YYYY-MM-DD:hh24:mi:ss
- RMAN_LOG_FILE : "C:scripthot_database_backup.out"
- NB_ORA_SERV : mastersrv
- NB_ORA_FULL : 1
- NB_ORA_INCR : 0
- NB_ORA_CINC : 0
- NB_ORA_CLASS : oracle-bak
- Recovery Manager: Release 10.1.0.2.0 - Production
- Copyright (c) 1995, 2004, Oracle. All rights reserved.
- connected to target database: ORCL (DBID=1218420383)
- using target database controlfile instead of recovery catalog
- RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18>
- allocated channel: ch00
- channel ch00: sid=132 devtype=SBT_TAPE
- channel ch00: Veritas NetBackup for Oracle - Release 6.5 (20070723)
- allocated channel: ch01
- channel ch01: sid=148 devtype=SBT_TAPE
- channel ch01: Veritas NetBackup for Oracle - Release 6.5 (20070723)
- Starting backup at 2009-06-27:20:53:42
- channel ch00: starting incremental level 0 datafile backupset
- channel ch00: specifying datafile(s) in backupset
- input datafile fno=00001 name=C:ORACLEPRODUCT10.1.0ORADATAORCLSYSTEM01.DBF
- input datafile fno=00004 name=C:ORACLEPRODUCT10.1.0ORADATAORCLUSERS01.DBF
- channel ch00: starting piece 1 at 2009-06-27:20:53:42
- channel ch01: starting incremental level 0 datafile backupset
- channel ch01: specifying datafile(s) in backupset
- input datafile fno=00003 name=C:ORACLEPRODUCT10.1.0ORADATAORCLSYSAUX01.DBF
- input datafile fno=00002 name=C:ORACLEPRODUCT10.1.0ORADATAORCLUNDOTBS01.DBF
- channel ch01: starting piece 1 at 2009-06-27:20:53:42
- RMAN-03009: failure of backup command on ch00 channel at 06/27/2009 20:55:21
- ORA-27206: requested file not found in media management catalog
- continuing other job steps, job failed will not be re-run
- channel ch00: starting incremental level 0 datafile backupset
- channel ch00: specifying datafile(s) in backupset
- including current controlfile in backupset
- channel ch00: starting piece 1 at 2009-06-27:20:55:45
- RMAN-03009: failure of backup command on ch01 channel at 06/27/2009 20:56:00
- ORA-27206: requested file not found in media management catalog
- continuing other job steps, job failed will not be re-run
- channel ch01: starting incremental level 0 datafile backupset
- channel ch01: specifying datafile(s) in backupset
- including current SPFILE in backupset
- channel ch01: starting piece 1 at 2009-06-27:20:56:00
- RMAN-03009: failure of backup command on ch00 channel at 06/27/2009 20:56:25
- ORA-27206: requested file not found in media management catalog
- continuing other job steps, job failed will not be re-run
- released channel: ch00
- released channel: ch01
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03009: failure of backup command on ch01 channel at 06/27/2009 20:56:50
- ORA-27206: requested file not found in media management catalog
- RMAN>
- Recovery Manager complete.
- #
复制代码
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
不好意思,在那里看我装的是什么版本呢?
NBU的标准版和企业版对RMAN的通道数没什么限制吧?
企业版才能用两个CHANNEL。你看看你的是哪个版本。
NBU是6.5
文件系统能够备份。
另外,在命令行下用RMAN备份能备份得了。
只使用一个通道?在hot_database_backup.cmd 中把有关CH01的条目都删除吗?
NBU是什么版本?印象中企业版才可以用两个通道。
先确保文件系统能够备份。
另外,在命令行下用RMAN备份试试看能否备份得了。
备份卷池用的是本地磁盘,时间,路径都没问题的。
加了无牙的那一行也不行。master server名字是mastersrv 的。
veritasnetbackuplogsuser_opsdbextlogs 最新日志如下。
复制代码
复制代码
在脚本里面加上下面这行试一试。
send 'NB_ORA_CLIENT=mastersrv,NB_ORA_SERV=mastersrv';
master server的名字是mastersrv吗?
时间对么?
备份到DISK还是TAPE?
另外把日志贴出来瞧瞧
veritasnetbackuplogsuser_opsdbextlogs