Sunday 17 March 2013

How to enable database archive mode in oracle


Login sys as sysdba.

sqlplus sys/oracle as sysdba


To check if archiving status

SQL> archive log list;
Database log mode       No Archive Mode
Automatic archival       Disabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     23
Current log sequence       25


shutdown database.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

start up database at mount point


SQL> startup mount;
ORACLE instance started.

Total System Global Area 1590267904 bytes
Fixed Size    1336792 bytes
Variable Size 1040189992 bytes
Database Buffers  536870912 bytes
Redo Buffers   11870208 bytes
Database mounted.

To check if archiving status

SQL> archive log list;
Database log mode       No Archive Mode
Automatic archival       Disabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     23
Current log sequence       25

To enable archiving .


SQL> alter database archivelog;

Database altered.

To verify archiving


SQL> archive log list;
Database log mode       Archive Mode
Automatic archival       Enabled
Archive destination       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     23
Next log sequence to archive   25
Current log sequence       25
SQL>

Now open the database.

SQL> alter database open;

Database altered.

SQL>

No comments:

Post a Comment