Oracle 10g RAC 常用維護(hù)命令
來源:易賢網(wǎng) 閱讀:1274 次 日期:2014-09-17 09:52:35
溫馨提示:易賢網(wǎng)小編為您整理了“Oracle 10g RAC 常用維護(hù)命令”,方便廣大網(wǎng)友查閱!

所有實(shí)例和服務(wù)的狀態(tài)

[oracle@vzwc1 ~]$ srvctl status database -d zwc

Instance zwc1 is running on node vzwc1

Instance zwc2 is running on node vzwc2

單個(gè)實(shí)例的狀態(tài)

[oracle@vzwc1 ~]$ srvctl status instance -d zwc -i zwc1

Instance zwc1 is running on node vzwc1

[oracle@vzwc1 ~]$ srvctl status instance -d zwc -i zwc2

Instance zwc2 is running on node vzwc2

特定節(jié)點(diǎn)上節(jié)點(diǎn)應(yīng)用程序的狀態(tài)

[oracle@vzwc1 ~]$ srvctl status nodeapps -n vzwc1

VIP is running on node: vzwc1

GSD is running on node: vzwc1

Listener is running on node: vzwc1

ONS daemon is running on node: vzwc1

[oracle@vzwc1 ~]$

[oracle@vzwc1 ~]$ srvctl status nodeapps -n vzwc2

VIP is running on node: vzwc2

GSD is running on node: vzwc2

Listener is running on node: vzwc2

ONS daemon is running on node: vzwc2

ASM 實(shí)例的狀態(tài)

[oracle@vzwc1 ~]$ srvctl status asm -n vzwc1

ASM instance +ASM1 is running on node vzwc1.

[oracle@vzwc1 ~]$

[oracle@vzwc1 ~]$ srvctl status asm -n vzwc2

ASM instance +ASM2 is running on node vzwc2.

顯示 RAC 數(shù)據(jù)庫(kù)的配置

[oracle@vzwc1 ~]$ srvctl config database -d zwc

vzwc1 zwc1 /u01/app/oracle/product/10.2.0/db_1

vzwc2 zwc2 /u01/app/oracle/product/10.2.0/db_1

顯示節(jié)點(diǎn)應(yīng)用程序的配置 —(VIP、GSD、ONS、監(jiān)聽)

[oracle@vzwc1 ~]$ srvctl config nodeapps -n vzwc1 -a -g -s -l

VIP exists.: /vzwc1-vip/192.168.1.151/255.255.255.0/eth0

GSD exists.

ONS daemon exists.

Listener exists.

[oracle@vzwc1 ~]$

[oracle@vzwc1 ~]$ srvctl config nodeapps -n vzwc2 -a -g -s -l

VIP exists.: /vzwc2-vip/192.168.1.152/255.255.255.0/eth0

GSD exists.

ONS daemon exists.

Listener exists.

顯示 ASM 實(shí)例的配置

[oracle@vzwc1 ~]$ srvctl config asm -n vzwc1

+ASM1 /u01/app/oracle/product/10.2.0/db_1

[oracle@vzwc1 ~]$

[oracle@vzwc1 ~]$ srvctl config asm -n vzwc2

+ASM2 /u01/app/oracle/product/10.2.0/db_1

RAC正在運(yùn)行的實(shí)例

SQL> SELECT

2 inst_id

, instance_number inst_no

, instance_name inst_name

, parallel

6 , status

7 , database_status db_status

8 , active_state state

9 , host_name host

10 FROM gv$instance

11 /

INST_ID INST_NO INST_NAME PAR STATUS DB_STATUS STATE HOST

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

1 1 zwc1 YES OPEN ACTIVE NORMAL vzwc1

2 2 zwc2 YES OPEN ACTIVE NORMAL vzwc2

磁盤組中的所有數(shù)據(jù)文件

SQL> select name from v$datafile

2 union

3 select member from v$logfile

4 union

5 select name from v$controlfile

6 union

7 select name from v$tempfile

8 /

NAME

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

+DATADG/zwc/controlfile/current.260.810684377

+DATADG/zwc/datafile/example.264.810684397

+DATADG/zwc/datafile/sysaux.257.810684333

+DATADG/zwc/datafile/system.256.810684333

+DATADG/zwc/datafile/undotbs1.258.810684333

+DATADG/zwc/datafile/undotbs2.265.810684503

+DATADG/zwc/datafile/users.259.810684333

+DATADG/zwc/onlinelog/group_1.261.810684379

+DATADG/zwc/onlinelog/group_2.262.810684383

+DATADG/zwc/onlinelog/group_3.266.810684557

+DATADG/zwc/onlinelog/group_4.267.810684559

+DATADG/zwc/tempfile/temp.263.810684393

+FLASHDG/zwc/controlfile/current.256.810684377

+FLASHDG/zwc/onlinelog/group_1.257.810684381

+FLASHDG/zwc/onlinelog/group_2.258.810684385

+FLASHDG/zwc/onlinelog/group_3.259.810684559

+FLASHDG/zwc/onlinelog/group_4.260.810684561

OCR存放路徑

[oracle@vzwc1 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 1043916

Used space (kbytes) : 3832

Available space (kbytes) : 1040084

ID : 1906841437

Device/File Name : /dev/raw/raw1

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

VOTEDISK存放路徑

[oracle@vzwc1 ~]$ crsctl query css votedisk

0. 0 /dev/raw/raw2

located 1 votedisk(s).

clusterware版本

[oracle@vzwc1 ~]$ crsctl query crs activeversion

CRS active version on the cluster is [10.2.0.5.0]

RAC資源查看

[oracle@vzwc1 ~]$ crs_stat -t

Name Type Target State Host

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

ora....SM1.asm application ONLINE ONLINE vzwc1

ora....C1.lsnr application ONLINE ONLINE vzwc1

ora.vzwc1.gsd application ONLINE ONLINE vzwc1

ora.vzwc1.ons application ONLINE ONLINE vzwc1

ora.vzwc1.vip application ONLINE ONLINE vzwc1

ora....SM2.asm application ONLINE ONLINE vzwc2

ora....C2.lsnr application ONLINE ONLINE vzwc2

ora.vzwc2.gsd application ONLINE ONLINE vzwc2

ora.vzwc2.ons application ONLINE ONLINE vzwc2

ora.vzwc2.vip application ONLINE ONLINE vzwc2

ora.zwc.db application ONLINE ONLINE vzwc2

ora....c1.inst application ONLINE ONLINE vzwc1

ora....c2.inst application ONLINE ONLINE vzwc2

停止 Oracle 實(shí)例,當(dāng)此實(shí)例(和相關(guān)服務(wù))關(guān)閉后,關(guān)閉 ASM 實(shí)例。最后,關(guān)閉節(jié)點(diǎn)應(yīng)用程序(虛擬 IP、GSD、TNS 監(jiān)聽器和 ONS)。

export ORACLE_SID=zwc1

emctl stop dbconsole

srvctl stop instance -d zwc -i zwc1

srvctl stop asm -n vzwc1

srvctl stop nodeapps -n vzwc1

啟動(dòng)節(jié)點(diǎn)應(yīng)用程序(虛擬 IP、GSD、TNS 監(jiān)聽器和 ONS)。當(dāng)成功啟動(dòng)節(jié)點(diǎn)應(yīng)用程序后,啟動(dòng) ASM 實(shí)例。最后,啟動(dòng) Oracle 實(shí)例(和相關(guān)服務(wù))以及EM。

export ORACLE_SID=zwc1

srvctl start nodeapps -n vzwc1

srvctl start asm -n vzwc1

srvctl start instance -d zwc -i zwc1

emctl start dbconsole

啟動(dòng)/停止所有實(shí)例及其啟用的服務(wù)

srvctl start database -d zwc

srvctl stop database -d zwc

更多信息請(qǐng)查看IT技術(shù)專欄

更多信息請(qǐng)查看數(shù)據(jù)庫(kù)
易賢網(wǎng)手機(jī)網(wǎng)站地址:Oracle 10g RAC 常用維護(hù)命令
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國(guó)考·省考課程試聽報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢 | 簡(jiǎn)要咨詢須知 | 加入群交流 | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
咨詢QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)