Akashic Records

How to enable oracle archivelog 본문

Database Learning Guide

How to enable oracle archivelog

Andrew's Akashic Records 2023. 3. 13. 10:41
728x90

To enable archivelog mode in Oracle, follow these steps:

1. Connect to the database using SQL*Plus or a similar tool as a user with SYSDBA privileges.

2. Check the current log mode of the database by running the following command:

SELECT log_mode FROM v$database;

This will show whether the database is currently in NOARCHIVELOG or ARCHIVELOG mode.

3. If the database is currently in NOARCHIVELOG mode, shut down the database using the SHUTDOWN IMMEDIATE command.

4. Start up the database in MOUNT mode using the following command:

STARTUP MOUNT;

 

5. Enable archivelog mode using the ALTER DATABASE command as follows:

ALTER DATABASE ARCHIVELOG;

 

6. Open the database using the following command:

ALTER DATABASE OPEN;


7. Verify that the database is now in ARCHIVELOG mode by running the following command:

SELECT log_mode FROM v$database;

This should show that the database is now in ARCHIVELOG mode.

8. After enabling archivelog mode, make sure to back up your database regularly to prevent the archive logs from filling up the disk. You can set up a backup strategy using Oracle Recovery Manager (RMAN) or a similar tool.

Note: Enabling archivelog mode requires a database restart, so be sure to plan accordingly and schedule downtime as needed.

728x90
Comments