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è)問題:
1. 輸出中顯示的這些 service 是在哪里定義的? 2. 為什么一個(gè) service 會(huì)有兩個(gè) instance? 先來看第二個(gè)問題。從Oracle 8.1 版本后,在listener.ora文件中沒有為數(shù)據(jù)庫預(yù)先定義條目的時(shí)候,instance 和 listener 可以自動(dòng)的互相發(fā)現(xiàn)。但是習(xí)慣上在listener.ora文件中為每個(gè)數(shù)據(jù)庫定義一個(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ù)庫啟動(dòng)時(shí) PMON進(jìn)程自動(dòng)把數(shù)據(jù)庫注冊到監(jiān)聽器。在數(shù)據(jù)庫啟動(dòng)后每一分鐘注冊一次。在使用OEM等工具時(shí)需要有監(jiān)聽的靜態(tài)定義。 再來看看這些服務(wù)是怎么定義的。oracle有三種監(jiān)聽方式:Database 提供對數(shù)據(jù)庫實(shí)例的網(wǎng)絡(luò)訪問PLSExtProc PL/SQL 包訪問操作系統(tǒng)可執(zhí)行程序的方法Executable 提供對操作系統(tǒng)可執(zhí)行程序的網(wǎng)絡(luò)訪問 Service "PLSExtProc" 是在 listener.ora 文件中為數(shù)據(jù)庫實(shí)例缺省配置的,答應(yīng)PL/SQL包訪問外部程序; Service "catadb" 也是在 listener.ora 文件中配置,是每個(gè)數(shù)據(jù)庫連接使用的標(biāo)準(zhǔn)模式; Service "catadbXDB" 是Oracle 9i以后版本創(chuàng)建數(shù)據(jù)庫時(shí)默認(rèn)包含的XML DB特性,提供http、FTP等服務(wù),在初始化文spfile(或pfile)中定義; right">(出處:清風(fēng)軟件下載學(xué)院)