oracle¡¢proxool¡¢hibernateʹÓÃ×ܽá
¿ªÊ¼ÔÚmyeclipse6.5ÖÐDB BROWERн¨ÁËÒ»¸öÊý¾Ý¿âÁ¬½Ó£¬Èçͼ£º
Ò»Á¬½Ó£¬±¨³öÁËÁ½¸ö´íÎó£º
1. ORA-00604 error occurred at recursive SQL level string.
2.ORA-12705: invalid or unknown NLS parameter value.
²é×ÊÁϺó½â¾ö£¨ÆÚ¼äÎÒ»¹¸Ä¹ýtestÓû§µÄÁ¬½ÓȨÏÞ£©£º
½«MyEclipseÖÐeclipseĿ¼ÏµÄeclipse.iniÎļþ£¬°ÑDuser.language=en ¸Ä³É Duser.language=zh¾ÍÐÐÁË.
proxool.xml·ÅÔÚSRCÏ£¬ÊÇÕâôдµÄ£º
Xml´úÂë
<?xml version="1.0" encoding="UTF-8"?>
<proxool-config>
<proxool>
<alias>DBPool</alias>
<driver-url>jdbc:oracle:thin:@192.168.1.88:1521:XE</driver-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<driver-properties>
<property name="user" value="test" />
<property name="password" value="test" />
</driver-properties>
<house-keeping-sleep-time>90000</house-keeping-sleep-time>
<maximum-new-connections>20</maximum-new-connections>
<prototype-count>5</prototype-count>
<maximum-connection-count>1000</maximum-connection-count>
<minimum-connection-count>10</minimum-connection-count>
</proxool>
</proxool-config>
applicationContext.xmlÖеÄsessionFactory£º
Xml´úÂë
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="mappingResources">
<!--Êý¾Ý×ÖµäµÄÓ³ÉäÎļþ-->
<list>
<!--²âÊÔʵÌåÓ³ÉäÎļþ-->
<value>yang\model\testmapping\ListTest.hbm.xml</value>
<!-- ................ -->
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.proxool.xml">proxool.xml</prop>
<prop key="hibernate.proxool.pool_alias">DBPool</prop>
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://www.bokee.net/bloggermodule/blog_viewblog.do?id=465310
OracleµÄµ¼ÈëʵÓóÌÐò(Import utility)ÔÊÐí´ÓÊý¾Ý¿âÌáÈ¡Êý¾Ý£¬²¢ÇÒ½«Êý¾ÝдÈë²Ù×÷ϵͳÎļþ¡£impʹÓõĻù±¾¸ñʽ£ºimp[username[/password[@service]]]£¬ÒÔÏÂÀý¾Ùimp³£ÓÃÓ÷¨¡£
1. »ñÈ¡°ïÖú
imp help=y
2. µ¼ÈëÒ»¸öÍêÕûÊý¾Ý¿â
i ......
֮ǰ¿ª·¢OracleÒ»°ãÊÇʹÓÃPL/SQL Developer»òÕßÊÇTOAD£¬ÓÉÓÚÏÖÔÚ¹«Ë¾¶Ô°æȨÎÊÌâ¿´µÃ±È½ÏÖØ£¬ËùÒÔÎÒÒ²Ö»ÄܶÔÕâЩÊìϤµÄ¿ª·¢¹¤¾ß˵Éù°Ý°ÝÁË£¡ÔÚOracle¹Ù·½ÍøÕ¾Õ¾¿´µ½ÁËOracleÒѾÓÐÁËÒ»¸öOracle SQL Developer£¬²¢ÇÒÊÇÃâ·ÑµÄ£¡
ÒÔÏÂÊÇOracle¹Ù·½¶ÔOracle SQL DeveloperµÄ½éÉÜ
³ÌÐò´úÂë
orac ......
PL/SQLÊǶÔOracleÊý¾Ý¿â½øÐвÙ×÷µÄÒ»ÖÖ¹ý³ÌÐÔ±à³ÌÓïÑÔ£¬Ëü¿ÉÒÔÔÚSQL * plusÖÐÖ´ÐУ¬Ò²¿ÉÒÔǶÈëµ½JAVA»òÕßC++ÖС£Æä»ù±¾×é³ÉΪ£º
DECLARE
...
BEGIN
...
EXCEPTION
...
END
¿ÉÓÃÀ´½«¶ÔÊý¾Ý¿âµÄ¸÷ÖÖ²Ù×÷·âװΪһ¸ö´úÂë¿é£¬ÎªÁ˼ÓÇ¿¿ÉÖØÓÃÐÔ£¬»¹¿É½«Öظ´ÐÔ´úÂëд³Éº¯ÊýÓë´æ´¢¹ý³Ì£¬Ó ......
Ò»£®ÒýÑÔ
ORACLE
Êý¾Ý¿â×Ö·û¼¯£¬¼´Oracle
È«Çò»¯Ö§³Ö(Globalization Support)
£¬»ò¼´¹ú¼ÒÓïÑÔÖ§³Ö£¨NLS
£©Æä×÷ÓÃÊÇÓñ¾¹úÓïÑԺ͸ñʽÀ´´æ´¢¡¢´¦ÀíºÍ¼ìË÷Êý¾Ý¡£ÀûÓÃÈ«Çò»¯Ö§³Ö£¬ORACLE
ΪÓû§Ìṩ×Ô¼ºÊìϤµÄÊý¾Ý¿âĸÓï»·¾³£¬ÖîÈçÈÕÆÚ¸ñʽ¡¢Êý×Ö¸ñʽºÍ´æ´¢ÐòÁеȡ£Oracle
¿ÉÒÔÖ§³Ö¶àÖÖÓïÑÔ¼°×Ö·û¼ ......
ORACLE ÈçºÎ²úÉúÒ»¸öËæ»úÊý:DBMS_RANDOM
--1¡¢Ð¡Êý( 0 ~ 1)
select dbms_random.value from dual ;
--2¡¢Ö¸¶¨·¶Î§ÄÚµÄСÊý ( 0 ~ 100 )
select dbms_random.value(0,100) from dual ;
--3¡¢Ö¸¶¨·¶Î§ÄÚµÄÕûÊý ( 0 ~ 100 )
select trunc(d ......