連線資料庫報錯ORA-12514
在本機安裝的VMWARE虛機上,無法透過服務名連線資料庫。
連線時報錯:
[oracle@yangtk2 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 01-SEP-2008 17:36:03
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 01-SEP-2008 17:01:31
Uptime 0 days 0 hr. 34 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.25.1.104)(PORT=1521)))
The listener supports no services
The command completed successfully
檢查listener.ora和tnsnames.ora都未發現異常:
[oracle@yangtk2 admin]$ more listener.ora
# listener.ora Network Configuration File: /data/oracle/product/11.1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.25.1.104)(PORT = 1521))
)
)
[oracle@yangtk2 admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /data/oracle/product/11.1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORA11G_S =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.25.1.104)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g_s.ytk-thinkpad)
)
)
ORA11G_P =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.25.1.102)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g_p.ytk-thinkpad)
)
)
而且以前這個配置沒有任何問題,就是這次啟動虛機後才出現的問題。
查詢了metalink,雖然上面記載了很多ORA-12514錯誤,但是沒有發現什麼有幫助的線索。
由於這個錯誤以前並沒有出現,所以懷疑是最近修改了什麼東西導致了這個問題。而啟動之後做了唯一的修改就是修改了主機的IP地址。
透過ifconfig修改了主機IP地址,莫非是修改錯誤導致了問題,不過現在透過IP地址可以正常的登陸主機,而且tnsping也沒有任何的問題:
[oracle@yangtk2 admin]$ tnsping ora11g_s
TNS Ping Utility for Linux: Version 11.1.0.6.0 - Production on 01-SEP-2008 17:54:31
Copyright (c) 1997, 2007, Oracle. All rights reserved.
Used parameter files:
/data/oracle/product/11.1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.25.1.104)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ora11g_s.ytk-thinkpad)))
OK (0 msec)
最後檢查listner的日誌:
[oracle@yangtk2 admin]$ tail -20 /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
host_addr='172.25.4.70'>
host_addr='172.25.4.70'>
host_addr='172.25.4.70'>
發現日誌中的IP地址並沒有改變,看來是修改IP的時候遺漏了什麼位置。
檢查HOSTS檔案,發現裡面的配置忘了進行修改:
[oracle@yangtk2 admin]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
172.25.4.70 yangtk2.ytk-thinkpad
127.0.0.1 localhost.localdomain localhost
將hosts檔案中的ip也修改為當前的IP後,問題解決。
[oracle@yangtk2 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 01-SEP-2008 18:01:00
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
[oracle@yangtk2 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 01-SEP-2008 18:01:10
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Starting /data/oracle/product/11.1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /data/oracle/product/11.1/network/admin/listener.ora
Log messages written to /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.25.1.104)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date 01-SEP-2008 18:01:10
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /data/oracle/product/11.1/network/admin/listener.ora
Listener Log File /data/oracle/diag/tnslsnr/yangtk2/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.25.1.104)(PORT=1521)))
The listener supports no services
The command completed successfully
稍等一會,透過sqlplus連線資料庫:
[oracle@yangtk2 ~]$ sqlplus sys/test@ora11g_s as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 1 18:03:16 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/4227/viewspace-446940/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQLYOG連線資料庫時報錯1251SQL資料庫
- Oracle透過ODBC連線SQL Server資料庫後ORA-12514OracleSQLServer資料庫
- springboot整合Batis,執行報錯,資料庫連線密碼錯誤Spring BootBAT資料庫密碼
- 我的postgresql資料庫報埠錯誤,連線失敗SQL資料庫
- 連線oracle資料庫時,報錯:{dataSource-1} init errorOracle資料庫Error
- Java專案連線資料庫Mysql報錯create connection SQLExceptionJava資料庫MySqlException
- 網站連線資料庫配置錯誤網站資料庫
- 網站提示資料庫連線錯誤網站資料庫
- 阿里雲資料庫連線資料庫錯誤:如何解決?阿里資料庫
- 用Navicat連線資料庫-資料庫連線(MySQL演示)資料庫MySql
- DedeCms錯誤警告:連線資料庫失敗資料庫
- asp網站提示資料庫連線出錯網站資料庫
- PbootCMS錯誤提示:資料庫連線失敗boot資料庫
- 解決navicat遠端連線資料庫報2059錯誤的方法資料庫
- 連線資料庫資料庫
- 資料庫連線異常故障報告資料庫
- 網站資料庫連線錯誤怎麼辦?網站資料庫
- 資料庫連線池-Druid資料庫連線池原始碼解析資料庫UI原始碼
- mysqli連線資料庫MySql資料庫
- Mongodb資料庫連線MongoDB資料庫
- Android 連線資料庫Android資料庫
- java連線資料庫Java資料庫
- 連線資料庫-mysql資料庫MySql
- jmeter連線資料庫JMeter資料庫
- Mybatis連線資料庫MyBatis資料庫
- JSP連線資料庫JS資料庫
- JDBC連線資料庫JDBC資料庫
- Flask連線資料庫Flask資料庫
- SQLyog連線資料庫報錯:錯誤號碼2058 plugin caching_sha2_password could not be loadedSQL資料庫Plugin
- 《四 資料庫連線池原始碼》手寫資料庫連線池資料庫原始碼
- 開啟網頁顯示資料庫連線出錯網頁資料庫
- 網站出現資料庫連線錯誤怎麼辦?網站資料庫
- 資料庫連線錯誤的原因及解決方法資料庫
- 織夢DedeCms錯誤警告,連線資料庫失敗資料庫
- 網站資料庫連線時錯誤怎麼辦?網站資料庫
- sql server資料庫錯誤資料恢復(資料庫連線失效,無法附加查詢)SQLServer資料庫資料恢復
- python 連線 mongo 資料庫連線超時PythonGo資料庫
- 資料庫的連線數資料庫
- Python連線SQLite資料庫PythonSQLite資料庫