client端如果想要連線到遠端的資料庫伺服器,首先資料庫伺服器必須啟動***
oracle***的配置在$oracle_home/network/admin/listener.ora,開啟這個檔案,我們看到配置如下:
listener =
(description_list =
(description =
(address = (protocol = ipc)(key = extproc1))))
動態註冊:oracle instance的pmon程序會在instance啟動之後自動將instance_name和service_name註冊到1521埠中,我們只需要在listener中修改配置如下,即可實現
listener =
(description_list =
(description =
(address = (protocol = ipc)(key = extproc1))
(address = (protocol = tcp)(host = 192.168.1.102)(port = 1521))))
注意我們不用修改sid_list_listener中的配置
啟動oracle例項
[oracle@localhost ~]$ export oracle_sid=prod
[oracle@localhost ~]$ sqlplus / as sysdba
sql*plus: release 10.2.0.1.0 - production on wed feb 22 07:42:49 2012
connected to an idle instance.
sql> startup
oracle instance started.
由於是非標準埠號,我們必須指定sid_list配置
儲存之後,啟動監聽:
[oracle@localhost admin]$ lsnrctl
lsnrctl for linux: version 10.2.0.1.0 - production on 22-feb-2012 07:51:03
welcome to lsnrctl, type "help" for information.
sql*plus: release 10.2.0.1.0 - production on wed feb 22 07:42:49 2012
connected to an idle instance.
sql> startup
oracle instance started.
total system global area 180355072 bytes
fixed size 1218364 bytes
variable size 88082628 bytes
database buffers 83886080 bytes
redo buffers 7168000 bytes
database mounted.
database opened.
sql*plus: release 10.2.0.1.0 - production on 星期三 2月 22 23:58:06 2012
連線到:
oracle database 10g enterprise edition release 10.2.0.1.0 - production
with the partitioning, olap and data mining options
sql>
連線成功,
最後我們需要在client端配置tnsname,這時無論啟動的是1521還是其他埠的監聽,差別都不大,基本上只有埠號的差異
linux =
(description =
(address = (protocol = tcp)(host = 192.168.1.102)(port = 1521))
(connect_data =
(server = dedicated)
(service_name = prod)))
port1522 =
(description =
(address = (protocol = tcp)(host = 192.168.1.102)(port = 1522))
(connect_data =
(server = dedicated)
(service_name = prod)))
出自:
Oracle靜態監聽註冊詳解
歡迎來到oracle世界。這裡,將結合linux as4 下的oracle 10gr2.0.1 舉乙個具體的例子 1 在 oracle home network admin listener.ora 檔案中加入乙個靜態註冊的節點 oracle prudent oracle cd oracle hom...
oracle監聽的靜態註冊
監聽的靜態註冊指的是指定監聽需要服務某個特定例項的客戶端連線。即在listener.ora檔案的sid list listener模組中明確寫明監聽需要處理的例項名字,但監聽並不需要關心資料庫伺服器上是否有真正的例項在執行。在靜態註冊環境下,在listener.ora檔案中主要配置以下內容 sid ...
監聽的動態註冊和靜態註冊
動態監聽 oracle例項在啟動時,或使用命令alter system register 或每隔一分鐘,pmon程序會向監聽進行動態註冊,pmon程序根據init.ora中的instance name,service names兩個引數將例項和服務動態註冊到listener中 oracle 執行後,...