Oracle·ÖÇø¼¼Êõ
ORACLEµÄ·ÖÇø(Partitioning Option)ÊÇÒ»ÖÖ´¦Àí³¬´óÐͱíµÄ¼¼Êõ¡£·ÖÇøÊÇÒ»ÖÖ“·Ö¶øÖÎÖ®”µÄ¼¼Êõ£¬Í¨¹ý½«´ó±íºÍË÷Òý·Ö³É¿ÉÒÔ¹ÜÀíµÄС¿é£¬´Ó¶ø±ÜÃâÁ˶Ôÿ¸ö±í×÷Ϊһ¸ö´óµÄ¡¢µ¥¶ÀµÄ¶ÔÏó½øÐйÜÀí£¬Îª´óÁ¿Êý¾ÝÌṩÁË¿ÉÉìËõµÄÐÔÄÜ¡£·ÖÇøÍ¨¹ý½«²Ù×÷·ÖÅ䏸¸üСµÄ´æ´¢µ¥Ôª£¬¼õÉÙÁËÐèÒª½øÐйÜÀí²Ù×÷µÄʱ¼ä£¬²¢Í¨¹ýÔöÇ¿µÄ²¢Ðд¦ÀíÌá¸ßÁËÐÔÄÜ£¬Í¨¹ýÆÁ±Î¹ÊÕÏÊý¾ÝµÄ·ÖÇø£¬»¹Ôö¼ÓÁË¿ÉÓÃÐÔ¡£
select * from user_tables a where a.partitioned= 'YES '
Sql´úÂë
CREATE TABLE range
(id NUMBER(5),
name VARCHAR2(30),
amount NUMBER(10),
sdate DATE)
COMPRESS
PARTITION BY RANGE(sdate)
(PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('16/09/2009','DD/MM/YYYY')),
PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('17/09/2009','DD/MM/YYYY')),
PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('18/09/2009','DD/MM/YYYY')),
PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('19/09/2009','DD/MM/YYYY')));
CREATE TABLE range
(id NUMBER(5),
name VARCHAR2(30),
amount NUMBER(10),
sdate DATE)
COMPRESS
PARTITION BY RANGE(sdate)
(PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('16/09/2009','DD/MM/YYYY')),
PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('17/09/2009','DD/MM/YYYY')),
PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('18/09/2009','DD/MM/YYYY')),
PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('19/09/2009','DD/MM/YYYY')));
¶¯Ì¬Ôö¼Ó·ÖÇø
Sql´úÂë
create or replace procedure addpart(tableName varchar2,
&nbs
Ïà¹ØÎĵµ£º
¾ÍÊÇÔÚÒÑÓеÄÊý¾Ý¿âʵÀýÉÏ´´½¨Ò»¸öеÄÕʺţ¬·ÃÎÊһЩеıí
²Ù×÷²½ÖèÈçÏ£º
1¡¢µÇ¼linux£¬ÒÔoracleÓû§µÇ¼£¨Èç¹ûÊÇrootÓû§µÇ¼µÄ£¬µÇ¼ºóÓà su - oracleÃüÁîÇл»³ÉoracleÓû§£©
2¡¢ÒÔsysdba·½Ê½À´´ò¿ªsqlplus£¬ÃüÁîÈçÏ£º sqlplus "/as sysdba"
3¡¢²é¿´ÎÒÃdz£¹æ½«Óû§±í¿Õ¼ä·ÅÖÃλÖà ......
ÊÓͼµÄ¸ÅÄî
ÊÓͼÊÇ»ùÓÚÒ»Õűí»ò¶àÕűí»òÁíÍâÒ»¸öÊÓͼµÄÂß¼±í¡£ÊÓͼ²»Í¬ÓÚ±í£¬ÊÓͼ±¾Éí²»°üº¬ÈκÎÊý¾Ý¡£±íÊÇʵ¼Ê¶ÀÁ¢´æÔÚµÄʵÌ壬ÊÇÓÃÓÚ´æ´¢Êý¾ÝµÄ»ù±¾½á¹¹¡£¶øÊÓͼֻÊÇÒ»ÖÖ¶¨Ò壬¶ÔÓ¦Ò»¸ö²éѯÓï¾ä¡£ÊÓͼµÄÊý¾Ý¶¼À´×ÔÓÚijЩ±í£¬ÕâЩ±í±»³ÆÎª»ù±í¡£Í¨¹ýÊÓͼÀ´²é¿´±í£¬¾ÍÏñÊÇ´Ó²»Í¬µÄ½Ç¶ÈÀ´¹Û²ìÒ»¸ö(»ò¶à¸ö)±í¡£
Ê ......
ÔÚÖ´ÐÐÒ»¸ö´æ´¢¹ý³Ì½¨±íʱ£¬³öÏÖÁËÕâ¸öORA-38301:ÎÞ·¨¶Ô»ØÊÕÕ¾ÖеĶÔÏóÖ´ÐÐDDL/DML´íÎó¡£·¢ÏÖÔÀ´ÕâÊÇ10GµÄÒ»¸öÐÂÌØÐÔ£¬»ØÊÕÕ¾¡£¶ÔÓÚdropµÄ±í²¢²»ÊÇÖ±½Óɾ³ýµôµÄ¡£¶øÊÇ·ÅÔÚ»ØÊÕÕ¾ÖÐÁË¡£RecycleBin¡£
¿ÉÊÇÔÚ»ØÊÕÕ¾ÖÐûÓв鵽Õâ¸ö±í¡£
select * from recyclebin;
ºÜÆæ¹Ö¡£
½øÐÐɾ³ý²Ù×÷¡£
½øÐÐɾ³ýºó£¬»¹ÊDz»ÄܶԸà ......
1.1.1 °²×°OracleÊý¾Ý¿â·þÎñ¶Ë
°´ÕÕ°²×°Ïòµ¼£¬ÕýÈ·°²×°Oracle 9i¡£
°´ÕÕĬÈÏÑ¡Ïµã»÷ÏÂÒ»²½£¬¼´¿É¡£
ͼ 2 2 Oracle °²×°Ïòµ¼ - »¶ÓʹÓÃ
ͼ 2 3 Oracle °²×°Ïòµ¼ - Îļþ¶¨Î»
ÕâÀÐè×¢ÒâOracleµÄ°²×°Îļþ·¾¶²»Äܰüº¬¿Õ¸ñºÍÖÐÎÄÃû¡£Ä¬Èϰ²×°Â·¾¶ÊÇD:\oracle\ora92,ÕâÀィÒéʹÓÃÕâ¸ö°²×°Â·¾¶¡££¨°²×°£© ......
1¡¢°²×°
2¡¢´´½¨“±¾µØNet·þÎñÃû”
3¡¢PLSQL Developer Á¬½Ó²âÊÔ
4¡¢´´½¨±í¿Õ¼ä
1.´ò¿ªsqlplus¹¤¾ß£º
sqlplus /nolog
2. Á¬½ÓÊý¾Ý¿â£º
conn /as sysdba
3. ´´½¨±í¿Õ¼ä£º
create tablespace camds datafile 'D:\oracle\product\10.2.0\oradata\camds\camds.dbf' size  ......