一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

oracle中v$archived_log中显示creator是rman

时间:2022-06-29 09:37:59 编辑:袖梨 来源:一聚教程网

Q:$archived_log中显示creator有多种,如果是FGRD,这可能是alter system archive log current,那么还有看到是RMAN,这是怎么产生的?

A:可能是这些archive之前被rman catalog过。见下面的testcase:

[oracle10g@testdb archivelog]$ cd 2014_09_28
[oracle10g@testdb 2014_09_28]$ ls
o1_mf_1_51_b2g3dm1s_.arc  o1_mf_1_52_b2g3f81q_.arc  o1_mf_1_53_b2g467rk_.arc  o1_mf_1_54_b2g469qm_.arc  o1_mf_1_55_b2g46fqr_.arc
[oracle10g@testdb 2014_09_28]$ mkdir -p /tmp/arctmp
[oracle10g@testdb 2014_09_28]$ mv *.arc /tmp/arctmp/
[oracle10g@testdb 2014_09_28]$ cd /tmp/arctmp
[oracle10g@testdb arctmp]$ ls
o1_mf_1_51_b2g3dm1s_.arc  o1_mf_1_52_b2g3f81q_.arc  o1_mf_1_53_b2g467rk_.arc  o1_mf_1_54_b2g469qm_.arc  o1_mf_1_55_b2g46fqr_.arc
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$ rman target /
 
Recovery Manager: Release 10.2.0.5.0 - Production on Sun Sep 28 03:34:06 2014
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
connected to target database: ORA10G (DBID=4148492656)
 
RMAN> crosscheck archivelog all;
 
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_17/o1_mf_1_3_9wfokdfm_.arc recid=3 stamp=853127084
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_17/o1_mf_1_4_9wfokddk_.arc recid=1 stamp=853127084
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_17/o1_mf_1_5_9wfokdds_.arc recid=2 stamp=853127084
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_18/o1_mf_1_1_9wjs3np7_.arc recid=4 stamp=853229047
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_18/o1_mf_1_2_9wjs7h24_.arc recid=5 stamp=853229167
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_24/o1_mf_1_3_9x0bpc79_.arc recid=6 stamp=853738571
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_24/o1_mf_1_4_9x0pnnfx_.arc recid=7 stamp=853750807
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_07_24/o1_mf_1_5_9x0pnt67_.arc recid=8 stamp=853750813
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_04/o1_mf_1_6_9xxrcb9z_.arc recid=9 stamp=854702835
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_12/o1_mf_1_7_9yl8c2j5_.arc recid=10 stamp=855374564
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_20/o1_mf_1_8_9z7vvndx_.arc recid=11 stamp=856082678
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_9_9zqk95rq_.arc recid=12 stamp=856596133
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_10_9zqkhdc0_.arc recid=13 stamp=856596333
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_11_9zqlbb40_.arc recid=14 stamp=856597196
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_12_9zqlbkyg_.arc recid=15 stamp=856597205
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_13_9zqlby6j_.arc recid=16 stamp=856597219
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_14_9zqlcnrt_.arc recid=17 stamp=856597236
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_15_9zqlcofb_.arc recid=18 stamp=856597237
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_16_9zqlcoyv_.arc recid=19 stamp=856597237
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_17_9zqlcpjc_.arc recid=20 stamp=856597238
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_18_9zqlcq1p_.arc recid=21 stamp=856597239
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_19_9zqlcqjb_.arc recid=22 stamp=856597239
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_20_9zqld0n4_.arc recid=23 stamp=856597250
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_21_9zqldjv8_.arc recid=24 stamp=856597266
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_22_9zqldrbl_.arc recid=25 stamp=856597272
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_23_9zqldsy9_.arc recid=26 stamp=856597274
validation succeeded for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_08_26/o1_mf_1_24_9zqldt4t_.arc recid=27 stamp=856597274
validation failed for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_51_b2g3dm1s_.arc recid=28 stamp=859432723
validation failed for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_52_b2g3f81q_.arc recid=29 stamp=859432744
validation failed for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_53_b2g467rk_.arc recid=30 stamp=859433543
validation failed for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_54_b2g469qm_.arc recid=31 stamp=859433545
validation failed for archived log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_55_b2g46fqr_.arc recid=32 stamp=859433549
Crosschecked 32 objects
 
 
RMAN> delete expired archivelog all;
 
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=142 devtype=DISK
 
List of Archived Log Copies
Key     Thrd Seq     S Low Time  Name
------- ---- ------- - --------- ----
28      1    51      X 28-SEP-14 /u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_51_b2g3dm1s_.arc
29      1    52      X 28-SEP-14 /u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_52_b2g3f81q_.arc
30      1    53      X 28-SEP-14 /u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_53_b2g467rk_.arc
31      1    54      X 28-SEP-14 /u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_54_b2g469qm_.arc
32      1    55      X 28-SEP-14 /u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_55_b2g46fqr_.arc
 
Do you really want to delete the above objects (enter YES or NO)? Y
deleted archive log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_51_b2g3dm1s_.arc recid=28 stamp=859432723
deleted archive log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_52_b2g3f81q_.arc recid=29 stamp=859432744
deleted archive log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_53_b2g467rk_.arc recid=30 stamp=859433543
deleted archive log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_54_b2g469qm_.arc recid=31 stamp=859433545
deleted archive log
archive log filename=/u01/ora10g/app/oracle/flash_recovery_area/ORA10G/archivelog/2014_09_28/o1_mf_1_55_b2g46fqr_.arc recid=32 stamp=859433549
Deleted 5 EXPIRED objects
 
 
RMAN>
 
RMAN>
 
RMAN>
 
RMAN> exit
 
 
Recovery Manager complete.
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$ rman target /
 
Recovery Manager: Release 10.2.0.5.0 - Production on Sun Sep 28 03:35:11 2014
 
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
 
connected to target database: ORA10G (DBID=4148492656)
 
RMAN> catalog start with '/tmp/arctmp';
 
using target database control file instead of recovery catalog
searching for all files that match the pattern /tmp/arctmp
 
List of Files Unknown to the Database
=====================================
File Name: /tmp/arctmp/o1_mf_1_55_b2g46fqr_.arc
File Name: /tmp/arctmp/o1_mf_1_53_b2g467rk_.arc
File Name: /tmp/arctmp/o1_mf_1_54_b2g469qm_.arc
File Name: /tmp/arctmp/o1_mf_1_52_b2g3f81q_.arc
File Name: /tmp/arctmp/o1_mf_1_51_b2g3dm1s_.arc
 
Do you really want to catalog the above files (enter YES or NO)? Y
cataloging files...
cataloging done
 
List of Cataloged Files
=======================
File Name: /tmp/arctmp/o1_mf_1_55_b2g46fqr_.arc
File Name: /tmp/arctmp/o1_mf_1_53_b2g467rk_.arc
File Name: /tmp/arctmp/o1_mf_1_54_b2g469qm_.arc
File Name: /tmp/arctmp/o1_mf_1_52_b2g3f81q_.arc
File Name: /tmp/arctmp/o1_mf_1_51_b2g3dm1s_.arc
 
RMAN>
 
RMAN> exit
 
 
Recovery Manager complete.
[oracle10g@testdb arctmp]$
[oracle10g@testdb arctmp]$ sqlplus "/ as sysdba"
 
SQL*Plus: Release 10.2.0.5.0 - Production on Sun Sep 28 03:35:48 2014
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
 
SQL> select SEQUENCE#,CREATOR from v$archived_log order by SEQUENCE#  desc;
 
 SEQUENCE# CREATOR
---------- -------
        55 RMAN
        55 ARCH
        54 RMAN
        54 ARCH
        53 RMAN
        53 ARCH
        52 RMAN
        52 ARCH
        51 RMAN
        51 ARCH
        24 ARCH
 
 SEQUENCE# CREATOR
---------- -------
        23 ARCH
        22 ARCH
        21 ARCH
        20 ARCH
        19 ARCH
        18 ARCH
        17 ARCH
        16 ARCH
        15 ARCH
        14 ARCH
        13 ARCH
 
 SEQUENCE# CREATOR
---------- -------
        12 ARCH
        11 ARCH
        10 ARCH
         9 ARCH
         8 ARCH
         7 ARCH
         6 ARCH
         5 FGRD
         5 ARCH
         4 ARCH
         4 FGRD
 
 SEQUENCE# CREATOR
---------- -------
         3 ARCH
         3 FGRD
         2 ARCH
         1 ARCH
 
37 rows selected.
 
SQL>

热门栏目