Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE Ê±Çø

ÉÌÒµºÍÊý¾Ý¿âºÜ¶àʱºò±ØÐë¿çÊ±Çø¹¤×÷£¬´Ó9i¿ªÊ¼£¬oracle»·¾³¿ªÊ¼ÓÐÁËÊ±ÇøÒâʶ£¬Í¨¹ýÖ¸¶¨Êý¾Ý¿âµÄÊ±ÇøºÍʹÓÃTIMESTAMP WITH TIME ZONEºÍTIMESTAMP WITH LOCAL TIME ZONEÊý¾ÝÀàÐÍÀ´ÊµÏָù¦ÄÜ¡£
TIMESTAMP WITH TIME ZONE²»»á´æ´¢Êý¾Ý¿âÊ±Çø£¬µ«ÊÇÓÐÒ»¸öָʾÓÃÀ´ËµÃ÷¸Ãʱ¼äËùʹÓõÄÊ±Çø¡£TIMESTAMP WITH LOCAL TIME ZONE»áͬʱ´æ´¢Êý¾Ý¿âÊ±Çø£¬²¢ÇÒ»á¸ù¾Ý²éѯ¿Í»§¶ËµÄÊ±Çø½øÐÐÏàÓ¦µÄת»»¡£
Êý¾Ý¿âÊ±Çø¿ÉÒÔÔÚ´´½¨Ê±ÔÚcreate databaseÃüÁîÖÐÉèÖã¬Ò²¿ÉÒÔʹÓÃalter database set TIME_ZONE=...À´Ð޸ġ£Èç¹ûûÓÐÌØ±ðµÄÖ¸¶¨£¬Ä¬Èϵģ¬Êý¾Ý¿â½«×ñ´ÓÖ÷»ú²Ù×÷ÏµÍ³Ê±ÇøÉèÖ㬻òÕßÈ¡×Ô»·¾³±äÁ¿ORA_STDZ¡£ËùÓÐÖ§³ÖµÄÊ±Çø¼Ç¼ÔÚV$TIMEZONE_NAMES¶¯Ì¬ÐÔÄܱíÖС£Ê±ÇøÓÐÈýÖÖ±íʾ·½·¨£¬È«Ãû¡¢ËõдºÍÏà¶ÔÓÚ±ê׼ʱ¼ä£¨¸ñÁÖÍþÖÎʱ¼ä£©µÄ¹Ì¶¨Æ«ÒÆ,±ÈÈç±ê׼ʱ¼äÏàÓ¦µÄÈýÖÖ±íʾ·½·¨·Ö±ðΪ£ºEtc/Greenwich¡¢GMTºÍ+00:00¡£
Oracle 9i ¿ªÊ¼¶àÁË 3 ¸ö¹ØÓÚʱ¼äµÄÊý¾ÝÀàÐÍ£ºTIMESTAMP [(precision)] TIMESTAMP [(precision)] WITH TIME ZONE TIMESTAMP [(precision)] WITH LOCAL TIME ZONE£¬ÆäÖÐ TIMESTAMP [(precision)] WITH TIME ZONE ±£´æÁËÊ±ÇøÐÅÏ¢¡£
1. Oracle µÄÊ±ÇøÉèÖÃ
Oracle µÄÊ±Çø¿ÉÒÔ·ÖΪÁ½ÖÖ£¬Ò»ÖÖÊÇÊý¾Ý¿âµÄÊ±Çø£¬Ò»ÖÖÊÇ session Ê±Çø£¬Ò²¾ÍÊǿͻ§¶ËÁ¬½ÓʱµÄÊ±Çø£¨¾­¹ýʵÑ飬Á¬½ÓÒÔºóÔÙÐ޸Ŀͻ§¶ËµÄÊ±Çø£¬session µÄÊ±Çø²»»á¸ü¸Ä£©¡£
Êý¾Ý¿âµÄÊ±ÇøÔÚ´´½¨Êý¾Ý¿âʱ¿ÉÒÔͨ¹ýÔÚ create database Óï¾äÖмÓÉÏ SET TIME_ZONE = ' { { + | - } hh : mi | time_zone_region } ' À´Ö¸¶¨£¬Èç¹û£¬²»Ö¸¶¨£¬Ä¬ÈÏÊǰ´ÕÕÊý¾Ý¿âËùÔڵIJÙ×÷ÏµÍ³Ê±ÇøÀ´É趨µÄ¡£´´½¨Ö®ºó£¬¿ÉÒÔͨ¹ý alter database À´Ð޸ġ£ÆäÖÐ time_zone_region ²ÎÊý¿ÉÒÔͨ¹ý²éѯ V$TIMEZONE_NAMES ¶¯Ì¬ÊÓͼÀ´»ñµÃËùÓÐÖ§³ÖµÄÖµ¡£ÐÞ¸ÄÖ®ºó£¬ÐèÒªÖØÆôÊý¾Ý¿â²ÅÄÜÉúЧ¡£¾­³£ÓÐÈË»áÅöµ½ÎÞ·¨Ð޸ĵÄÇé¿ö£º
SQL> alter database set time_zone='+06:00';
alter database set time_zone='+06:00'
*
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE
TOM ¶Ô´ËÎÊÌâÓйý½âÊÍ£¬TIME_ZONE µÄÉ趨Ö÷ÒªÊÇΪÁË WITH LOCAL TIME ZONE£¬µ± session µÄÊ±ÇøºÍÊý¾Ý¿âµÄÊ±Çø²»Í¬Ê±£¬oracle ¸ù¾ÝÊ±ÇøµÄ²î¾àת»»µ½Êý¾Ý¿âµÄʱ¼ä£¬ÔÙ±£´æµ½Êý¾Ý¿âµÄ WITH LOCAL TIME ZONE ÀàÐÍÖУ¬ËûÊDz»±£´æÊ±ÇøµÄ£¬ËùÒÔÐèÒª TIME_ZONE À´½øÐи÷ÖÖÊ±ÇøÖ®¼äʱ¼äµÄת»»£¨WITH TIME ZONE ÀàÐͱ£´æÁËԭʼµÄÊ±Çø£¬ËùÒÔ²»ÐèÒª TIM


Ïà¹ØÎĵµ£º

½éÉÜORACLE DATA GUARD

¡¾IT168¼¼ÊõÎĵµ¡¿
     DATA GUARDµÄ×îÖ÷ÒªµÄ¹¦ÄÜÊÇÈßÔÖ¡£µ±È»¸ù¾ÝÅäÖõIJ»Í¬£¬DATA GUARD»¹¿ÉÒԾ߱¸ÒÔÏÂÌØµã£º¸ß¿ÉÓá¢ÐÔÄÜÌáÉý¡¢Êý¾Ý±£»¤ÒÔ¼°¹ÊÕϻָ´µÈ¡£
    DATA GUARD¿ÉÒÔ·ÖΪÎïÀíSTANDBYºÍÂß¼­STANDBYÁ½ÖÖ¡£¶þÕßµÄ×î´ó²î±ðÔÚÓÚ£¬ÎïÀíSTANDBYÓ¦ÓõÄÊÇÖ÷¿âµÄ¹éµµÈÕÖ¾£¬¶øÂ ......

Oracle Cursor

 1£¬Ê²Ã´ÊÇÓαꣿ
 ¢Ù´Ó±íÖмìË÷³ö½á¹û¼¯£¬´ÓÖÐÿ´ÎÖ¸ÏòÒ»Ìõ¼Ç¼½øÐн»»¥µÄ»úÖÆ¡£
   
 ¢Ú¹ØÏµÊý¾Ý¿âÖеIJÙ×÷ÊÇÔÚÍêÕûµÄÐм¯ºÏÉÏÖ´Ðеġ£
  ÓÉ SELECT Óï¾ä·µ»ØµÄÐм¯ºÏ°üÀ¨Âú×ã¸ÃÓï¾äµÄ WHERE ×Ó¾äËùÁÐÌõ¼þµÄËùÓÐÐС£ÓɸÃÓï¾ä·µ»ØÍêÕûµÄÐм¯ºÏ½Ð×ö½á¹û¼¯¡£
   &n ......

Oracle ÈýÖÖ¼¯ºÏÊý¾ÝÀàÐ͵ıȽÏ

 Oracle ÈýÖÖ¼¯ºÏÊý¾ÝÀàÐ͵ıȽÏ:
PL/SQLÖÐûÓÐÊý×éµÄ¸ÅÄËûµÄ¼¯ºÏÊý¾ÝÀàÐͺÍÊý×éÊÇÏàËÆµÄ¡£ÔÚ7.3ÒÔǰµÄ°æ±¾ÖÐÖ»ÓÐÒ»ÖÖ¼¯ºÏ£¬³ÆÎªPL/SQL±í£¬ÔÚÕâÖ®ºóÓÖÓÐÁ½ÖÖ¼¯ºÏÊý¾ÝÀàÐÍ:ǶÌ×±íºÍvarray¡£ÆäÖÐvarray¼¯ºÏÖеÄÔªËØÊÇÓÐÊýÁ¿ÏÞÖÆµÄ£¬index_by±íºÍǶÌ×±íÊÇûÓÐÕâ¸öÏÞÖÆµÄ¡£index-by±íÊÇÏ¡ÊèµÄ£¬Ò²¾ÍÊÇ˵ϱê¿ÉÒÔ²»Á¬Ðø ......

oracle forallÓï¾ä

 FORALLÓï¾äµÄÒ»¸ö¹Ø¼üÐԸĽø£¬Ëü¿É´ó´ó¼ò»¯´úÂ룬²¢ÇÒ¶ÔÓÚÄÇЩҪÔÚPL/SQL³ÌÐòÖиüкܶàÐÐÊý¾ÝµÄ³ÌÐòÀ´Ëµ£¬Ëü¿ÉÏÔÖøÌá¸ßÆäÐÔÄÜ¡£
1:
ÓÃFORALLÀ´ÔöÇ¿DMLµÄ´¦ÀíÄÜÁ¦
OracleΪOracle8iÖеÄPL/SQLÒýÈëÁËÁ½¸öеÄÊý¾Ý²Ù×ÝÓïÑÔ£¨DML£©Óï¾ä£ºBULK COLLECTºÍFORALL¡£ÕâÁ½¸öÓï¾äÔÚPL/SQLÄÚ²¿½øÐÐÒ»ÖÖÊý×é´¦Àí
£»BULK COLLE ......

¹ØÓÚOracle 01122,01110,01207µÄ´íÎóºÍ½â¾ö

 Ô­´´ÓÚ2007Äê04ÔÂ12ÈÕ£¬2009Äê10ÔÂ15ÈÕÇ¨ÒÆÖÁ´Ë¡£
windows xp£¬Êý¾Ý¿âoracle 10.2.0¡£1
ûÓб¸·Ý£¬»ù±¾ÉÏÊÇĬÈϰ²×°£¬ºÃÏñ»¹²»Êǹ鵵ģʽ
Ö¢×´£ºsqlplusÖ»ÓÐsysdbaÓû§ÄܽøÈ¥£¬ÆäËûÓû§½øÈ¥Ò»¸Å±¨£ºora-01033£ºoracleÕýÔÚ³õʼ»¯»ò¹Ø±Õ
¶øÇÒsysdbaÓû§½øÈ¥Ö®ºóÄÜÖ´ÐÐselect sysdate from dual£¬µ«ÊÇÖ´ÐÐselect use ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ