¹ØÓÚoracleµÄ±í¿Õ¼ä£¬·ÖÇø±í£¬ÒÔ¼°Ë÷ÒýµÄ×ܽá
http://episode.javaeye.com/blog/183016
±í¿Õ¼ä£º
OracleµÄUNDOTBS01.DBFÎļþÌ«´óµÄ½â¾ö°ì·¨
1¡¢.½ûÖ¹undo tablespace×Ô¶¯Ôö³¤
alter database datafile 'full_path\undotbs01.dbf' autoextend off;
2.-- ´´½¨Ò»¸öеÄС¿Õ¼äµÄundo tablespace
create undo tablespace undotBS2 datafile 'full_path\UNDOTBS02.DBF' size 100m;
-- ÉèÖÃеıí¿Õ¼äΪϵͳundo_tablespace
alter system set undo_tablespace=undotBS2;
-- Drop ¾ÉµÄ±í¿Õ¼ä
drop tablespace undotbs1 including contents;
--²é¿´ËùÓбí¿Õ¼äµÄÇé¿ö
select * from dba_tablespaces
--´´½¨±í¿Õ¼ä
create tablespace HRPM0
datafile '/oradata/misdb/HRPM0.DBF' size 5m autoextend on next 10m maxsize unlimited
--ɾ³ý±í¿Õ¼ä
DROP TABLESPACE data01 INCLUDING CONTENTS AND DATAFILES;
--Ð޸ıí¿Õ¼ä´óС
alter database datafile '/path/NADDate05.dbf' resize 100M
·ÖÇø±í£º
µ±±íÖеÄÊý¾ÝÁ¿²»¶ÏÔö´ó£¬²éѯÊý¾ÝµÄËٶȾͻá±äÂý£¬Ó¦ÓóÌÐòµÄÐÔÄܾͻáϽµ£¬Õâʱ¾ÍÓ¦¸Ã¿¼ÂǶԱí½øÐзÖÇø¡£±í½øÐзÖÇøºó£¬Âß¼ÉϱíÈÔÈ»ÊÇÒ»ÕÅÍêÕûµÄ±í£¬Ö»Êǽ«±íÖеÄÊý¾ÝÔÚÎïÀíÉÏ´æ·Åµ½¶à¸ö±í¿Õ¼ä(ÎïÀíÎļþÉÏ)£¬ÕâÑù²éѯÊý¾Ýʱ£¬²»ÖÁÓÚÿ´Î¶¼É¨ÃèÕûÕÅ±í¡£
OracleÖÐÌṩÁËÒÔϼ¸ÖÖ±í·ÖÇø£º
Ò»¡¢·¶Î§·ÖÇø£ºÕâÖÖÀàÐ͵ķÖÇøÊÇʹÓÃÁеÄÒ»×éÖµ£¬Í¨³£½«¸ÃÁгÉΪ·ÖÇø¼ü¡£
ʾÀý1£º¼ÙÉèÓÐÒ»¸öCUSTOMER±í£¬±íÖÐÓÐÊý¾Ý200000ÐУ¬ÎÒÃǽ«´Ë±íͨ¹ýCUSTOMER_ID½øÐзÖÇø£¬Ã¿¸ö·ÖÇø´æ´¢100000ÐУ¬ÎÒÃǽ«Ã¿¸ö·ÖÇø±£´æµ½µ¥¶ÀµÄ±í¿Õ¼äÖУ
Ïà¹ØÎĵµ£º
1.OSÈÏÖ¤
Oracle°²×°Ö®ºóĬÈÏÇé¿öÏÂÊÇÆôÓÃÁËOSÈÏÖ¤µÄ£¬ÕâÀïÌáµ½µÄosÈÏÖ¤ÊÇÖ¸·þÎñÆ÷¶ËosÈÏÖ¤¡£OSÈÏÖ¤µÄÒâ˼°ÑµÇ¼Êý¾Ý¿âµÄÓû§ºÍ¿ÚÁîУÑé·ÅÔÚÁ˲Ù×÷ϵͳһ¼¶¡£Èç¹ûÒÔ°²×°OracleʱµÄÓû§µÇ¼OS£¬ÄÇô´ËʱÔڵǼOracleÊý¾Ý¿âʱ²»ÐèÒªÈκÎÑéÖ¤£¬È磺
SQL> connect /as sysdba
ÒÑÁ¬½Ó¡£
SQL> connect sys/aaa@te ......
1. ϵͳÅäÖùý³Ì
2.1. oracle°²×°Ìõ¼þ¼ì²é
2.1.1. Ó²¼þ¼ì²é
¼ì²éÓ²¼þÇé¿öÊÇ·ñ·ûºÏoracle 10g µÄ°²×°ÒªÇó¡£ÒÔrootµÇ¼ϵͳ£¬ÓÃϱíÃüÁîÊä³öµÄÖµÓ¦´óÓÚ»òµÈÓÚ½¨ÒéÖµ¡£
¼ì²éÏîÄ¿
ÃüÁî ......
ÔÚSQLÓï¾äÓÅ»¯¹ý³ÌÖУ¬ÎÒÃǾ³£»áÓõ½hint,ÏÖ×ܽáÒ»ÏÂÔÚSQLÓÅ»¯¹ý³ÌÖг£¼ûOracle HINTµÄÓ÷¨£º
1. /*+ALL_ROWS*/
±íÃ÷¶ÔÓï¾ä¿éÑ¡Ôñ»ùÓÚ¿ªÏúµÄÓÅ»¯·½·¨,²¢»ñµÃ×î¼ÑÍÌÍÂÁ¿,ʹ×ÊÔ´ÏûºÄ×îС»¯.
ÀýÈç:
SELECT /*+ALL+_ROWS*/ EMP_NO,EMP_NAM,DAT_IN from BSEMPMS WHERE EMP_NO=’SCOTT’;
2. /*+FIRST_ROWS*/
±í ......
Oracle°²×°Íêºó£¬ÆäÖÐÓÐÒ»¸öȱʡµÄÊý¾Ý¿â£¬³ýÁËÕâ¸öȱʡµÄÊý¾Ý¿âÍ⣬ÎÒÃÇ»¹¿ÉÒÔ´´½¨×Ô¼ºµÄÊý¾Ý¿â¡£
¶ÔÓÚ³õѧÕßÀ´Ëµ£¬ÎªÁ˱ÜÃâÂé·³£¬¿ÉÒÔÓÃ'Database Configuration Assistant'Ïòµ¼À´´´½¨Êý¾Ý¿â¡£
´´½¨ÍêÊý¾Ý¿âºó£¬²¢²»ÄÜÁ¢¼´ÔÚÊý¾Ý¿âÖн¨±í£¬±ØÐëÏÈ´´½¨¸ÃÊý¾Ý¿âµÄ ......
http://www.ej38.com/showinfo/Oracle-108709.html
Oracle 10g statisticÊý¾Ýͳ¼Æ,Oracle»á¸ù¾ÝÕâЩͳ¼ÆÐÅÏ¢À´¾ö¶¨ÊÇ×ßRBO(Rule-BasedOptimization)£¬»¹ÊÇ×ßCBO(Cost-BasedOptimization)£¬»áȥѡÔñÄÄÖÖÖ´Ðмƻ®¸ü»®Ëã,Ó°ÏìÊÇ·ñ×ßÏà¹ØµÄË÷ÒýµÈ.Èç¹ûÊÇCBOµÄ»°£¬ËüÒÀ¿¿×¼È·µÄ£¨»òÕß˵±È½Ï׼ȷµÄ£©Í³¼ÆÐÅÏ¢À´²úÉúÓÅ»¯µÄÖ ......