Oracle log files
Oracle log files : An introduction
The Oracle server maintains the redo Oracle log files to minimize the loss of data in the Database in case of an uncontrolled shutdown.
Online redo Oracle log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database.
For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the rollback segment data block, and the transaction table of the rollback segments.
The question here is how are the Oracle log files maintained, and what information do we have?
A couple of interesting Oracle views:
a)To view information on log files:
SELECT * from v$log;
b)To view information on log file history:
SELECT thread#, first_change#,
TO_CHAR(first_time,'MM-DD-YY HH12:MIPM'),
next_change#
from v$log_history;
The above shows you what log state your system is in. Read more about ARCHIVELOG in the article on Oracle Backup.
Consider the parameters that can limit the number of online redo Oracle log files before setting up or altering the configuration of an instance's online redo log.
The following parameters limit the number of online redo Oracle log files that you can add to a database:
The MAXLOGFILES parameter used in the CREATE DATABASE statement determines the maximum number of groups of online redo Oracle log files for each database.
Group values can range from 1 to MAXLOGFILES.
The only way to override this upper limit is to re-create the database or its control file. Thus, it is important to consider this limit before creating a database.
If MAXLOGFILES is not specified for the CREATE DATABASE statement, Oracle uses an operating system specific default value. The MAXLOGMEMBERS parameter used in the CREATE DATABASE statement determines the maxim
相关文档:
什么是合并多行字符串(连接字符串)呢,例如:
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
1). 设置当前session是否对修改的数据进行自动提交 :SET AUTO[COMMIT] {ON|OFF|IMM[EDIATE]| n}
SQL> set autocommit off
2).在用start命令执行一个sql脚本时,是否显示脚本中正在执行的SQL语句 :SET ECHO {ON|OFF}
SQL> set echo on
3).是否显示当前sql语句查询或修改的行数
SQL> SET FEED[BACK] {6|n|O ......
INSERT INTO hydlsrs@remote_zzh
SELECT * from hydlsrs where zzh='2'
hydlsrs为表名 @remote_zzh为库名
select * from hydlsrs为另1库中表名,
不同库中相同表结构,可以跨库插入。用于
2地倒入表内容。 ......
1. 取A表的数据,更新B表字段
update m_build b
set b.district_id=(
select d.district_id
from
bjhouse.d_district d
where
b.build_name_jq=d.district_name)
where exists
(select 1
from ......