Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1196403
  • 博文数量: 245
  • 博客积分: 10185
  • 博客等级: 上将
  • 技术积分: 2744
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-30 17:07
文章分类

全部博文(245)

文章存档

2015年(1)

2014年(1)

2013年(1)

2012年(1)

2011年(37)

2010年(20)

2009年(14)

2008年(38)

2007年(88)

2006年(44)

分类: Oracle

2010-10-09 16:44:47


1) create oracle user and dba group.
   oracle_home
   rsh, .bash_profiles
  
  [oracle@sun215c]$ more .rhosts
+
[oracle@sun215c]$ more .bash_profile
export ORACLE_BASE=/opt/oracle/9i
export PS1='[\u@\h]$ '
export ORACLE_HOME=/opt/oracle/9i/db
export ORACLE_SID=racg1
PATH=$PATH:/etc/vx/bin:/opt/VRTS/bin:/opt/VRTSvcs/bin:/opt/VRTSat/bin:/sbin:/usr/sbin:$ORACLE_HOME/bin:/usr/local/bin
ORACLE_ADMIN=$ORACLE_HOME/admin
export ORACLE_ADMIN
PATH=$PATH:$ORACLE_HOME/bin:/opt/bin:/usr/cluster/bin:/etc/vx/bin:/opt/VRTSvxvm/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/sbin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/openwin/lib:/usr/db/lib:/usr/lib:/usr/up/vortex/lib
export LD_LIBRARY_PATH
TNS_ADMIN=$ORACLE_HOME/network/admin
export TNS_ADMIN
MANPATH=/usr/man:/opt/VRTS/man:/opt/SYMClma/man/:$MANPATH
export PATH MANPATH

2) /etc/system
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmni=1024
set semsys:seminfo_semmsl=1510
set semsys:seminfo_semmns=3010
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767   
3) create shared dg and vol
[root@sun215c /]#>vxdg -s init oradg ams_wms0_471 ams_wms0_472
[root@sun215c /]#>vxassist -g oradg make oravol 8g
[root@sun215c /]#>mkfs -F vxfs /dev/vx/rdsk/oradg/oravol
    version 7 layout
    16777216 sectors, 8388608 blocks of size 1024, log size 16384 blocks
    largefiles supported
[root@sun215c /]#>vxassist -g oradg make orasrvvol 300M
[root@sun215c /]#>vxedit -g oradg set user=oracle group=dba mode=660 orasrvvol
[root@sun215c /]#>vxassist -g oradg make spfile 300M
[root@sun215c /]#>vxedit -g oradg set user=oracle group=dba mode=660 spfile

modify main.cf ; reboot both nodes

        CFSMount ora_mount (
                Critical = 0
                MountPoint = "/oracle"
                BlockDevice = "/dev/vx/dsk/oradg/oravol"
                )
        CVMVolDg oradata_vol (
                Critical = 0
                CVMDiskGroup = oradg
                CVMVolume = { oravol }
                CVMActivation = sw
                )
        ora_mount requires oradata_vol
        oradata_vol requires vxfsckd

mkdir /oracle ;
chown -R oracle:dba /oracle ;
 
4)  install rdbms and relink oracle
   ./installsfrac -configure -rsh
  
   ls -rlt $ORACLE_HOME/bin/oracle
  
  
5)   netca
[oracle@sun215c]$ netca
Oracle Net Services Configuration:
Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

6) start gsd

[oracle@sun215c]$ gsdctl stat
GSD is not running on the local node
[oracle@sun215c]$ gsdctl start
Successfully started GSD on local node
[oracle@sun215d]$ gsdctl stat
GSD is not running on the local node
[oracle@sun215d]$
[oracle@sun215d]$ gsdctl start
Successfully started GSD on local node

检查srvcfg设置
检查/var/opt/oracle下srvConfig.loc文件,确保包含同样的链接:
srvconfig_loc=/dev/vx/rdsk/oradg/srvcfg
两边应该有同样的配置,否则gsd则不能启动.
[root@sun215c /]#>cd /var/opt/oracle
[root@sun215c oracle]#>ls -rlt
total 6
-rw-r--r--   1 root     other         57 Oct  9 14:43 oraInst.loc
-rw-rw-r--   1 oracle   other        698 Oct  9 15:01 oratab
-rw-rw-r--   1 oracle   other         43 Oct  9 15:01 srvConfig.loc
[root@sun215c oracle]#>more srvConfig.loc
srvconfig_loc=/dev/vx/rdsk/oradg/orasrvvol
[oracle@sun215d]$ pwd
/var/opt/oracle
[oracle@sun215d]$ ls -rtl
total 6
-rw-r--r--   1 root     other         57 Oct  9 14:43 oraInst.loc
-rw-rw-r--   1 oracle   other        698 Oct  9 15:01 oratab
-rw-rw-r--   1 oracle   other         43 Oct  9 15:01 srvConfig.loc
[oracle@sun215d]$ more srvConfig.loc
srvconfig_loc=/dev/vx/rdsk/oradg/orasrvvol
oraInst.loc
inventory_loc=/opt/oracle/9i/oraInventory
inst_group=dba
/var/opt
-rlt
total 18
drwxr-xr-x   2 root     other        512 Apr 29 14:10 webconsole
drwxr-xr-x   2 root     other        512 Sep 29 17:21 dbed_lic
drwxr-xr-x   4 root     other        512 Oct  4 02:04 VRTSmh
drwxr-xr-x   3 root     other        512 Oct  4 02:30 VRTSobc
drwxr-xr-x   3 root     other        512 Oct  4 02:31 VRTSob
drwxr-xr-x   3 root     other        512 Oct  4 02:48 VRTSdcli
drwxr-xr-x   3 root     root         512 Oct  4 03:17 VRTSaa
drwxr-xr-x   4 root     root         512 Oct  4 03:19 VRTSccg
drwxr-xr-x   2 root     root         512 Oct  4 19:19 oracle
-rlt
total 6
-rw-r--r--   1 root     root          57 Oct  4 18:49 oraInst.loc
-rw-rw-r--   1 oracle   root          43 Oct  4 19:19 srvConfig.loc
-rw-r--r--   1 oracle   dba          723 Oct  4 20:12 oratab
 
建库的时候报:PRKR-1005:adding of cluster database $ORACLE_SID configuration failed,PRKR-1064:General Exception in OCR

[root@sun215c /]#>cd /var/opt
[root@sun215c opt]#>ls -rlt
total 14
drwxr-xr-x   2 root     other        512 Oct  9 15:01 oracle
[root@sun215c opt]#>chown root:root oracle
 
7 ) dbca

#####  create db scripts : /opt/oracle/9i/admin/racg/scripts
[oracle@sun215c]$ dbca -datafileDestination /oracle

PRKR-1005:adding of cluster database racg configuration failed, PRKR-1064:General Exception in OCR
                              SUN下安装ORACLE9208 RAC 
                             
上周四完成在SUN下安装ORACLE9208RAC,整个过程还算是顺利,把过程遇到问题和解决方法记录之:
系统环境
CPU:20*1.9G
MEM:130G
STORAGE:4T
1 误安装了legato组件
  在把数据库软件rac9201安装好后,为了支持proc,重新运行oui选择program组件,此时系统自动把legato组件也给选中了!装起的时候才发现,为了保证系统的干净和稳定性,决定删除已经安装好的DB软件,重新安装软件,删除过程如下:
  $./runInstaller --删除所有组件
  $cd /var/opt/oracle/
  $rm -rf *
  $cd $ORACLE_HOME
  $rm -rf *
  $cd
  $rm -rf oraInventory
 
2 建库的时候报:PRKR-1005:adding of cluster database $ORACLE_SID configuration failed,PRKR-1064:General Exception in OCR
  解决办法:
  #ls -l /var/opt/oracle/srvConfig.loc --发现权限有问题
  #chown -R oracle:dba /var/opt/oracle/srvConfig.loc
  #chmod 755 /var/opt/oracle/srvConfig.loc
  $ORACLE_HOME/bin/gsdctl stat -查看gsdctl状态,如果已经启动,立停
  $ORACLE_HOME/bin/gsdctl stop
  $srvconfig -init   -初始化srvconfig
  $ORACLE_HOME/bin/gsdctl start  -再次启动gsdctl并再次执行创建数据库
 

 
 
 
 8) check
 
  select HOST_NAME, INSTANCE_NAME from v$instance ;
 
[oracle@sun215c]$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.1.0 - Production on Sat Oct 9 16:15:26 2010
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL>  select HOST_NAME, INSTANCE_NAME from v$instance ;
HOST_NAME
----------------------------------------------------------------
INSTANCE_NAME
----------------
sun215c
racg1
 
[oracle@sun215d]$ sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.1.0 - Production on Sat Oct 9 16:15:44 2010
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL>  select HOST_NAME, INSTANCE_NAME from v$instance ;
HOST_NAME
----------------------------------------------------------------
INSTANCE_NAME
----------------
sun215d
racg2
阅读(1145) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~