sql> sql> sql> archive log list database log mode automatic archival archive destination oldest online log sequence next log sequence to archive current log sequence sql> select * from v$log;
archive mode disabled d:\oracle\ora92\rdbms 25 26 27
group# thread# sequence# bytes members arc status ---------- ---------- ---------- ---------- ---------- --- ---------------first_change# first_tim ------------- --------1 1 26 104857600 1 no inactive 601130 19-may-08 2 1 775135 21-may-08
27
104857600
1 no
current
3 1 572607 16-may-08
25
104857600
1 yes inactive
group# thread# sequence# first_change# first_tim
bytes
sql> set linesize 200; sql> set pagesize 200; sql> / members arc status
---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1 601130 19-may-08
1
26
104857600
1 no
inactive
2 775135 21-may-08
1
27
104857600
1 no
current
3 572607 16-may-08
1
25
104857600
1 yes inactive
sql> select * from v$logfile; group# status
type
---------- ------- ------member -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------3 stale online
d:\oracle\oradata\iimdba\redo03.log
2
online
d:\oracle\oradata\iimdba\redo02.log
1 stale
online
d:\oracle\oradata\iimdba\redo01.log
sql> ------ to create a new redo log files sql> sql> alter database add log file group 4 'd:\oracle\oradata\iimdba\redo04.log' size 100k; alter database add log file group 4 'd:\oracle\oradata\iimdba\redo04.log' size 100k * error at line 1: ora-01900: logfile keyword expected sql> alter database add logfile group 4 'd:\oracle\oradata\iimdba\redo04.log' size 100k; database altered. sql> select * from v4log; select * from v4log * error at line 1: ora-00942: table or view does not exist sql> select * from v$log; group# thread# sequence# first_change# first_tim
bytes
members arc status
---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1 601130 19-may-08
1
26
104857600
1 no
inactive
2 775135 21-may-08
1
27
104857600
1 no
current
3 572607 16-may-08
1
25
104857600
1 yes inactive
1
0
102400
4
1 yes unused
0 sql> ------ to change unused log file to used sql> sql> ------- we must to switch the logfile sql> sql> alter system switch logfile; system altered. sql> / system altered. sql> / alter system switch logfile * error at line 1: ora-01089: immediate shutdown in progress - no operations are permitted sql> startup ora-12571: tns:packet writer failure sql> conn sys/oracle as sysdba connected to an idle instance. sql> startup oracle instance started. total system global area fixed size
135338868 bytes 453492 bytes
variable size
109051904 bytes
database buffers
25165824 bytes
redo buffers
667648 bytes
database mounted. database opened. sql> sql> sql> select * from v$log; group# thread# sequence# first_change# first_tim
bytes
members arc status
---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1 601130 19-may-08
1
26
104857600
1 no
inactive
2 775135 21-may-08
1
27
104857600
1 no
inactive
1
29
104857600
1 no
current
3
797456 21-may-08 4 797289 21-may-08
1
28
102400
1 no
inactive
sql> alter system checkpoint; system altered. sql> -------- one group is current and other is inactive sql> sql> ----- if the group has status it has sequence 0.. sql> sql> create user ganesh identified by sql; user created. sql> grant connect,resource to sql; grant connect,resource to sql * error at line 1: ora-01917: user or role 'sql' does not exist sql> sql> grant connect,resource to ganesh; grant succeeded. sql> -------- to add a member in a group sql> sql> alter database add logfile member 'd:\oracle\oradata\iimdba\remem.log to group 1; alter database add logfile member 'd:\oracle\oradata\iimdba\remem.log to group 1 * error at line 1: ora-01756: quoted string not properly terminated sql> ed wrote file afiedt.buf 1* alter database add logfile member 'd:\oracle\oradata\iimdba\remem1.log' to group 1 sql> / database altered. sql> select * from v$log; group# thread# sequence# first_change# first_tim
bytes
members arc status
---------- ---------- ---------- ---------- ---------- --- ---------------------------- --------1
1
26
104857600
2 no
inactive
601130 19-may-08 2 775135 21-may-08
1
27
104857600
1 no
inactive
3 797456 21-may-08
1
29
104857600
1 no
current
4 797289 21-may-08
1
28
102400
1 no
inactive
sql> ----------- inside the group member must have the same size... sql> sql> ------- to drop the sql> sql> spool off