- 论坛徽章:
- 0
|
force logging并不比一般的logging记录的日志多,
数据库在force logging状态下,nologging选项将无
效,因为nologging将破坏dataguard的可恢复性.
force logging强制数据库在任何状态下必须记录
日志而已。
logical standby允许数据库在恢复的同时进行访问,
physical standby则在恢复时不允许进行访问
logical standby可以使机器的使用最大化
Oracle Dataguard
Chapter 3 - Implementing Standby Databases
Preparing To Create a Physical Standby Database
ALTER DATABASE ARCHIVELOG;
If the “automatic archival” is not enabled, it can be enabled using the following statement:
ALTER SYSTEM ARCHIVE LOG START;
Change the log_archive_start=true parameter in the initialization file so that it will remain enabled on next startup of the database.
Once the database is in archive log mode, the next step is to put it in FORCE LOGGING mode. This will ensure that all the transactions made on the primary database will be registered in the redo logs of the primary database and can be replicated on standby databases.
FORCE LOGGING Option
The FORCE LOGGING option is the safest method to ensure that all the changes made in the database will be captured and available for recovery in the redo logs. Force logging is the new feature added to the family of logging attributes.
Before the existence of FORCE LOGGING, Oracle provided logging and nologging options. These two options have higher precedence at the schema object level than the tablespace level; therefore, it was possible to override the logging settings at the tablespace level with nologging setting at schema object level.
rollping :
就是说,设置FORCE LOGGING 之后。本来一些可以指定nologging减少redo log的操作 ,虽然不报错,但事实上redo log还是都纪录了。
等于是,没法nologging了
其实nologging与表模式,插入模式,数据库运行模式(archived/unarchived)都有很大的关系。force logging(强制日志)模式通过命令:alter database force logging来使得Oracle无论什么操作都进行redo的写入。
其实nologging与表模式,插入模式,数据库运行模式(archived/unarchived)都有很大的关系:
总结如下:
注意append是一种hint;
一般我们可以这样来使用
insert /*+append+/ into mytable values(1,'alan');
数据库在归档模式下
当表模式为logging状态时,无论是append模式还是no append模式,redo都会生成。
当表模式为nologging状态时,只有append模式,不会生成redo.
数据库在非归档模式下
无论是在logging还是nologing的模式下,append的模式都不会生成redo,而no append模式下都会生成redo。
如果我想看一张表是否是logging状态,可以这样
select table_name,logging from dba_tables where table_name='tablename';
那么在Oracle内部还存在一个内部参数:_disable_logging 默认是false
通过更改为true可以让Oracle在修改表中的记录的时候完全不记录redo,这个参数要甚用。平时,我们只作为性能测试用。
force logging(强制日志)模式:
通过命令:
alter database force logging来使得Oracle无论什么操作都进行redo的写入。
通过select force_logging from v$database可以看到当前数据库强制日志模式的状
http://www.itpub.net/viewthread. ... p;extra=&page=1
http://database.ctocio.com.cn/tips/282/8200782.shtml
http://space.itpub.net/10648374/viewspace-615845 |
|