Coming to Primary
Database (3)
[oracle@localhost
~]$ export ORACLE_SID=orcl
[oracle@localhost
~]$ sqlplus / as sysdba
SQL*Plus:
Release 10.2.0.1.0 - Production on Fri Jul 5 06:14:24 2013
Copyright
(c) 1982, 2005, Oracle. All rights
reserved.
Connected
to an idle instance.
SQL>
startup
ORACLE
instance started.
Total
System Global Area 608174080 bytes
Fixed
Size 1220844 bytes
Variable
Size 201330452 bytes
Database
Buffers 402653184 bytes
Redo
Buffers 2969600 bytes
Database
mounted.
Database
opened.
SQL>
exit
SQL>
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIM NEXT_TIME
----------
--------- ---------
4 05-JUL-13 05-JUL-13
5 05-JUL-13 05-JUL-13
SQL>
alter system switch logfile;
System
altered.
SQL>
/
System
altered.
SQL>
/
System
altered.
SQL>
/
System
altered.
SQL>
/
System
altered.
SQL>
/
/
/
/
/
/
System
altered.
SQL>
/
/
/
/
System
altered.
SQL>
/
System
altered.
SQL>
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIM NEXT_TIME
----------
--------- ---------
4 05-JUL-13 05-JUL-13
5 05-JUL-13 05-JUL-13
6 05-JUL-13 05-JUL-13
7 05-JUL-13 05-JUL-13
8 05-JUL-13 05-JUL-13
9 05-JUL-13 05-JUL-13
10 05-JUL-13 05-JUL-13
11 05-JUL-13 05-JUL-13
12 05-JUL-13 05-JUL-13
13 05-JUL-13 05-JUL-13
14 05-JUL-13 05-JUL-13
SEQUENCE# FIRST_TIM NEXT_TIME
----------
--------- ---------
15 05-JUL-13 05-JUL-13
16 05-JUL-13 05-JUL-13
17 05-JUL-13 05-JUL-13
18 05-JUL-13 05-JUL-13
19 05-JUL-13 05-JUL-13
20 05-JUL-13 05-JUL-13
21 05-JUL-13 05-JUL-13
18
rows selected.
SQL>
desc v$log
Name
Null? Type
-----------------------------------------
-------- ----------------------------
GROUP#
NUMBER
THREAD#
NUMBER
SEQUENCE#
NUMBER
BYTES
NUMBER
MEMBERS
NUMBER
ARCHIVED VARCHAR2(3)
STATUS
VARCHAR2(16)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
SQL>
select status, MEMBERS from v$log;
STATUS MEMBERS
----------------
----------
INACTIVE 1
ACTIVE 1
CURRENT 1
SQL>
alter system switch logfile;
System
altered.
SQL>
/
System
altered.
SQL>
/
/
/
/
/
/
/
/
/
System
altered.
SQL>
System
altered.
SQL>
select status,group# from v$log;
STATUS GROUP#
----------------
----------
ACTIVE 1
CURRENT 2
ACTIVE 3
No comments:
Post a Comment