I can use this problem the day before, and the next morning, I will report the mistake.
I found a lot of methods on the Internet, mostly to modify the SID in this file,/listener.ora, and did not fix it.
My solution is simple,
Open the services in Oracle Net Manager and we will see that we have a new service name (for example: ORCL) When we install Oracle, and click on this service to see its information: Service Name: Orcl,sid: I'm empty here, connection type: Database default settings, Protocol: TCP/IP, hostname: Baidu (host name of the computer), port number: 1521.
This appears to be correct, we use the command to test the service to discover that the test failed, and then I changed the hostname to 127.0.0.1 but failed.
Can't find out the reason I had to delete this service, and then add a service, the service name and just deleted, the same configuration information, the hostname I use 127.0.0.1, and then save the settings after restarting the service can be normal connection.
"Remarks" from the Baidu article migrated over, that is too bad to use, the original article was founded in 2012-06-10
oracle11g ORA-12505