ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect descriptor.
This error occurs when you try to connect to a database.
Cause: If you used Oracle Net Easy Configuration or Oracle Net Assistant to create the Net Service Name entry, and you used
This error occurs when you try to connect to a database.
Cause: If you used Oracle Net Easy Configuration or Oracle Net Assistant to create the Net Service Name entry, and you used
the default option (Service Name) on the newly created Net Service Name, then the parameter SERVICE_NAME is added to the
TNSNAMES.ORA as a subclause to the CONNECT_DATA section in the Net Service Name entry. This replaces the (SID=SIDname)
subclause in previous releases of the database, for example, Oracle **i (8.1.x).
Action: Implement the TNSNAMES.ORA file as follows:
1.
Use the GLOBAL_DBNAME parameter in the LISTENER.ORA for each SID to identify as a separate service. Use the value of this
Action: Implement the TNSNAMES.ORA file as follows:
1.
Use the GLOBAL_DBNAME parameter in the LISTENER.ORA for each SID to identify as a separate service. Use the value of this
parameter as the value of the SERVICE_NAME parameter. You need to activate any changes that you make to LISTENER.ORA for
this purpose by stopping and restarting the listener process.
2.
Use the values of the parameters that exist in the INIT.ORA, namely SERVICE_NAMES and DB_DOMAIN, to determine the value of
2.
Use the values of the parameters that exist in the INIT.ORA, namely SERVICE_NAMES and DB_DOMAIN, to determine the value of
the SERVICE_NAME that you must use in TNSNAMES.ORA. The valid construction of this value is SERVICE_NAMES.DB_DOMAIN with
the period separating the two INIT.ORA values. If your SERVICE_NAMES is BIKES and your DB_DOMAIN is COM, then your
SERVICE_NAME is BIKES.COM.
3.
If there is no DB_DOMAIN parameter set in your INIT.ORA, or if there is no GLOBAL_DBNAME in the LISTENER.ORA, then you can
3.
If there is no DB_DOMAIN parameter set in your INIT.ORA, or if there is no GLOBAL_DBNAME in the LISTENER.ORA, then you can
use the SERVICE_NAMES from the INIT.ORA in your TNSNAMES.ORA for the SERVICE_NAME parameter.
For example, if INIT.ORA contains SERVICE_NAMES = "TEST817" and db_domain is not set, then the TNSNAMES.ORA entry is:
For example, if INIT.ORA contains SERVICE_NAMES = "TEST817" and db_domain is not set, then the TNSNAMES.ORA entry is:
CONNECT_DATA =(SERVICE_NAME = "TEST817")).
4.
If you have multiple values specified in the SERVICE_NAMES parameter in the init.ora, then you can use one of them. If
4.
If you have multiple values specified in the SERVICE_NAMES parameter in the init.ora, then you can use one of them. If
SERVICE_NAMES is not set, then you can use DB_NAME.DB_DOMAIN parameters from the INIT.ORA file.
5.
If SERVICE_NAMES and DB_DOMAIN is not set in the INIT.ORA and there is no GLOBAL_DBNAME in the LISTENER.ORA, then your
5.
If SERVICE_NAMES and DB_DOMAIN is not set in the INIT.ORA and there is no GLOBAL_DBNAME in the LISTENER.ORA, then your
SERVICE_NAME in TNSNAMES.ORA file is DB_NAME.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-723229/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-723229/