tnsnames.ora
中假如没有所需要的SID名
ORCL=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 202.113.13.84)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)
而你需要用SID ORCL
就会发生这个错误。
---------------------------------------------------------------------------------------------------------------------------------------------
I see the error "HTTP-503 ORA-12154" in the file ORACLE_HOME/Apache/Apache/conf/error_log. What does this mean?
This error means that mod_plsql is unable to connect to the database.
Ensure that:
-
The database is up and running.
-
The username and password information in the DAD is correct.
-
The middle-tier is able to connect to the database using the
PlsqlDatabaseConnectString
parameter in the DAD.
In most situations, the problem occurs because SQL*Net is not able to resolve the connect string parameter using the configuration information under ORACLE_HOME
/network/admin
.
-
For entries configured with TNSFormat or NetServiceNameFormat, validate the connect string information by using
tnsping dad_connect_string
. For example:tnsping "cn=iasdb,cn=oraclecontext"
or
tnsping iasdb.us.oracle.com
-
For entries configured with SIDFormat and ServiceNameFormat, ensure that the hostname, port, and SID/service_name information match for the database listener. After verifying this, confirm that SQL*Plus can connect to the database using the DAD username, password, and connect string.
If this does not work, refer to the Oracle SQL*Net documentation on how to troubleshoot this further.
-------------------------------------------------------------------------------------------------------------------------------
解决过程
-
ORA-12154: TNS:could not resolve service name
-
Cause: Oracle Net could not locate the net service name specified in the
tnsnames.ora
configuration file. -
Action: Perform these steps:
-
Verify that a
tnsnames.ora
file exists.See Also:
"Localized Configuration File Support" for configuration file location information -
Verify that there are not multiple copies of the
tnsnames.ora
file. -
In the
tnsnames.ora
file, verify that the net service name specified in your connect string is mapped to a connect descriptor. -
Verify that there are no duplicate copies of the
sqlnet.ora
file. -
If you are using domain names, verify that your
sqlnet.ora
file contains aNAMES.DEFAULT_DOMAIN
parameter. If this parameter does not exist, you must specify the domain name in your connect string. -
If you are not using domain names, and this parameter exists, delete it or disable it by commenting it out.
-
If you are connecting from a login dialog box, verify that you are not placing an "@" symbol before your connect net service name.
-
Activate client tracing and repeat the operation.
-
-
Cause: Oracle Net could not locate the database service name or net service name specified in the directory server.
-
Action: Perform these steps:
-
Verify that the database service or net service name entry exists in the directory that this computer was configured to use.
See Also:
Oracle Internet Directory Administrator's Guide for directory setup instructions -
Verify that the
sqlnet.ora
file includes the following entry:NAMES.DIRECTORY_PATH=(ldap, other_naming_methods)
-