- 浏览: 1019998 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (529)
- 服务器 (8)
- jsp (1)
- java (6)
- AIX (1)
- solaris (3)
- linux学习 (53)
- javaScript (2)
- hibernate (1)
- 数据库 (74)
- sql语句 (8)
- oracle 学习 (75)
- oracle 案例 (42)
- oracle 管理 (42)
- Oracle RAC (27)
- oracle data guard (12)
- oracle 参数讲解 (14)
- Oracle 字符集 (8)
- oracle性能调优 (24)
- oracle备份与恢复 (12)
- oracle Tablespace (9)
- oracle性能诊断艺术 (1)
- oracle 11g学习 (5)
- oracle streams (1)
- oracle upgrade and downgrade (4)
- db2学习 (13)
- db2命令学习 (2)
- mysql (28)
- sql server (30)
- sql server 2008 (0)
- 工具 (10)
- 操作系统 (3)
- c++ (1)
- stock (1)
- 生活 (5)
- HADOOP (2)
最新评论
-
massjcy:
...
如何将ubuntu文件夹中文名改为英文 -
skypiea:
谢谢。。。
终于解决了。。。
Oracle 10.2.0.4(5)EM不能启动的解决方案(Patch 8350262) -
qwe_rt:
引用vi /etc/sysconfig/network 请问 ...
Linux操作系统下配置静态IP上网 -
liuqiang:
sudo killall -9 apache2
ps 和 kill 命令详解 -
dazuiba:
引用*绝杀 kill -9 PID 当使用此命令时,一定要通过 ...
ps 和 kill 命令详解
1.Creating Redo Log Groups and Members
1.1.Creating Redo Log Groups
ALTER DATABASE ADD LOGFILE GROUP 10 ('/oracle/dbs/log1c.rdo', '/oracle/dbs/log2c.rdo') SIZE 500K;
1.2.Creating Redo Log Members
ALTER DATABASE ADD LOGFILE MEMBER '/oracle/dbs/log2b.rdo' TO GROUP 2;
2.Relocating and Renaming Redo Log Members
2.1.Steps for Renaming Redo Log Members
-
Shut down the database.
SHUTDOWN
-
Copy the redo log files to the new location.
The following example uses operating system commands (UNIX) to move the redo log members to a new location:
mv /diska/logs/log1a.rdo /diskc/logs/log1c.rdo mv /diska/logs/log2a.rdo /diskc/logs/log2c.rdo
-
Startup the database, mount, but do not open it.
CONNECT / as SYSDBA STARTUP MOUNT
-
Rename the redo log members.
Use the
ALTER DATABASE
statement with theRENAME FILE
clause to rename the database redo log files.ALTER DATABASE RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo' TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';
-
Open the database for normal operation.
The redo log alterations take effect when the database is opened.
ALTER DATABASE OPEN;
3.Dropping Redo Log Groups and Members
3.1.Dropping Log Groups
To drop a redo log group, you must have the ALTER DATABASE
system privilege. Before dropping a redo log group, consider the following restrictions and precautions:
-
An instance requires at least two groups of redo log files, regardless of the number of members in the groups. (A group comprises one or more members.)
-
You can drop a redo log group only if it is inactive. If you need to drop the current group, first force a log switch to occur.
-
Make sure a redo log group is archived (if archiving is enabled) before dropping it. To see whether this has happened, use the
V$LOG
view.SELECT GROUP#, ARCHIVED, STATUS FROM V$LOG; GROUP# ARC STATUS --------- --- ---------------- 1 YES ACTIVE 2 NO CURRENT 3 YES INACTIVE 4 YES INACTIVE
Drop a redo log group with the SQL statement ALTER DATABASE
with the DROP LOGFILE
clause.
The following statement drops redo log group number 3:
ALTER DATABASE DROP LOGFILE GROUP 3;
3.2.Dropping Redo Log Members
ALTER DATABASE DROP LOGFILE MEMBER '/oracle/dbs/log3c.rdo';
4.Forcing Log Switches
To force a log switch, you must have the ALTER SYSTEM
privilege. Use the ALTER SYSTEM
statement with the SWITCH LOGFILE
clause.
The following statement forces a log switch:
ALTER SYSTEM SWITCH LOGFILE;
5.Verifying Blocks in Redo Log Files
If you set the initialization parameter DB_BLOCK_CHECKSUM
to TRUE
, the database computes a checksum for each database block when it is written to disk, including each redo log block as it is being written to the current log. The checksum is stored the header of the block.
6.Clearing a Redo Log File
A redo log file might become corrupted while the database is open, and ultimately stop database activity because archiving cannot continue. In this situation the ALTER DATABASE CLEAR LOGFILE
statement can be used to reinitialize the file without shutting down the database.
The following statement clears the log files in redo log group number 3:
ALTER DATABASE CLEAR LOGFILE GROUP 3;
This statement overcomes two situations where dropping redo logs is not possible:
-
If there are only two log groups
-
The corrupt redo log file belongs to the current group
If the corrupt redo log file has not been archived, use the UNARCHIVED
keyword in the statement.
ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;
This statement clears the corrupted redo logs and avoids archiving them. The cleared redo logs are available for use even though they were not archived.
If you clear a log file that is needed for recovery of a backup, then you can no longer recover from that backup. The database writes a message in the alert log describing the backups from which you cannot recover.
If you want to clear an unarchived redo log that is needed to bring an offline tablespace online, use the UNRECOVERABLE DATAFILE
clause in the ALTER DATABASE CLEAR LOGFILE
statement.
If you clear a redo log needed to bring an offline tablespace online, you will not be able to bring the tablespace online again. You will have to drop the tablespace or perform an incomplete recovery. Note that tablespaces taken offline normal do not require recovery.
发表评论
-
sqlldr总结参数介绍
2012-06-28 14:29 22819有效的关键字: userid -- ORACLE use ... -
11gR2新特性:STANDBY_MAX_DATA_DELAY
2011-12-27 11:18 1210Active Data Guard 是 Oracle 11g ... -
Linux下用OCCI或OCI连接Oracle
2011-07-26 12:00 2898首先,去oracle官网下载C ... -
Oracle Mutex实现机制
2011-05-18 23:43 1064我们都知道Latch是Oracle ... -
local_listener参数作用
2011-05-10 17:19 1924pmon只会动态注册port等于1521的监听,否则 ... -
oracle伪列 rowid和rownum
2011-03-23 10:00 3532整理ROWID一 一,什么是伪列RowID?1,首先是一种数 ... -
Oracle10gR2 主备自动切换之客户端Failover配置
2011-01-20 10:32 9501. 主库检查和设置假设新增的服务名为ORCL_TAF.LK. ... -
Oracle10g配置Dataguard的相关参数解释
2011-01-20 10:24 1265参考自 http://space.itpub.ne ... -
wrap加密oracle包
2011-01-19 11:52 1297大家都知道oracle的很多系统包是没法看它的源码的,orac ... -
利用hcheck检查数据字典一致性状态
2011-01-17 17:42 1813利用hcheck可以检查oracle数据字典的一致性状态,主要 ... -
插入相同的数据量普通表和临时表产生的redo对比
2011-01-17 16:08 985往临时表里插入相同量 ... -
Database Link与GLOBAL_NAMES参数
2011-01-12 13:36 1027当GLOBAL_NAMES参数设置为TRUE时,使用DATAB ... -
Oracle Streams学习二(清除流配置)
2011-01-09 23:34 1179在完成streams部署之后,如果需要重新配置或舍弃配置,可以 ... -
red hat enterprise 下完全删除oracle 数据库
2011-01-05 01:28 1756步骤 1 以oracle用户登录主、备节点。步骤 2 ... -
Oracle常用dump命令
2010-12-20 00:31 831Oracle常用dump命令,记录一下备查。 一.M ... -
oracle执行DML(事物过程)的深入研究(二)
2010-12-14 15:02 1536接上一节的 oracle执行DML(事物过程)的深入研究(一) ... -
oracle执行DML(事物过程)的深入研究(一)
2010-12-14 10:26 2802用户所执行 DML (即执行事务)操作在 Oracle 内部按 ... -
Oracle基本数据类型存储格式研究(二)—数字类型
2010-12-14 00:35 1471数字类型包含number,intege ... -
Oracle基本数据类型存储格式研究(一)—字符类型
2010-12-13 23:32 11701.char char是定长字符型,内部代码是:96,最多可 ... -
关于oracle rowid的一些内容 -- 转载
2010-12-13 15:47 779本文讨论的是关于oracle ...
相关推荐
`py_innodb_page_info`能帮助我们查看redo log的内容,理解这些日志如何与数据页关联,如何在事务提交或回滚时执行操作。 另一方面,undo log(回滚日志)则用于回滚事务和提供隔离级别。它记录了对数据的原始状态...
- 归档日志切换:当redo log group切换时,会自动触发归档操作,也可以手动通过`ALTER SYSTEM ARCHIVE LOG CURRENT`命令进行。 4. **归档日志和RMAN备份**: - RMAN(Recovery Manager)是Oracle提供的备份和恢复...
在Oracle数据库系统中,redo日志由一系列的redo log files组成,这些文件包含了一系列的redo entries,每个entry都对应一个特定的事务操作。 undo,又称回滚日志(Undo Log),则记录了事务对数据的原始状态,即在...
redo log 是关系数据库中最 critical 的组件之一,它记录了所有数据库的事务操作,以便在系统崩溃或故障时恢复数据库。Exadata Smart Flash Log 使用 flash 存储器来加速 redo log 的写入,使得数据库的整体性能得到...
相关配置如`innodb_flush_log_at_trx_commit`控制何时将redo log写入磁盘,以确保数据一致性。 5. 二进制日志(Binary Log) 二进制日志记录了所有改变数据库状态的非临时性语句,以及服务器状态的改变,主要用于...
`ALTER DATABASE RENAME FILE`用于改变日志文件的路径或名称,例如:`ALTER DATABASE RENAME FILE 'c:/oracle/oradata/oradb/redo01.log' TO 'c:/oracle/oradata/redo01.log';` 6. **删除在线重做日志组(Dropping...
5. **Changing the name of the online redo log file** - `ALTER DATABASE RENAME FILE 'old_path' TO 'new_path';`:更改在线重做日志文件的路径或名称,适用于日志文件迁移场景。 6. **Dropping online redo ...
非也,揭秘redo log buffer.pdf”和“44 redo log buffer中的缓冲日志,到底什么时候可以写入磁盘?l.pdf”中,你将深入理解redo log的工作原理和写入时机。 数据库优化不仅限于SQL语句,还涉及到存储和硬件层面。...
- **重做日志(Redo Log)**:记录事务的修改操作,用于在系统崩溃后重新执行这些操作以恢复数据。 - **回滚日志(Undo Log)**:记录事务的撤销操作,用于回滚未提交的事务。 - **归档日志(Archive Log)**:在...
共享池用来缓存最近执行过的SQL语句和数据定义,而Redo Log Buffer负责在数据库进行修改时记录这些修改,以备恢复使用。 Oracle数据库包括数据文件、控制文件和Redo Log文件。数据文件存放用户的数据;控制文件包含...
Oracle LogMiner是Oracle数据库提供的一种内置工具,它允许用户分析redo log文件,从中提取SQL语句、DML操作和事务信息。通过LogMiner,DBA可以回顾历史操作,追踪错误,进行性能调优,以及满足合规性的审计需求。...
4. **InnoDB的redo log**:更新记录首先写入redo log,然后更新内存。redo log是固定大小,循环写入,提供crash-safe能力,保证即使数据库重启,已提交的记录也不会丢失。 5. **binlog**:MySQL Server层的日志,...
参考资料则包括了相关文档和技术资料,为深入学习提供路径。 2. 需求概述 总体目标是建立一个Physical Standby Database,它与Primary Database实时同步,能够在主数据库出现故障时立即接管服务。运行环境包括硬件...
在 primary 侧,我们需要生成 standby redolog,以便在复制库上应用redo日志。可以使用以下命令来生成 standby redolog: ```sql ALTER DATABASE ADD STANDBY LOGFILE 'D:\ORACLE\ORADATA\DG1\ONLINELOG\redo05.log'...
315 HIGH OPEN 06-OCT-15 Redolog file /u01/app/oracle/oradata/PROD2/redo03.log is missing 204 HIGH OPEN 06-OCT-15 Redolog file /u01/app/oracle/oradata/PROD2/redo03.log is corrupt 121 HIGH OPEN 05-OCT-...
通过以上详细介绍,我们不仅了解了Oracle数据库中一系列关键的管理命令,还深入学习了日志管理和表空间管理的核心概念与操作流程。这些知识对于任何希望深化理解Oracle数据库运维和优化的专业人士来说,都是不可或缺...
总结来说,Oracle基础培训旨在让学习者掌握Oracle数据库的基本架构和操作,包括其内存和进程的管理,物理存储的组织,以及如何进行有效的数据库管理和性能优化。通过深入理解这些概念,能更好地管理和维护Oracle...
1. Redo Logs:Oracle的Redo Log File系统由一组成员文件组成,它们以循环方式记录事务操作。当一个事务提交时,其更改的数据被写入redo log,如果系统发生故障,通过redo logs可以恢复未持久化的数据。 2. Alert ...