標籤:oracle linux
上期中建立完資料庫執行個體,但是最後使用em訪問資料庫執行個體的時候出現了一個問題?
Enterprise Manager 無法串連到資料庫執行個體。下面列出了組件的狀態。
回答上面的問題請看以下oracle的結構:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/32/wKioL1SUOu6xVfxHAACXWOm4hMk922.jpg" title="結構.png" alt="wKioL1SUOu6xVfxHAACXWOm4hMk922.jpg" />
客戶使用瀏覽器通過EM的1158連接埠訪問EM,EM通過監聽訪問oracle資料庫執行個體,上節中我們通過資料庫配置助手(Database Configuraion Assistant)建立了資料庫執行個體,但我們還沒有建立監聽.所以就出現了上節最後提出的問題.這節中我們將通過oracle網路設定助手(Oracle Net Configuration Assistant) 完成Listener建立
[[email protected] db_1]$ netca
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/36/wKiom1SUPOCwfKBeAAGQBsQyiTM535.jpg" title="netca1.png" alt="wKiom1SUPOCwfKBeAAGQBsQyiTM535.jpg" />
Oracle Net Configuration Assistant(oracle網路設定助手的第一個頁面)監聽程式配置 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/33/wKioL1SUPqryltjYAAGP6c7uveA022.jpg" title="netca2.png" alt="wKioL1SUPqryltjYAAGP6c7uveA022.jpg" />
添加 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/36/wKiom1SUPj_jUAgGAAF08yUxRxg251.jpg" title="netca3.png" alt="wKiom1SUPj_jUAgGAAF08yUxRxg251.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/33/wKioL1SUP1ryNVupAAGTZ_B2Dys645.jpg" title="netca4.png" alt="wKioL1SUP1ryNVupAAGTZ_B2Dys645.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/36/wKiom1SUPvXT16WnAAGAeljjQaY681.jpg" title="netca6.png" alt="wKiom1SUPvXT16WnAAGAeljjQaY681.jpg" />
使用標準連接埠號碼1521下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/57/33/wKioL1SUP-XDzIDoAAE9skMqfPY208.jpg" title="netca7.png" alt="wKioL1SUP-XDzIDoAAE9skMqfPY208.jpg" />
否下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/33/wKioL1SUQMXSg1qzAAE6qvXCjnc810.jpg" title="netca8.png" alt="wKioL1SUQMXSg1qzAAE6qvXCjnc810.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/33/wKioL1SUQXLRulNFAAGe-K0vpVw576.jpg" title="netca91.png" alt="wKioL1SUQXLRulNFAAGe-K0vpVw576.jpg" />
配置完監聽以後還需要配置 本地Net服務名配置 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/36/wKiom1SUQYOSncFxAAGRHQU5YDE374.jpg" title="netca10.png" alt="wKiom1SUQYOSncFxAAGRHQU5YDE374.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/33/wKioL1SUQmXTSDyeAAGAKNbKcnE067.jpg" title="netca11.png" alt="wKioL1SUQmXTSDyeAAGAKNbKcnE067.jpg" />
服務名 和資料庫的執行個體名一樣 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/57/33/wKioL1SUQqridpw5AAFvsJDcGfQ500.jpg" title="netca12.png" alt="wKioL1SUQqridpw5AAFvsJDcGfQ500.jpg" />
選擇TCP下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/33/wKioL1SUQzaRgtgBAAGolo67fPo669.jpg" title="netca13.png" alt="wKioL1SUQzaRgtgBAAGolo67fPo669.jpg" />
主機名稱 本機ip 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/36/wKiom1SUQt3R8VfBAAGD6Ql3p_0295.jpg" title="netca14.png" alt="wKiom1SUQt3R8VfBAAGD6Ql3p_0295.jpg" />
不,不進行測試 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/57/33/wKioL1SUQ_LQg1ZMAAFgXXfRlOY483.jpg" title="netca15.png" alt="wKioL1SUQ_LQg1ZMAAFgXXfRlOY483.jpg" />
網路服務名 資料庫執行個體名 下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/57/33/wKioL1SURETw1qY_AAEvnG5zbDo802.jpg" title="netca16.png" alt="wKioL1SURETw1qY_AAEvnG5zbDo802.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/33/wKioL1SURKPSVTaGAAEsHp9hqPk174.jpg" title="netca17.png" alt="wKioL1SURKPSVTaGAAEsHp9hqPk174.jpg" />
下一步
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/57/36/wKiom1SURFzhX2jUAAGfJGA3y_A803.jpg" title="netca18.png" alt="wKiom1SURFzhX2jUAAGfJGA3y_A803.jpg" />
完成
驗證配置成功以否:
[
[email protected] db_1]$ lsnrctl status LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-DEC-2014 23:31:06Copyright (c) 1991, 2005, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Orcl)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionStart Date 19-DEC-2014 23:09:11Uptime 0 days 0 hr. 21 min. 55 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.oraListener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.logListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Orcl)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))Services Summary...Service "Orcl" has 1 instance(s). Instance "Orcl", status READY, has 1
handler(s) for this service...Service "OrclXDB" has 1 instance(s). Instance "Orcl", status READY, has 1 handler(s) for this service...Service "Orcl_XPT" has 1 instance(s). Instance "Orcl", status READY, has 1 handler(s) for this service...Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...The command completed successfully
命令結果中如果有以下行出現說明 配置成功:
Instance "Orcl", status READY, has 1 handler(s) for this service...
監聽管理命令
[[email protected] db_1]$ lsnrctl LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 19-DEC-2014 23:36:57Copyright (c) 1991, 2005, Oracle. All rights reserved.Welcome to LSNRCTL, type "help" for information.LSNRCTL> help The following operations are availableAn asterisk (*) denotes a modifier or extended command:start stop status services version reload save_config trace spawn change_password quit exit set* show*
實驗 如何監聽沒有識別到資料庫執行個體,的解決辦法
[[email protected] db_1]$ lsnrctl stop 停止[[email protected] db_1]$ lsnrctl start 開啟
可以看到監聽程式並沒有識別的oracle資料庫執行個體(但時間一長就可以自動識別得到)
本文出自 “關注linux技術” 部落格,請務必保留此出處http://werewolftj.blog.51cto.com/1606482/1591893
oracle初體驗二