Linux平台 Oracle 11g DG测试环境快速搭建参考

两台虚拟主机A和B:

1. A机器已安装ASM存储的Oracle 11g 实例

参考:

2. B机器已安装系统,配置以及目录结构均和A机器保持一致

/u01 + 3块ASM盘

DG部署规划:

    primary   standby  
主机   JY-DB   JY-DBS  
db_name   jyzhao   jyzhao  
db_unique_name   jyzhao   jyzhao_s  
instance_name   jyzhao   jyzhao_s  
存储   +DATA1   +DATA1  
归档  

/u01/app/oracle/product/11.2.0/db_1/dbs/arch

 

/u01/app/oracle/product/11.2.0/db_1/dbs/arch

 
DGMGRL   jyzhao_dgmgrl   jyzhao_s_dgmgrl  
GRID_HOME  

/u01/app/11.2.0/grid

 

/u01/app/11.2.0/grid

 
ORACLE_HOME  

/u01/app/oracle/product/11.2.0/db_1

 

/u01/app/oracle/product/11.2.0/db_1

 

一、前期准备

1.1. A机器打包拷贝/u01/app到B机器(包含了grid和oracle软件安装目录)

# tar -zcvf app.tar.gz app 

# scp app.tar.gz 192.168.99.160:/u01/

root@192.168.99.160's password:

app.tar.gz                                                                                                                          100% 3564MB  54.8MB/s  01:05

B机器解压,解压前确保第二步操作已完成。 

# pwd

/u01

[root@JY-DBS u01]# ls

app.tar.gz  lost+found

[root@JY-DBS u01]# tar -zxvf app.tar.gz

解压完成后,检查权限是正确的

# ls -lh

total 3.5G

drwxrwxr-x. 7 oracle oinstall 4.0K Mar 13 14:47 app

-rw-r--r--. 1 root  root    3.5G Mar 15 22:28 app.tar.gz

1.2. B机器配置用户,系统参数,安装依赖包,用户环境变量,ASM磁盘 

配置用户,系统参数,安装依赖包,用户环境变量

注:在第一步解压前做完,会发现权限都是正确的不用费心再改

root用户执行脚本

# /u01/app/oraInventory/orainstRoot.sh

# /u01/app/11.2.0/grid/root.sh

# /u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/roothas.pl


配置has

需要建立asm磁盘组


环境变量:

vi $ORACLE_HOME/dbs/init+ASM.ora

*.asm_diskstring='/dev/mapper/ora*'

*.asm_power_limit=1

*.diagnostic_dest='/u01/app/grid'

*.instance_type='asm'

*.large_pool_size=12M

*.remote_login_passwordfile='EXCLUSIVE'

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 16 10:51:02 2015

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

Connected to an idle instance.

SQL> startup

ORA-01078: failure in processing system parameters

ORA-29701: unable to connect to Cluster Synchronization Service

$  crsctl stat res -t

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

NAME          TARGET  STATE        SERVER                  STATE_DETAILS     

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

Local Resources

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

ora.ons

OFFLINE OFFLINE      jy-dbs                                     

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

Cluster Resources

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

ora.cssd

1        OFFLINE OFFLINE                                                 

ora.diskmon

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/3e8db39f3603081d372c77a371d3b5aa.html