>  기사  >  데이터 베이스  >  关于Oracle RAC的维护

关于Oracle RAC的维护

WBOY
WBOY원래의
2016-06-07 16:58:20995검색

◆oracle用户的环境设置:$ cat .profile# Created for oracle RAC by ljg, 20091230 --- begin#umask 022ORACLE_BASE=/u01/app/

◆Oracle用户的环境设置:

$ cat .profile

# Created for oracle RAC by ljg, 20091230 --- begin

#

umask 022

ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE

CRS_HOME=/u01/crs/oracle/product/10/app;export CRS_HOME

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;export ORACLE_HOME

ORACLE_SID=eoms1;export ORACLE_SID

AIXTHREAD_SCOPE=S;export AIXTHREAD_SCOPE

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:$ORACLE_HOME/bin:$CRS_HOME/bin:.;export PATH

#

# Created for oracle RAC by ljg, 20091230 --- end

if [ -s "$MAIL" ]           # This is at Shell startup. In normal

then echo "$MAILMSG"        # operation, the Shell checks

fi                          # periodically.

◆oracleRAC操作语法(4个层次):

1、服务、实例、数据库:

srvctl status|start|stop service -d eoms -s TAF_EOMS_SERVER

srvctl status|start|stop instance -d eoms -i eoms1

srvctl status|start|stop database -d eoms

2、ASM实例:

srvctl status|start|stop asm -n sdwgrac1

3、nodeapps资源:

srvctl status|start|stop nodeapps -n sdwgrac1

4、crs:

crs_stat -t

crs_start res|-all

crs_stop res|-all

crsctl check|stop|start crs

/etc/init.crs start|stop

◆为ASM增加磁盘的操作步骤:

在盘阵侧为ASM新添加vdisk后,在两个节点执行以下步骤

cfgmgr:扫描硬件改动

lspv:检查是否有新盘

lsattr -El hdiskn:查看新加盘的属性

chdev -l hdiskn -a reserve_policy=no_reserve:把新加的盘设为共享

(如果有pvid,需要如下方式取消:chdev -l hdiskn -a pv=clear)

修改pv的属性为oracle用户使用:

chown oracle:dba /dev/rhdiskn

chmod 660 /dev/rhdiskn

最后在+ASM1实例添加磁盘:

$ export ORACLE_SID=+ASM1

$ sqlplus "/ as sysdba"

alter diskgroup DATA add disk '/dev/rhdiskn';

select group_number, name, TOTAL_MB, FREE_MB from V$asm_disk_stat;

alter diskgroup DATA drop disk DATA_0001;

◆创建表空间的步骤:

create (bigfile) tablespace test_ljg datafile '+DATA0/pm/datafile/test_ljg' size 200m;

alter database datafile '+DATA0/pm/datafile/test_ljg' resize 300m;

drop tablespace test_ljg including contents and datafiles;

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.