Question: What are the steps to see if my Oracle database is in ARCHIVELOG mode? Answer: The following steps are required to see if you are running in ARCHIVELOG mode: An Oracle database can run in one of two modes. By default, the database is created in NOARCHIVELOG mode. This command will check to see if you have altered your database to run in ARCHIVELOG mode. $ export ORACLESID= where is the name of the database $ sqlplus /nolog SQL connect / as sysdba; To enable ARCHIVELOG mode status, enter the following SQL commands: SQL Shutdown SQL Startup mount SQL Alter database archivelog; SQL alter database open; To check the ARCHIVELOG mode status, enter the following SQL command.
- Oracle Database Archivelog Mode
- Enable Archivelog Mode
- How To Enable Archivelog Mode Oracle 12c
- Oracle Enable Archivelog Mode
With Flashback Database, you can rewind the database to a previous point in time without media recovery (that is, without restoring backup copies of the datafiles). When the database is running, Flashback Database buffers and writes before-images of data blocks to flashback logs, which are generated by default for all permanent tablespaces and which reside in the fast recovery area (FRA).
- Enable pluggable database(PDB) archivelog mode Enabling archive log mode -12c pluggable database/Container database. Since the Redologs are created at container database level in 12c and not at pluggable database level.
- Start the Database in Mount Mode. Enable Archive log. ALTER DATABASE ARCHIVELOG. Open the Database. ALTER DATABASE OPEN Now the Database is in Archivelog Mode and can be verified using the Archive Log List Command. Conn sys as sysda. Archive log list; SQL archive log list Database log mode Archive Mode.
Flashback logs allow Flashback Database to reduce the time to correct an error proportionally to the time it takes to detect the error, rather than to media recovery time (when Flashback Database is not enabled), which depends on database size.
1. Shut down the database and start up the database in mount mode in SQL*Plus:
2. Confirm that the database is in ARCHIVELOG mode, which is required for Flashback Database, and enable ARCHIVELOG mode if needed.
![Mode Mode](/uploads/1/1/8/9/118932807/758199472.jpg)
3. Set the flashback retention target to the desired value (in minutes). The following example value is for a 48-hour flashback target (as recommended earlier):
4. Set or change the relevant FRA parameters for Flashback Database, as noted in the following example (these commands assume the FRA disk group is named +FRA and that you are adding 20GB to the FRA size suggested earlier, which is more than enough to accommodate the flashback logs that will be generated):
For a RAC database, you must locate the FRA on ASM or a clustered file system.
NOTE If DB_RECOVERY_FILE_DEST is previously unset and you want to dynamically set it, you must first set DB_RECOVERY_FILE_DEST_SIZE. (This constraint makes sense if you think about it. The way to remember which parameter you must set first is to remind yourself that Oracle cannot allocate a FRA on disk until it knows how large to make the FRA.) |
If these parameters are already set, increase the FRA size to allocate space for flashback logs. The volume and rate of flashback log generation is approximately the same order of magnitude as those of redo log generation.
5. Set the associated undo retention, required for certain flashback features. Here, we set a 24-hour undo retention (in seconds), equivalent to half the DB_FLASHBACK_RETENTION_TARGET, as in Step 3:
6. Finally, enable Flashback Database and FORCE LOGGING while the database is mounted, then open the database:
Oracle Database Archivelog Mode
Related Posts
This is a quick post about the steps required to enable the ARCHIVELOG mode for an oracle database (Single Instance or RAC)
To check if the archive log mode is enabled or not, use the following command:
SYS@XPS 01-SEP-18 SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7164
Current log sequence 7167
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7164
Current log sequence 7167
If the database is not in the archivelog mode , you need first to set the archiving location, using one of the following options:
alter system set log_archive_dest_1=’LOCATION=+RECO_DG’;
OR
alter system set log_archive_dest_1=’LOCATION=USE_DB_RECOVERY_FILE_DEST’;
OR
alter system set log_archive_dest_1=’LOCATION=USE_DB_RECOVERY_FILE_DEST’;
For Single Instance Database, follow the following steps:
shutdown immediate
startup mount
alter database archivelog;
alter database open;
startup mount
alter database archivelog;
alter database open;
Now check the archivelog mode again:
SYS@XPS 01-SEP-18 SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7164
Next log sequence to archive 7167
Current log sequence 7167
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7164
Next log sequence to archive 7167
Current log sequence 7167
For RAC Instance Database:
Enable Archivelog Mode
srvctl stop database -d PROD
srvctl start database -d PROD -o mount
sqlplus / as sysdba
alter database archivelog;
exit;
srvctl stop database -d PROD
srvctl start database -d PROD
srvctl start database -d PROD -o mount
sqlplus / as sysdba
alter database archivelog;
exit;
srvctl stop database -d PROD
srvctl start database -d PROD
![Oracle enable archivelog mode Oracle enable archivelog mode](/uploads/1/1/8/9/118932807/879063461.jpg)
How To Enable Archivelog Mode Oracle 12c
That is all.
Oracle Enable Archivelog Mode
Thanks
Ahmed
Ahmed