简体   繁体   English

Spring Batch-ORA 12516 SQLState 66000-TNS:Listener无法使用具有匹配协议栈的处理程序

[英]Spring Batch - ORA 12516 SQLState 66000 - TNS:Listener could not available handler with matching protocol stack

When I run Spring batch to process more than 100 records, I am get following error, 当我运行Spring批处理来处理100多个记录时,出现以下错误,

 "Listener Refused the connection with the following error: ORA-12516,  
  TNS:Listener could not available handler with matching protocol stack". 

But when I run the batch to process less than 50 records, it works fine. 但是,当我运行该批处理以处理少于50条记录时,它可以正常工作。

In my batch's before step of my reader, I query DB to get records. 在我的阅读器的批处理前步骤中,我查询数据库以获取记录。

eg If I get 100 records from DB, Using Loop, I extract a particular field from each record and using the particular fields i will query to another table. 例如,如果我从数据库中获得100条记录,则使用循环,我将从每条记录中提取一个特定字段,并使用该特定字段查询另一个表。 So the second query run for 100 times inside the for loop. 因此,第二个查询在for循环中运行了100次。

In Logs, I can see the batch runs for a while (queries some records inside for loop) and then it throws the error. 在日志中,我可以看到批处理运行了一段时间(在循环中查询了一些记录),然后引发了错误。

Please help me to solve this. 请帮我解决这个问题。

Changed my data source bean from 更改了我的数据源bean

<bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="${database.driverClassName}" />
    <property name="url" value="${database.url}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
</bean>

to this 对此

<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
  <property name="driverClassName" value="${database.driverClassName}" />
    <property name="url" value="${database.url}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
    <property name="connectionProperties"   value="initialSize=1,maxTotal=10" />
</bean> 

OnlyGod Team - OnlyGod团队 -

Oracle database server's value for "PROCESSES" has been configured too low you can resolve it by steps Oracle数据库服务器“ PROCESSES”的值配置得太低,您可以分步解决

  1. Launch 'SQL Plus' 启动“ SQL Plus”

  2. Logon as 'system' 登录为“系​​统”

  3. Type the following command (to check that the database is using spfile): 键入以下命令(以检查数据库是否正在使用spfile):

     show parameter spfile 
  4. Assuming that it shows that you ARE using spfile, then type the following command: 假设它表明您正在使用spfile,然后键入以下命令:

     alter system set PROCESSES=300 scope = spfile 
  5. Obtain some downtime (nobody using the databases) and restart the Oracle database server (or simply the relevant Oracle database) or you can edit it in notepad++ 获得一些停机时间(无需使用数据库),然后重新启动Oracle数据库服务器(或简单地相关的Oracle数据库),或者您可以在notepad ++中对其进行编辑

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ORA-12516,TNS:侦听器找不到可用的处理程序 - ORA-12516, TNS:listener could not find available handler 无法获得JDBC连接。 嵌套异常为java.sql.SQLException:ORA-28040:Spring Batch中没有匹配的身份验证协议 - Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-28040: No matching authentication protocol in Spring Batch 侦听器拒绝连接并出现以下错误:ORA-12519,TNS:找不到合适的服务处理程序 - Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found ORA-12518,TNS:侦听器无法移交客户端连接来自存在大量内存访问的循环 - ORA-12518, TNS:listener could not hand off client connection comes from a loop with heavy memory access ORA-12518, TNS:listener 无法切换客户端连接 oracle 11g - ORA-12518, TNS:listener could not hand off client connection oracle 11g java.sql.SQLException:侦听器拒绝连接时出现以下错误:ORA-12519,TNS:找不到合适的服务处理程序 - java.sql.SQLException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found ORA-12505,TNS:侦听器当前不知道SID - ORA-12505, TNS:listener does not currently know of SID oracle-ORA-12519,TNS:找不到合适的服务处理程序 - oracle - ORA-12519, TNS:no appropriate service handler found 如何解决ORA-12516错误? - How to solve ORA-12516 error? ORA-28040: 没有匹配的身份验证协议 Oracle - ORA-28040: No matching authentication protocol Oracle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM