免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 11676 | 回复: 12
打印 上一主题 下一主题

help!ORACLE RMAN恢复问题ORA-01152 ORA-01110 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-20 20:10 |只看该作者 |倒序浏览
在生产机上利用NBU全备份脚本进行全备份(包括数据文件\归档\控制文件),然后用NBU恢复到另外一台机器上,数据文件重定向,数据恢复没有问题,但在RMAN里恢复archive的时候有报错,
执行sqlplus>recover database using backup controlfile until cancel;
cancel
显示介质恢复没有开始

执行sqlplus>alter database open resetlogs;
报错:
ORA-01152:file1 was not restored from a sufficiently old backup
ORA-01110:data file 1 :/oradata/1.dbf


感觉是归档没有恢复,为什么会出现这个错误呢,如何解决,望大侠们赐教

论坛徽章:
0
2 [报告]
发表于 2007-05-20 23:02 |只看该作者
可能是因为在备份过程中,该数据文件被修改(其SCN比其他文件都要大),仍然产生redo,在你做完backup full database后,有没有执行sql 'alter system archive log current';  然后将所有的archived log都copy到另外的机器上?

解决办法:
1. recover database using backup controlfile until cancel时候,如果不是所有archived log都提示apply,则手工输入archived log,最后在输入cancel.

2. 或者设置 set until time ...   or  set until logseq ...

论坛徽章:
0
3 [报告]
发表于 2007-05-21 08:47 |只看该作者
用的是veritas netbackup 的全备份脚本:
备份数据文件和归档的代码如下:
CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
change archivelog all crosscheck;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;

论坛徽章:
0
4 [报告]
发表于 2007-05-22 10:11 |只看该作者
异机恢复过程:
在rman>run
{
allocate channel ch00 type 'sbt_tape' parms="ENV=(NB_ORA_CLIENT=zjddms1)";
set newname for datafile 1 to '/oradata/zjdms/1.dbf';
set newname for datafile 2 to '/oradata/zjdms/2.dbf';
set newname for datafile 3 to '/oradata/zjdms/3.dbf';
set newname for datafile 4 to '/oradata/zjdms/4.dbf';
set newname for datafile 5 to '/oradata/zjdms/5.dbf';
set newname for datafile 6 to '/oradata/zjdms/6.dbf';
set newname for datafile 7 to '/oradata/zjdms/7.dbf';
set newname for datafile 8 to '/oradata/zjdms/8.dbf';
set newname for datafile 9 to '/oradata/zjdms/9.dbf';
set newname for datafile 10 to '/oradata/zjdms/10.dbf';
set newname for datafile 11 to '/oradata/test/11.dbf';
set newname for datafile 12 to '/oradata/zjdms/12.dbf';
set newname for datafile 13 to '/oradata/zjdms/13.dbf';
set newname for datafile 14 to '/oradata/zjdms/14.dbf';
set newname for datafile 15 to '/oradata/zjdms/15.dbf';
set newname for datafile 16 to '/oradata/test/16.dbf';
set newname for datafile 17 to '/oradata/test/17.dbf';
set newname for datafile 18 to '/oradata/test/18.dbf';
set newname for datafile 19 to '/oradata/test/19.dbf';
set newname for datafile 20 to '/oradata/test/20.dbf';
set newname for datafile 21 to '/oradata/test/21.dbf';
set newname for datafile 22 to '/oradata/test/22.dbf';
set newname for datafile 23 to '/oradata/test/23.dbf';
set newname for datafile 24 to '/oradata/test/24.dbf';
restore database;
switch datafile all;
recover database;
release channel ch00;
}
在恢复完数据文件后,
报错情况:
Starting recover at 21-5月 -07

starting media recovery

Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/oradata/zjdms/1.dbf'

released channel: ch00
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/21/2007 12:15:56
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 1829 scn 346995546 found to restore
RMAN-06025: no backup of log thread 1 seq 1828 scn 346792052 found to restore
RMAN-06025: no backup of log thread 1 seq 1827 scn 346703657 found to restore
RMAN-06025: no backup of log thread 2 seq 810 scn 346599859 found to restore
RMAN-06025: no backup of log thread 1 seq 1826 scn 346599811 found to restore
RMAN-06025: no backup of log thread 1 seq 1825 scn 346473736 found to restore
RMAN-06025: no backup of log thread 1 seq 1824 scn 346296777 found to restore
RMAN-06025: no backup of log thread 2 seq 809 scn 346173706 found to restore
RMAN-06025: no backup of log thread 1 seq 1823 scn 346173484 found to restore
RMAN-06025: no backup of log thread 1 seq 1822 scn 346054833 found to restore
RMAN-06025: no backup of log thread 1 seq 1821 scn 345962016 found to restore
RMAN-06025: no backup of log thread 2 seq 808 scn 345807290 found to restore
RMAN-06025: no backup of log thread 1 seq 1820 scn 345807267 found to restore
RMAN-06025: no backup of log thread 1 seq 1819 scn 345606204 found to restore
RMAN-06025: no backup of log thread 1 seq 1818 scn 345167508 found to restore
RMAN-06025: no backup of log thread 2 seq 807 scn 344786407 found to restore
RMAN-06025: no backup of log thread 1 seq 1817 scn 344786402 found to restore
RMAN-06025: no backup of log thread 1 seq 1816 scn 344700233 found to restore
RMAN-06025: no backup of log thread 1 seq 1815 scn 344597359 found to restore
RMAN-06025: no backup of log thread 2 seq 806 scn 344474332 found to restore
RMAN-06025: no backup of log thread 1 seq 1814 scn 344474312 found to restore
RMAN-06025: no backup of log thread 1 seq 1813 scn 344315242 found to restore
RMAN-06025: no backup of log thread 1 seq 1812 scn 344160555 found to restore
RMAN-06025: no backup of log thread 2 seq 805 scn 344002994 found to restore
RMAN-06025: no backup of log thread 1 seq 1811 scn 344002987 found to restore
RMAN-06025: no backup of log thread 1 seq 1810 scn 343850002 found to restore
RMAN-06025: no backup of log thread 1 seq 1809 scn 343700840 found to restore
RMAN-06025: no backup of log thread 2 seq 804 scn 343560656 found to restore
RMAN-06025: no backup of log thread 1 seq 1808 scn 343560652 found to restore
RMAN-06025: no backup of log thread 1 seq 1807 scn 343113383 found to restore
RMAN-06025: no backup of log thread 1 seq 1806 scn 342758977 found to restore
RMAN-06025: no backup of log thread 2 seq 803 scn 342682556 found to restore
RMAN-06025: no backup of log thread 1 seq 1805 scn 342682550 found to restore
RMAN-06025: no backup of log thread 1 seq 1804 scn 342583307 found to restore
RMAN-06025: no backup of log thread 1 seq 1803 scn 342476123 found to restore
RMAN-06025: no backup of log thread 2 seq 802 scn 342335933 found to restore
RMAN-06025: no backup of log thread 1 seq 1802 scn 342335784 found to restore
RMAN-06025: no backup of log thread 1 seq 1801 scn 342091741 found to restore
RMAN-06025: no backup of log thread 1 seq 1800 scn 341969997 found to restore
RMAN-06025: no backup of log thread 2 seq 801 scn 341816214 found to restore
RMAN-06025: no backup of log thread 1 seq 1799 scn 341816057 found to restore
RMAN-06025: no backup of log thread 1 seq 1798 scn 341622627 found to restore
RMAN-06025: no backup of log thread 1 seq 1797 scn 341516937 found to restore
RMAN-06025: no backup of log thread 2 seq 800 scn 341067342 found to restore
RMAN-06025: no backup of log thread 1 seq 1796 scn 341067278 found to restore
RMAN-06025: no backup of log thread 1 seq 1795 scn 340748546 found to restore
RMAN-06025: no backup of log thread 1 seq 1794 scn 340510564 found to restore
RMAN-06025: no backup of log thread 2 seq 799 scn 340325928 found to restore
RMAN-06025: no backup of log thread 1 seq 1793 scn 340325923 found to restore
RMAN-06025: no backup of log thread 1 seq 1792 scn 340247939 found to restore
RMAN-06025: no backup of log thread 1 seq 1791 scn 340107663 found to restore
RMAN-06025: no backup of log thread 2 seq 798 scn 339998719 found to restore
RMAN-06025: no backup of log thread 1 seq 1790 scn 339998676 found to restore
RMAN-06025: no backup of log thread 1 seq 1789 scn 339828284 found to restore
RMAN-06025: no backup of log thread 1 seq 1788 scn 339366125 found to restore
RMAN-06025: no backup of log thread 2 seq 797 scn 339028137 found to restore
RMAN-06025: no backup of log thread 1 seq 1787 scn 339028120 found to restore
RMAN-06025: no backup of log thread 1 seq 1786 scn 338959453 found to restore
RMAN-06025: no backup of log thread 1 seq 1785 scn 338925536 found to restore
MAN-06025: no backup of log thread 2 seq 796 scn 338826676 found
RMAN>

论坛徽章:
0
5 [报告]
发表于 2007-05-22 14:19 |只看该作者
backup script & log

论坛徽章:
0
6 [报告]
发表于 2007-05-22 22:11 |只看该作者
NBU备份脚本:
#!/bin/sh
# $Header: hot_database_backup.sh,v 1.2 2002/08/06 23:51:42 $
#
#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2003 VERITAS Software Corporation, All Rights Reserved $ *
#***************************************************************************
#ecpyrght
#
# ---------------------------------------------------------------------------
#                          hot_database_backup.sh
# ---------------------------------------------------------------------------
#  This script uses Recovery Manager to take a hot (inconsistent) database
#  backup. A hot backup is inconsistent because portions of the database are
#  being modified and written to the disk while the backup is progressing.
#  You must run your database in ARCHIVELOG mode to make hot backups. It is
#  assumed that this script will be executed by user root. In order for RMAN
#  to work properly we switch user (su -) to the oracle dba account before
#  execution. If this script runs under a user account that has Oracle dba
#  privilege, it will be executed using this user's account.
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# Determine the user which is executing this script.
# ---------------------------------------------------------------------------

CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`

# ---------------------------------------------------------------------------
# Put output in <this file name>.out. Change as desired.
# Note: output directory requires write permission.
# ---------------------------------------------------------------------------

RMAN_LOG_FILE=${0}.out

# ---------------------------------------------------------------------------
# You may want to delete the output file so that backup information does
# not accumulate.  If not, delete the following lines.
# ---------------------------------------------------------------------------

if [ -f "$RMAN_LOG_FILE" ]
then
        rm -f "$RMAN_LOG_FILE"
fi

# -----------------------------------------------------------------
# Initialize the log file.
# -----------------------------------------------------------------

echo >> $RMAN_LOG_FILE
chmod 666 $RMAN_LOG_FILE

# ---------------------------------------------------------------------------
# Log the start of this script.
# ---------------------------------------------------------------------------

echo Script $0 >> $RMAN_LOG_FILE
echo ==== started on `date` ==== >> $RMAN_LOG_FILE
echo >> $RMAN_LOG_FILE

# ---------------------------------------------------------------------------
# Replace /db/oracle/product/ora81, below, with the Oracle home path.
# ------------------------------------------------------------------

ORACLE_HOME=/oracle/product/9.0.1
export ORACLE_HOME

# ---------------------------------------------------------------------------
# Replace ora81, below, with the Oracle SID of the target database.
# ---------------------------------------------------------------------------

ORACLE_SID=sid1
export ORACLE_SID

# ---------------------------------------------------------------------------
# Replace ora81, below, with the Oracle DBA user id (account).
# ---------------------------------------------------------------------------

ORACLE_USER=oracle

# ---------------------------------------------------------------------------
# Set the target connect string.
# Replace "sys/manager", below, with the target connect string.
# ---------------------------------------------------------------------------

TARGET_CONNECT_STR=/

# ---------------------------------------------------------------------------
# Set the Oracle Recovery Manager name.
# ---------------------------------------------------------------------------

RMAN=$ORACLE_HOME/bin/rman

# ---------------------------------------------------------------------------
# Print out the value of the variables set by this script.
# ---------------------------------------------------------------------------

echo >> $RMAN_LOG_FILE
echo   "RMAN: $RMAN" >> $RMAN_LOG_FILE
echo   "ORACLE_SID: $ORACLE_SID" >> $RMAN_LOG_FILE
echo   "ORACLE_USER: $ORACLE_USER" >> $RMAN_LOG_FILE
echo   "ORACLE_HOME: $ORACLE_HOME" >> $RMAN_LOG_FILE

# ---------------------------------------------------------------------------
# Print out the value of the variables set by bphdb.
# ---------------------------------------------------------------------------

echo  >> $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_SERV: $NB_ORA_SERV" >> $RMAN_LOG_FILE
echo   "NB_ORA_POLICY: $NB_ORA_POLICY" >> $RMAN_LOG_FILE

# ---------------------------------------------------------------------------
# NOTE: This script assumes that the database is properly opened. If desired,
# this would be the place to verify that.
# ---------------------------------------------------------------------------

echo >> $RMAN_LOG_FILE
# ---------------------------------------------------------------------------
# If this script is executed from a NetBackup schedule, NetBackup
# sets an NB_ORA environment variable based on the schedule type.
# The NB_ORA variable is then used to dynamically set BACKUP_TYPE
# For example, when:
#     schedule type is                BACKUP_TYPE is
#     ----------------                --------------
# Automatic Full                     INCREMENTAL LEVEL=0
# Automatic Differential Incremental INCREMENTAL LEVEL=1
# Automatic Cumulative Incremental   INCREMENTAL LEVEL=1 CUMULATIVE
#
# For user initiated backups, BACKUP_TYPE defaults to incremental
# level 0 (full).  To change the default for a user initiated
# backup to incremental or incremental cumulative, uncomment
# one of the following two lines.
# BACKUP_TYPE="INCREMENTAL LEVEL=1"
# BACKUP_TYPE="INCREMENTAL LEVEL=1 CUMULATIVE"
#
# Note that we use incremental level 0 to specify full backups.
# That is because, although they are identical in content, only
# the incremental level 0 backup can have incremental backups of
# level > 0 applied to it.
# ---------------------------------------------------------------------------

if [ "$NB_ORA_FULL" = "1" ]
then
        echo "Full backup requested" >> $RMAN_LOG_FILE
        BACKUP_TYPE="INCREMENTAL LEVEL=0"

elif [ "$NB_ORA_INCR" = "1" ]
then
        echo "Differential incremental backup requested" >> $RMAN_LOG_FILE
        BACKUP_TYPE="INCREMENTAL LEVEL=1"

elif [ "$NB_ORA_CINC" = "1" ]
then
        echo "Cumulative incremental backup requested" >> $RMAN_LOG_FILE
        BACKUP_TYPE="INCREMENTAL LEVEL=1 CUMULATIVE"

elif [ "$BACKUP_TYPE" = "" ]
then
        echo "Default - Full backup requested" >> $RMAN_LOG_FILE
        BACKUP_TYPE="INCREMENTAL LEVEL=0"
fi


# ---------------------------------------------------------------------------
# Call Recovery Manager to initiate the backup. This example does not use a
# Recovery Catalog. If you choose to use one, replace the option 'nocatalog'
# from the rman command line below with the
# 'rcvcat <userid>/<passwd>@<tns alias>' statement.
#
# Note: Any environment variables needed at run time by RMAN
#       must be set and exported within the switch user (su) command.
# ---------------------------------------------------------------------------
#  Backs up the whole database.  This backup is part of the incremental
#  strategy (this means it can have incremental backups of levels > 0
#  applied to it).
#
#  We do not need to explicitly request the control file to be included
#  in this backup, as it is automatically included each time file 1 of
#  the system tablespace is backed up (the inference: as it is a whole
#  database backup, file 1 of the system tablespace will be backed up,
#  hence the controlfile will also be included automatically).
#
#  Typically, a level 0 backup would be done at least once a week.
#
#  The scenario assumes:
#     o you are backing your database up to two tape drives
#     o you want each backup set to include a maximum of 5 files
#     o you wish to include offline datafiles, and read-only tablespaces,
#       in the backup
#     o you want the backup to continue if any files are inaccessible.
#     o you are not using a Recovery Catalog
#     o you are explicitly backing up the control file.  Since you are
#       specifying nocatalog, the controlfile backup that occurs
#       automatically as the result of backing up the system file is
#       not sufficient; it will not contain records for the backup that
#       is currently in progress.
#     o you want to archive the current log, back up all the
#       archive logs using two channels, putting a maximum of 20 logs
#       in a backup set, and deleting them once the backup is complete.
#
#  Note that the format string is constructed to guarantee uniqueness and
#  to enhance NetBackup for Oracle backup and restore performance.
#
#
#  NOTE WHEN USING TNS ALIAS: When connecting to a database
#  using a TNS alias, you must use a send command or a parms operand to
#  specify environment variables.  In other words, when accessing a database
#  through a listener, the environment variables set at the system level are not
#  visible when RMAN is running.  For more information on the environment
#  variables, please refer to the NetBackup for Oracle Admin. Guide.
#
# ---------------------------------------------------------------------------

CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
#change archivelog all crosscheck;
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL DELETE INPUT;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
#
# Note: During the process of backing up the database, RMAN also backs up the
# control file.  This version of the control file does not contain the
# information about the current backup because "nocatalog" has been specified.
# To include the information about the current backup, the control file should
# be backed up as the last step of the RMAN section.  This step would not be
# necessary if we were using a recovery catalog.
#
ALLOCATE CHANNEL ch00 TYPE DISK;
COPY
   CURRENT CONTROLFILE TO '/usr/openv/scripts/control.ora';
RELEASE CHANNEL ch00;
}
EOF
"
# Initiate the command string

if [ "$CUSER" = "root" ]
then
    su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
else
    /usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
fi

# ---------------------------------------------------------------------------
# Log the completion of this script.
# ---------------------------------------------------------------------------


#/usr/openv/netbackup/bin/bparchive -p /usr/openv/scripts/control.ora

if [ "$RSTAT" = "0" ]
then
    LOGMSG="ended successfully"
else
    LOGMSG="ended in error"
fi

echo >> $RMAN_LOG_FILE
echo Script $0 >> $RMAN_LOG_FILE
echo ==== $LOGMSG on `date` ==== >> $RMAN_LOG_FILE
echo >> $RMAN_LOG_FILE

exit $RSTAT

[ 本帖最后由 hzmark 于 2007-5-22 22:17 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2007-05-22 22:17 |只看该作者
备份脚本的.out文件:

Script /usr/openv/scripts/fu.sh
==== started on 2007年5月22日 星期二, 00:00:23 ====


RMAN: /oracle/product/9.0.1/bin/rman
ORACLE_SID: sid1
ORACLE_USER: oracle
ORACLE_HOME: /oracle/product/9.0.1

NB_ORA_FULL: 0
NB_ORA_INCR: 1
NB_ORA_CINC: 0
NB_ORA_SERV: backup
NB_ORA_POLICY: test

Differential incremental backup requested
(c)Copyright 1983-2000 Hewlett-Packard Co.,  All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993  The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2000 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1991-2000 Isogon Corporation, All Rights Reserved.


                           RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

                           Hewlett-Packard Company
                           3000 Hanover Street
                           Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).


        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2        2
                                                                        
Recovery Manager: Release 9.2.0.7.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: DBS (DBID=2001635239)
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> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37>
allocated channel: ch00
channel ch00: sid=40 devtype=SBT_TAPE
channel ch00: VERITAS NetBackup for Oracle - Release 5.0GA (2003103005)

allocated channel: ch01
channel ch01: sid=106 devtype=SBT_TAPE
channel ch01: VERITAS NetBackup for Oracle - Release 5.0GA (2003103005)

Starting backup at 22-5月 -07
channel ch00: starting incremental level 1 datafile backupset
channel ch00: specifying datafile(s) in backupset
channel ch01: starting incremental level 1 datafile backupset
channel ch01: specifying datafile(s) in backupset
input datafile fno=00002 name=/dev/vg01/rvg01_undotbs1_6004m.dbf
input datafile fno=00009 name=/dev/vg02/rvg02_user_blobs_5004m.ora
input datafile fno=00006 name=/dev/vg01/rvg01_user_4004m.dbf
input datafile fno=00004 name=/dev/vg01/rvg01_tools_1004m.dbf
input datafile fno=00014 name=/dev/vg02/rvg02_dbs_real_1004m.ora
channel ch01: starting piece 1 at 22-5月 -07
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00024 name=/dev/vg01/rvg01_bck25_10004m
input datafile fno=00001 name=/dev/vg01/rvg01_system_4004m.dbf
input datafile fno=00008 name=/dev/vg02/rvg02_dbs_web_2004m.ora
channel ch00: starting piece 1 at 22-5月 -07
channel ch01: finished piece 1 at 22-5月 -07
piece handle=bk_1279_1_623203232 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch01: backup set complete, elapsed time: 00:05:47
channel ch01: starting incremental level 1 datafile backupset
channel ch01: specifying datafile(s) in backupset
input datafile fno=00005 name=/dev/vg02/rvg02_undotbs2_6004m.dbf
input datafile fno=00021 name=/dev/vg03/rvg03_bck29_5004m
input datafile fno=00015 name=/dev/vg02/rvg02_dbms_bh_4004m.ora
input datafile fno=00012 name=/dev/vg02/rvg02_dbms_tx_1004m.ora
input datafile fno=00017 name=/dev/vg02/rvg02_dbms_sb_1004m.ora
channel ch01: starting piece 1 at 22-5月 -07
channel ch00: finished piece 1 at 22-5月 -07
piece handle=bk_1278_1_623203232 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:09:13
channel ch00: starting incremental level 1 datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00018 name=/dev/vg03/rvg03_dbms_scada_15004m
input datafile fno=00010 name=/dev/vg02/rvg02_dbms_dd_2004m.ora
input datafile fno=00019 name=/dev/vg02/rvg02_dte_504m.ora
channel ch00: starting piece 1 at 22-5月 -07
channel ch01: finished piece 1 at 22-5月 -07
piece handle=bk_1280_1_623203580 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch01: backup set complete, elapsed time: 00:06:50
channel ch01: starting incremental level 1 datafile backupset
channel ch01: specifying datafile(s) in backupset
input datafile fno=00003 name=/dev/vg01/rvg01_indx_8004m.dbf
input datafile fno=00022 name=/dev/vg03/rvg03_bck30_5004m
input datafile fno=00016 name=/dev/vg02/rvg02_dbms_zh_4004m.ora
input datafile fno=00020 name=/dev/vg03/rvg03_bck30.dbf
skipping datafile 00020 because it has not changed
channel ch01: starting piece 1 at 22-5月 -07
channel ch00: finished piece 1 at 22-5月 -07
piece handle=bk_1281_1_623203785 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:07:01
channel ch00: starting incremental level 1 datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00007 name=/dev/vg02/rvg02_dbms_base_8004m.ora
input datafile fno=00023 name=/dev/vg01/rvg01_bck23_5004m
input datafile fno=00011 name=/dev/vg02/rvg02_dbms_yf_3004m.ora
input datafile fno=00013 name=/dev/vg02/rvg02_dbms_zdh_1004m.ora
channel ch00: starting piece 1 at 22-5月 -07
channel ch01: finished piece 1 at 22-5月 -07
piece handle=bk_1282_1_623203991 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch01: backup set complete, elapsed time: 00:07:02
channel ch00: finished piece 1 at 22-5月 -07
piece handle=bk_1283_1_623204206 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:09:55
Finished backup at 22-5月 -07

sql statement: alter system archive log current

released channel: ch00

released channel: ch01

allocated channel: ch00
channel ch00: sid=40 devtype=SBT_TAPE
channel ch00: VERITAS NetBackup for Oracle - Release 5.0GA (2003103005)

allocated channel: ch01
channel ch01: sid=106 devtype=SBT_TAPE
channel ch01: VERITAS NetBackup for Oracle - Release 5.0GA (2003103005)

Starting backup at 22-5月 -07
current log archived
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=1928 recid=4589 stamp=623128519
input archive log thread=1 sequence=1929 recid=4593 stamp=623135543
input archive log thread=1 sequence=1930 recid=4595 stamp=623144752
input archive log thread=1 sequence=1931 recid=4597 stamp=623152569
input archive log thread=1 sequence=1932 recid=4601 stamp=623158535
input archive log thread=1 sequence=1933 recid=4605 stamp=623158546
input archive log thread=1 sequence=1934 recid=4606 stamp=623167848
input archive log thread=1 sequence=1935 recid=4610 stamp=623175282
channel ch00: starting piece 1 at 22-5月 -07
channel ch01: starting archive log backupset
channel ch01: specifying archive log(s) in backup set
input archive log thread=1 sequence=1936 recid=4612 stamp=623180463
input archive log thread=1 sequence=1937 recid=4614 stamp=623189285
input archive log thread=1 sequence=1938 recid=4618 stamp=623198536
input archive log thread=1 sequence=1939 recid=4622 stamp=623204944
input archive log thread=1 sequence=1940 recid=4626 stamp=623204954
input archive log thread=2 sequence=850 recid=4591 stamp=623135540
input archive log thread=2 sequence=851 recid=4599 stamp=623158489
input archive log thread=2 sequence=852 recid=4603 stamp=623158605
input archive log thread=2 sequence=853 recid=4608 stamp=623175193
input archive log thread=2 sequence=854 recid=4616 stamp=623198441
channel ch01: starting piece 1 at 22-5月 -07
channel ch00: finished piece 1 at 22-5月 -07
piece handle=al_1284_1_623204957 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:05:29
channel ch00: deleting archive log(s)
archive log filename=/arch/arch2/1_1928.dbf recid=4589 stamp=623128519
archive log filename=/arch/arch2/1_1929.dbf recid=4593 stamp=623135543
archive log filename=/arch/arch2/1_1930.dbf recid=4595 stamp=623144752
archive log filename=/arch/arch2/1_1931.dbf recid=4597 stamp=623152569
archive log filename=/arch/arch2/1_1932.dbf recid=4601 stamp=623158535
archive log filename=/arch/arch2/1_1933.dbf recid=4605 stamp=623158546
archive log filename=/arch/arch1/1_1934.dbf recid=4606 stamp=623167848
archive log filename=/arch/arch1/1_1935.dbf recid=4610 stamp=623175282
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=2 sequence=855 recid=4620 stamp=623204879
input archive log thread=2 sequence=856 recid=4624 stamp=623205015
channel ch00: starting piece 1 at 22-5月 -07
channel ch01: finished piece 1 at 22-5月 -07
piece handle=al_1285_1_623204957 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch01: backup set complete, elapsed time: 00:08:06
channel ch01: deleting archive log(s)
archive log filename=/arch/arch1/1_1936.dbf recid=4612 stamp=623180463
archive log filename=/arch/arch1/1_1937.dbf recid=4614 stamp=623189285
archive log filename=/arch/arch1/1_1938.dbf recid=4618 stamp=623198536
archive log filename=/arch/arch1/1_1939.dbf recid=4622 stamp=623204944
archive log filename=/arch/arch1/1_1940.dbf recid=4626 stamp=623204954
archive log filename=/arch/arch2/2_850.dbf recid=4591 stamp=623135540
archive log filename=/arch/arch2/2_851.dbf recid=4599 stamp=623158489
archive log filename=/arch/arch2/2_852.dbf recid=4603 stamp=623158605
archive log filename=/arch/arch1/2_853.dbf recid=4608 stamp=623175193
archive log filename=/arch/arch1/2_854.dbf recid=4616 stamp=623198441
channel ch00: finished piece 1 at 22-5月 -07
piece handle=al_1286_1_623205287 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:03:12
channel ch00: deleting archive log(s)
archive log filename=/arch/arch1/2_855.dbf recid=4620 stamp=623204879
archive log filename=/arch/arch1/2_856.dbf recid=4624 stamp=623205015
Finished backup at 22-5月 -07

released channel: ch00

released channel: ch01

allocated channel: ch00
channel ch00: sid=40 devtype=DISK

Starting copy at 22-5月 -07
channel ch00: copied current controlfile
output filename=/usr/openv/scripts/control.ora
Finished copy at 22-5月 -07

released channel: ch00

RMAN> RMAN>

Recovery Manager complete.
logout

Script /usr/openv/scripts/fu.sh
==== ended successfully on 2007年5月22日 星期二, 00:38:07 ====

[ 本帖最后由 hzmark 于 2007-5-22 22:18 编辑 ]

论坛徽章:
0
8 [报告]
发表于 2007-05-22 22:23 |只看该作者
源数据库机器为HP-UX 11.11,oracle9.2.0.7,数据文件放在裸设备上,现在通过NBU先备份到带库,然后做异机恢复数据到另一台HP-UX11.11,数据文件可以恢复,但归档无法恢复,在上面.out文件里看到归档已经备份了,通过list backup for archivelog all也能看到归档日志的备份集。

论坛徽章:
0
9 [报告]
发表于 2007-05-22 23:07 |只看该作者
NB_ORA_INCR=1
从日志中也可以看出

你作的是incremental level 1的备份
channel ch01: starting incremental level 1 datafile backupset

level 0的备份呢?

论坛徽章:
0
10 [报告]
发表于 2007-05-23 16:36 |只看该作者
哦,可能.out文件发错了,可以确信我的确是做的全备份,.out文件是晚上自动执行的增量备份产生的输出。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP