Home > Database > Mysql Tutorial > body text

RAC手工配置监听、ASM和创建数据库

WBOY
Release: 2016-06-07 17:03:13
Original
1214 people have browsed it

1.配置listenera.$Oracle_HOME/network/admin/listener.oraLISTENER1= (DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vi

1.配置listener
a.$Oracle_HOME/network/admin/listener.ora
LISTENER1=
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip.oracle.com)(PORT=1521)(IP=FIRST))
    (ADDRESS=(PROTOCOL=TCP)(HOST=rac1.oracle.com)(PORT=1521)(IP=FIRST))
  )

b.$ORA_CRS_HOME/crs/public/ora.rac1.LISTENER1.lsnr.cap
NAME=ora.rac1.LISTENER1.lsnr
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/10.2.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for listener on node
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=rac1
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.rac1.vip
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=

c.crs_register ora.rac1.LISTENER1.lsnr

d.节点2,重复步骤a,b,c

2.创建ASM
a.$ORACLE_HOME/dbs/init+ASM1.ora
cluster_database=true
instance_type=asm
large_pool_size=12m
background_dump_dest=/u01/app/oracle/admin/+ASM/bdump
core_dump_dest=/u01/app/oracle/admin/+ASM/cdump
user_dump_dest=/u01/app/oracle/admin/+ASM/udump
asm_diskgroups='DATA','FLASH'
+ASM1.instance_number=1
+ASM2.instance_number=2

b.export ORACLE_SID=+ASM
sqlplus / as sysdba
startup nomount
create diskgroup DATA external redundancy disk '/dev/raw/raw1'

c.srvctl add asm -n rac1 -i +ASM1 -o $ORACLE_HOME -p spfile+ASM1.ora

d.节点2,,重复a, b, c

3.创建RAC数据库
a.新建单实例数据库

b.alter database add logfile thread 2 group 3('+DATA/RACDB/redo01a.rdo','+DATA/RACDB/redo01b.rdo') size 50M
alter database add logfile thread 2 group 3('+DATA/RACDB/redo01a.rdo','+DATA/RACDB/redo01b.rdo') size 50M
create undo tablespace UNDOTBS2 datafile '+DATA/RACDB/undotbs02.dbf') size 50M
alter database enable thread 2

c.initRACDB.ora
cluster_database=true
cluster_instances=2
RACDB1.thread=1
RACDB2.thread=2
RACDB1.undo_tablespace=undotbs1
RACDB2.undo_tablespace=undotbs2
RACDB1.instance_number=1
RACDB2.instance_number=2

d.srvctl add database -d RACDB -o /u01/app/oracle/product/10.2.0/db_1 -p initRACDB.ora
srvctl add instance -d RACDB -i RACDB1 -n rac1
srvctl add instance -d RACDB -i RACDB2 -n rac2

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template