C/C++教程

12C RAC集群数据库开启归档模式

本文主要是介绍12C RAC集群数据库开启归档模式,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
首先在节点二 关闭数据库:
[oracle@gpnms3g2:/home/oracle]$sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 9 19:05:17 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.


连接节点1数据库:
[root@gpnms3g1 ~]# su - oracle
上一次登录:一 8月  9 18:41:19 CST 2021pts/2 上
[oracle@gpnms3g1:/home/oracle]$sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 9 19:07:23 2021

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> show parameter recovery;

NAME                                 TYPE
------------------------------------ ----------------------
VALUE
------------------------------
db_recovery_file_dest                string

db_recovery_file_dest_size           big integer
0
recovery_parallelism                 integer
0
SQL> set lin 2000;
SQL> alter system set db_recovery_file_dest_size=1500m; 

System altered.

SQL> alter system set db_recovery_file_dest='+dgrecovery';

System altered.

SQL> show parameter cluster;

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
cluster_database                     boolean                TRUE
cluster_database_instances           integer                2
cluster_interconnects                string
SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  2929352 bytes
Variable Size             771755320 bytes
Database Buffers         2365587456 bytes
Redo Buffers               13844480 bytes
Database mounted.
SQL> alter database archievelog;
alter database archievelog
                         *
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE


SQL> alter database archivelog; 

Database altered.

SQL> alter database flashback on;

Database altered.

SQL> alter system set cluster_database=true scope=spfile;

System altered.

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.


启动节点一数据库:
SQL> startup
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  2929352 bytes
Variable Size             771755320 bytes
Database Buffers         2365587456 bytes
Redo Buffers               13844480 bytes
Database mounted.
Database opened.

启动节点一数据库:
SQL> startup
ORACLE instance started.

Total System Global Area 3154116608 bytes
Fixed Size                  2929352 bytes
Variable Size             822086968 bytes
Database Buffers         2315255808 bytes
Redo Buffers               13844480 bytes
Database mounted.
Database opened.
SQL> 

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence        38
Next log sequence to archive    40
Current log sequence               40

切换日志:
SQL> alter system switch logfile;

 

这篇关于12C RAC集群数据库开启归档模式的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!