Hi All. Its been a long time since I posted so thought i’d better start again :-)
This is a pretty trivial thing but I always forget the syntax hence thought i’d post it for the benefit of others and myself
1. Change the cluster database parameter so the database can be mounted in exclusive mode which is required to enable archive logging
alter system set cluster_database=false scope=spfile;
2. Shutdown the database using srvctl
srvctl stop database -d ORCL
3. Startup one of the instances upto the mount state
sqlplus / as sysdba
startup mount
4. Enable archivelog mode
alter database archivelog;
5. Change the cluster_database parameter back to true in the spfile
alter system set cluster_database=true scope=spfile;
6. Shutdown the instance
shutdown immediate
7. Startup the database using srvctl
srvctl start database -d ORCL
8. Once the database is back up you can verify the change by connecting to one of the database instances
sqlplus / as sysdba
archive log list
For example:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archlogs/ORCL/
Oldest online log sequence 111
Next log sequence to archive 113
Current log sequence 113
This is a pretty trivial thing but I always forget the syntax hence thought i’d post it for the benefit of others and myself
1. Change the cluster database parameter so the database can be mounted in exclusive mode which is required to enable archive logging
alter system set cluster_database=false scope=spfile;
2. Shutdown the database using srvctl
srvctl stop database -d ORCL
3. Startup one of the instances upto the mount state
sqlplus / as sysdba
startup mount
4. Enable archivelog mode
alter database archivelog;
5. Change the cluster_database parameter back to true in the spfile
alter system set cluster_database=true scope=spfile;
6. Shutdown the instance
shutdown immediate
7. Startup the database using srvctl
srvctl start database -d ORCL
8. Once the database is back up you can verify the change by connecting to one of the database instances
sqlplus / as sysdba
archive log list
For example:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /archlogs/ORCL/
Oldest online log sequence 111
Next log sequence to archive 113
Current log sequence 113
No comments:
Post a Comment