SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination e:\ARCHIVEDLOGS\
Oldest online log sequence 8
Next log sequence to archive 10
Current log sequence 10
SQL> shu immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 535662592 bytes
Fixed Size 1334380 bytes
Variable Size 176161684 bytes
Database Buffers 352321536 bytes
Redo Buffers 5844992 bytes
Database mounted.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
sql>recover database until cancel;
SQL> recover database until cancel;
Media recovery complete.
SQL> recover database until cancel;
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination e:\ARCHIVEDLOGS\
Oldest online log sequence 1
Next log sequence to archive 1
Current log sequence 1
SQL> alter system archive log current;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination e:\ARCHIVEDLOGS\
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
No comments:
Post a Comment