СÒéOracleÍâ¼üÔ¼ÊøÐÞ¸ÄÐÐΪ£¨Ò»£©
OracleµÄÍâ¼üÓÃÀ´ÏÞÖÆ×Ó±íÖвο¼µÄ×ֶεÄÖµ£¬±ØÐëÔÚÖ÷±íÖдæÔÚ¡£¶øÇÒÔÚÖ÷±íµÄ¼Ç¼·¢Éú±ä»¯µ¼ÖÂÍâ¼ü²Î¿¼Î¨Ò»Ô¼ÊøÖµ·¢ÉúÁ˱仯ʱ£¬¶¨ÒåÁËһϵÁеĶ¯×÷¡£ ÔÚSQL92±ê×¼Öж¨ÒåÁ˼¸ÖÖÍâ¼ü¸Ä±äºó£¬ÈçºÎ´¦Àí×Ó±í¼Ç¼µÄ¶¯×÷£¬ÆäÖаüÀ¨£º
ÏÞÖÆRestrict£ºÕâÖÖ·½Ê½²»ÔÊÐí¶Ô±»²Î¿¼µÄ¼Ç¼µÄ¼üÖµÖ´Ðиüлòɾ³ýµÄ²Ù×÷£»ÖÃΪ¿ÕSet to null£ºµ±²Î¿¼µÄÊý¾Ý±»¸üлòÕßɾ³ý£¬ÄÇôËùÓвο¼ËüµÄÍâ¼üÖµ±»ÖÃΪ¿Õ£»
ÖÃΪĬÈÏÖµSet to default£ºµ±²Î¿¼µÄÊý¾Ý±»¸üлòÕßɾ³ý£¬ÄÇôËùÓвο¼ËüµÄÍâ¼üÖµ±»ÖÃΪһ¸öĬÈÏÖµ£»
¼¶ÁªCascade£ºµ±²Î¿¼µÄÊý¾Ý±»¸üУ¬Ôò²Î¿¼ËüµÄֵͬÑù±»¸üУ¬µ±²Î¿¼µÄÊý¾Ý±»É¾³ý£¬Ôò²Î¿¼ËüµÄ×Ó±í¼Ç¼Ҳ±»É¾³ý£»
²»×ö²Ù×÷No action£ºÕâÖÖ·½Ê½²»ÔÊÐí¸üлòɾ³ý±»²Î¿¼µÄÊý¾Ý¡£ºÍÏÞÖÆ·½Ê½µÄÇø±ðÔÚÓÚ£¬ÕâÖÖ·½Ê½µÄ¼ì²é·¢ÉúÔÚÓï¾äÖ´ÐÐÖ®ºó¡£OracleĬÈϲŻáµÄ·½Ê½¾ÍÊÇÕâÖÖ·½Ê½¡£
OracleÃ÷È·Ö§³ÖµÄ·½Ê½°üÀ¨No action¡¢Set to nullºÍCascade.¶ÔÓÚSet to DefaultºÍRestrict£¬OracleµÄÔ¼ÊøÀàÐͲ¢²»Ö±½ÓÖ§³Ö£¬²»¹ý¿ÉÒÔͨ¹ý´¥·¢Æ÷À´ÊµÏÖ¡£
¼òµ¥¿´Ò»ÏÂOracleµÄĬÈÏ´¦Àí·½Ê½No action£º
SQL> CREATE TABLE T_P (ID NUMBER, NAME VARCHAR2(30));
±íÒÑ´´½¨¡£
SQL> ALTER TABLE T_P ADD PRIMARY KEY (ID);
±íÒѸü¸Ä¡£
SQL> CREATE TABLE T_C (ID NUMBER, FID NUMBER, NAME VARCHAR2(30));
±íÒÑ´´½¨¡£
SQL> ALTER TABLE T_C ADD CONSTRAINT FK_T_C
2 FOREIGN KEY (FID)
3 REFERENCES T_P (ID);
±íÒѸü¸Ä¡£
SQL> INSERT INTO T_P VALUES (1, 'A');
ÒÑ´´½¨ 1 ÐС£
SQL> INSERT INTO T_P VALUES (2, 'B');
ÒÑ´´½¨ 1 ÐС£
SQL> INSERT INTO T_C VALUES (1, 1, 'A');
ÒÑ´´½¨ 1 ÐС£
SQL> COMMIT;
Ìá½»Íê³É¡£
¶ÔÓÚNo Action²Ù×÷¶øÑÔ£¬Èç¹ûÖ÷¼üµÄ¼Ç¼±»Íâ¼üËù²Î¿¼£¬ÄÇôÖ÷¼ü¼Ç¼ÊÇÎÞ·¨¸üлòɾ³ýµÄ¡£
SQL> DELETE T_P WHERE ID = 1;
DELETE T_P WHERE ID = 1
*µÚ 1 ÐгöÏÖ´íÎó:
ORA-02292: Î¥·´ÍêÕûÔ¼ÊøÌõ¼þ (YANGTK.FK_T_C) - ÒÑÕÒµ½×ӼǼÈÕÖ¾
SQL> UPDATE T_P SET ID = 3 WHERE ID = 1;
UPDATE T_P SET ID = 3 WHERE ID = 1
*µÚ 1 ÐгöÏÖ´íÎó:
ORA-02292: Î¥·´ÍêÕûÔ¼ÊøÌõ¼þ (YANGTK.FK_T_C) - ÒÑÕÒµ½×ӼǼÈÕÖ¾
SQL> DELETE T_P WHERE ID = 2;
ÒÑɾ³ý 1 ÐС£
²»¹ýNo ActionÓÖºÍRestrict²Ù×÷ÓÐËùÇø±ð£¬No ActionÔÊÐíÓû§Ö´ÐÐÓï¾ä£¬ÔÚÓï¾äÖ´ÐÐÖ®ºó£¬»òÕßÊÂÎñ½áÊøµÄʱºò²Å»á
Ïà¹ØÎĵµ£º
Ò»:oracle°æ±¾½éÉÜ:
oracle8
oracle8i ±íʾ´Ëʱoracle¹«Ë¾½ø¾ü»¥ÁªÍø,i´ú±íInternet
oracle9iºÍoracle8iÀàËÆ
oracle10g°üÀ¨ÏÖÔÚµÄ11gʹÓÃÁËÍø¸ñ¼ÆËã,g´ú±ígrid.
¶þ:oracle10g·þÎñ½éÉÜ:
OracleDBConsoleorcl Õâ¸öÊDzÉÓÃä¯ÀÀÆ÷ʹÓõÄoracleÆóÒµ¹ÜÀíÆ÷ (Ò²¾ÍÊÇÄã°²×°µ¯³öµÄÄǸöÍøÒ³)
OracleOraDb10g_home1iSQ ......
ÁгöÅäÖõÄËùÓÐÊý¾Ý¿â
[root@node1 ~]# srvctl config database
NOVADB
ËùÓÐʵÀýºÍ·þÎñµÄ״̬
[root@node1 ~]# srvctl status database -d NOVADB
Instance NOVADB1 is running on node node1
Instance NOVADB2 is running on node node2
µ¥¸öʵÀýµÄ״̬
[root@node1 ~]# srvctl status instance -d NOVADB -i NOVA ......
×÷ÕߣºChris Schalk
ÇáËɹ¹½¨Ò»¸ö»ì´îÓ¦ÓóÌÐò£¬ÒÔʹÓà Oracle XML DB ½« Oracle Êý¾ÝÓë Google Maps API ¼¯³É¡£
2007 Äê 8 Ô·¢²¼
ÕýÈçÄúÖªµÀµÄÄÇÑù£¬Ðí¶àÄêÒÔÇ°£¬Oracle ¾ÍÄܹ»´ÓÊý¾Ý¿â¼´Ê±Éú³É XML¡£³ýÁË´Ó Oracle Êý¾Ý¿âÉú³É XML£¬»¹¿ÉÒÔʹÓöàÖÖÓïÑÔ£¨Èç Java Servlets ºÍ JDBC£©½«Éú³ÉµÄÊý¾Ý XML ·¢²¼µ½ Web¡£ ......
1 ¡¢´´½¨Óû§ºÍ×é
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
2¡¢ÅäÖÃOSºËÐIJÎÊý
1£©±à¼Îļþ /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmm ......
·½·¨Ò»
µÚÒ»²½£ºµÇÈësql/plus Ö´ÐÐÃüÁÎÞÏȺó˳Ðò£©
set time on; (˵Ã÷£º´ò¿ªÊ±¼äÏÔʾ£©
set autotrace on; (˵Ã÷£º´ò¿ª×Ô¶¯·ÖÎöͳ¼Æ£¬²¢ÏÔʾSQLÓï¾äµÄÔËÐнá¹û£©
set autotrace traceonly; (˵à ......