登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

飞哥的技术博客

世上无难事,只怕有心人!

 
 
 

日志

 
 
 
 

CSDN技术中心 在Solaris 10 X86上安装Oracle 10g RAC详解 (2)  

2010-02-12 10:59:22|  分类: Solaris |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

同样,安装后期会提示用户在所有节点上以root身份运行脚本root.sh,这时在RAC1运行是还要进行VIP配置。

<root:RAC1>/u01/app/oracle/product/10.1.0.3/oracle/root.sh

Running Oracle10 root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/10.1.0.3/oracle

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Creating /usr/local/bin directory...

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Adding entry to /var/opt/oracle/oratab file...

Entries will be added to the /var/opt/oracle/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

 

配置完成后会出现显示整个配置的结果:

 

<root:RAC2>/u01/app/oracle/product/10.1.0.3/oracle/root.sh

Running Oracle10 root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /u01/app/oracle/product/10.1.0.3/oracle

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Creating /usr/local/bin directory...

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Creating /var/opt/oracle/oratab file...

Adding entry to /var/opt/oracle/oratab file...

Entries will be added to the /var/opt/oracle/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

 

CRS resources are already configured

<oracle:RAC1>netca

Oracle Net Services Configuration:

 

 

 

在所有节点上创建数据库

1,由于创建oracle数据库需要多个raw devices,这里为了方便起见,将这些raw devices的设备文件连接成更易懂的文件名,同时需要设置相应的属主和权限,具体步骤如下:

<root:RAC1>cd ORACLE

<root:RAC1>mkdir db

<root:RAC1>chown oracle:root db

<root:RAC1>cd db

<root:RAC1>ls

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C800d0s0 system

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C800d0s1 sysaux

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C800d0s3 undotbs1

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C800d0s4 undotbs2

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C800d0s5 temp

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s0 example

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s1 users

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s3 redo1_1

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s4 redo1_2

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s5 redo2_1

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s6 redo2_2

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C801d0s7 spfile

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C802d0s3 control1

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C802d0s4 control2

<root:RAC1>ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C802d0s5 pwdfile

<root:RAC1>pwd

/ORACLE/db

<root:RAC1>chown -RL oracle:dba *

<root:RAC1>chmod -R 660 *

 

<oracle:RAC1>mkdir -p /u01/app/oracle/oradata/tree

 

<oracle:RAC1>cat tree_raw.conf

system=/ORACLE/db/system

sysaux=/ORACLE/db/sysaux

example=/ORACLE/db/example

users=/ORACLE/db/users

temp=/ORACLE/db/temp

undotbs1=/ORACLE/db/undotbs1

undotbs2=/ORACLE/db/undotbs2

redo1_1=/ORACLE/db/redo1_1

redo1_2=/ORACLE/db/redo1_2

redo2_1=/ORACLE/db/redo2_1

redo2_2=/ORACLE/db/redo2_2

control1=/ORACLE/db/control1

control2=/ORACLE/db/control2

spfile=/ORACLE/db/spfile

pwdfile=/ORACLE/db/pwdfile

然后编辑文件/export/home/oracle/.profile,将以下几列加入

DBCA_RAW_CONFIG=/u01/app/oracle/oradata/tree/tree_raw.conf

export DBCA_RAW_CONFIG

RAC1,

ORACLE_SID=tree1

export ORACLE_SID

RAC2,

ORACLE_SID=tree2

export ORACLE_SID

3,和安装Oracle数据库一样,需要将节点RAC1RAC2上的另一个CPU离线,可参照安装Oracle数据库一节中的步骤来做。

=====================================================

<oracle:RAC1>dbca

创建数据库步骤:

1,选择数据库的类型,这里需要选择创建Oracle Real Application Clusters database

 

6,在随后的数据库管理选项中选取Oracle Enterprise Manager Grid Control,即不选中”Configure the Database with Enterprise Manage”的选项

以后的步骤中需要设定密码,设定存储和恢复机制以及数据库内容和服务,这里按照缺省值设定即可。

 

随后要设置数据库的初始参数,在此,根据机器的内存大小,设定SGA800MPGA 200M,用户可根据具体的环境来设定相应的大小

接下来需要配置数据库的存储并设置创建数据库的一些选项,所有这些设置完成后,就开始创建数据库,最终顺利建立,见下图:

在此我们还可以来起动并验证一下刚刚创建的数据库

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

oracle:RAC1>srvctl status database -d tree

Instance tree1 is running on node rac1

Instance tree2 is running on node rac2

<oracle:RAC1>srvctl status nodeapps -n RAC1

VIP is running on node: RAC1

GSD is running on node: RAC1

Listener is running on node: RAC1

ONS daemon is running on node: RAC1

<oracle:RAC1>srvctl status nodeapps -n RAC2

VIP is running on node: RAC2

GSD is running on node: RAC2

Listener is running on node: RAC2

ONS daemon is running on node: RAC2

<oracle:RAC1>srvctl stop database -d tree

<oracle:RAC1>srvctl status database -d tree

Instance tree1 is not running on node rac1

Instance tree2 is not running on node rac2

<oracle:RAC1>srvctl status nodeapps -n RAC1

VIP is running on node: RAC1

GSD is running on node: RAC1

Listener is running on node: RAC1

ONS daemon is running on node: RAC1

<oracle:RAC1>srvctl status nodeapps -n RAC2

VIP is running on node: RAC2

GSD is running on node: RAC2

Listener is running on node: RAC2

ONS daemon is running on node: RAC2

<oracle:RAC1>srvctl start database -d tree

<oracle:RAC1>srvctl status database -d tree

Instance tree1 is running on node rac1

Instance tree2 is running on node rac2

<oracle:RAC1>sqlplus /nolog

SQL*Plus: Release 10.1.0.3.0 - Production on Tue Jan 24 17:00:22 2006

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

SQL> connect / as sysdba

Connected.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 838860800 bytes

Fixed Size 781424 bytes

Variable Size 221254544 bytes

Database Buffers 616562688 bytes

Redo Buffers 262144 bytes

Database mounted.

Database opened.

SQL> SELECT * FROM V$ACTIVE_INSTANCES;

INST_NUMBER INST_NAME

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

1 RAC1:tree1

2 RAC2:tree2

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

参考文献:

Oracle Real Application Clusters Installation and Configuration Guide 10g Release 1 (10.1)

for AIX-Based Systems, Apple Mac OS X, hp HP-UX, hp Tru64 UNIX, Linux, Solaris Operating System, and Windows Platforms Part No. B10766-08

相关文章

引文来源  CSDN技术中心 Solaris 10 X86上安装Oracle 10g RAC详解 (2)

 

  评论这张
 
阅读(503)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018