Oracle´´½¨×ÔÔö×ֶη½·¨ ORACLE SEQUENCEµÄ¼òµ¥½éÉÜ
ÏȼÙÉèÓÐÕâôһ¸ö±í£º
create
table
S_Depart (
DepartId
INT
not
null
,
DepartName NVARCHAR2(
40
)
not
null
,
DepartOrder
INT
default
0
,
constraint
PK_S_DEPART
primary
key
(DepartId)
);
ÔÚoracleÖÐsequence¾ÍÊÇËùνµÄÐòÁкţ¬Ã¿´ÎÈ¡µÄʱºòËü»á×Ô¶¯Ôö¼Ó£¬Ò»°ãÓÃÔÚÐèÒª°´ÐòÁкÅÅÅÐòµÄµØ·½¡£
1¡¢Create Sequence
ÄãÊ×ÏÈÒªÓÐCREATE SEQUENCE»òÕßCREATE ANY SEQUENCEȨÏÞ£¬
CREATE SEQUENCE emp_sequence
INCREMENT BY 1 -- ÿ´Î¼Ó¼¸¸ö
START WITH 1 -- ´Ó1¿ªÊ¼¼ÆÊý
NOMAXvalue -- ²»ÉèÖÃ×î´óÖµ
NOCYCLE -- Ò»Ö±ÀÛ¼Ó£¬²»Ñ»·
CACHE 10; --ÉèÖûº´æcache¸öÐòÁУ¬Èç¹ûϵͳdownµôÁË»òÕßÆäËüÇé¿ö½«»áµ¼ÖÂÐòÁв»Á¬Ðø£¬Ò²¿ÉÒÔÉèÖÃΪ---------NOCACHE
Õë¶ÔS_Depart´´½¨µÄsequenceÈçÏ£º
create
sequence S_S_DEPART
minvalue
1
maxvalue
999999999999999999999999999
start
with
1
increment
by
1
nocache;
Ò»µ©¶¨ÒåÁËemp_sequence£¬Äã¾Í¿ÉÒÔÓÃCURRVAL£¬NEXTVAL
CURRVAL=·µ»Ø sequenceµÄµ±Ç°Öµ
NEXTVAL=Ôö¼ÓsequenceµÄÖµ£¬È»ºó·µ»Ø sequence Öµ
±ÈÈ磺
emp_sequence.CURRVAL
emp_sequence.NEXTVAL
¿ÉÒÔʹÓÃsequenceµÄµØ·½£º
- ²»°üº¬×Ó²éѯ¡¢snapshot¡¢VIEWµÄ SELECT Óï¾ä
- INSERTÓï¾äµÄ×Ó²éѯÖÐ
- NSERTÓï¾äµÄvalueSÖÐ
- UPDATE µÄ SETÖÐ
¿
Ïà¹ØÎĵµ£º
author£ºskate
time£º2010/03/04
oracleÊý¾Ý¿â¼¶±ðÓÅ»¯·ÖÎö¹¤¾ß½éÉÜ
µ±ÎÒÃǶÔÊý¾Ý¿âÓÅ»¯Õï¶Ïʱ£¬ÐèÒªÊÕ¼¯ÏàÓ¦µÄÐÅÏ¢ÒÔ¹©²Î¿¼£¬´Ó¸öÈ˵ÄʹÓþÑéÀ´Ëµ£¬ÕâÖÖͳ¼ÆÊý¾Ý·ÖΪÁ½´óÀà
Ò»ÀàÊÇÊý¾Ý¿â¼¶±ðµÄͳ¼ÆÐÅÏ¢
¶þÀàÊÇos¼¶±ðµÄͳ¼ÆÐÅÏ¢
ÏÂÃæ¾Í·Ö±ð½éÉÜÔÚ²»Í¬µÄ¼¶±ðÏ£¬³£ÓÃʲô¹¤¾ßÀ´ÊÕ¼¯ÐÅÏ¢°ïÖúÓÅ»¯Õï¶Ï
Ê×ÏÈÊÇoracleÊý¾ ......
·1979ÄêµÄÏļ¾£¬RSI·¢²¼ÁËOracleµÚ¶þ°æ
·1983Äê3Ô£¬RSI·¢²¼ÁËOracleµÚÈý°æ
´ÓÏÖÔÚÆðOracle²úÆ·ÓÐÁËÒ»¸ö¹Ø¼üµÄÌØÐÔ:¿ÉÒÆÖ²ÐÔ
·1984Äê10Ô£¬Oracle·¢²¼Á˵Ú4°æ²úÆ·
ÕâÒ»°æÔö¼ÓÁ˶ÁÒ»ÖÂÐÔÕâ¸öÖØÒªÌØÐÔ
·1985Ä꣬Oracle·¢²¼ÁË5.0°æ
Õâ¸ö°æ±¾ËãµÃÉÏÊÇOracleÊý¾Ý¿âµÄÎȶ¨°æ±¾¡£ÕâÒ²ÊÇÊ ......
Õª Òª£º±¾ÎÄÌÖÂÛÁËOracleºÍSQL ServerµÄÔÚÊÂÎñ´¦ÀíÉϵÄÇø±ð£¬²¢·ÖÎöÁËÆäʵÏÖ»úÖƵIJîÒì¡£
¹Ø¼ü´Ê£ºOracle£»SQL Server£»ÊÂÎñ£»ÊÂÎñ¸ôÀ뼶±ð£»DDL¡£
ÊÂÎñ´¦ÀíÊÇËùÓдóÐÍÊý¾Ý¿â²úÆ·µÄÒ»¸ö¹Ø¼üÎÊÌ⣬¸÷Êý¾Ý¿â³§É̶¼ÔÚÕâ¸ö·½Ã滨·ÑÁ˺ܴó¾«Á¦£¬²»Í¬µÄÊÂÎñ´¦Àí·½Ê½»áµ¼ÖÂÊý¾Ý¿âÐÔÄܺ͹¦ÄÜÉϵľ޴ó²îÒì¡£
ÊÂÎñ´¦ÀíÒ²ÊÇÊý¾Ý¿â¹Ü ......
Ò». ¼ì²é¹²ÏíÉ豸
Ò»°ãÇé¿öÏ£¬ ´æ·ÅOCR ºÍ Voting Disk µÄOCFS2 »òÕßraw ¶¼ÊÇ×Ô¶¯Æô¶¯µÄ¡£ Èç¹ûËûÃÇûÓÐÆô¶¯£¬RAC ¿Ï¶¨ÊÇÆô¶¯²»Á˵ġ£
1.1 Èç¹ûʹÓÃocfs2µÄ£¬¼ì²éocfs2 ״̬
/etc/init.d/o2cb status
ÔÚ¹ÒÔØ֮ǰ£¬/etc/init.d/o2cb st ......