我能够使用sqlDeveloper和SQL Plus连接到orcale 12c 用户名:SYSTEM 密码:密码
但是当我使用ASP.Net编写API并尝试连接到Oracle时,我得到了
ORA-12514:TNS:listner当前不知道连接描述中请求的服务。
# TNSNames.ora sample entry
#
# alias =
# (DESCRIPTION =
# (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.mycompany.com)(PORT = 1521))
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SERVICE_NAME = ORCL)
# )
# )
#
# You can modify the entry below for your own database.
# <data source alias> = Name to use in the connection string Data Source
# <hostname or IP> = name or IP of the database server machine
# <port> = database server machine port to use
# <database service name> = name of the database service on the server
<data source alias> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =myserver.mycompany.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)