RAC搜集的命令

  • ps -ef | grep css

GRID組件管理
crsctl 查看幫助
crsctl status -t -v
crsctl check css
crsctl check crs
crsctl query css votedisk
自動啟動CRS設置:
crsctl disable/enable crs

–查看節點資源:
crs_stat -c myrac2
–查看ora.myrac1.vip詳細信息:
crs_stat -f ora.myrac1.vip

#/xxxx/crs/bin/crsctl stop crs

查看OCR自動備份:
文件路徑:CRS_HOME/cdata/cluster_name
#/xxxx/crs/bin/ocrconfig -showbackup

主動備份OCR:
#/xxxx/crs/bin/ocrconfig -export /tmp/ocrbackup201000504

恢復自動備份的OCR:
#/xxxx/crs/bin/ocrconfig -restore /tmp/ocrbackup201000504
恢復手動備份的OCR:
#/xxxx/crs/bin/ocrconfig -import /tmp/ocrbackup201000504
./ocrcheck
./ocrconfig

oifcfg


crs_stat -help

SRVCTL指令:

查看數據庫配置
	[grid@stjpcasolap01 ~]$ srvctl config database
	pcasolap
	
	[grid@stjpcasolap01 ~]$ srvctl status database -d pcasolap
	Instance pcasolap1 is running on node stjpcasolap01
	Instance pcasolap2 is running on node stjpcasolap02

	srvctl config database -d myrac -a   --a顯示詳細信息
	srvctl stop/start database -h   --查看幫助
	srvctl start/stop instance -db myrac -i myrac1
	-o 指定啟動或關閉的模式

自動啟動數據庫設置:
	srvctl enable/disable database -d myrac
	
手工向OCR添加DATABASE對象
	srvctl add database -d myrac -o $ORACLE_HOME

srvctl config asm -n myrac2 +ASM2 /oracle/product/database
srvctl status listener
srvctl status scan

ASM相關字典
v a s m d i s k ; v asm_disk; v asmdisk;vasm_diskgroup
v a s m f i l e ; v asm_file; v asmfile;vasm_alias
v a s m t e m p l a t e v asm_template v asmtemplatevasm_client
ASMCMD>lsdg
ASMCMD>ls -l

select name,total_mb,free_mb from v a s m d i s k ; s e l e c t n a m e , t o t a l m b , f r e e m b , f r e e m b / t o t a l m b f r o m v asm_disk; select name,total_mb,free_mb,free_mb/total_mb from v asmdisk;selectname,totalmb,freemb,freemb/totalmbfromvasm_diskgroup;


alter diskgroup DISKGROUP2 add disk ‘ORCL:VOL4’;
show parameter asm_power_limit
alter diskgroup DATA add disk ‘VOL3’ rebalance power 5;
alter diskgroup DATA add directory '+DGLOG1/mylogfile/log_group1.
alter diskgroup DATA rename ‘+data/mydatafile’ to ‘+data/mydbfile’;

voting disk備份:
dd if=/dev/sdc1 of=/tmp/vddiskbackup.dmp
恢復:
dd if=/tmp/vddiskbackup.dmp of=/dev/sdc1

你可能感兴趣的:(Oracle,Rac)