SYS@newtest>select group#,members,status from v$log;
GROUP# MEMBERS STATUS
1 1 INACTIVE
2 1 INACTIVE
3 1 CURRENT
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
1 1 73 209715200 512 1 YES INACTIVE 4361569 2018/1/10 9 4414925 2018/1/10 2 0
2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
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;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
1 1 73 209715200 512 1 YES INACTIVE 4361569 2018/1/10 9 4414925 2018/1/10 2 0
2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
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;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME CON_ID
1 1 76 209715200 512 1 NO CURRENT 4457139 2018/1/11 1 1.8446744073 0
2 1 74 209715200 512 1 YES INACTIVE 4414925 2018/1/10 2 4438662 2018/1/11 2 0
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';
SID SERIAL# USERNAME
22 1392 SYS
26 41221 SYS
55 19525 SYS
71 13870 SYS
73 45653 SYS
SQL> SELECT SID FROM V$MYSTAT WHERE ROWNUM =1;
SID
55
另一个session
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
在10g中ORACLE会自动调整它的值,他遵循这样一个原则,
'Fixed SGA Size'+ 'Redo Buffers'是granule size的整数倍
这是从oracle9开始出现的新特性