查看: 1805|回复: 0

[Oracle数据库] REDO

发表于 2018-1-25 08:00:00

REDO
REDO
REDO
REDO
SYS@newtest>select group#,members,status from v$log;

  1. GROUP# MEMBERS STATUS
复制代码

  1. 1 1 INACTIVE
  2. 2 1 INACTIVE
  3. 3 1 CURRENT
复制代码

REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
SQL> select * from v$log;

  1. GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
复制代码

  1. 1 1 73 209715200 512 1 YES INACTIVE 4361569 2018/1/10 9 4414925 2018/1/10 2 0
  2. 2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
  3. 3 1 75 209715200 512 1 NO CURRENT 4438662 2018/1/11 2 1.8446744073 0
复制代码

SQL> alter system switch logfile;

alter system switch logfile

ORA-65040: operation not allowed from within a pluggable database
切换后
SQL> select * from v$log;

  1. GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
复制代码

  1. 1 1 73 209715200 512 1 YES INACTIVE 4361569 2018/1/10 9 4414925 2018/1/10 2 0
  2. 2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
  3. 3 1 75 209715200 512 1 NO CURRENT 4438662 2018/1/11 2 1.8446744073 0
复制代码

SQL> alter system switch logfile;

System altered
SQL> select * from v$log;

  1. GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
复制代码

  1. 1 1 76 209715200 512 1 NO CURRENT 4457139 2018/1/11 1 1.8446744073 0
  2. 2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
  3. 3 1 75 209715200 512 1 YES ACTIVE 4438662 2018/1/11 2 4457139 2018/1/11 1 0
复制代码

SQL> select * from emp where empno=7839;

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO


7839 KING PRESIDENT 1981/11/17 5000.00 10

SQL> update emp set sal=9000 where empno=7839;

1 row updated

SQL> commit;

Commit complete

SQL> select sid,serial#,username from v$session where username='SYS';

  1. SID SERIAL# USERNAME
复制代码

  1. 22 1392 SYS
  2. 26 41221 SYS
  3. 55 19525 SYS
  4. 71 13870 SYS
  5. 73 45653 SYS
复制代码

SQL> SELECT SID FROM V$MYSTAT WHERE ROWNUM =1;

  1. SID
复制代码

  1. 55
  2. 另一个session
  3. SQL> alter system dump logfile 'C:\app\Administrator\virtual\oradata\newtest\redo01.log';
复制代码

System altered

SQL> select value from v$diag_info where name='Default Trace File';

VALUE

C:\APP\ADMINISTRATOR\VIRTUAL\diag\rdbms\newtest\newtest\trace\newtest_ora_32512.trc
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
在10g中ORACLE会自动调整它的值,他遵循这样一个原则,
'Fixed SGA Size'+ 'Redo Buffers'是granule size的整数倍
这是从oracle9开始出现的新特性
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO
REDO




上一篇:回滚与撤销
下一篇:等待事件
回复

使用道具 举报