Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1066031
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

分类: LINUX

2013-09-11 09:35:29

用rman备份数据库时,遇到如下信息
RMAN-03009: failure of backup command on ORA_DISK_1 channel
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
Rman需要在归档模式下
SQL> connect sys/chaya as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;

[oracle@oracle ~]$ rman target /;


Recovery Manager: Release 11.2.0.1.0 - Production on Tue Sep 10 18:31:23 2013


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


connected to target database: PORTALDB (DBID=667359659)


RMAN> backup database;


Starting backup at 10-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 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=00001 name=/opt/oracle/oradata/portaldb/system01.dbf
input datafile file number=00002 name=/opt/oracle/oradata/portaldb/sysaux01.dbf
input datafile file number=00003 name=/opt/oracle/oradata/portaldb/undotbs01.dbf
input datafile file number=00005 name=/oradata/portaldb_ICMLFQ32_01.dbf
input datafile file number=00006 name=/oradata/portaldb_ICMLNF32_01.dbf
input datafile file number=00007 name=/oradata/portaldb_ICMSFQ04_01.dbf
input datafile file number=00008 name=/oradata/portaldb_ICMVFQ04_01.dbf
input datafile file number=00009 name=/oradata/portaldb_ICMLSNDX_01.dbf
input datafile file number=00004 name=/opt/oracle/oradata/portaldb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-SEP-13
channel ORA_DISK_1: finished piece 1 at 10-SEP-13
piece handle=/opt/oracle/flash_recovery_area/PORTALDB/backupset/2013_09_10/o1_mf_nnndf_TAG20130910T183137_92zkzt2y_.bkp tag=TAG20130910T183137 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 10-SEP-13
channel ORA_DISK_1: finished piece 1 at 10-SEP-13
piece handle=/opt/oracle/flash_recovery_area/PORTALDB/backupset/2013_09_10/o1_mf_ncsnf_TAG20130910T183137_92zl2t44_.bkp tag=TAG20130910T183137 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-SEP-13

指定备份目录
RMAN> backup datbase format '/oradata/backup/bak_%U';


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "archivelog, as, auxiliary, backupset, backup, channel, check, controlfilecopy, copies, copy, cumulative, current, database, datafilecopy, datafile, db_file_name_convert, db_recovery_file_dest, device, diskratio, duration, filesperset, force, format, for, from, full, incremental, keep, maxsetsize, nochecksum, noexclude, nokeep, not, pool, proxy, recovery, reuse, section, skip readonly, skip, spfile, tablespace, tag, to, validate, ("
RMAN-01008: the bad identifier was: datbase
RMAN-01007: at line 1 column 8 file: standard input


RMAN> backup database format '/oradata/backup/bak_%U';


Starting backup at 10-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/opt/oracle/oradata/portaldb/system01.dbf
input datafile file number=00002 name=/opt/oracle/oradata/portaldb/sysaux01.dbf
input datafile file number=00003 name=/opt/oracle/oradata/portaldb/undotbs01.dbf
input datafile file number=00005 name=/oradata/portaldb_ICMLFQ32_01.dbf
input datafile file number=00006 name=/oradata/portaldb_ICMLNF32_01.dbf
input datafile file number=00007 name=/oradata/portaldb_ICMSFQ04_01.dbf
input datafile file number=00008 name=/oradata/portaldb_ICMVFQ04_01.dbf
input datafile file number=00009 name=/oradata/portaldb_ICMLSNDX_01.dbf
input datafile file number=00004 name=/opt/oracle/oradata/portaldb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 10-SEP-13
channel ORA_DISK_1: finished piece 1 at 10-SEP-13
piece handle=/oradata/backup/bak_0aojh5d8_1_1 tag=TAG20130910T183832 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 10-SEP-13
channel ORA_DISK_1: finished piece 1 at 10-SEP-13
piece handle=/oradata/backup/bak_0bojh5ft_1_1 tag=TAG20130910T183832 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 10-SEP-13

[oracle@oracle backup]$ ls
bak_0aojh5d8_1_1  bak_0bojh5ft_1_1
[oracle@oracle backup]$ pwd
/oradata/backup


RMAN> list backup of database;




List of Backup Sets
===================




BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    979.52M    DISK        00:01:28     10-SEP-13      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20130910T183137
        Piece Name: /opt/oracle/flash_recovery_area/PORTALDB/backupset/2013_09_10/o1_mf_nnndf_TAG20130910T183137_92zkzt2y_.bkp
  List of Datafiles in backup set 4
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1133009    10-SEP-13 /opt/oracle/oradata/portaldb/system01.dbf
  2       Full 1133009    10-SEP-13 /opt/oracle/oradata/portaldb/sysaux01.dbf
  3       Full 1133009    10-SEP-13 /opt/oracle/oradata/portaldb/undotbs01.dbf
  4       Full 1133009    10-SEP-13 /opt/oracle/oradata/portaldb/users01.dbf
  5       Full 1133009    10-SEP-13 /oradata/portaldb_ICMLFQ32_01.dbf
  6       Full 1133009    10-SEP-13 /oradata/portaldb_ICMLNF32_01.dbf
  7       Full 1133009    10-SEP-13 /oradata/portaldb_ICMSFQ04_01.dbf
  8       Full 1133009    10-SEP-13 /oradata/portaldb_ICMVFQ04_01.dbf
  9       Full 1133009    10-SEP-13 /oradata/portaldb_ICMLSNDX_01.dbf


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    979.57M    DISK        00:01:23     10-SEP-13      
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20130910T183832
        Piece Name: /oradata/backup/bak_0aojh5d8_1_1
  List of Datafiles in backup set 6
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1133254    10-SEP-13 /opt/oracle/oradata/portaldb/system01.dbf
  2       Full 1133254    10-SEP-13 /opt/oracle/oradata/portaldb/sysaux01.dbf
  3       Full 1133254    10-SEP-13 /opt/oracle/oradata/portaldb/undotbs01.dbf
  4       Full 1133254    10-SEP-13 /opt/oracle/oradata/portaldb/users01.dbf
  5       Full 1133254    10-SEP-13 /oradata/portaldb_ICMLFQ32_01.dbf
  6       Full 1133254    10-SEP-13 /oradata/portaldb_ICMLNF32_01.dbf
  7       Full 1133254    10-SEP-13 /oradata/portaldb_ICMSFQ04_01.dbf
  8       Full 1133254    10-SEP-13 /oradata/portaldb_ICMVFQ04_01.dbf
  9       Full 1133254    10-SEP-13 /oradata/portaldb_ICMLSNDX_01.dbf


改为非归档
SQL> connect sys/chaya as sysdba
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database noarchivelog;
SQL> alter database open;
如果用啦flashback,需要先disable他,再改为非归档
查看归档信息
SQL> select log_mode from v$database;
LOG_MODE
--------------------
ARCHIVELOG
或者
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /ora_archive/smtst3
Oldest online log sequence 87950
Next log sequence to archive 87952
Current log sequence 87952
10G以前用archive_log_start参数控制自动归档,10G后默认自动归档
阅读(1881) | 评论(0) | 转发(0) |
0

上一篇:oracle修改字符集

下一篇:rman备份表空间

给主人留下些什么吧!~~