码迷,mamicode.com
首页 > 其他好文 > 详细

一条命令搞定ADG

时间:2017-09-06 22:52:43      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:一条命令搞定adg


最近一直在搭建ORACLE 12C ADG ,其中包括单机到单机的ADG, RAC到RAC的ADG,还有RAC到单机的ADG,遇到不少小问题,在此做一下记录。


Oracle 12c R1 RAC 修改启动方式

$srvctl modify database -d orcldg -s nomount  orcldg为数据库名

$srvctl modify database -d orcldg -s mount  

$srvctl modify database -d orcldg -s open  

 

置完DATAGUARD之后,默认是mount,但是我们要求自动启动成ADG模式,这里就需要做一个小小的改动。

1.查看启动方式

$srvctl config database -d orcldg

Database unique name: orcldg

Database name:

Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1

Oracle user: oracle

Spfile: +DATADG/orcldg/spfileorcldg.ora

Password file: +DATADG/orcldg/PASSWORD/pworcldg

Domain:

Start options: mount

Stop options: immediate

Database role: PHYSICAL_STANDBY

Management policy: AUTOMATIC

Disk Groups: DATADG

Services:

OSDBA group:

OSOPER group:

Database instance: orcldg

 2.修改启动方式

$srvctl modify database -db orcldg -startoption open

 

3.在此验证启动方式

<orcldg:orcldg:/home/oracle>$srvctl config database -d orcldg

Database unique name: orcldg

Database name:

Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1

Oracle user: oracle

Spfile: +DATADG/orcldg/spfileorcldg.ora

Password file: +DATADG/orcldg/PASSWORD/pworcldg

Domain:

Start options: open

Stop options: immediate

Database role: PHYSICAL_STANDBY

Management policy: AUTOMATIC

Disk Groups: DATADG

Services:

OSDBA group:

OSOPER group:

Database instance: orcldg

 

4.启动数据库,查看open_mode 已经启动为ADG模式了

SQL> startup

ORACLE instance started.

 

Total System Global Area 1174405120 bytes

Fixed Size                  2923680 bytes

Variable Size             436208480 bytes

Database Buffers          721420288 bytes

Redo Buffers               13852672 bytes

Database mounted.

Database opened.

SQL> select open_mode from v$database;

 

OPEN_MODE

--------------------

READ ONLY WITH APPLY

 

SQL>


本文出自 “roidba” 博客,请务必保留此出处http://roidba.blog.51cto.com/12318731/1963242

一条命令搞定ADG

标签:一条命令搞定adg

原文地址:http://roidba.blog.51cto.com/12318731/1963242

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!