The reason for the above error is the due to the database is configured to run in NOARCHIVE Mode.
So to fix the error, We need to convert the database to ARCHIVE Mode.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 2
Current log sequence 4
SQL>
So to fix the error, We need to convert the database to ARCHIVE Mode.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 2
Current log sequence 4
SQL>
Converting to ARCHIVE Mode.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any instance
SQL>
So, doing that before the database should be in Mounted state.
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 392495104 bytes
Fixed Size 2213696 bytes
Variable Size 138414272 bytes
Database Buffers 247463936 bytes
Redo Buffers 4403200 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/11.2.0/db_1/dbs/arch
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4
SQL> alter database open;
Database altered.
SQL>
Bingo...!!!!!!!!!!!!!
No comments:
Post a Comment