ORA-12519

問題:sql

用hibernate實現批量插入oracle數據庫操做的時候,出現ORA-12519: TNS:no appropriate service handler found 異常。實際最終代碼未出現該異常,插入成功記錄數量爲6000多條。數據庫

解決方法:oracle

將hibernate屬性配置作些修改,最終配置以下:app

<property name="hibernateProperties">

   <props>

    <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</prop>

    <prop key="hibernate.show_sql">false</prop>

    <prop key="hiberante.format_sql">false</prop>

    <prop key="hibernate.c3p0.max_size">2</prop>

    <prop key="hibernate.c3p0.min_size">0</prop>

    <prop key="hibernate.c3p0.timeout">1000</prop>

    <prop key="hibernate.c3p0.max_statements">10000</prop>

    </props>

  </property>

一開始報異常的配置以下:hibernate

<property name="hibernateProperties">

   <props>

    <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</prop>

    <prop key="hibernate.show_sql">false</prop>

    <prop key="hiberante.format_sql">false</prop>

    <prop key="hibernate.c3p0.max_size">50</prop>

    <prop key="hibernate.c3p0.min_size">0</prop>

    <prop key="hibernate.c3p0.timeout">1000</prop>

    <prop key="hibernate.c3p0.max_statements">1000</prop>

    </props>

  </property>

期間操做:只是對如下兩屬性配置進行了修改code

<prop key="hibernate.c3p0.max_size">2</prop>
<prop key="hibernate.c3p0.max_statements">10000</prop>

over~orm

本站公眾號
   歡迎關注本站公眾號,獲取更多信息