ORACLEÖеÄʱÇø£¨time zone£©
oracle¶ÔʱÇøµÄÖ§³Ö±È½ÏÍêÃÀÁË£¬ÓÐtimestamp with time zoneºÍtimestamp with local time zoneÁ½ÖÖÊý¾ÝÀàÐÍ¡£Ëùνtimestamp with time zone£¬Ò²¾ÍÊÇ°ÑʱÇøÐÅÏ¢±£´æÔÚÁÐÊý¾ÝÖУ¬¶øtimestamp with local time zone£¬»á½«Óû§ÊäÈëµÄʱ¼äת»»ÎªÊý¾Ý¿â·þÎñÆ÷ËùÔÚʱÇøµÄʱ¼ä£¬±£´æÔÚÁÐÖУ¬ÕâÑùÄÜÉÔÉÔ¼õÉÙÒ»µã±£´æµÄÊý¾ÝÁ¿¡£ÒòΪtimestamp with local time zoneÖв»»á±£´æʱÇøÐÅÏ¢£¨Ê±ÇøÓëÊý¾Ý¿â·þÎñÆ÷ËùÔÚʱÇøÏàͬ£©£¬ËùÒÔµ±Êý¾Ý¿âÖÐÓбí´æÔÚtimestamp with local time zone ʱ£¬Êý¾Ý¿â²»Äܸü¸ÄʱÇø¡£Èç¹ûÓпÉÄܽ«Êý¾Ý¿â¿çʱÇøǨÒÆ£¬×îºÃ»¹ÊÇÓÃtimestamp with time zoneºÃÁË£¬¸ÃÊý¾ÝÀàÐÍ×î¾ßÓÐÀ©Õ¹ÐÔ¡£
˵ÆðʱÇø£¬²»µÃ²»Ìá¼°¼¸¸ö¹ØÓÚtimestampµÄº¯ÊýÁË£º
systimestamp Êý¾Ý¿â·þÎñÆ÷µ±Ç°µÄʱ¼äÒÔ¼°Ê±Çø£»
localtimestamp ¿Í»§¶Ëµ±Ç°Ê±¼ä£¬²»°üº¬Ê±Çø£»
current_timestamp ¿Í»§¶Ëµ±Ç°Ê±Çø£¬°üº¬¿Í»§¶ËµÄʱÇø¡£
˵ÁËÕâô¶à£¬ÏÂÃæ¿´¸öÀý×Ó£¬ÎªÁË¿´µ½Àý×ÓµÄЧ¹û£¬ÎÒÃÇÊ×ÏÈÐ޸Ŀͻ§¶ËµÄʱÇøΪÎ÷ÎåÇø£¨ÃÀ¹ú¶«²¿Ê±¼ä£©£¬ÊµÑ鵱ǰʱ¼äΪ±±¾©Ê±¼ä2010Äê01ÔÂ03ÈÕÔ糿11µã×óÓÒ¡£
alter session set TIME_ZONE='-5:00';
È»ºóн¨Ò»¸ö±í
CREATE TABLE TEST(ID number(2),
time_tz timestamp with time zone,
time_lc_tz timestamp with local time zone);
Ïò±íÖвåÈ뼸Ðп´¿´£º
insert into test
values (1,localtimestamp,localtimestamp);
insert into test
values (2,systimestamp,systimestamp);
insert into test
values (3,current_timestamp,current_timestamp);
insert into test
values (3,current_timestamp,current_timestamp);
insert into test
values(4,to_timestamp('2010-01-03 11:09:00','YYYY-MM-DD HH24:MI:SS'),
to_timestamp('2010-01-03 11:09:00','YYYY-MM-DD HH24:MI:SS'));
insert into test
values(5,to_timestamp_tz('2010-01-03 11:09:00 +0:00','YYYY-MM-DD HH24:MI:SS TZH:TZM'),
to_timestamp_tz('2010-01-03 11:09:00 +0:00','YYYY-MM-DD HH24:MI:SS TZH:TZM'));
Ìá½»²åÈëµÄÊý¾Ý£ºCOMMIT;
ÔÚµ±Ç°session²éѯ¿´¿´£º£¨µ±Ç°sessionʱÇøΪ-5:00)
select * from test;
IDTIME_TZTIME_LC_TZ
1
02-1ÔÂ -10 09.58.45.106141 ÏÂÎç -05:00
02-1ÔÂ -10 09.58.45.106141 ÏÂÎç
2
03-1ÔÂ -10 10.58.45.130013 ÉÏÎç +08:00
02-1ÔÂ -10 09.58
Ïà¹ØÎĵµ£º
High Water Mask£¨×î¸ßˮλÏߣ¬ºÇºÇ£©ÒÔϼò³ÆHWM
deleteÃüÁî²»Ó°Ïì±í×ÔÉíµÄHWM£¬¼´±íÖеÄÇø¿é»áËæ×ÅÊý¾ÝÁ¿µÄÔö´ó¶øÔö´ó£¬µ«É¾³ýÊý¾Ýʱ£¬
Çø¿é²¢²»»á¼õÉÙ£¬µ±²éѯʱ£¬»á°´ÕÕHWMµÄ±ê׼ȥɨÃè±í£¬¼´Ê¹Ê¹ÓÃdelete½«±íÊý¾ÝÇå¿Õ£¬²éѯʱ£¬
ÒÀ¾É»áɨÃèHWMµÄÇø¿é£¬²éѯËÙ¶ÈÒ²¾ÍºÍûʹÓÃdeleteÃüÁî֮ǰÊÇÒ»ÑùµÄ£¬¶øtruncate¿ÉÒÔ½ ......
ÎÒµÄORACLE RAC INSTALL for LINUX 10.2Ñо¿
ÎÒµÄORACLE RAC INSTALL for LINUX 10.2Ñо¿
1¡¢´´½¨ÐéÄâ»ú
DB1ÐéÄâ»úÎļþĿ¼ g:\vmtest1 Îļþ´óС8G ÄÚ´æ944M£¨ÔÁÂÎÒÖ»ÓÐ2GRAM)
DB2ÐéÄâ»úÎļþĿ¼ E:\vmtest2 Îļþ´óС8G ÄÚ´æ944M
ÔÚDB1ÉÏ´´½¨¹²Ïí´ÅÅÌ£¬
E:\SHARE Îļþ´óС8G
DB2Ò²´´½¨´ÅÅÌ£¬ ......
1. ͨ¹ýv$session£¬v$locked_object²é¿´ËËø¶¨ÁË×ÊÔ´
select t1.sid, t1.serial#, t1.username, t1.logon_time
from v$session t1 , v$locked_object t2
where t1.sid = t2.session_id
order by t1.logon_time
......
Èí¼þ»·¾³:
1¡¢Windows XP + Oracle 10g
2¡¢Oracle°²×°Â·¾¶Îª:d:\Oracle
ʵÏÖ·½·¨:
1¡¢¿ªÊ¼£>ÉèÖã>¿ØÖÆÃæ°å£>¹ÜÀí¹¤¾ß£>·þÎñÍ£Ö¹ËùÓÐOracle·þÎñ;
2¡¢¿ªÊ¼£>³ÌÐò£>Oracle – OraDb10g_home1>Oracle Installation Products£> Universal Installer жװËùÓÐOracle²úÆ·,µ«Universal I ......