Today, the remote connection to the Linux server encountered such an error, Tnsnames.ora and Listener.ora file configuration is not wrong but is not connected to the tnsping is normal but the Plsql connection always error ora-12514 TNS Listener Sequence does not recognize the service requested in the connection descriptor, because there is no problem connecting to the local database, so the listener should be no problem, the next to see Tnsnames.ora found or there is a problem, in fact, the report has been very clear that the error is not recognized in the Connection Descriptor request service Description SID and The service name is different. I changed the service_name to Sid and restarted the listener. Connection Successful
The following is the Tnsnames.ora file when the connection fails
YANZHAO_ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 220.194.59.37) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORCL)
)
)
Modified Tnsnames.ora File
YANZHAO_ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 220.194.59.37) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(sid= ORCL)
)
)
Tnsping's
I'm going to go online and check the relationship between Sid and server_name.
In Oracle, the SID must be equal to instance_name (the instance name), which can be simply remembered as the SID is the instance name
1. The SID is the instance name, and the instance name refers to the name of the database management system that responds to a database operation. The instance name is determined by the parameter instance_name of the initialization parameter file. If this parameter is not specified (that is, instance_name is not specified as any value), then the name of the instance is determined by the user's environment variable ORACLE_SID (note that this is capitalized). Under the Windows platform, the ORACLE_SID value in the registry is determined.
2. Service_Name refers to the global database name in listener: This name is determined by the Global_dbname parameter in Listener.ora. This name represents the value that corresponds to the service_name parameter in Tnsnames.ora when the client connects to the database.
3. When the connection string is configured Tnsname.ora, you can use SID or Service_Name. Note that these two values are not necessarily the same, depending on the configuration in the database server.
The problem is in the 3rd here, if the SID and the service name, of course, the connection will not be wrong, but if not the same, it is reported ora-12514 this specifically also depends on the server configuration information.
the difference between Instance_name/sid/server_name provides two articles for everyone's reference.
1, http://blog.chinaunix.net/uid-23072872-id-35661.html
2, http://www.zhetao.com/content240
Thank you all ~ ~
ora-12514 The TNS Listener does not recognize the service requested in the connection descriptor