C#ÔÚ64λ²Ù×÷ϵͳÉÏÁ¬½ÓOracleµÄÎÊÌâºÍ½â¾ö·½°¸
C#ʹÓÃSystem.Data.OracleClientÁ¬½ÓOracleÊý¾Ý¿â¡£Ö®Ç°ÔÚWinXPÉÏÕý³£ÔËÐеijÌÐòÒÆÖ²µ½ Windows 2008 x64ÉÏÖ®ºó¾ÍÁ¬²»ÉÏÊý¾Ý¿âÁË£¬´íÎóÐÅÏ¢ÈçÏ£º
³¢ÊÔ¼ÓÔØ Oracle¿Í»§¶Ë¿âʱÒý·¢BadImageFomatException¡£Èç¹ûÔÚ°²×°32λOracle¿Í»§¶Ë×é¼þµÄÇé¿öÏÂÒÔ64λģʽÔËÐУ¬½«³öÏÖ´ËÎÊÌâ¡£
´íÎóÔÒòÊÇÔÀ´WinXP»ú×ÓÉÏËù°²×°µÄOracleInstantClientÊÇ32룬ËùÒÔ±àÒëµÄ³ÌÐòËùÓÃµÄ OracleClientÒ²ÊÇ32λµÄ£¬´Ó¶øµ¼Ö¼æÈÝÎÊÌâ¡£µ±È»£¬Èç¹ûÔÚ64λ²Ù×÷ϵͳÉÏÖØа²×°64λµÄOracle¿Í»§¶ËÔÙÖØбàÒë³ÌÐòÒ²ÊÇÄܽâ¾öÎÊÌâµÄ¡£ÕâÀïÎÒÃǽéÉÜÒ»ÖÖ¼òµ¥µÄ·½·¨À´ÒÆÖ²³ÌÐò¡£
ʵ¼ÊÉÏ£¬System.Data.OracleClientËùÖ¸ÏòµÄÊÇPATH»·¾³±äÁ¿ÏµÄoci.dll¡£Òò´Ë£¬ÎÒÃÇÖ»ÒªÈóÌÐòÄܹ»ÕÒµ½64λµÄoci.dll¾Í¿ÉÒÔÁË¡£·½·¨ÈçÏ£º
1. ÏÂÔØinstantclient-basic-win-x86-64-11.1.0.7.0.zip£¬²¢½âѹ£¬Èç C:\instantclient-basic-win-x86-64-11.1¡£
2. ÔÚϵͳµÄ»·¾³±äÁ¿PATHÖмÓÈëÒÔÉÏ·¾¶¡£
Ö®ºóÔÙÔËÐгÌÐò£¬³ÌÐò»áÒÀÕÕPATH·¾¶Ñ°ÕÒoci.dll£¬Èç¹ûÓöµ½32λµÄoci.dll»á×Ô¶¯ÂÔ¹ý£¬ÕÒµ½64λµÄoci.dll¾ÍÄÜÁ¬½ÓÉÏÊý¾Ý¿âÁË¡£
½â¾ö¹ý³ÌÖвο¼ÁËJeffreyµÄ²©ÎÄ£¬http://blog.darkthread.net/blogs/darkthreadtw/archive/2008/10/19/system-data-oracleclient-requires-oracle-client-software-version-8-1-7.aspx£¬Ò»²¢±íʾ¸Ðл¡£
Ïà¹ØÎĵµ£º
oracle grant
ÊÚȨÓï¾ä--select * from dba_users; ²éѯÊý¾Ý¿âÖеÄËùÓÐÓû§
--alter user TEST_SELECT account lock; ËøסÓû§
--alter user TEST_SELECT account unlock; ¸øÓû§½âËø
--create user xujin identified by xujin; ½¨Á¢Óû§
--grant create tablespace to xujin; ÊÚȨ
--grant select ......
²éѯÐÇÆÚ¼¸:
select to_char(sysdate,'day') from dual;
²éѯ¼¸ºÅ:
select to_char(sysdate,'dd') from dual;
²éѯСʱÊý:
select to_char(sysdate,'hh24') from dual;
²éѯʱ¼ä:
select to_char(sysdate,'hh24:mi:ss') from dual;
²éѯÈÕÆÚʱ¼ä:
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
²é ......
•±í·ÖÇø¼¼ÊõÊÇÔÚ³¬´óÐÍÊý¾Ý¿â(VLDB)Öн«´ó±í¼°ÆäË÷Òýͨ¹ý·ÖÇø£¨patition£©µÄÐÎʽ·Ö¸îΪÈô¸É½ÏС¡¢¿É¹ÜÀíµÄС¿é£¬²¢ÇÒÿһ·ÖÇø¿É½øÒ»²½»®·ÖΪ¸üСµÄ×Ó·ÖÇø£¨sub partition£©
•Í¨¹ý¶Ô±í½øÐзÖÇø£¬¿ÉÒÔ»ñµÃÒÔϵĺô¦
–¼õÉÙÊý¾ÝË𻵵ĿÉÄÜÐÔ
–¸÷·ÖÇø¿ÉÒÔ¶ÀÁ¢±¸·ÝºÍ»Ö¸´£¬ÔöÇ¿ÁËÊý¾Ý¿âµÄ¿É¹ÜÀíÐÔ
......
ÎÄÕÂÒ»£ºSCNÊÇʲô£¿The System Change Number
system change number (SCN)ÊÇÒ»¸ö·Ç³£ÖØÒªµÄ±ê¼Ç£¬OracleʹÓÃËüÀ´±ê¼ÇÊý¾Ý¿âÔÚ¹ýȥʱ¼äÄÚµÄ״̬ºÍ¹ì¼£¡£
OracleʹÓÃSCNÀ´±£´æËùÓб仯µÄ¹ì¼£¡£SCNÊÇÒ»¸öÂ߼ʱÖÓÀ´¼Ç¼Êý¾Ý¿âʼþ¡£Ëü·Ç³£µÄÖØÒª£¬²¢²»ÊÇÖ»ÊÇΪÁ˻ָ´¡£
SCNÓеãÀàËÆÓÚsequence£¬OracleÔÚSGAÖÐÔ ......
36.ADD_MONTHS
¡¡¡¡Ôö¼Ó»ò¼õÈ¥Ô·Ý
¡¡¡¡SQL> select to_char(add_months(to_date(199912,yyyymm),2),yyyymm) from dual;
¡¡¡¡TO_CHA
¡¡¡¡------
¡¡¡¡200002
¡¡¡¡SQL> select to_char(add_months(to_date(199912,yyyymm),-2),yyyymm) from dual;
¡¡¡¡TO_CHA
¡¡¡¡------
¡¡¡¡199910
¡¡¡¡37.LAST_DAY
¡¡¡¡·µ» ......