ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Compressed backup database -> ORA-19914 + ORA-28365: wallet is not open

Compressed backup database -> ORA-19914 + ORA-28365: wallet is not open

原创 Linux操作系统 作者:jiuniang012 时间:2009-07-24 17:28:22 0 删除 编辑
RMAN支持压缩备份来节省空间,但是我在用压缩备份来备份full database或incremental level n database时将会报错:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 17:06:29
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

因此在用压缩备份时需要配置wallet并打开. 但压缩备份archivelog, tablespace, datafile不需要wallet.

以下是我的实验结果:
1. 配置默认压缩备份集
 RMAN> configure device type disk backup type to compressed backupset;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET PARALLELISM 1;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
starting full resync of recovery catalog
full resync complete

RMAN> show device type;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;

2. 运行full database备份
RMAN> run{ backup database;}
Starting backup at 24-JUL-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=122 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 17:35:13
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

3. 运行增量级别为0的备份
RMAN> run{ backup incremental level 0 database;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 17:36:29
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

4. 运行增量备份级别为1的数据库备份
RMAN> run{ backup incremental level 1 database;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 17:38:27
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

5. 直接用压缩命令备份数据库
RMAN> run{ backup as compressed backupset database;}
Starting backup at 24-JUL-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=122 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 17:04:53
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

6. 用默认的设置压缩备份表空间(不报错)
RMAN> run { backup tablespace users;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
channel ORA_DISK_1: finished piece 1 at 24-JUL-09
piece handle=/bakup/rman/orcl/db_t693077989_s29_p1 tag=TAG20090724T173948 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09
Finished backup at 24-JUL-09

Starting Control File and SPFILE Autobackup at 24-JUL-09
piece handle=/bakup/flash_recovery_area/ORCL/autobackup/2009_07_24/o1_mf_s_693078020_56m0d9xw_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-JUL-09

RMAN> list backupset 1867;
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1867    Full    1.30M      DISK        00:00:15     24-JUL-09
        BP Key: 1870   Status: AVAILABLE  Compressed: YES  Tag: TAG20090724T173948
        Piece Name: /bakup/rman/orcl/db_t693077989_s29_p1
  List of Datafiles in backup set 1867
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  4       Full 834290     24-JUL-09 /data/oradata/orcl/users01.dbf

RMAN> run{backup as compressed backupset tablespace users;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
channel ORA_DISK_1: finished piece 1 at 24-JUL-09
piece handle=/bakup/rman/orcl/db_t693078306_s31_p1 tag=TAG20090724T174505 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 24-JUL-09

Starting Control File and SPFILE Autobackup at 24-JUL-09
piece handle=/bakup/flash_recovery_area/ORCL/autobackup/2009_07_24/o1_mf_s_693078339_56m0p637_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-JUL-09

RMAN> run{ backup datafile 4;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
channel ORA_DISK_1: finished piece 1 at 24-JUL-09
piece handle=/bakup/rman/orcl/db_t693078437_s33_p1 tag=TAG20090724T174716 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 24-JUL-09

Starting Control File and SPFILE Autobackup at 24-JUL-09
piece handle=/bakup/flash_recovery_area/ORCL/autobackup/2009_07_24/o1_mf_s_693078465_56m0t4lg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-JUL-09

7. 设置并打开wallet后备份通过
SQL> ALTER SYSTEM SET ENCRYPTION KEY IDENTIFIED BY "oracle";
SQL> ALTER SYSTEM SET WALLET OPEN IDENTIFIED BY "oracle";
注意: 在创建WALLET时必须保证$ORACLE_HOME/admin/$ORACLE_SID下有个空目录叫wallet,否则将报错. 或者配置sqlnet.ora文件,添加如下行:
WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/u01/app/oracle/admin/orcl/wallet)))

RMAN> run{
2>    backup incremental level 1 database
3>    format '/bakup/rman/orcl/dbinc1_%d_%s_%p_%t'
4>    tag 'WHOLE_INC1';}

Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
channel ORA_DISK_1: finished piece 1 at 24-JUL-09
piece handle=/bakup/rman/orcl/dbinc1_ORCL_35_1_693078959 tag=WHOLE_INC1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 24-JUL-09

Starting Control File and SPFILE Autobackup at 24-JUL-09
piece handle=/bakup/flash_recovery_area/ORCL/autobackup/2009_07_24/o1_mf_s_693078999_56m1bsws_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-JUL-09

8. 配置默认为非压缩备份集然后备份
RMAN> configure device type disk backup type to backupset;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET PARALLELISM 1;
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1
starting full resync of recovery catalog
full resync complete

RMAN> show device type;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET PARALLELISM 1;

RMAN> sql 'ALTER SYSTEM SET WALLET CLOSE';

RMAN> run{backup incremental level 2 database format '/bakup/rman/orcl/dbinc2_%d_%s_%p_%t' tag 'WHOLE_INC2';}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 2 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
channel ORA_DISK_1: finished piece 1 at 24-JUL-09
piece handle=/bakup/rman/orcl/dbinc2_ORCL_42_1_693080004 tag=WHOLE_INC2 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 24-JUL-09

Starting Control File and SPFILE Autobackup at 24-JUL-09
piece handle=/bakup/flash_recovery_area/ORCL/autobackup/2009_07_24/o1_mf_s_693080030_56m2c26b_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 24-JUL-09

RMAN> run{ backup as compressed backupset incremental level 1 database;}
Starting backup at 24-JUL-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/oradata/orcl/system01.dbf
input datafile file number=00002 name=/data/oradata/orcl/sysaux01.dbf
input datafile file number=00010 name=/data/oradata/orcl/mgmt.dbf
input datafile file number=00003 name=/data/oradata/orcl/undotbs01.dbf
input datafile file number=00011 name=/data/oradata/orcl/mgmt_ecm_depot01.dbf
input datafile file number=00004 name=/data/oradata/orcl/users01.dbf
input datafile file number=00005 name=/data/oradata/orcl/tsa01.dbf
input datafile file number=00006 name=/data/oradata/orcl/tsb01.dbf
input datafile file number=00008 name=/data/oradata/orcl/tsc01.dbf
input datafile file number=00009 name=/data/oradata/orcl/tsd01.dbf
input datafile file number=00012 name=/data/oradata/orcl/oms_test01.dbf
input datafile file number=00007 name=/data/oradata/orcl/securespace01.dbf
channel ORA_DISK_1: starting piece 1 at 24-JUL-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 07/24/2009 18:10:19
ORA-19914: unable to encrypt backup
ORA-28365: wallet is not open

总结: 只要使用了压缩备份数据库(不管是配置默认的压缩还是手工指定的压缩), 都需要WALLET的支持. 而且注意在本实例中
ENCRYPTION FOR DATABASE为OFF, 并没有开启加密.
RMAN> show encryption for database;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

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

请登录后发表评论 登录
全部评论

注册时间:2009-07-02

  • 博文量
    126
  • 访问量
    211722