Oracle Installation产品文件夹和diag文件夹位于不同的位置 [英] Oracle Installation product folder and diag folder in different place

查看:239
本文介绍了Oracle Installation产品文件夹和diag文件夹位于不同的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很困惑,因为Java无法与Oracle一起使用. 我正在尝试将Java连接到Oracle,但是却出现oracle.jdbc.driver.OracleDriver异常.我遵循所有步骤.将ojdbc.jar文件放置在jre/lib/ext Director中,但仍然出现相同的异常. 最近,它工作正常.但是最近我又安装了Windows和Oracle.但是在错误地安装Oracle的过程中,我更改了安装路径,现在我的Oracle目录是按此顺序排列的.

I'm confused because java is not working with Oracle. I'm trying to connect java to Oracle but I'm getting oracle.jdbc.driver.OracleDriver exception. I follow the all steps. Placed the ojdbc.jar file in jre/lib/ext director but still getting same exception. Recently It was working fine. But recently I installed windows and Oracle again. But during installation of Oracle by mistake I change the path in installation and now my Oracle directories are in this order.

admin
audit
cfgtoollogs
checkpoints
diag
OracleHome
--oradata
--product

但是在新安装之前,当连接正常时,目录顺序是此顺序.

But before new installation when connection working fine the Directory order was in this order.

OracleHome
--admin
--audit
--cfgtoollogs
--checkpoints
--diag
--oradata
--product

我很困惑,可能是由于此目录层次结构导致异常吗?如果是,那我该怎么解决?

I'm confused may be exception could be caused due to this directories hirarchy? if yes then how I can solve it?

推荐答案

对于Java中的数据库连接,安装路径并不重要,唯一重要的是服务器的主机名/IP地址,服务器端口,用户名,密码和数据库别名. 您必须检查所有这些信息在新安装中是否都没有更改.尝试使用数据库客户端连接到oracle数据库,如果连接正常,则尝试从Java应用程序进行连接. 在这里您可以阅读一个简单的示例:

The installation path is not important for the database connection from Java, the only important things are hostname/ip address of the server, server port, username, password and database alias. You have to check that all these informations are not changed with the new installation. Try to connect to your oracle database with a database client, if the connection works correctly then try to connect from your Java application. Here you can read a simple example:

http://www.mkyong .com/jdbc/connect-to-oracle-db-via-jdbc-driver-java/

我希望它对您有用.

这篇关于Oracle Installation产品文件夹和diag文件夹位于不同的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆