初始化首次測試請使用用戶名: scott
正在嘗試使用以下用戶 ID 連接:scott
測試沒有成功
ORA
登錄到數據庫:orcl
您的用戶名和/或口令無效
解決方法
c:\lsnrctl start
然後在看狀態
lsnrctl>status
打開該配置文件後發現如下一段配置信息
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = local)(PORT =
)
)
)
當看到這一行HOST=local 的時候
總結
# TNSNAMES
# Generated by Oracle configuration tools
INST
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = tt)(PORT =
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = //HRService)
)
)
MYGOD
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = tt)(PORT =
)
(CONNECT_DATA =
(SERVICE_NAME = mygod)
)
)
myDB
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = tt)(PORT =
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = myDB)
)
)
EXTPROC_CONNECTION_DATA
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
myDB是安裝時默認創建的
MYGOD
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = tt)(PORT =
)
(CONNECT_DATA =
(SERVICE_NAME = mydb)
)
)
From:http://tw.wingwit.com/Article/program/Oracle/201311/18899.html