文章詳情頁(yè)
理解 oracle 的 “l(fā)snrctl status”
瀏覽:27日期:2023-11-19 12:48:15
;先看看 lsnrctl status 的輸出信息: Services Summary... Service 'PLSExtProc' has 1 instance(s). Instance 'PLSExtProc', status UNKNOWN, has 1 handler(s) for this ;service... Service 'catadb' has 2 instance(s). Instance 'catadb', status UNKNOWN, has 1 handler(s) for this service... Instance 'catadb', status READY, has 1 handler(s) for this service... Service 'catadbXDB' has 1 instance(s). Instance 'catadb', status READY, has 1 handler(s) for this service... The command completed sUCcessfully;這里提出兩個(gè)問(wèn)題: 1. 輸出中顯示的這些 service 是在哪里定義的? 2. 為什么一個(gè) service 會(huì)有兩個(gè) instance?;先來(lái)看第二個(gè)問(wèn)題。從Oracle 8.1 版本后,在listener.ora文件中沒(méi)有為數(shù)據(jù)庫(kù)預(yù)先定義條目的時(shí)候,instance 和 listener 可以自動(dòng)的互相發(fā)現(xiàn)。但是習(xí)慣上在listener.ora文件中為每個(gè)數(shù)據(jù)庫(kù)定義一個(gè)SID_DESC條目以便在需要的時(shí)候使用。這就使服務(wù)“catadb”有兩個(gè)實(shí)例: 一個(gè)狀態(tài)是 UNKNOWN 的實(shí)例 是在 listener.ora 文件中靜態(tài)定義;另一個(gè)狀態(tài)是 READY 的實(shí)例是當(dāng)數(shù)據(jù)庫(kù)啟動(dòng)時(shí) PMON進(jìn)程自動(dòng)把數(shù)據(jù)庫(kù)注冊(cè)到監(jiān)聽(tīng)器。在數(shù)據(jù)庫(kù)啟動(dòng)后每一分鐘注冊(cè)一次。在使用OEM等工具時(shí)需要有監(jiān)聽(tīng)的靜態(tài)定義。;再來(lái)看看這些服務(wù)是怎么定義的。oracle有三種監(jiān)聽(tīng)方式:Database 提供對(duì)數(shù)據(jù)庫(kù)實(shí)例的網(wǎng)絡(luò)訪問(wèn)PLSExtProc PL/SQL 包訪問(wèn)操作系統(tǒng)可執(zhí)行程序的方法Executable 提供對(duì)操作系統(tǒng)可執(zhí)行程序的網(wǎng)絡(luò)訪問(wèn);Service 'PLSExtProc' 是在 listener.ora 文件中為數(shù)據(jù)庫(kù)實(shí)例缺省配置的,答應(yīng)PL/SQL包訪問(wèn)外部程序; Service 'catadb' 也是在 listener.ora 文件中配置,是每個(gè)數(shù)據(jù)庫(kù)連接使用的標(biāo)準(zhǔn)模式; Service 'catadbXDB' 是Oracle 9i以后版本創(chuàng)建數(shù)據(jù)庫(kù)時(shí)默認(rèn)包含的XML DB特性,提供http、FTP等服務(wù),在初始化文spfile(或pfile)中定義; right'>(出處:清風(fēng)軟件下載學(xué)院)
標(biāo)簽:
Oracle
數(shù)據(jù)庫(kù)
排行榜
