解决32位plsql_Developer客户端连接不64位Oracle11g上数据库

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/sinat_35767703/article/details/84818445

网上找到的解决方案,整理如下:

由于笔记本是64位的window7系统,我装的oracle版本为win 64位操作系统 下载地址:

http://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_database_1of2.zip
http://download.oracle.com/otn/nt/oracle11g/112010/win64_11gR2_database_2of2.zip

然而PLSQL_Developer没有64位的,这造成了我们连接的麻烦,这里教大家怎么将win7_oracle11g_64位连接32位PLSQL_Developer。详细步骤如下:

 

第一步:1.下载PLSQL_Developer

               2.在http://www.oracle.com/technetwork/topics/winsoft-085727.html上下载对应的Instant Client

                  我的是:instantclient-basic-win32-11.2.0.1.0.zip 

                         注:instantclient-basic-win32-11.2.0.1.0.zip 文件在后面进行配置用

第二步:安装你下载的PLSQL_Developer并点击汉化文件进行汉化。

              安装好打开你会发现你的PLSQL_Developer不能正常连接到数据库,没有数据库的初始化内容,如下图所示:
                                          

第三步:请将你下载instantclient-basic-win32-11.2.0.1.0.zip文件解压,然后复制到你的Oracle数据库安装的文件夹下的product文件夹下。  

                     

第四步:然后在Oracle安装文件下找到文件listener.ora,也可以我的在D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN里面。复制到    D:\app\Administrator\product\instantclient_11_2的下面。这两个路径是我的安装路径,去找你们的路径。

 

第五步:然后找到你的PLSQL_Developer安装的目录,我的是:

D:\Program Files (x86)\PLSQL Developer 9.04

在里面新建一个记事本,写入以下类似代码:

@echo off 

set path=D:\app\Administrator\product\instantclient_11_2

set ORACLE_HOME=D:\app\Administrator\product\instantclient_11_2

set TNS_ADMIN=D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN

set NLS_LANG=AMERICAN_AMERICA.AL32UTF8

start plsqldev.exe



 
  》》》注意!!!!

1.我的instantclient_11_2地址是:D:\app\Administrator\product\instantclient_10_2

2.set TNS_ADMIN: 后面填写oracle里本地网络配置的地址 

 

D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN

 

然后把文件名字改成start.bat

 

第五步:

打开PLSQL_Developer后,取消登陆,进入主界面。

1.点击--工具--首选项--连接:

2.把上面的注销改为提交

3.OCI库改为带有instantclient_11_2的路径。

4.应用--确定--关闭PLSQL_Developer重新运行。

5.注意:点击刚才建的start.bat文件,

以后都通过start来运行PLSQL_Developer程序!



 

 

最后一步:恭喜你!现在你可以正常运行并完美的解决了win7_oracle11g_64位连接32位PLSQL_Developer的问题了!

 

====================================================================

                                                  参考网友的方案:

(如果按照下面这种方式,如果oracle目录里的tnsnames.ora有更新时,

必须手动去对复制文件(instantclient的tnsnames.ora)同步更新一次)

====================================================================

1,把解压的instantclient-basic-win32-10.2.0.4(Oracle instant Client) 放在F:\app\Administrator\product目录下,

然后将F:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN目录下的tnsnames.ora 拷贝至

instantclient-basic-win32-10.2.0.4目录下

2非登录状态下进入PL/SQL developer,进入工具——>首选项,在connection中设置Oracle_Home和OCI Library,其中
Oracle_Home设置为InstantClient的解压目录,OCI Library设置为该目录下的oci.dll.

3.最后要设置启动PL/SQL developer的环境,在PL/SQL developer的安装目录下建立一个bat文件,文件内容如下:
@echo off
set path=F:\app\Administrator\product\instantclient_10_2
set ORACLE_HOME=F:\app\Administrator\product\instantclient_10_2
set TNS_ADMIN== F:\app\Administrator\product\instantclient_10_2
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
start plsqldev.exe 
其中NLS_LANG前部分必须是AMERICAN_AMERICA,后部分是数据库采用的字符集. ......

4.双击bat文件启动PL/SQL developer

 

5F:\app 为ORAcle 安装目录。

 

-----------------------------------------------------------------------------------------------

oracle认证:登陆oracle数据库的方式

 

登陆oracle数据库的几种方式:

登陆用户:除sys,system,dbsnmp,sysman用户外,其他都被锁定

登录密码:在数据库安装时设定

登陆权限(身份):sysdba(数据库管理员DBA),权限最高

sysoper(数据库操作员)normal(普通用户)

一、oracle数据库自带的SQL plus

开始——程序——ORACLE10G--APPLICATION DEVELOPMENT——SQL PLUS

二、第三方软件PL/SQL Developer

打开PL/SQL Developer软件

三、以浏览器的方式EM(Enterprise Manager)

在oracle数据库安装过程中,有信息提示。

在地址栏中输入:http://本机物理地址:端口号/em(如果oracle数据库安装在本机中)

http://安装数据库的机器的IP地址:端口号/em(如果oracle数据库安装在其他机器上)

以em方式进入时,用户名和权限有一些限制:

【sys】用户具有“SYSDBA”或者“SYSOPER”权限,登陆em也只能用这两个身份,不能用

normal。sysoper主要用来启动、关闭数据库,sysoper 登陆后用户是 public,sysdba登

陆后是sys

【system】用户只能用normal身份登陆em。normal 是普通用户

展开阅读全文

servlet连接不上数据库

11-06

servlet连接数据库时报这个错.请高手指点..谢谢!!急!!rnrn信息: Reloading context [/My]rnjava.sql.SQLException: Access denied for user 'rott'@'localhost' (using password: YES)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)rn at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:718)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorrnHttpServlet.java:617)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilrnterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChainrn.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:rn233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:rn191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10rn9)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Prnrotocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnjava.sql.SQLException: Access denied for user 'rott'@'localhost' (using password: YES)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)rn at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)rn at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)rn at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)rn at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:718)rn at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:46)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorrnImpl.java:39)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorrnAccessorImpl.java:27)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:513)rn at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)rn at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)rn at java.sql.DriverManager.getConnection(DriverManager.java:582)rn at java.sql.DriverManager.getConnection(DriverManager.java:207)rn at ShowRs.doGet(ShowRs.java:29)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilrnterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChainrn.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:rn233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:rn191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10rn9)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Prnrotocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnrnrnrnrnrnrnrnrnrnrnrnrnrn 论坛

关于连接不上数据库

10-27

连接数据库的时候出现这种错误 ,但是一般没有问题,就是点击次数太多后就会出现连接数据库错误,请高手指教!~~rnrnnicationsException: Communications link failure due to underlying exception: rnrn** BEGIN NESTED EXCEPTION ** rnrnjava.io.EOFExceptionrnrnSTACKTRACE:rnrnjava.io.EOFExceptionrn at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1903)rn at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2349)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2860)rn at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771)rn at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3647)rn at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176)rn at com.mysql.jdbc.Connection.createNewIO(Connection.java:2544)rn at com.mysql.jdbc.Connection.(Connection.java:1474)rn at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at src.com.xinhaicompany.JDBCconnect.JDBConnection.(JDBConnection.java:16)rn at src.com.xinhaicompany.DAO.Imp.RecruitmentSimple.(RecruitmentSimple.java:23)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:66)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at src.com.xinhaicompany.Tool.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:48)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 论坛

spring+birt连接不上数据库

08-12

[code=perl]rnorg.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.rn at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)rn at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382)rn at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)rn at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)rn at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:187)rn at com.unionpay.ump.report.dao.imp.TblCumgmCtSettleStBxDao.getSettleDataSet(TblCumgmCtSettleStBxDao.java:55)rn at com.unionpay.ump.report.service.MADReportBatService.getSettleTableBx(MADReportBatService.java:485)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)rn at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)rn at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66)rn at org.mozilla.javascript.gen.c4._c1(/report/data-sets/script-data-set[@id="602"]/method[@name="open"]:5)rn at org.mozilla.javascript.gen.c4.call(/report/data-sets/script-data-set[@id="602"]/method[@name="open"])rn at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)rn at org.mozilla.javascript.gen.c5._c0(/report/data-sets/script-data-set[@id="602"]/method[@name="open"]:0)rn at org.mozilla.javascript.gen.c5.call(/report/data-sets/script-data-set[@id="602"]/method[@name="open"])rn at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)rn at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)rn at org.mozilla.javascript.gen.c5.call(/report/data-sets/script-data-set[@id="602"]/method[@name="open"])rn at org.mozilla.javascript.gen.c5.exec(/report/data-sets/script-data-set[@id="602"]/method[@name="open"])rn at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:99)rn at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:138)rn at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:993)rn at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138)rn at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90)rn at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:256)rn at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:98)rn at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:80)rn at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:247)rn at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:223)rn at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1208)rn at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)rn at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)rn at org.eclipse.birt.report.engine.data.dte.QueryResultSet.(QueryResultSet.java:98)rn at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)rn at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)rn at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)rn at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)rn at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)rn at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)rn at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)rn at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)rn at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)rn at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)rn at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)rn at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)rn at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)rn at com.unionpay.ump.report.job.ReportBatBxNotifierJob.createBatReport(ReportBatBxNotifierJob.java:97)rn at com.unionpay.ump.report.job.ReportBatBxNotifierJob.execute(ReportBatBxNotifierJob.java:53)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)rn at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)rn at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)rn at org.quartz.core.JobRunShell.run(JobRunShell.java:203)rn at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)rnCaused by: java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.rn at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)rn at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527)rn at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)rn at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)rn at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)rn ... 60 morernCaused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@20d10a -- timeout at awaitAvailable()rn at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1317)rn at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)rn at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)rn ... 63 morern[/code] 论坛

没有更多推荐了,返回首页