SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
Oracle 数据库日志满导致错误
                              Zianed Hou
                            zianed@live.cn


1、登录数据库发现错误情况 ORA-00257




查看 ORA-00257 的说明:


ORA-00257:archiver error. Connect internal only, until freed.
Cause: The archiver process received an error while trying to archive a
redo log. If the problem is not resolved soon, the database will stop
executing transactions. The most likely cause of this message is the
destination device is out of space to store the redo log file.
Action: Check archiver trace file for a detailed description of the
problem. Also verify that the device specified in the initialization
parameter ARCHIVE_LOG_DEST is set up properly for archiving.


2、查看出现问题的现象
磁盘空间被大幅占用,导致 Oracle 所在的分区,磁盘空间满。
3、进行处理
前期条件的确认
$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 22 10:10:10 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from V$FLASH_RECOVERY_AREA_USAGE;
FILE_TYPE    PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE                   0                         0               0
ONLINELOG                     0                         0               0
ARCHIVELOG                    0                         0               0
BACKUPPIECE               33.61                      16.8               2
IMAGECOPY                     0                         0               0
FLASHBACKLOG                  0                         0               0
6 rows selected.

SQL> select group#,sequence# from v$log;
    GROUP# SEQUENCE#
---------- ----------
         1       1721
         2       1722
         3       1720

SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /export.home/oradata/orcl
Oldest online log sequence     1720
Current log sequence           1722

SQL> show parameter log_archive_dest;
NAME                                 TYPE        VALUE
----------------------------- ----------- ------------------------------
log_archive_dest              string
log_archive_dest_1            string    location=/export.home/oradata/orcl
log_archive_dest_10                  string
log_archive_dest_2                   string
log_archive_dest_3                   string
log_archive_dest_4                   string
log_archive_dest_5                   string
log_archive_dest_6                   string
log_archive_dest_7                   string
log_archive_dest_8                   string
SQL>
进行日志删除处理
bash-3.00$ rman target /
Recovery Manager: Release 10.2.0.3.0 - Production on Mon Mar 22 09:52:18 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1199752177)
RMAN> list archivelog all;
using target database control file instead of recovery catalog
List of Archived Log Copies
Key     Thrd Seq     S Low Time Name
------- ---- ------- - --------- ----
1695    1    1696    A 16-MAR-10 /export.home/oradata/orcl/1_1696_671971445.dbf
1698    1    1697    A 16-MAR-10 /export.home/oradata/orcl/1_1697_671971445.dbf
1696    1    1698    A 16-MAR-10 /export.home/oradata/orcl/1_1698_671971445.dbf
1697    1    1699    A 17-MAR-10 /export.home/oradata/orcl/1_1699_671971445.dbf
1699    1    1700    A 17-MAR-10 /export.home/oradata/orcl/1_1700_671971445.dbf
RMAN>



手工删除,oracle 并不释放空间,需要通过 rman 删除。

1、RMAN 数据连接
rman target system/manager@target_tnsname

2、查看归档日志文件的状态:
RMAN> list archivelog all;

3、 删除操作系统中的日志文件(到操作系统级进行手工删除);

4、 将归档日志信息进行更新;
RMAN> crosscheck archivelog all;
RMAN> delete expired archivelog all;                       (确认时键入"yes")
RMAN> exit

//
RMAN> delete expired archivelog all;      (确认时键入"yes")
如果你想省去敲这个 YES
delete noprompt expired archivelog all;



---------------------------------------------------------------------------------------
注意:
在删除归档日志后,必须用 RMAN 维护控制文件,否则空间显示仍然不释放。
---------------------------------------------------------------------------------------
若此时链接数据库将会遇到以下错误:




正常后链接数据库成功:




归纳步骤如下:
1) 系统目录下删除日志文件
2) Rman 连接到目标库 $rman target /
3) 交叉检查日志 RMAN>crosschech archivelog all;
4) 删除过期日志 RMAN>delete expired archivelog all;




4、再次查看磁盘空间状态:
References
http://www.itpub.net/viewthread.php?tid=960155
http://blog.csdn.net/panys/archive/2009/01/20/3838846.aspx
http://ora-00257.ora-code.com/

Mais conteúdo relacionado

Mais procurados

FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GN/A
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instanceMonowar Mukul
 
Drupal and Open shift (and php)
Drupal and Open shift (and php)Drupal and Open shift (and php)
Drupal and Open shift (and php)Phase2
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gLeandro Santos
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...Marco Vigelini
 
Mgangler Virtualization
Mgangler VirtualizationMgangler Virtualization
Mgangler VirtualizationSecure-24
 
High Availability Server with DRBD in linux
High Availability Server with DRBD in linuxHigh Availability Server with DRBD in linux
High Availability Server with DRBD in linuxAli Rachman
 
LIMS_DOCUMENTATION
LIMS_DOCUMENTATIONLIMS_DOCUMENTATION
LIMS_DOCUMENTATIONRAHUL KUMAR
 
12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storageMonowar Mukul
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linuxVasudeva Rao
 
Endevor api an introduction to the endevor application programming interface
Endevor api   an introduction to the endevor application programming interface Endevor api   an introduction to the endevor application programming interface
Endevor api an introduction to the endevor application programming interface Kevin Grimes
 
Publishing a Perl6 Module
Publishing a Perl6 ModulePublishing a Perl6 Module
Publishing a Perl6 Moduleast_j
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013sayajeff
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeJeff Frost
 
Testing Orachk for Database Health Monitoring
Testing Orachk for Database Health MonitoringTesting Orachk for Database Health Monitoring
Testing Orachk for Database Health MonitoringMonowar Mukul
 
Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0ContCentric IT Services Pvt Ltd
 

Mais procurados (20)

FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
 
Drupal and Open shift (and php)
Drupal and Open shift (and php)Drupal and Open shift (and php)
Drupal and Open shift (and php)
 
Oracle RDBMS Workshop (Part1)
Oracle RDBMS Workshop (Part1)Oracle RDBMS Workshop (Part1)
Oracle RDBMS Workshop (Part1)
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11g
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
 
Mgangler Virtualization
Mgangler VirtualizationMgangler Virtualization
Mgangler Virtualization
 
High Availability Server with DRBD in linux
High Availability Server with DRBD in linuxHigh Availability Server with DRBD in linux
High Availability Server with DRBD in linux
 
LIMS_DOCUMENTATION
LIMS_DOCUMENTATIONLIMS_DOCUMENTATION
LIMS_DOCUMENTATION
 
12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linux
 
Endevor api an introduction to the endevor application programming interface
Endevor api   an introduction to the endevor application programming interface Endevor api   an introduction to the endevor application programming interface
Endevor api an introduction to the endevor application programming interface
 
Publishing a Perl6 Module
Publishing a Perl6 ModulePublishing a Perl6 Module
Publishing a Perl6 Module
 
Clase 09 03-2013
Clase 09 03-2013Clase 09 03-2013
Clase 09 03-2013
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
 
Testing Orachk for Database Health Monitoring
Testing Orachk for Database Health MonitoringTesting Orachk for Database Health Monitoring
Testing Orachk for Database Health Monitoring
 
Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0
 
MySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB StatusMySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB Status
 
Load demo-oct2016
Load demo-oct2016Load demo-oct2016
Load demo-oct2016
 
Install oracle11gr2 rhel5
Install oracle11gr2 rhel5Install oracle11gr2 rhel5
Install oracle11gr2 rhel5
 

Destaque

Jvm的最小使用内存测试
Jvm的最小使用内存测试Jvm的最小使用内存测试
Jvm的最小使用内存测试Zianed Hou
 
Oracle中Sql解析过程
Oracle中Sql解析过程Oracle中Sql解析过程
Oracle中Sql解析过程Zianed Hou
 
Java设置环境变量
Java设置环境变量Java设置环境变量
Java设置环境变量Zianed Hou
 
Arrays的Sort算法分析
Arrays的Sort算法分析Arrays的Sort算法分析
Arrays的Sort算法分析Zianed Hou
 
Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1Zianed Hou
 
Java中的Float&Double以及Ieee754研究V1.0
Java中的Float&Double以及Ieee754研究V1.0Java中的Float&Double以及Ieee754研究V1.0
Java中的Float&Double以及Ieee754研究V1.0Zianed Hou
 
Oracle的Constraint约束V1.1
Oracle的Constraint约束V1.1Oracle的Constraint约束V1.1
Oracle的Constraint约束V1.1Zianed Hou
 
top 64 universities of China, their research centers, and researches
top 64 universities of China, their research centers, and researchestop 64 universities of China, their research centers, and researches
top 64 universities of China, their research centers, and researchesZoya Yameen
 
Etika dan Moral Penggunaan TIK
Etika dan Moral Penggunaan TIKEtika dan Moral Penggunaan TIK
Etika dan Moral Penggunaan TIKAllegation
 
Webinar: Cloud-Based Web Security as First/Last Line of Defense
Webinar: Cloud-Based Web Security as First/Last Line of DefenseWebinar: Cloud-Based Web Security as First/Last Line of Defense
Webinar: Cloud-Based Web Security as First/Last Line of DefenseCyren, Inc
 

Destaque (10)

Jvm的最小使用内存测试
Jvm的最小使用内存测试Jvm的最小使用内存测试
Jvm的最小使用内存测试
 
Oracle中Sql解析过程
Oracle中Sql解析过程Oracle中Sql解析过程
Oracle中Sql解析过程
 
Java设置环境变量
Java设置环境变量Java设置环境变量
Java设置环境变量
 
Arrays的Sort算法分析
Arrays的Sort算法分析Arrays的Sort算法分析
Arrays的Sort算法分析
 
Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1Oracle试题Exam Adminv1.1
Oracle试题Exam Adminv1.1
 
Java中的Float&Double以及Ieee754研究V1.0
Java中的Float&Double以及Ieee754研究V1.0Java中的Float&Double以及Ieee754研究V1.0
Java中的Float&Double以及Ieee754研究V1.0
 
Oracle的Constraint约束V1.1
Oracle的Constraint约束V1.1Oracle的Constraint约束V1.1
Oracle的Constraint约束V1.1
 
top 64 universities of China, their research centers, and researches
top 64 universities of China, their research centers, and researchestop 64 universities of China, their research centers, and researches
top 64 universities of China, their research centers, and researches
 
Etika dan Moral Penggunaan TIK
Etika dan Moral Penggunaan TIKEtika dan Moral Penggunaan TIK
Etika dan Moral Penggunaan TIK
 
Webinar: Cloud-Based Web Security as First/Last Line of Defense
Webinar: Cloud-Based Web Security as First/Last Line of DefenseWebinar: Cloud-Based Web Security as First/Last Line of Defense
Webinar: Cloud-Based Web Security as First/Last Line of Defense
 

Semelhante a Oracle数据库日志满导致错误

Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLErick Vidbaz
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜Michitoshi Yoshida
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Guatemala User Group
 
还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery还原Oracle中真实的cache recovery
还原Oracle中真实的cache recoverymaclean liu
 
Oracle Database Management Basic 1
Oracle Database Management Basic 1Oracle Database Management Basic 1
Oracle Database Management Basic 1Chien Chung Shen
 
MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016Dave Stokes
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016Dave Stokes
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016Dave Stokes
 
Data Guard on EBS R12 DB 10g
Data Guard on EBS R12 DB 10gData Guard on EBS R12 DB 10g
Data Guard on EBS R12 DB 10gIbrahim Malek
 
Setup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationSetup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationKanwar Batra
 
DOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedDOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedLoopback.ORG
 
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜Michitoshi Yoshida
 

Semelhante a Oracle数据库日志满导致错误 (20)

Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQL
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
Securefile LOBs
Securefile LOBsSecurefile LOBs
Securefile LOBs
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!
 
还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery还原Oracle中真实的cache recovery
还原Oracle中真实的cache recovery
 
Oracle Database Management Basic 1
Oracle Database Management Basic 1Oracle Database Management Basic 1
Oracle Database Management Basic 1
 
MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016
 
Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명
 
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
MySQL Utilities -- Cool Tools For You: PHP World Nov 16 2016
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016
 
Data Guard on EBS R12 DB 10g
Data Guard on EBS R12 DB 10gData Guard on EBS R12 DB 10g
Data Guard on EBS R12 DB 10g
 
Awr doag
Awr doagAwr doag
Awr doag
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
les04.pdf
les04.pdfles04.pdf
les04.pdf
 
Setup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationSetup oracle golden gate 11g replication
Setup oracle golden gate 11g replication
 
DOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedDOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security Reloaded
 
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜
DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜
 

Oracle数据库日志满导致错误

  • 1. Oracle 数据库日志满导致错误 Zianed Hou zianed@live.cn 1、登录数据库发现错误情况 ORA-00257 查看 ORA-00257 的说明: ORA-00257:archiver error. Connect internal only, until freed. Cause: The archiver process received an error while trying to archive a redo log. If the problem is not resolved soon, the database will stop executing transactions. The most likely cause of this message is the destination device is out of space to store the redo log file. Action: Check archiver trace file for a detailed description of the problem. Also verify that the device specified in the initialization parameter ARCHIVE_LOG_DEST is set up properly for archiving. 2、查看出现问题的现象 磁盘空间被大幅占用,导致 Oracle 所在的分区,磁盘空间满。
  • 2. 3、进行处理 前期条件的确认 $ sqlplus / as sysdba SQL*Plus: Release 10.2.0.3.0 - Production on Mon Mar 22 10:10:10 2010 Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
  • 3. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production With the Partitioning, OLAP and Data Mining options SQL> select * from V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES ------------ ------------------ ------------------------- --------------- CONTROLFILE 0 0 0 ONLINELOG 0 0 0 ARCHIVELOG 0 0 0 BACKUPPIECE 33.61 16.8 2 IMAGECOPY 0 0 0 FLASHBACKLOG 0 0 0 6 rows selected. SQL> select group#,sequence# from v$log; GROUP# SEQUENCE# ---------- ---------- 1 1721 2 1722 3 1720 SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination /export.home/oradata/orcl Oldest online log sequence 1720 Current log sequence 1722 SQL> show parameter log_archive_dest; NAME TYPE VALUE ----------------------------- ----------- ------------------------------ log_archive_dest string log_archive_dest_1 string location=/export.home/oradata/orcl log_archive_dest_10 string log_archive_dest_2 string log_archive_dest_3 string log_archive_dest_4 string log_archive_dest_5 string log_archive_dest_6 string log_archive_dest_7 string log_archive_dest_8 string SQL>
  • 4. 进行日志删除处理 bash-3.00$ rman target / Recovery Manager: Release 10.2.0.3.0 - Production on Mon Mar 22 09:52:18 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORCL (DBID=1199752177) RMAN> list archivelog all; using target database control file instead of recovery catalog List of Archived Log Copies Key Thrd Seq S Low Time Name ------- ---- ------- - --------- ---- 1695 1 1696 A 16-MAR-10 /export.home/oradata/orcl/1_1696_671971445.dbf 1698 1 1697 A 16-MAR-10 /export.home/oradata/orcl/1_1697_671971445.dbf 1696 1 1698 A 16-MAR-10 /export.home/oradata/orcl/1_1698_671971445.dbf 1697 1 1699 A 17-MAR-10 /export.home/oradata/orcl/1_1699_671971445.dbf 1699 1 1700 A 17-MAR-10 /export.home/oradata/orcl/1_1700_671971445.dbf RMAN> 手工删除,oracle 并不释放空间,需要通过 rman 删除。 1、RMAN 数据连接 rman target system/manager@target_tnsname 2、查看归档日志文件的状态: RMAN> list archivelog all; 3、 删除操作系统中的日志文件(到操作系统级进行手工删除); 4、 将归档日志信息进行更新; RMAN> crosscheck archivelog all; RMAN> delete expired archivelog all; (确认时键入"yes") RMAN> exit // RMAN> delete expired archivelog all; (确认时键入"yes") 如果你想省去敲这个 YES delete noprompt expired archivelog all; --------------------------------------------------------------------------------------- 注意: 在删除归档日志后,必须用 RMAN 维护控制文件,否则空间显示仍然不释放。 ---------------------------------------------------------------------------------------
  • 5. 若此时链接数据库将会遇到以下错误: 正常后链接数据库成功: 归纳步骤如下: 1) 系统目录下删除日志文件 2) Rman 连接到目标库 $rman target / 3) 交叉检查日志 RMAN>crosschech archivelog all; 4) 删除过期日志 RMAN>delete expired archivelog all; 4、再次查看磁盘空间状态: