記一次Oracle無法動態註冊問題

denglt發表於2011-12-22
listener.ora內容如下:
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = orcl.dlt )(PORT = 1521))
    )
  )

[oracle@localhost admin]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
172.16.90.57            orcl.dlt   dbserver2   
::1             localhost6.localdomain6 localhost6

資料庫啟動後一直無法動態註冊。
配置為靜態註冊:
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
   (SID_DESC =
        (GLOBAL_DBNAME =orcl)
        (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
        (SID_NAME =orcl)
    )
 
  )
 
遠端客戶端可以登入。
鬱悶。。。。呀
[oracle@localhost admin]$ hostname
localhost.localdomain

機器名變了,我這臺機器是從同一臺機器中複製拷貝來的虛擬機器,與原虛擬機器同名,被VM給改了名。
 
vi /etc/sysconfig/network
修改:
HOSTNAME=orcl.dlt2
修改listener.ora檔案中的orcl.dlt為orcl.dlt2
tnsnames.ora檔案中的也要修改
 
/ect/hosts中增加:
172.16...            orcl.dlt2
 
[root@localhost ~]# reboot
Oracle動態註冊成功!
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195110/viewspace-713791/,如需轉載,請註明出處,否則將追究法律責任。

相關文章