免费注册 查看新帖 |

Chinaunix

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

[备份软件] legato在备份ORACLE数据库时出现的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-02-12 10:00 |只看该作者 |倒序浏览
info: starting LKD380oracledata (with 1 client(s))
* lkd380:/fullback

/opt/networker/bin/nsrnmolk[87]: PROD.env:  not found.

* lkd380:/fullback

* lkd380:/fullback Recovery Manager: Release 8.0.5.1.0 - Production
* lkd380:/fullback

* lkd380:/fullback RMAN>; connect rcvcat rman/rman@rman

* lkd380:/fullback 2>; connect target internal/oracle

* lkd380:/fullback 3>; run {

* lkd380:/fullback 4>; allocate channel t2 type 'SBT_TAPE'

* lkd380:/fullback 5>; parms 'ENV=(NSR_SERVER=backserver,NSR_DATA_VOLUME_POOL=oraclepool,

* lkd380:/fullback 6>; NSR_SERVER=backserver,

* lkd380:/fullback 7>; NSR_GROUP=LKD380oracledata,
* lkd380:/fullback 8>;

NSR_SAVESET_NAME=/fullback)';

* lkd380:/fullback 9>; sql 'alter system switch logfile';


* lkd380:/fullback 10>; backup full database

* lkd380:/fullback 11>; format 'FuLL_%d_%u'

* lkd380:/fullback 12>; filesperset 1;

* lkd380:/fullback 13>; release channel t2;

* lkd380:/fullback 14>; }

* lkd380:/fullback 15>;

* lkd380:/fullback 16>;

* lkd380:/fullback RMAN-06008: connected to recovery catalog database

* lkd380:/fullback

* lkd380:/fullback RMAN-06005: connected to target database: PROD


* lkd380:/fullback

* lkd380:/fullback RMAN-03022: compiling command: allocate

* lkd380:/fullback RMAN-03023: executing command: allocate

* lkd380:/fullback RMAN-08030: allocated channel: t2

* lkd380:/fullback RMAN-08500: channel t2: sid=38 devtype=SBT_TAPE

* lkd380:/fullback

* lkd380:/fullback RMAN-03022: compiling command: sql
* lkd380:/fullback RMAN-06162: sql statement: alter system switch logfile
* lkd380:/fullback

RMAN-03023: executing command: sql

* lkd380:/fullback

* lkd380:/fullback RMAN-03022: compiling command: backup

* lkd380:/fullback RMAN-00569: ================error message stack follows================

* lkd380:/fullback RMAN-03002: failure during compilation of command

* lkd380:/fullback RMAN-03013: command type: backup

* lkd380:/fullback RMAN-03014: implicit resync of recovery catalog failed

* lkd380:/fullback RMAN-06038: recovery catalog package detected an error

* lkd380:/fullback RMAN-20035: invalid high recid

* lkd380:/fullback

* lkd380:/fullback Recovery Manager complete.

* lkd380:/fullback 02/12/03 00:57:18 NetWorker: Error: process 13404 running command

"/u03/oracle/app/oracle/product/8.0.5/bin/rman" completed with an error code of 1.

* lkd380:/fullback nsrnmostart returned status of 1

* lkd380:/fullback /opt/networker/bin/nsrnmolk exiting.
02/12/03 01:00:22 savegrp:

lkd380:/fullback will retry 1 more time(s)

* lkd380:/controlback /opt/networker/bin/nsrnmolk[87]: PROD.env:  not found.

* lkd380:/controlback

* lkd380:/controlback Recovery Manager: Release 8.0.5.1.0 - Production
* lkd380:/controlback

* lkd380:/controlback RMAN>; connect rcvcat rman/rman@rman
* lkd380:/controlback 2>; connect target

internal/oracle

* lkd380:/controlback 3>; run {

* lkd380:/controlback 4>; allocate channel t2 type 'SBT_TAPE'

* lkd380:/controlback 5>; parms 'ENV=(NSR_SERVER=backserver,NSR_DATA_VOLUME_POOL=oraclepool,

* lkd380:/controlback 6>; NSR_SERVER=backserver,

* lkd380:/controlback 7>; NSR_GROUP=LKD380oracledata,

* lkd380:/controlback 8>; NSR_SAVESET_NAME=/controlback)';

* lkd380:/controlback 9>; backup current controlfile
* lkd380:/controlback 10>; format

'control_%d_%u'

* lkd380:/controlback 11>; filesperset 1;

* lkd380:/controlback 12>; release channel t2;

* lkd380:/controlback 13>; }

* lkd380:/controlback 14>;

* lkd380:/controlback 15>;

* lkd380:/controlback RMAN-06008: connected to recovery catalog database

* lkd380:/controlback

* lkd380:/controlback RMAN-06005: connected to target database: PROD

* lkd380:/controlback

* lkd380:/controlback RMAN-03022: compiling command: allocate

* lkd380:/controlback RMAN-03023: executing command: allocate

* lkd380:/controlback RMAN-08030: allocated channel: t2

* lkd380:/controlback RMAN-08500: channel t2: sid=51 devtype=SBT_TAPE

* lkd380:/controlback

* lkd380:/controlback RMAN-03022: compiling command: backup

* lkd380:/controlback RMAN-00569: ================error message stack follows================
*

lkd380:/controlback RMAN-03002: failure during compilation of command

* lkd380:/controlback RMAN-03013: command type: backup

* lkd380:/controlback RMAN-03014: implicit resync of recovery catalog failed

* lkd380:/controlback RMAN-06038: recovery catalog package detected an error

* lkd380:/controlback RMAN-20035: invalid high recid

* lkd380:/controlback

* lkd380:/controlback Recovery Manager complete.

* lkd380:/controlback 02/12/03 00:57:18 NetWorker: Error: process 13405 running command

"/u03/oracle/app/oracle/product/8.0.5/bin/rman" completed with an error code of 1.

* lkd380:/controlback nsrnmostart returned status of 1

* lkd380:/controlback /opt/networker/bin/nsrnmolk exiting.
02/12/03 01:00:22 savegrp:

lkd380:/controlback will retry 1 more time(s)

02/12/03 01:00:24 nsrd: media info: suggest mounting oracledata:01 (SL0191) on backserver for

writing  to pool 'oraclepool'

02/12/03 01:00:26 nsrd: media waiting event: Waiting for 1 writable volumes to backup pool

'oraclepool' tape(s) on backserver

02/12/03 01:00:27 nsrd: /dev/nst0 Eject operation in progress
02/12/03 01:02:00 nsrd: media info:

loading volume oracledata:01 into /dev/nst0

02/12/03 01:02:56 nsrd: /dev/nst0 Verify label operation in progress

02/12/03 01:03:02 nsrd: /dev/nst0 Mount operation in progress

02/12/03 01:05:39 nsrd: media event cleared: Waiting for 1 writable volumes to backup pool

'oraclepool' tape(s) on backserver

02/12/03 01:05:39 nsrd: lkd380:Archive_PROD_bref7njd saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:05:39 nsrd: lkd380:FuLL_PROD_btef7njm saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:05:39 nsrd: lkd380:control_PROD_bsef7njl saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:05:48 nsrd: lkd380:Archive_PROD_bref7njd done saving to pool 'oraclepool'

(oracledata:01) 64 KB

02/12/03 01:05:54 nsrd: lkd380:control_PROD_bsef7njl done saving to pool 'oraclepool'

(oracledata:01) 2624 KB

02/12/03 01:06:04 nsrd: lkd380:Archive_PROD_buef7ntv saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:06:30 nsrd: lkd380:Archive_PROD_buef7ntv done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:06:42 nsrd: lkd380:Archive_PROD_bvef7nv4 saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:07:07 nsrd: lkd380:Archive_PROD_bvef7nv4 done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:07:19 nsrd: lkd380:Archive_PROD_c0ef7o09 saving to pool 'oraclepool'

(oracledata:01)
02/12/03 01:07:45 nsrd: lkd380:Archive_PROD_c0ef7o09 done saving to pool

'oraclepool' (oracledata:01) 10 MB

02/12/03 01:07:56 nsrd: lkd380:Archive_PROD_c1ef7o1e saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:08:22 nsrd: lkd380:Archive_PROD_c1ef7o1e done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:08:34 nsrd: lkd380:Archive_PROD_c2ef7o2k saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:08:59 nsrd: lkd380:Archive_PROD_c2ef7o2k done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:09:11 nsrd: lkd380:Archive_PROD_c3ef7o3p saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:09:37 nsrd: lkd380:Archive_PROD_c3ef7o3p done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:09:48 nsrd: lkd380:Archive_PROD_c4ef7o4u saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:10:06 nsrd: lkd380:FuLL_PROD_btef7njm done saving to pool 'oraclepool'

(oracledata:01) 147 MB

02/12/03 01:10:07 nsrd: lkd380:Archive_PROD_c4ef7o4u done saving to pool 'oraclepool'

(oracledata:01) 10 MB

02/12/03 01:10:13 nsrd: lkd380:Archive_PROD_c5ef7o5r saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:10:15 nsrd: lkd380:Archive_PROD_c5ef7o5r done saving to pool 'oraclepool'

(oracledata:01) 1024 KB

02/12/03 01:10:18 nsrd: lkd380:FuLL_PROD_c6ef7o61 saving to pool 'oraclepool' (oracledata:01)

02/12/03 01:11:42 nsrd: lkd380:FuLL_PROD_c6ef7o61 done saving to pool 'oraclepool'

(oracledata:01) 63 MB

02/12/03 01:11:44 nsrd: lkd380:FuLL_PROD_c7ef7o8n saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:12:00 nsrd: lkd380:FuLL_PROD_c7ef7o8n done saving to pool 'oraclepool'

(oracledata:01) 7937 KB

02/12/03 01:12:11 nsrd: lkd380:FuLL_PROD_c8ef7o9h saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:12:18 nsrd: lkd380:FuLL_PROD_c8ef7o9h done saving to pool 'oraclepool'

(oracledata:01) 3201 KB

02/12/03 01:12:27 nsrd: lkd380:FuLL_PROD_c9ef7oa1 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:12:40 nsrd: lkd380:FuLL_PROD_c9ef7oa1 done saving to pool 'oraclepool'

(oracledata:01) 8065 KB

02/12/03 01:12:43 nsrd: lkd380:FuLL_PROD_caef7oai saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:12:55 nsrd: lkd380:FuLL_PROD_caef7oai done saving to pool 'oraclepool'

(oracledata:01) 6721 KB

02/12/03 01:13:00 nsrd: lkd380:FuLL_PROD_cbef7ob2 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:13:28 nsrd: lkd380:FuLL_PROD_cbef7ob2 done saving to pool 'oraclepool'

(oracledata:01) 20 MB

02/12/03 01:13:37 nsrd: lkd380:FuLL_PROD_ccef7oc7 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:13:48 nsrd: lkd380:FuLL_PROD_ccef7oc7 done saving to pool 'oraclepool'

(oracledata:01) 5441 KB

02/12/03 01:13:54 nsrd: lkd380:FuLL_PROD_cdef7oco saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:14:07 nsrd: lkd380:FuLL_PROD_cdef7oco done saving to pool 'oraclepool'

(oracledata:01) 8193 KB

02/12/03 01:14:10 nsrd: lkd380:FuLL_PROD_ceef7od9 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:14:25 nsrd: lkd380:FuLL_PROD_ceef7od9 done saving to pool 'oraclepool'

(oracledata:01) 9345 KB

02/12/03 01:14:36 nsrd: lkd380:FuLL_PROD_cfef7oe3 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:15:15 nsrd: lkd380:FuLL_PROD_cfef7oe3 done saving to pool 'oraclepool'

(oracledata:01) 29 MB

02/12/03 01:15:23 nsrd: lkd380:FuLL_PROD_cgef7ofh saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:15:30 nsrd: lkd380:FuLL_PROD_cgef7ofh done saving to pool 'oraclepool'

(oracledata:01) 4033 KB

02/12/03 01:15:40 nsrd: lkd380:FuLL_PROD_chef7og2 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:15:42 nsrd: lkd380:FuLL_PROD_chef7og2 done saving to pool 'oraclepool'

(oracledata:01) 64 KB

02/12/03 01:15:44 nsrd: lkd380:FuLL_PROD_cief7og7 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:15:46 nsrd: lkd380:FuLL_PROD_cief7og7 done saving to pool 'oraclepool'

(oracledata:01) 64 KB

02/12/03 01:15:48 nsrd: lkd380:FuLL_PROD_cjef7ogb saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:15:50 nsrd: lkd380:FuLL_PROD_cjef7ogb done saving to pool 'oraclepool'

(oracledata:01) 64 KB

02/12/03 01:15:54 nsrd: lkd380:FuLL_PROD_ckef7ogf saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:29:42 nsrd: lkd380:FuLL_PROD_ckef7ogf done saving to pool 'oraclepool'

(oracledata:01) 656 MB

02/12/03 01:29:53 nsrd: lkd380:FuLL_PROD_clef7pam saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:43:52 nsrd: lkd380:FuLL_PROD_clef7pam done saving to pool 'oraclepool'

(oracledata:01) 664 MB

02/12/03 01:44:00 nsrd: lkd380:FuLL_PROD_cmef7q56 saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:58:29 nsrd: lkd380:FuLL_PROD_cmef7q56 done saving to pool 'oraclepool'

(oracledata:01) 698 MB

02/12/03 01:58:37 nsrd: lkd380:FuLL_PROD_cnef7r0j saving to pool 'oraclepool' (oracledata:01)
02/12/03 01:59:59 nsrd: drm:lkpcoa: info: Client resource for "LKPCOA" was not found on server

"backserver". Cannot schedule Mini OS Image creation.

02/12/03 02:10:01 nsrd: lkd380:FuLL_PROD_cnef7r0j done saving to pool 'oraclepool'

(oracledata:01) 525 MB

02/12/03 02:10:04 nsrd: lkd380:FuLL_PROD_coef7rm2 saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:20:42 nsrd: lkd380:FuLL_PROD_coef7rm2 done saving to pool 'oraclepool'

(oracledata:01) 490 MB

02/12/03 02:20:51 nsrd: lkd380:FuLL_PROD_cpef7sa9 saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:29:42 nsrd: lkd380:FuLL_PROD_cpef7sa9 done saving to pool 'oraclepool'

(oracledata:01) 394 MB

02/12/03 02:29:47 nsrd: lkd380:FuLL_PROD_cqef7sr2 saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:33:34 nsrd: lkd380:FuLL_PROD_cqef7sr2 done saving to pool 'oraclepool'

(oracledata:01) 130 MB

02/12/03 02:33:44 nsrd: lkd380:FuLL_PROD_cref7t2f saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:48:39 nsrd: lkd380:FuLL_PROD_cref7t2f done saving to pool 'oraclepool'

(oracledata:01) 722 MB

02/12/03 02:48:51 nsrd: lkd380:FuLL_PROD_csef7tuq saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:57:58 nsrd: lkd380:FuLL_PROD_csef7tuq done saving to pool 'oraclepool'

(oracledata:01) 428 MB

02/12/03 02:58:08 nsrd: lkd380:FuLL_PROD_ctef7ug6 saving to pool 'oraclepool' (oracledata:01)
02/12/03 02:59:59 nsrd: drm:lkpcoa: info: Client resource for "LKPCOA" was not found on server

"backserver". Cannot schedule Mini OS Image creation.

02/12/03 03:01:37 nsrd: lkd380:FuLL_PROD_ctef7ug6 done saving to pool 'oraclepool'

(oracledata:01) 135 MB

02/12/03 03:01:44 nsrd: lkd380:FuLL_PROD_cuef7umv saving to pool 'oraclepool' (oracledata:01)
02/12/03 03:15:14 nsrd: lkd380:FuLL_PROD_cuef7umv done saving to pool 'oraclepool'

(oracledata:01) 664 MB

02/12/03 03:15:22 nsrd: lkd380:FuLL_PROD_cvef7vgg saving to pool 'oraclepool' (oracledata:01)
02/12/03 03:28:01 nsrd: lkd380:FuLL_PROD_cvef7vgg done saving to pool 'oraclepool'

(oracledata:01) 624 MB

02/12/03 03:28:08 nsrd: lkd380:FuLL_PROD_d0ef808f saving to pool 'oraclepool' (oracledata:01)
02/12/03 03:36:45 nsrd: lkd380:FuLL_PROD_d0ef808f done saving to pool 'oraclepool'

(oracledata:01) 418 MB

02/12/03 03:36:59 nsrd: backserver:index:lkd380 saving to pool 'oraclepool' (oracledata:01)
02/12/03 03:37:01 nsrd: backserver:index:lkd380 done saving to pool 'oraclepool' (oracledata:01)

16 MB
02/12/03 03:37:02 nsrd: backserver:bootstrap saving to pool 'oraclepool' (oracledata:01)
02/12/03 03:37:02 nsrmmdbd: media db is saving its data.  This may take a while.
02/12/03

03:37:02 nsrmmdbd: media db is open for business.
02/12/03 03:37:04 nsrd: backserver:bootstrap done saving to pool 'oraclepool' (oracledata:01) 627

KB
02/12/03 03:37:05 nsrd: savegroup notice: LKD380oracledata completed, 1 client(s) (All

Succeeded)

那为人兄帮帮忙

论坛徽章:
0
2 [报告]
发表于 2003-02-12 10:36 |只看该作者

legato在备份ORACLE数据库时出现的问题

prod.env是你的东西吗?


implicit resync of recovery catalog failed

* lkd380:/fullback RMAN-06038: recovery catalog package detected an error

* lkd380:/fullback RMAN-20035: invalid high recid


你是否修改了数据库?

命令行方式下:$rman target internal/oracle@xx rcvcat rman/rman@rman

rman>;resync catalog;

然后用
$rman target internal/oracle@targetSID rcvcat rman/rman@rman cmdfile=xxx/xxx/fullback msglog=xxx/xx/log

看看log文件中的记录。

论坛徽章:
0
3 [报告]
发表于 2003-02-12 13:16 |只看该作者

legato在备份ORACLE数据库时出现的问题

原帖由 "dansz" 发表:


你是否修改了数据库?

命令行方式下:$rman target internal/oracle@xx rcvcat rman/rman@rman

rman>;resync catalog;

然后用
$rman target internal/oracle@targetSID rcvcat rman/rman@rman cmdfil..........


prod.env是数据库启动的一些环境变量,数据库每天都有业务发生,昨天我执行了这个命令命令行方式下:$rman target internal/oracle@xx rcvcat rman/rman@rman

rman>;resync catalog;
但是今天备份的时候还是出现了这个问题,难道每天都要做吗???

论坛徽章:
0
4 [报告]
发表于 2003-02-12 13:18 |只看该作者

legato在备份ORACLE数据库时出现的问题

Backup Fails with Invalid RECID Error: Scenario
In this scenario, you attempt a backup and receive the following error messages:

RMAN-3014: Implicit resync of recovery catalog failed
RMAN-6038: Recovery catalog package detected an error
RMAN-20035: Invalid high RECID error

Backup Fails with Invalid RECID Error: Diagnosis
In one common scenario, you restore a backup control file created through a non-Oracle mechanism, and then open the database without the RESETLOGS option. If you had created the backup control file through the RMAN BACKUP command or the SQL ALTER DATABASE BACKUP CONTROLFILE statement, then Oracle would have required you to reset the online logs.

The control file and the recovery catalog are now not synchronized. The database control file is older than the recovery catalog, because at one time the recovery catalog resynchronized with the old current control file, and now the database is using a backup control file. RMAN detects that the control file currently in use is older than the control file previously used to resynchronize.

Another common scenario occurs when you attempt to copy the target database to a new machine as follows:

On machine 1, you shut down the database and make a copy of the control file with an operating system utility. You do not use CATALOG to add this control file copy to the repository.
You transfer the control file copy to machine 2.
On machine 2, you create a new initialization parameter file and new database instance.
You mount the control file copy on machine 2. Oracle does not recognize the control file as a backup control file: to Oracle it looks like the current control file.
You start RMAN and connect to the new target database and the recovery catalog on machine 2. Because the control file was not created with RMAN and was not cataloged as a control file copy, RMAN sees the database on machine 2 as the database on machine 1.
You restore and recover database the new database on machine 2 and then open it. As a consequence, various records are added to the recovery catalog during the restore and recovery. For example, the highest RECID in the recovery catalog moves from 90 to 100.
On machine 1, you start RMAN and connect to the original target database and recovery catalog. The recovery catalog indicates that the highest RECID is 100, but the control file indicates that the highest RECID is 90. The control file RECID should always be greater than or equal to the recovery catalog RECID, so RMAN issues RMAN-20035.
Backup Fails with Invalid RECID Error: Solution 1
This solution is safest and is strongly recommended:

To reset the database with RMAN:

Connect to the target database with SQL*Plus. For example, enter:
% sqlplus '/ AS SYSDBA'


Mount the database if it is not already mounted. For example, enter:
ALTER DATABASE MOUNT;


Start cancel-based recovery by using the backup control file, then cancel it. The reason for canceling is that the USING BACKUP CONTROLFILE clause stamps the controlfile as a backup, which then permits OPEN RESETLOGS. For example, enter:
ALTER DATABASE RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE;
ALTER DATABASE RECOVER CANCEL;


Open the database with the RESETLOGS option. For example, enter:
ALTER DATABASE OPEN RESETLOGS;


Use RMAN to connect to the target database and recovery catalog. For example, enter:
% rman TARGET SYS/oracle@trgt CATALOG rman/cat@catdb


Reset the database. For example, enter:
RESET DATABASE;


Take new backups so that you can recover the database if necessary. For example, enter:
BACKUP DATABASE PLUS ARCHIVELOG;

Backup Fails with Invalid RECID Error: Solution 2
This solution is more difficult than solution 1:

To create the control file with SQL*Plus:

Connect to the target database with SQL*Plus. For example, enter:
% sqlplus 'SYS/oracle@trgt AS SYSDBA'


Mount the database if it is not already mounted:
SQL>; ALTER DATABASE MOUNT;


Back up the control file to a trace file:
SQL>; ALTER DATABASE BACKUP CONTROLFILE TO TRACE;


Edit the trace file as necessary. The relevant section of the trace file looks something like the following:
# The following commands will create a new control file and use it
# to open the database.
# Data used by the recovery manager will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "TRGT" NORESETLOGS  ARCHIVELOG
--  STANDBY DATABASE CLUSTER CONSISTENT AND UNPROTECTED
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXDATAFILES 32
    MAXINSTANCES 1
    MAXLOGHISTORY 226
LOGFILE
  GROUP 1 '/oracle/oradata/trgt/redo01.log'  SIZE 25M,
  GROUP 2 '/oracle/oradata/trgt/redo02.log'  SIZE 25M,
  GROUP 3 '/oracle/oradata/trgt/redo03.log'  SIZE 500K
-- STANDBY LOGFILE
DATAFILE
  '/oracle/oradata/trgt/system01.dbf',
  '/oracle/oradata/trgt/undotbs01.dbf',
  '/oracle/oradata/trgt/cwmlite01.dbf',
  '/oracle/oradata/trgt/drsys01.dbf',
  '/oracle/oradata/trgt/example01.dbf',
  '/oracle/oradata/trgt/indx01.dbf',
  '/oracle/oradata/trgt/tools01.dbf',
  '/oracle/oradata/trgt/users01.dbf'
CHARACTER SET WE8DEC
;
# Take files offline to match current control file.
ALTER DATABASE DATAFILE '/oracle/oradata/trgt/tools01.dbf' OFFLINE;
ALTER DATABASE DATAFILE '/oracle/oradata/trgt/users01.dbf' OFFLINE;
# Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CHANNEL','DEVICE TYPE DISK
DEBUG 255');
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
RECOVER DATABASE
# All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOG ALL;
# Database can now be opened normally.
ALTER DATABASE OPEN;
# Commands to add tempfiles to temporary tablespaces.
# Online tempfiles have complete space information.
# Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/oradata/trgt/temp01.dbf' REUSE;
# End of tempfile additions.


Shut down the database:
SHUTDOWN IMMEDIATE


Execute the script to create the control file, recover (if necessary), archive the logs, and open the database:
STARTUP NOMOUNT
CREATE CONTROLFILE ...;
EXECUTE ...;
RECOVER DATABASE
ALTER SYSTEM ARCHIVE LOG CURRENT;
ALTER DATABASE OPEN ...;


--------------------------------------------------------------------------------
Caution:
If you do not open with the RESETLOGS option, then two copies of an archived redo log for a given log sequence number may exist--even though these two copies have completely different contents. For example, one log may have been created on the original host and the other on the new host. If you accidentally confuse the logs during a media recovery, then the database will be corrupted but Oracle and RMAN cannot detect the problem.

--------------------------------------------------------------------------------


Backup Fails Because of Control File Enqueue: Scenario
In this scenario, a backup job fails because RMAN cannot make a snapshot control file. The message stack is as follows:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/30/2001 22:48:44
ORA-00230: operation disallowed: snapshot controlfile enqueue unavailable

Backup Fails Because of Control File Enqueue: Diagnosis
When RMAN needs to back up or resynchronize from the control file, it first creates a snapshot or consistent image of the control file. If one RMAN job is already backing up the control file while another needs to create a new snapshot control file, then you may see the following message:

waiting for snapshot controlfile enqueue


Under normal circumstances, a job that must wait for the control file enqueue waits for a brief interval and then successfully obtains the enqueue. RMAN makes up to five attempts to get the enqueue and then fails the job. The conflict is usually caused when two jobs are both backing up the control file, and the job that first starts backing up the control file waits for service from the media manager.

To determine which job is holding the conflicting enqueue:

After you see the first message stating "RMAN-08512: waiting for snapshot controlfile enqueue", start a new SQL*Plus session on the target database:
% sqlplus 'SYS/oracle@trgt AS SYSDBA'


Execute the following query to determine which job is causing the wait:
SELECT s.SID, USERNAME AS "User", PROGRAM, MODULE,
       ACTION, LOGON_TIME "Logon", l.*
FROM V$SESSION s, V$ENQUEUE_LOCK l
WHERE l.SID = s.SID
AND l.TYPE = 'CF'
AND l.ID1 = 0
AND l.ID2 = 2;


You should see output similar to the following (the output in this example has been truncated):

SID User Program              Module                    Action           Logon
--- ---- -------------------- ------------------------- ---------------- ---------
  9 SYS  rman@h13 (TNS V1-V3) backup full datafile: c1  0000210 STARTED  21-JUN-01

Backup Fails Because of Control File Enqueue: Solution
After you have determined which job is creating the enqueue, you can do one of the following:

Wait until the job creating the enqueue completes
Cancel the current job and restart it after the job creating the enqueue completes
Cancel the job creating the enqueue
Commonly, enqueue situations occur when a job is writing to a tape drive, but the tape drive is waiting for a new cassette to be inserted. If you start a new job in this situation, then you will probably receive the enqueue message because the first job cannot complete until the new tape is loaded.

RMAN Fails to Delete All Archived Logs: Scenario
In this scenario, the database archives automatically to two directories: ?/oradata/trgt/arch and ?/oradata/trgt/arch2. You tell RMAN to perform a backup and delete the input archived redo logs afterward in the following script:

BACKUP ARCHIVELOG ALL DELETE INPUT;


You then run a crosscheck to make sure the logs are gone and find the following:

CROSSCHECK ARCHIVELOG ALL;

validation succeeded for archived log
archivelog filename=/oracle/oradata/trgt/arch2/archive1_964.arc recid=19 stamp=368726072


RMAN deleted one set of logs but not the other.

RMAN Fails to Delete All Archived Logs: Diagnosis
This problem is not an error. When you specify DELETE INPUT without the ALL keyword, RMAN deletes only one copy of each input log. Even if you archive to five destinations, RMAN deletes logs from only one directory.

RMAN Fails to Delete All Archived Logs: Solution
To force RMAN to delete all existing archived redo logs, use the DELETE ALL INPUT clause of the BACKUP command. For example, enter:

BACKUP ARCHIVELOG ALL DELETE ALL INPUT;

Backup Fails Because RMAN Cannot Locate an Archived Log: Scenario
In this scenario, you schedule regular backups of the archived redo logs. The next time you make a backup, you receive this error:

RMAN-6089:  archive log NAME not found or out of sync with catalog

Backup Fails Because RMAN Cannot Locate an Archived Log: Diagnosis
This problem occurs when the archived log that RMAN is looking for cannot be accessed by RMAN, or the recovery catalog needs to be resynchronized. Often, this error occurs when you delete archived logs with an operating system command, which means that RMAN is unaware of the deletion. The RMAN-6089 error occurs because RMAN attempts to back up a log that the repository indicates still exists.

Backup Fails Because RMAN Cannot Locate an Archived Log: Solution
Make sure that the archived logs exists in the specified directory and that the RMAN catalog is synchronized. Check the following:

Make sure the archived log file that is specified by the RMAN-6089 error exists in the correct directory.
Check that the operating system permissions are correct for the archived log (owner = oracle, group = DBA) to make sure that RMAN can access the file.
If the file appears to be correct, then try synchronizing the catalog by running the following command from the RMAN prompt:
RESYNC CATALOG;


If you know that the logs are unavailable because you deleted them by using an operating system utility, then run the following command at the RMAN prompt to update RMAN metadata:

CROSSCHECK ARCHIVELOG ALL;


It is always better to use RMAN to delete logs than to use an operating system utility. The easiest method to remove unwanted logs is to specify the DELETE INPUT option when backing up archived logs. For example, enter:

BACKUP DEVICE TYPE sbt
  ARCHIVELOG ALL
  DELETE ALL INPUT;

论坛徽章:
0
5 [报告]
发表于 2003-02-12 13:21 |只看该作者

legato在备份ORACLE数据库时出现的问题

原帖由 "wangmingjie" 发表:


prod.env是数据库启动的一些环境变量,数据库每天都有业务发生,昨天我执行了这个命令命令行方式下:$rman target internal/oracle@xx rcvcat rman/rman@rman

rman>;resync catalog;
但是今天备份的时候还?.........


备份成功会自己做resync catalog的,你可以看看备份过程中的详细日志信息。

论坛徽章:
0
6 [报告]
发表于 2003-02-12 14:07 |只看该作者

legato在备份ORACLE数据库时出现的问题

原帖由 "dansz" 发表:


备份成功会自己做resync catalog的,你可以看看备份过程中的详细日志信息。


我看得日志信息是在备份服务器上显示的在ORACLE中日志在那里阿?????

论坛徽章:
0
7 [报告]
发表于 2003-02-12 14:19 |只看该作者

legato在备份ORACLE数据库时出现的问题

用rman target internal/oracle@targetSID rcvcat rman/rman@rman cmdfile=xxx[说明:你的备份脚本] msglog=xxx[备份过程中的日志文件]。

[msglog参数指定日志文件]。



如手工方式备份成功了在做成自动备份。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP