Database/Oracle
116 - [Oracle 19C] Enableing ARCHIVELOG mode.
unsungIT
2023. 12. 28. 02:52
- Enableing ARCHIVELOG mode.
show user;
show con_name;
/*
USER is "SYS"
CON_NAME
------------------------------
CDB$ROOT
*/
select * from v$logfile;
/*
GROUP# STATUS TYPE MEMBER IS_RECOVERY_DEST_FILE CON_ID
---------- ------- ------- ---------------------------------------- ------------------------- ----------
3 ONLINE /u01/app/oracle/oradata/ORCL/redo03.log NO 0
2 ONLINE /u01/app/oracle/oradata/ORCL/redo02.log NO 0
1 ONLINE /u01/app/oracle/oradata/ORCL/redo01.log NO 0
*/
archive log list
/*
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 59
Current log sequence 61
*/
If not then
Shutdown immediate;
STARTUP MOUNT;
alter database archivelog;
ALTER DATABASE OPEN;
ALTER PLUGGABLE DATABASE ALL OPEN;
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 1526723608 bytes
Fixed Size 9135128 bytes
Variable Size 1107296256 bytes
Database Buffers 402653184 bytes
Redo Buffers 7639040 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
Pluggable database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/19/db_1/dbs/arch
Oldest online log sequence 59
Next log sequence to archive 61
Current log sequence 61