ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-07217

ORA-07217

原创 Linux操作系统 作者:to_be_dba 时间:2013-06-17 08:40:27 0 删除 编辑

ORA-07217

备份时遇到如下报错:
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 10 22:05:49 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TESTDB (DBID=2581100181)

RMAN> run{configure channel 2 device type disk format '/ogg/rman_bk/%U';
backup database;
}2> 3>

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/%U';
new RMAN configuration parameters are successfully stored

Starting backup at 10-MAY-13
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/oradata/testdb/sysaux01.dbf
input datafile file number=00001 name=/u01/oradata/testdb/system01.dbf
input datafile file number=00004 name=/u01/oradata/testdb/users01.dbf
input datafile file number=00003 name=/u01/oradata/testdb/undotbs01.dbf
input datafile file number=00005 name=/u01/oradata/testdb/test01.dbf
channel ORA_DISK_1: starting piece 1 at 10-MAY-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/10/2013 22:05:57
ORA-07217: sltln: environment variable cannot be evaluated.

是由于环境变量配置有问题导致的
RMAN> show all;

RMAN configuration parameters for database with db_unique_name TESTDB are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/$d%T%t';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/oracle/dbs/snapcf_testdb.f'; # default

重新设置:
RMAN> configure channel device type disk format '/0gg/rman_bk/%U';

old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/$d%T%t';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/0gg/rman_bk/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1

这次暴露的问题是路径找不到,因为笔误将ogg的首字母写成大写形式了。
RMAN> backup database;

Starting backup at 10-MAY-13
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/oradata/testdb/sysaux01.dbf
input datafile file number=00001 name=/u01/oradata/testdb/system01.dbf
input datafile file number=00004 name=/u01/oradata/testdb/users01.dbf
input datafile file number=00003 name=/u01/oradata/testdb/undotbs01.dbf
input datafile file number=00005 name=/u01/oradata/testdb/test01.dbf
channel ORA_DISK_1: starting piece 1 at 10-MAY-13
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/10/2013 22:06:43
ORA-19504: failed to create file "/0gg/rman_bk/0no9aj3i_1_1"
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 9

正确设置为:
RMAN> configure channel device type disk format '/ogg/rman_bk/%U';

old RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/0gg/rman_bk/%U';
new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/ogg/rman_bk/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1

再次备份:
RMAN> backup database;

Starting backup at 10-MAY-13
configuration for DISK channel 2 is ignored
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=14 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/u01/oradata/testdb/sysaux01.dbf
input datafile file number=00001 name=/u01/oradata/testdb/system01.dbf
input datafile file number=00004 name=/u01/oradata/testdb/users01.dbf
input datafile file number=00003 name=/u01/oradata/testdb/undotbs01.dbf
input datafile file number=00005 name=/u01/oradata/testdb/test01.dbf
channel ORA_DISK_1: starting piece 1 at 10-MAY-13
……

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26451536/viewspace-764058/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 实验-闪回数据库
请登录后发表评论 登录
全部评论

注册时间:2011-11-23

  • 博文量
    170
  • 访问量
    484900