1.問題描述:在客戶端使用shutdown immediate關(guān)閉遠(yuǎn)程數(shù)據(jù)庫后,無法startup,提示錯(cuò)誤為:ORA-12514: TNS: 監(jiān)聽程序當(dāng)前無法識(shí)別連接描述符中請(qǐng)求的服務(wù)。操作如下:
Microsoft Windows XP [版本 5.1.2600]
(C) 版權(quán)所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\IBM>sqlplus
SQL*Plus: Release .1.0 - Production on 星期三 9月 12 10:20:56 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
請(qǐng)輸入用戶名: sys/password@s210 as sysdba
連接到:
Oracle Database Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
數(shù)據(jù)庫已經(jīng)關(guān)閉。
已經(jīng)卸載數(shù)據(jù)庫。
ORACLE 例程已經(jīng)關(guān)閉。
SQL> startup
ORA-12514: TNS: 監(jiān)聽程序當(dāng)前無法識(shí)別連接描述符中請(qǐng)求的服務(wù)
SQL> conn sys/password@s210 as sysdba
ERROR:
ORA-12514: TNS: 監(jiān)聽程序當(dāng)前無法識(shí)別連接描述符中請(qǐng)求的服務(wù)
2.檢查服務(wù)器端:
Microsoft Windows [版本 5.2.3790]
(C) 版權(quán)所有 1985-2003 Microsoft Corp.
C:\Documents and Settings\Administrator>sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 12 10:40:02 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
2.1使用操作系統(tǒng)驗(yàn)證方式可以登錄
請(qǐng)輸入用戶名: / as sysdba
連接到:
Oracle Database Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
2.2使用連接符無法登錄
SQL> conn sys/password@orcl as sysdba
ERROR:
ORA-12514: TNS: 監(jiān)聽程序當(dāng)前無法識(shí)別連接描述符中請(qǐng)求的服務(wù)
警告: 您不再連接到 ORACLE。
2.3檢查監(jiān)聽,發(fā)現(xiàn)未設(shè)置對(duì)服務(wù)名的監(jiān)聽(Oracle默認(rèn)安裝后不自動(dòng)設(shè)置監(jiān)聽)。
2.3.1修改前為:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hdsb-dell)(PORT = 1521))
)
)
2.3.2修改后為:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
)
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\product\10.2.0\db_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hdsb-dell)(PORT = 1521))
)
)
2.4重啟監(jiān)聽:
SQL> host
Microsoft Windows [版本 5.2.3790]
(C) 版權(quán)所有 1985-2003 Microsoft Corp.
C:\Documents and Settings\Administrator>lsnrctl stop
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-9月 -2007 10:4
1:56
Copyright (c) 1991, 2005, Oracle. All rights reserved.
正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
命令執(zhí)行成功
C:\Documents and Settings\Administrator>lsnrctl start
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 12-9月 -2007 10:4
2:00
Copyright (c) 1991, 2005, Oracle. All rights reserved.
啟動(dòng)tnslsnr: 請(qǐng)稍候...
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
系統(tǒng)參數(shù)文件為d:\oracle\product\10.2.0\db_1\network\admin\listener.ora
寫入d:\oracle\product\10.2.0\db_1\network\log\listener.log的日志信息
監(jiān)聽: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
監(jiān)聽: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hdsb-dell)(PORT=1521)))
正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
LISTENER 的 STATUS
------------------------
別名????????????????????? LISTENER
版本????????????????????? TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
啟動(dòng)日期????????????????? 12-9月 -2007 10:42:02
正常運(yùn)行時(shí)間????????????? 0 天 0 小時(shí) 0 分 1 秒
跟蹤級(jí)別????????????????? off
安全性??????????????????? ON: Local OS Authentication
SNMP????????????????????? OFF
監(jiān)聽程序參數(shù)文件????????? d:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
監(jiān)聽程序日志文件????????? d:\oracle\product\10.2.0\db_1\network\log\listener.log
監(jiān)聽端點(diǎn)概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hdsb-dell)(PORT=1521)))
服務(wù)摘要..
服務(wù) "PLSExtProc" 包含 1 個(gè)例程。
例程 "PLSExtProc", 狀態(tài) UNKNOWN, 包含此服務(wù)的 1 個(gè)處理程序...
服務(wù) "orcl" 包含 1 個(gè)例程。
例程 "ORCL", 狀態(tài) UNKNOWN, 包含此服務(wù)的 1 個(gè)處理程序...
命令執(zhí)行成功
C:\Documents and Settings\Administrator>exit
2.5再次測(cè)試:
SQL> conn sys/password@orcl as sysdba
已連接。
SQL>
3.再測(cè)試客戶端的啟動(dòng)關(guān)閉:
C:\Documents and Settings\IBM>sqlplus "sys/password@s210 as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on 星期三 9月 12 10:45:27 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連接到:
Oracle Database Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
數(shù)據(jù)庫已經(jīng)關(guān)閉。
已經(jīng)卸載數(shù)據(jù)庫。
ORACLE 例程已經(jīng)關(guān)閉。
SQL> startup
ORACLE 例程已經(jīng)啟動(dòng)。
Total System Global Area 1073741824 bytes
Fixed Size????????????????? 1253124 bytes
Variable Size???????????? 104857852 bytes
Database Buffers????????? 960495616 bytes
Redo Buffers??????????????? 7135232 bytes
數(shù)據(jù)庫裝載完畢。
數(shù)據(jù)庫已經(jīng)打開。
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元
