*** Chapter 7
Maintaining Online Redo Log Files
Online Redo Log Files's Characteristics:
1, Record all changes made to data.
2, Provide a recovery mechanism.
3, Can be orgnized into groups.
4, At least two groups required.
A set identical copies of online redo log files called an online
redo log file group.
Each member in a group has identical log sequence numbers and are of the same number.
Multiplexed Redo Log Files : 多路复用.
Log Switch : the act of switching from one log file group to another.
When will LGWR write online redo log file?
when a transaction commits.
Every three seconds.
When the redo log buffer becomes one-thired full.
when there is more than a megabyte of changed records in the redo log buffer.
Before the DBWn writes modified blocks in the Database Buffer Cache to the data files.
LS & LSN
Log Switch
Log Sequence Number
Force Log Switches & Check Point
desc v$log;
select group#, thread#, sequence#,status from v$log;
alter system switch logfile;
Check Point can be forced by
fast_start_mttr_traget=600: 600秒必需发生一次Checkpoint
也就是把脏数据写入数据文件.同时也加快了恢复时间.
show parameter fast_start
alter system set fast_start_mttr_target=300 scope=both;
手动发生check point
alter system checkpoint;
Adding Redo Files Groups
alter database add logfile group 4 ('xx.rdo') size 50M;
alter database add logfile member 'xx.rdo' to group 4;
Dropping Redo File Members.
alter database drop logfile member 'xx.rdo';
Dropping Redo Files Groups.
alter database drop logfile 1;
Relocate & Rename.
alter database rename file command:
shut down the database.
copy to another location.
Clear Redo Files.
alter database clear logfile group 2;
alter database clear unarchived logfile group 2;
Redo File Configuration.
What is Redo Threads?
each database instance referred to as a redo thread.
Archived Redo Log Files.
Filled online redo log files can be archived.
desc v$instance;
select archiver from v$instance;
select log_mode from v$database;
23:26 2009-9-9
Chapter 8 Maintaining Tabspace & Date Files
System tabspace
Non-system tablespace
permanent, undo ,temporary
create tablespace userdata datafile filepath size 5M
select * from v$tablespace;
desc dba_data_files;
select file_name, tablespace_name from dba_data_files;
dbms_space_admin.可改变表空间管理方式.
desc database_properties;
alter tablespace userdata read only;
create tablespace wenchuan
datafile 'd:/wenchuan01.dbf' size 20M
extent management local uniform size 128k;
create user yunchow identified by yunchow default tablespace wenchuan;
grant connect,resource to yunchow;
alter tablespace wenchuan offline;
alter tablespace wenchuan online;
Changing Storage Settings
locally managed tablespaces cannot be altered.
So it is abandoned.
Resizing a Tablespace
alter tablespace wenchuan add datafile
'd:/wenchuan02.dbf' size 20M
autoextend on next 10M maxsize 100M;
alter database datafile 'd:/wenchuan01.dbf'
autoextend on next 10M maxsize 100M;
alter database datafile 'd:/wenchuan01.dbf' resize 10M;
Methods for Moving Datafile
alter tablespace wenchuan rename datafile 'd:/wenchuan02.dbf'
to 'd:/oracle/wenchuan02.dbf';
alter database rename file 'd:/oracle/wenchuan02.dbf'
to 'd:/wenchuan02.dbf';
Dropping Tablespaces
drop tablespace wenchuan including contents and datafiles;
dba_tablespaces
v$tablespace
dba_data_files
v$datafile
dba_temp_files
v$tempfile
分享到:
- 2009-09-21 00:06
- 浏览 894
- 评论(0)
- 论坛回复 / 浏览 (0 / 1679)
- 查看更多
相关推荐
深入浅出Oracle: DBA入门、进阶与诊断案例.pdf 深入浅出Oracle: DBA入门、进阶与诊断案例.pdf
《深入解析Oracle:DBA入门、进阶与诊断案例》PDF版本下载
Oracle新手DBA入门,适合准备做DBA工作的人作为参考来使用
深入浅出Oracle:DBA入门、进阶与诊断案例深入浅出Oracle:DBA入门、进阶与诊断案例深入浅出Oracle:DBA入门、进阶与诊断案例深入浅出Oracle:DBA入门、进阶与诊断案例深入浅出Oracle:DBA入门、进阶与诊断案例
请一起下载 [深入解析Oracle.DBA入门进阶与诊断案例].盖国强.扫描版.pdf(上) [深入解析Oracle.DBA入门进阶与诊断案例].盖国强.扫描版.pdf(下) 并解压
深入浅出Oracle:DBA入门、进阶与诊断案例.pdf 内容详实
深入浅出Oracle:DBA入门、进阶与诊断案例.pdf 内容详实
超清晰的Oracle: DBA入门、进阶与诊断案例,数据库大咖eagle 力作,值得仔细阅读。
深入浅出Oracle——DBA 入门、进阶与诊断案例 (盖国强 编制) PDF格式-rar格式压缩 ------------------------------------ 第1章 数据库的启动和关闭 第2章 参数及参数文件 第3章 数据字典 第4章 内存管理 第5章 ...
深入浅出Oracle:DBA入门、进阶与诊断案例.pdf
深入浅出Oracle: DBA入门、进阶与诊断案例,本书是ITPUB技术丛书的第三本,是作者多年实践工作的积累和总结,各章节更从DBA的成长历程入手,引导大家快速进入并深入Oracle知识的国度。
深入解析Oracle.DBA入门进阶与诊断案例(高清版).rar 由于上传权限的问题,压缩成40M的包 共三部分,第三部分收1分哈,意思意思下咯
深入解析Oracle.DBA入门进阶与诊断案例.盖国强.扫描版,文件压缩成两个文件,下载朋友注意了。 针对数据库的启动和关闭、控制文件与数据库初始化、参数及参数文件、数据字典、内存管理、Buffer Cache与Shared Pool...
从入门到精通Oracle: DBA入门、进阶与诊断案例。里面详细介绍了Oracle的DBA知识与DBA责任以及DBA相关的案例。分享给大家。希望对你们有帮助。
很好很强大的oracle DBA入门教材。
本书继续贯彻了作者“由点到线再及面”的学习方法 既可以让初学者参考学习 又可以帮助具备一定基础的中级DBA进行进阶学习 不同层次的学习者都能从本书的不同内容中受益 ">目前市场上的Oracle书籍普遍存在的问题是...