DRP problem series -- The Network Adapter cocould not establish the connection, drpestablish

Source: Internet
Author: User

DRP problem series -- The Network Adapter cocould not establish the connection, drpestablish

After the last problem is solved, another new problem occurs. There will always be too many disappointments in life. Let's take a look at the problem first.
1. Question 1

We must not be scared by the way it looks. Read it carefully and we will find that it is actually not connected to the database, let's see what went wrong with it.
2. Start solving
When we encounter a problem, we must find it online, because 70% of the questions are answered online. If not, that would be great, you know. 1. IP address error. An error occurred while setting the URL. For example, jdbc: oracle: thin: @ 192.168.0.36: 1521: the sharp database server is incorrect. Check whether the IP address of the ping SERVER is correct. Incorrect. An error occurred while changing the URL to the correct port number. Perform the following operation: Type sqlplus on DOS and check whether oracle is enabled but normal. Then, execute step 1. 2. If a firewall is installed on the machine, the firewall may be caused by blocking the server port number. Close the firewall and try again. Still not working. Execute step 1. 3. The ImagePath value in the Registry on the PC is not modified when the Database Listener is not started. I will take the current mainstream database ORACLE as an example to restart the Database Listener manually
3. Try
With a direction, I started to modify it. At the beginning, I wrote it like this.
String url="jdbc:oracle:thin:@localhost:1521:drp";
I think it may be a problem with localhost, so I changed it to my own IP address.
String url="jdbc:oracle:thin:@192.168.24.169:1521:drp";
Of course, this is not acceptable, because my Oracle is not installed on my computer, so it is changed to the IP address of the server.
String url="jdbc:oracle:thin:@192.168.26.206:1521:drp";
But this still doesn't work, so I tried using the ping command and the server could not be pinged. Is that why? So I went online again and got the following information.

Click View Original website

Just now I checked whether Oracle has a listener and found the situation cmd-> netstat-an such
Look down, 127.0.0.1
No 1521.
It should look like this.

I guess the port number is wrong, so I checked it.

It seems that I guessed it again. I suddenly found that the error was changed.
4. Answers surfaced
The error message is as follows:

That is to say, the SID cannot be found. What is the SID? This SID should be your database name, but my database is called drp. Why, so I checked it online again.

Click View Original website

The main reason is that SID is configured in the listener. ora file of Oracle. 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_DESC =      (GLOBAL_DBNAME = ORCL)       (ORACLE_HOME = /app/oracle/oracle/product/10.2.0/db_1)      (SID_NAME = ORCL)    )  )
Therefore, you can change your url to the following:
String url="jdbc:oracle:thin:@192.168.26.206:1521:ORCL"; 
5. Summary
In short, the main reasons for MyEclipse connection to Oracle failure are IP, port number, SID, etc., or problems with your environment configuration. Here, I would like to say that we should not be confused when there is a problem, calm down, believe that we can solve the problem, and then we can do it through our unremitting efforts. The method is always more problematic than the problem.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.