Solution to failure to Connect ODBC to the Oracle database using localhost

Source: Internet
Author: User

Sometimes, when we perform database connection tests or deploy the system, we may encounter problems with data. Let's share one of my experiences over the past two days.

The scenario is as follows: the project needs to be transferred to other servers, and both database backup and project backup are completed. The two backups are correct. Then install the database. Here I use the default one. Directly configure listen, which is a risk of problems. Next, import data and deploy the project on Tomcat. After Tomcat is started. No matter how you log on, the message "cocould found JDBC driver" is displayed. I checked the driver in the project. I suspect that my database is different from the driver in the project, so the driver in the database of the server used in the new project is put on the project, and the application is restarted, the problem still persists. The header is too big and the configuration file is okay. Later, a colleague helped me debug the database by reading the listen and found that he used the actual IP address. After the IP address is changed, the problem is solved.

In summary, the problem is that I ignore it. The address in the URL should be the address listened to by the database, while localhost is not necessarily the address of the Data listener (if listen is localhost, It is localhost ).

Note: The URL is the address listened by JDBC. Oracle. Thin @ listen: Database port: Database Name. Note the address of the listen listener.

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.