Oracle 19c rac database running on no archivelog mode , below are the steps to enable archivelog mode
check db details and archive mode:
select a.INSTANCE_NUMBER,a.INSTANCE_NAME,a.HOST_NAME,b.OPEN_MODE,b.DATABASE_ROLE from gv$instance a,gv$database b where a.INSTANCE_NUMBER=b.INST_ID;
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME OPEN_MODE DATABASE_ROLE
--------------- ---------------- ---------------------------------------- -------------------- ----------------
1 zdmtst1 racnode01 READ WRITE PRIMARY
2 zdmtst2 racnode02 READ WRITE PRIMARY
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Current log sequence 10
Check Database status using srvctl:
[oracle@racnode01 ~]$ srvctl status database -d zdmtst
Instance zdmtst1 is running on node racnode01
Instance zdmtst2 is running on node racnode02
Stop Database using srvctl:
[oracle@racnode01 ~]$ srvctl stop database -d zdmtst
[oracle@racnode01 ~]$ srvctl status database -d zdmtst
Instance zdmtst1 is not running on node racnode01
Instance zdmtst2 is not running on node racnode02
Startup db in mount state from node1:
[oracle@racnode01 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 10 03:51:56 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.0737E+10 bytes
Fixed Size 12446800 bytes
Variable Size 1778384896 bytes
Database Buffers 8891924480 bytes
Redo Buffers 54661120 bytes
Database mounted.
Enable Archivelog mode:
SQL> alter database archivelog;
Database altered.
Shutdown database:
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
Start db using srvctl and check status:
[oracle@racnode01 ~]$ srvctl start database -d zdmtst
[oracle@racnode01 ~]$ srvctl status database -d zdmtst
Instance zdmtst1 is running on node racnode01
Instance zdmtst2 is running on node racnode02
Connect to db and check archivelog status:
[oracle@racnode01 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 10 03:57:22 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 10
Current log sequence 10
No comments:
Post a Comment