Óà Navicat for Oracle ¹ÜÀí Oracle10g/11g Êý¾Ý¿â
Navicat for xxx ÊÇÒ»¸öÓÅÐãµÄÊý¾Ý¿â¹ÜÀí¿Í»§¶Ë£¬ÓÐ MySQL¡¢Oracle µÈ°æ±¾¡£½¨Òé´ó¼Ò×îºÃÓà Enterprise °æ±¾£¬¹¦ÄÜÈ«ÃæһЩ£¬µ«½ÏÖ®ÓÚÃâ·ÑµÄ Lite °æ£¬ÆóÒµ°æ¿ÉÊÇÒª»¨Òø×ÓÂòµÄ¡£
°²×° Navicat for Oracle ºó£¬Ê×ÏÈÐèÒª½¨Ò»¸ö“Á¬½Ó”£¬×÷Ϊij¸ö¹ÜÀíÈÎÎñµÄ±êʶ£¬ÒòΪ×÷Ϊ¿Í»§¶Ë£¬Ëü¿ÉÒÔÁ¬½ÓºÍ¹ÜÀíºÜ¶àµÄÊý¾Ý¿â·þÎñÆ÷¡£
ºÍ for MySQL °æ±¾²»Í¬µÄÊÇ£¬Oracle ¹ÜÀíÓÐËüµÄÌØÊâÐÔ¡£Oracle ±ØÐëͨ¹ýËüµÄ OCI ´úÀíº¯Êý¿âÓëÊý¾Ý¿â½øÐÐÁ¬½Ó£¬Navicat µ±È»Ò²ÈƲ»¹ýÕâÒ»µã£¬ËùÒÔ±ØÐëÊ×ÏȽøÐÐ Oracle µÄ oci ÉèÖá£ÅäÖõķ½·¨ÊÇ£¬ÔËÐÐ Navicat µÄ²Ëµ¥“¹¤¾ß/Ñ¡Ï¬ÅäÖÓÆäËü”·ÖÀàÏ嵀 OCI ²ÎÊý£¬°Ñ OCIÀà¿â£¨¶ÔÓ¦oci.dll£©ÎļþµÄ·¾¶ÊäÈ룬°´“È·¶¨”±£´æ¡£
µ«½ö½öÕâÑù×ö»¹²»¹»£¬ÒòΪÕâÒ»Çж¼ÒÀÀµÓÚÄǸö Oracle µÄ“¼´Ê±¿Í»§¶Ë”Èí¼þ°ü£¬ËùÒÔÐèÒªÏÈÏÂÔØÄǸö InstantClient Èí¼þ°ü£¬ÉÏÃæ˵µÄ oci.dll Îļþ¾ÍÔÚÕâ¸ö°üÖС£ÏÂÔظÃÈí¼þ°üºó½âѹµ½Ò»¸öÎļþ¼Ð£¬»¹ÐèÒª×öµÄÊÇ£¬Ìí¼Ó»·¾³±äÁ¿ TNS_ADMIN ÈÃËüµÄÖµµÈÓÚÕâ¸öÎļþ¼ÐµÄ·¾¶£¬ÔÙÔÚϵͳ±äÁ¿ path Ç°¼ÓÉÏÕâ¸öÎļþ¼ÐµÄ·¾¶¡£ÐÞ¸ÄÕâЩÅäÖòÎÊýºó£¬¿ÉÒÔ²»ÓÃÆô¶¯ Windows ϵͳ¡£
ÔÙ¾ÍÊÇÐÞ¸Ä×¢²á±í·¾¶ HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE Ï嵀 NLS_LANG ¼üÖµ£¬Õâ¸ö¼üÖµÏÖÔÚÊÇ NA£¬Òò´Ë將 NLS_LANG µÄÖµ¸ÄΪ SIMPLIFIED CHINESE_CHINA.ZHS16GBK£¬ºÍ Oracle Êý¾Ý¿â·þÎñÆ÷ÉϵÄÒ»Ö¡£»¹¼ûÓÐÈ˸ɴà°ÑÕâ¸ö NLS_LANG ¼üɾ³ý»ò¸ÄÃû£¬±¾È˲âÊÔÒ²ÊÇ¿ÉÒԵģ¬µ«²»ÖªµÀ»á²»»á´øÀ´±ðµÄÎÊÌâ¡£
ÒÔÉÏËù˵µÄ Oracle InstantClient ÅäÖ÷½·¨£¬±¾È˵ÄÎÄÕ¡¶Windows 2003 Ï PHP5.2.5 + Apache2.2.8 + Oracle10g/11g µÄÅäÖá·£¨http://blog.why100000.com/?p=581£©ÀïÓиüÏêϸµÄ˵Ã÷£¬ÕâÀïÔÙÖظ´Ò»Ï¡£
OCI ÅäÖúú󣬾ͿÉÒÔÅäÖà Navicat µÄÁ¬½ÓÁË¡£Á¬½ÓÀàÐÍÓÐ Basic ºÍ TNS Á½ÖÖ£¬µ«±¾ÈËÎÞ·¨Åäͨ Basic ÀàÐÍ£¬¾ÍÅäÖà TNS Á¬½Ó£¬ÕâÐèÒªÔÚ¼´Ê±¿Í»§¶ËÎļþ¼ÐÏ·ÅÒ»¸öÃû×ÖΪ tnsnames.ora µÄÅäÖýâÎöÎļþ£¬ÎļþµÄ¸ñʽÈçÏ£º
# TNSNAMES.ORA Network Configuration File: ……
ORCL10 =
(DESCRIPTION =
&nbs
Ïà¹ØÎĵµ£º
1:pfileºÍspfile
ÔÚ9i֮ǰ£¬²ÎÊýÎļþÖ»ÓÐÒ»ÖÖ£¬ËüÊÇÎı¾¸ñʽµÄ£¬³ÆΪpfile£¬ÔÚ9i¼°ÒÔºóµÄ°æ±¾ÖУ¬ÐÂÔöÁË·þÎñÆ÷²ÎÊýÎļþ,³ÆΪspfile,ËüÊǶþ½øÖƸñʽµÄ¡£ÕâÁ½ÖÖ²ÎÊýÎļþ¶¼ÊÇÓÃÀ´´æ´¢²Î ÊýÅäÖÃÒÔ¹©oracle¶ÁÈ¡µÄ£¬µ«Ò²Óв»Í¬µã£¬×¢ÒâÒÔϼ¸µã£º
1)pfileÊÇÎı¾Îļþ£¬spfileÊǶþ½øÖÆÎļþ£»
2)¶ÔÓÚ²ÎÊýµÄÅäÖã¬pfile¿ÉÒÔÖ±½ÓÒÔÎ ......
1¡¢ÓÃdblinkÁ´½Óoracle
£¨1£©Óëƽ̨Î޹صÄд·¨£º
create public database
link cdt connect to apps
identified by apps using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.205.100)(PORT = 1541))
)
(CONNECT_DATA =
(SERVICE_NAME = CDT)
)
)'
£¨2£©¿ÉÒÔ½«µ¥ÒýºÅÄÚµÄÄÚÈÝ ......
1¡¢select TIMESTAMP'2009-11-03 09:26:50.124' from dual --ĬÈϺÁÃë±£´æÁùλ
2¡¢´ËÓï¾äÖ»ÄÜÔÚ·þÎñÆ÷¶ËÔËÐУ¬Èç¹ûÖ´ÐÐÒÔϲÙ×÷£¬ÔòÔÚ²åÈëoracleʱ£¬¿ÉÒÔÖ±½Óдnls_date_formatÉ趨µÄ¸ñʽ£¬µ«ÊÇÖ»ÄÜÕë¶ÔÒ»´Î»æ»£¬Èç¹û¹Øµô´°¿ÚÔòʧЧ¡£
alter session set nls_d ......
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’ ’) space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32
2.CHR
¸ø³öÕ ......
ÔÚwindowsÏÂsqlplusÍêÈ«Õý³££¬¿ÉÊǵ½linuxÏ£¬sqlplusÖÐÎÄÏÔʾ¾Í³öÎÊÌâÁË£¬×ÜÊÇÏÔʾ“??”£¬Õâ¸öÎÊÌâÓÖÔõô½â¾öÄØ£¿
¾¹ýÔÚÍøÂçÉϲé×ÊÁÏ£¬ÒÔ¼°³¢ÊÔ£¬µÃµ½µÄ½â·¨ÈçÏ£º
ÆäʵºÜ¼òµ¥ÎÒÃÇÖ»ÒªÉèÖÃÍ˳ösqlplus,ÉèÖÃÏàÓ¦µÄ»·¾³±äÁ¿NLS_LANG
export NLS_LANG="SIMPLI ......