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

oracle ¹ØÓÚID×ÔÔöºÍÔÚÔ­ÓÐIDµÄ»ù´¡ÉÏ×ÔÔö

ÎÒÊǸöÐÂÊÖ,ËùÒÔÓÐЩ˵µÄ¿ÉÄܻ᲻ºÃ,Ï£ÍûÔĶÁÕâÎÄÕµÄÈ˼ûÁ°¡.
Ò»°ã¹ØÓÚID×ÔÔöµÄÍøÉ϶¼ÓÐÁ˺ܶàÁË,ºÇºÇ^ÄÇÎҾͼòµ¥µÄ˵һÏÂ: ÏÈ´´½¨±í£¬ÔÙ´´½¨ÐòÁÐ:
                  create sequence ÐòÁÐÃû
                   minvalue 1(ÉèÖÃ1Ϊ×îСֵ)
                     maxvalues 1.0E28(orcale ĬÈÏ×î´óֵΪ1.0E28)
                  start with 1  ( ³õʼֵΪ1)
                  increment by 1 (²½³¤Îª1 ,Ò²¾ÍÊÇÿ´ÎÔö¼Ó1)
                  noorder (Õâ¸öÊÇÉèÖÃΪ ²»ÅÅÐò)
                  nocycle (Õâ¸öÊÇÉèÖÃΪ ²»Ñ­»·)
                  nocache(Õâ¸öÊÇÉèÖÃΪ  ûÓлº³å)
   È»ºóÊÇ´´½¨Ò»¸ö´¥·¢Æ÷£º
             create trigger ´¥·¢Æ÷Ãû  before insert on ±íÃû for each row
             as
             begin
             select ÐòÁÐÃû.nextval into :new.id from dual;
             end;                     
   ÕâÑùÒ»¸öID×ÔÔö±í¾Í´´½¨ÁË.
  


Ïà¹ØÎĵµ£º

ÔÚIBM AIXÉÏ°²×°Oracle RAC (RS/6000)

±¾Îijö×Ô “inthirties£¨ÄÐÈËÈýÊ®£©”²©¿Í£¬×ªÔØÇëÎñ±Ø×¢Ã÷×÷Õߺͱ£Áô³ö´¦£¬Î´¾­×÷ÕßÐí¿ÉתÔØ£¬±Ø×·¾¿·¨ÂÉÔðÈΡ£
ÔÚIBM AIXÉÏ°²×°Oracle RAC (RS/6000)
Ä¿µÄ
´ËÎĵµÏò¶ÁÕßÌṩÈçºÎ°²×°Ò»¸öȺ¼¯£¬°²×°RAC£¬²¢ÔÚIBM AIX HACMP/ES (CRM) 4.4.xÉÏÆô¶¯Ò»¸öȺ¼¯Êý¾Ý¿âµÄÊÖ°ÑÊÖÖ¸µ¼Êֲᣬ¶ÔÓÚ¹ØÓÚÈκÎÕâЩ²½ÖèµÄÆäËü½ ......

½«Êý¾Ý¿âµÄSQL½Å±¾Îļþµ¼Èëµ½oracleÖÐ

#1. Ê×ÏÈÒÔ¹ÜÀíÔ±µÄÉí·ÝµÇ¼µ½oracleϵͳÖÐ
cmd;
sqlplus sys/sys as sysdba;
#2.´´½¨Óû§test,ÃÜÂëΪtest
create user test identified by test;
#3.´´½¨±í¿Õ¼ä,ÔÚDÅÌϽ¨Á¢50mµÄ±í¿Õ¼ädata_dbf
create tablespace ts_tablespace datefile 'D:\data_dbf' size 50m;
#4.ΪÓû§·ÖÅä±í¿Õ¼ä
alter user test default t ......

±±´óÇàÄñoracleѧϰ±Ê¼Ç1¡«2

    ÕâѧÆÚ×¼±¸»¨ÉÙÐíʱ¼äÑо¿Ò»ÏÂoracle£¬Ì¨Ê½»úµÄUbuntu²»Îȶ¨ÀÏ»µ£¬·ÅÆúÁËlinuxÉÏʹÓÃoracleµÄÏë·¨£¬ÔÚ×Ô¼º±Ê¼Ç±¾ÉÏ×°ÁËÒ»¸öoracle 10g express°æ±¾£¬Ñ§Ï°Ò»Ï¡£
    ±¾À´»¹ÏëÓÃÔƶËÐéÄ⻯һÏÂoracle£¬ÊµÑéʧ°Ü£¬ÀÏÀÏʵʵÈÃoracleÇÖÈëÎÒµÄϵͳ¡£¡£¡£囧
    °²×°Íê ......

oracleµ÷ÓÃjavaÀà±éÀú´ÅÅÌÎļþ

ÀûÓÃoracle×Ô´øµÄutl_file°ü¿ÉÒÔ·ÃÎÊ´ÅÅÌÎļþ£¬µ«ÓиöÏÞÖÆ--ÎÞ·¨·ÃÎÊÎļþ¼Ð£¿Ê²Ã´Òâ˼ÄØ£¿¾ÍÊÇ˵oracleÖ»ÄÜ·ÃÎÊÖ¸¶¨µÄÎļþ£¬¶ø²»ÄÜ·ÃÎÊÎļþ¼ÐϵÄδ֪Îļþ¡£ËùÒÔ£¬Èç¹ûҪͨ¹ýoracleÈ¥±éÀúijָ¶¨Â·¾¶ÏµÄËùÓÐÎļþ£¬sorry, impossible! µ«ÊÇ£¬ÓÐÒ»ÖÖÌæ´ú·½°¸¿ÉÒÔÖúÄãÒ»±ÛÖ®Á¦£¡
ÖÚËùÖÜÖªjavaÖ®FileÀàÖ¸ÏòµÄ¿ÉÒÔÊÇĿ¼Ҳ¿ÉÒÔÊ ......

±±´óÇàÄñoracleѧϰ±Ê¼Ç6

Ëø
²éѯÆäËûÓû§µÄ±í <Óû§Ãû.±íÃû>
Ëø¶¨Ä£Ê½£º
Ðм¶Ëø
Ðб»ÅÅËûÐÔËø¶¨
ÔÚijÐеÄËø±»ÊÍ·Å֮ǰ£¬ÆäËûÓû§²»ÄÜÐ޸ĴËÐÐ
ʹÓÃcommit rollbackÃüÁîÊÍ·ÅËø
»ñÈ¡Ðм¶Ëø
ʹÓÃinsert¡¢updateÓï¾ä£¬×Ô¶¯ÉÏÐм¶Ëø
ʹÓÃselect...for update [of ÁÐÃû] Óï¾ä×Ô¶¯»ñÈ¡Ðм¶Ëø
ÔÚ±íµÄÒ»Ðлò¶àÐзÅÖÃÅÅËûËø£¬ÓÃÓÚ·ÀÖÎÆäË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ