just after solving the last problem, there is a new problem, life is always too many unhappy ah. Let's take a look at the problem first.
1. Question 1
we must not be frightened by its appearance, carefully read we will find, in fact, it is not connected to the database, oh, simple enough, then let us see where it is the problem.
2, start to solve
we have a problem, it must be on the Internet to find, because 70% of the problems on the Internet have the answer, if not, it is very good, you understand. 1. IP error. Error setting URL, for example: Jdbc:oracle:thin:@192.168.0.36:1521:sharp database server is incorrect: Ping server IP is correct. Incorrect, change the URL to the correct port number error: generally not error. To do this: type Sqlplus on DOS, check if Oracle is turned on, and perform the 2nd step below. 2. Firewalls may be caused by a server port number shield If a fire wall is installed on the machine. After shutting down the firewall, try reconnecting. Still not, take the 3rd step. 3. The database listener does not start modifying the ImagePath value in the registry on the PC. I'm following the current mainstream database Oracle as an example restart the database listener manually
3. Try
with the direction, so I began to revise, and at first I wrote this
String url="jdbc:oracle:thin:@localhost:1521:drp";
I think it might be localhost, so I changed my IP address
.
String url="jdbc:oracle:thin:@192.168.24.169:1521:drp";
Of
Course this is not possible, because my Oracle is not installed on their own computer, and then changed to the server IP
String url="jdbc:oracle:thin:@192.168.26.206:1521:drp";
but this still does not, so I use ping command to try a bit, the server actually ping does not pass, is this reason? So I went online to find a bit, got the following information.
Click to view the original URL
Just check to see if Oracle has been listening and found a situation like Cmd–>netstat-an
Look down, 127.0.0.1.
Not 1521.
It's supposed to be like this.
so I guess it's not the wrong port, so I checked.
I
guess I was wrong again, and I suddenly found out that the mistakes I had made changed.
4. The answer is surfaced
the error message is as follows
In
other words, Sid is not found, then SID is what east, this SID should be your database name, but my database is called DRP, this is what reason, so again on the Internet to check a bit.
Click to view the original URL
The
main reason for not showing it all here is that the SID is configured in Oracle's Listener.ora file, the code is as follows
sid_list_listener = (SID _list = (sid_desc = (sid_name = plsextproc ) (oracle_home = /app/oracle /oracle/product / 10.2.0/db _1) (program = Extproc)) (sid_d ESC = (global_dbname = orcl ) ( oracle_home = /app/oracle /oracle/product /10.2.0/db _1) ( sid_name = ORCL ))
The
URL is changed to the following so that the success
String url="jdbc:oracle:thin:@192.168.26.206:1521:ORCL"
5. Summary
In
short, the reason why MyEclipse connect Oracle failure is mainly IP, port number, SID, etc., or you have a problem with the configuration of the environment, in this, I would like to say, we encounter problems do not panic, calm, believe that they can certainly solve, and then we through their unremitting efforts, Must be done. The method is always much more than the problem.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
DRP Problem Series--the Network Adapter could not establish the connection