自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle修改監(jiān)聽IP地址

運維 數(shù)據(jù)庫運維
在局域網(wǎng)中遠程連接oracle時,一直提示拒絕連接,在確定防火墻關(guān)閉,oracle服務(wù)器監(jiān)聽端口開啟的情況下,可能的錯誤就是oracle的監(jiān)聽IP地址不是預(yù)設(shè)的那樣,而是本地的127.0.0.1。排錯過程不再細說,這里只分享由于主機名不正確而導(dǎo)致oracle拒絕連接的解決辦法。

在局域網(wǎng)中遠程連接oracle時,一直提示拒絕連接,在確定防火墻關(guān)閉,oracle服務(wù)器監(jiān)聽端口開啟的情況下,可能的錯誤就是oracle的監(jiān)聽IP地址不是預(yù)設(shè)的那樣,而是本地的127.0.0.1。

排錯過程不再細說,這里只分享由于主機名不正確而導(dǎo)致oracle拒絕連接的解決辦法。

一、修改hosts文件

打開cmd,輸入hostname,記下主機名 用記事本打開c:\windows\system32\drivers\etc\hosts 文件,添加主機名。

  1. <code class="hljs vala"># Copyright (c) 1993-2009 Microsoft Corp. 
  2.  
  3. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. 
  4.  
  5. # This file contains the mappings of IP addresses to host names. Each 
  6. # entry should be kept on an individual line. The IP address should 
  7. # be placed in the first column followed by the corresponding host name
  8. # The IP address and the host name should be separated by at least one 
  9. space
  10. # Additionally, comments (such as these) may be inserted on individual 
  11. # lines or following the machine name denoted by a '#' symbol. 
  12.  
  13. For example: 
  14.  
  15. #      102.54.94.97     rhino.acme.com          # source server 
  16. #       38.25.63.10     x.acme.com              # x client host 
  17.   
  18. # localhost name resolution is handled within DNS itself. 
  19. #    127.0.0.1       localhost 
  20. #    ::1             localhost 
  21.     [主機IP]          [主機名]</code> 

二、修改oracle監(jiān)聽文件

1、打開listener.ora

文件在F:\app\young\product\11.2.0\dbhome_1\NETWORK\ADMIN 目錄下,將里面的localhost換為自己的主機名。 

  1. <code class="hljs vala"><code class="hljs tex"># listener.ora Network Configuration File: F:\app\young\product\11.2.0\dbhome_1\network\admin\listener.ora 
  2. # Generated by Oracle configuration tools. 
  3.   
  4. SID_LIST_LISTENER = 
  5.   (SID_LIST = 
  6.     (SID_DESC = 
  7.       (SID_NAME = CLRExtProc) 
  8.       (ORACLE_HOME = F:\app\young\product\11.2.0\dbhome_1) 
  9.       (PROGRAM = extproc) 
  10.       (ENVS = "EXTPROC_DLLS=ONLY:F:\app\young\product\11.2.0\dbhome_1\bin\oraclr11.dll"
  11.     ) 
  12.   ) 
  13.   
  14. LISTENER = 
  15.   (DESCRIPTION_LIST = 
  16.     (DESCRIPTION = 
  17.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) 
  18.       (ADDRESS = (PROTOCOL = TCP)(HOST = Young-PC)(PORT = 1521))//Young-PC原為localhost 
  19. ) ) ADR_BASE_LISTENER = F:\app\young</code></code> 

2、修改tnsnames.ora

目錄同上,也將localhost更改為主機名。

  1. <code class="hljs vala"><code class="hljs tex"><code class="hljs tex"># tnsnames.ora Network Configuration File: F:\app\young\product\11.2.0\dbhome_1\network\admin\tnsnames.ora 
  2. # Generated by Oracle configuration tools. 
  3.   
  4. LISTENER_ORCL = 
  5.   (ADDRESS = (PROTOCOL = TCP)(HOST = Young-PC)(PORT = 1521))//Young-PC原為localhost 
  6.    
  7. ORACLR_CONNECTION_DATA = 
  8.   (DESCRIPTION = 
  9.     (ADDRESS_LIST = 
  10.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) 
  11.     ) 
  12.     (CONNECT_DATA = 
  13.       (SID = CLRExtProc) 
  14.       (PRESENTATION = RO) 
  15.     ) 
  16.   ) 
  17. ORCL = 
  18.   (DESCRIPTION = 
  19.     (ADDRESS = (PROTOCOL = TCP)(HOST = Young-PC)(PORT = 1521))//Young-PC原為localhost 
  20.     (CONNECT_DATA = 
  21.       (SERVER = DEDICATED) 
  22.       (SERVICE_NAME = orcl) 
  23.     ) 
  24.   )</code></code></code> 

3、重啟tnslsnr。

打開cmd,輸入以下命令。

  1. <code class="hljs vala"><code class="hljs tex"><code class="hljs tex"><code class="hljs sql">lsnrctl stop 
  2. lsnrctl start 
  3. lsnrctl stat</code></code></code></code> 

  

再次遠程連接,已經(jīng)可以連上了,成功。 

責(zé)任編輯:龐桂玉 來源: Oracle疑點通
相關(guān)推薦

2010-01-04 13:29:37

2022-10-10 08:05:23

IP地址節(jié)點

2011-08-25 11:22:02

修改IP地址Vista系統(tǒng)

2009-08-15 10:40:00

2023-10-12 07:18:25

IP地址服務(wù)器

2009-06-24 15:03:00

2015-07-10 09:08:52

IP地址IP地址沖突

2011-03-21 16:21:49

Oracle監(jiān)聽口令監(jiān)聽器

2009-07-19 09:21:52

oracle端口號IP訪問

2015-09-28 09:58:24

網(wǎng)絡(luò)IP地址IP

2012-04-25 14:31:12

2010-06-08 14:09:11

IP協(xié)議地址

2010-07-07 17:09:24

IP地址協(xié)議

2013-06-13 11:29:26

IP地址規(guī)劃IP地址企業(yè)IP規(guī)劃

2022-01-24 07:01:55

oracle數(shù)據(jù)庫oracle監(jiān)聽

2013-09-27 11:31:18

IP地址MAC地址

2009-11-18 18:28:27

Oracle監(jiān)聽器

2022-05-24 06:14:41

動態(tài)服務(wù)靜態(tài)服務(wù)oracle

2020-11-12 06:03:54

IP IPv4IPv6

2020-11-30 12:15:26

KubernetesPodLinux
點贊
收藏

51CTO技術(shù)棧公眾號