oracle Êý¾Ý¿âÀï²é¿´±í¿Õ¼äÊ©ÓÃÇé¿ö
oracle Êý¾Ý¿âÀï²é¿´±í¿Õ¼äÊ©Óþ°¿ö£»
oracle±í¿Õ¼äµÄʶùÇé¿öÒª³£³£²é¿´£¬Õý³£ÏпձÈÂʹýµÍµÄʱ·Ö¾ÍÓ¦¸Ã˼¿¼Ôö´ó±í¿´¿Õ¼äÁË¡£²é¿´²½ÖèÈç´ÎSQL:
²½Öè1£º
select dbf.tablespace_name,
dbf.totalspace "×ÜÁ¿(M)",
dbf.totalblocks as ×Ü¿éÊý,
dfs.freespace "ÓàÏÂ×ÜÁ¿(M)",
dfs.freeblocks "ÓàÏ¿éÊý",
(dfs.freespace / dbf.totalspace) * 100 "ÏпձÈÂÊ"
from (select t.tablespace_name,
sum(t.bytes) / 1024 / 1024 totalspace,
sum(t.blocks) totalblocks
from dba_data_files t
group by t.tablespace_name) dbf,
(select tt.tablespace_name,
sum(tt.bytes) / 1024 / 1024 freespace,
sum(tt.blocks) freeblocks
from dba_free_space tt
group by tt.tablespace_name) dfs
where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)
²½Öè2£º
SELECT Total.name "Tablespace Name",
Free_space, (total_space-Free_space) Used_space, total_space
from
(select tablespace_name, sum(bytes/1024/1024) Free_Space
from sys.dba_free_space
group by tablespace_name
) Free,
(select b.name, sum(bytes/1024/1024) TOTAL_SPACE
from sys.v_$datafile a, sys.v_$tablespace B
where a.ts# = b.ts#
group by b.name
) Total
WHERE Free.Tablespace_name = Total.name
Ó¦·¢ÐÒ´æµÄ±í¿Õ¼ä²»¹»µÄ²î´íʱ£¬´¦ÖÃÈç´Î£º
Ò»£ºÕÒµ½¸Ã±í¿Õ¼ä¶ÔÓ¦µÄÊý¾ÝÎļþ¼°Í¾¾¶
select * from dba_data_files t
where t.tablespace_name = 'ARD'
¶þ£ºÔö´óÊý¾ÝÎļþ
alter database datafile 'ȫ;¾¶µÄÊý¾ÝÎļþÐÕÃû' resize ***M
Èý£ºÔö¼ÓÊý¾ÝÎļþ
alter tablespace ±í¿Õ¼äÐÕÃû
add datafile 'ȫ;¾¶µÄÊý¾ÝÎļþÐÕÃû' ***M
Ú¹×¢£º±í¿Õ¼ä¾¡¿ÉÄÜÈÃfree°Ù·Ö±È±£³ÖÔÚÊ®%Ö®ÉÏ£¬ÈçÈô½ö´ÎÓÚÊ®%±ãÔö¶àdatafileÒ²Ðíresizedatafile£¬Í¨³£Êý¾ÝÎļþ²»Óó¬¹ý¶þG
±¾ÎÄÀ´Ô´£º
ÎÒµÄÒì³£Íø
Oracle Exception
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
²ÎÊý
UNDO_MANAGEMENT = AUTO --¹ÜÀíģʽ,¿ÉΪAUTO»òMANUAL.Ö»ÄÜÔÚÆôʼ²ÎÊýÎļþÀïÃæÐÞ¸Ä
UNDO_TABLESPACE = undo --Öƶ¨´æ´¢»¹ÔÊý¾ÝµÄ±í¿Õ¼ä,Òà¿ÉÓÃALTER SYSTEM SET undo_tablespace = 'abc'À´¸ ......
in ÊÇ°ÑÍâ±íºÍÄÚ±í×÷hash Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö±ÒÔÀ´ÈÏΪexists±ÈinЧÂʸߵÄ˵·¨ÊDz»×¼È·µÄ¡£
Èç¹û²éѯµÄÁ½¸ö±í´óСÏ൱£¬ÄÇôÓÃinºÍexists²î±ð²»´ó¡£
in ÊÇ°ÑÍâ±íºÍÄÚ±í×÷hash
Á¬½Ó£¬¶øexistsÊǶÔÍâ±í×÷loopÑ»·£¬Ã¿´ÎloopÑ»·ÔÙ¶ÔÄÚ±í½øÐвéѯ¡£
Ò»Ö±ÒÔ ......
¡¡1¡¢Ä¿µÄ£º
¡¡¡¡OracleϵͳÖеÄprofile¿ÉÒÔÓÃÒÔ¶ÔÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´½øÕ¹ÏÞÖÆ£¬ÔËÓÃCreate ProfileÏÂÁî´´°ìÒ»¸öProfile£¬ÓÃËüÀ´¶ÒÏÖ¶ÔÊý¾Ý¿â×ÊÔ´µÄÏÞÖÆÔËÓã¬Èç¹û°Ñ¸Ãprofile·ÖÅä¸øÓû§£¬Ôò¸ÃÓû§ËùÄÜÊ©ÓõÄÊý¾Ý¿â×ÊÔ´¶¼ÔÚ¸ÃprofileµÄÏÞÖÆÒÔÄÚ¡£
¡¡¡¡2¡¢Ìõ¼þ£º
¡¡¡¡´´ÉèprofileÎñ±ØÒªÓÐCREATE PROFILEµÄÏµÍ ......
ת×Ô£ºhttp://blog.csdn.net/wangdongzjk/archive/2005/11/18/532424.aspx
ʹØCUBE ROLLUP GROUPING SETS£¨1£©
ÔÎÄÒý×Ô£º
¾ÛºÏÊÇÊý¾Ý²Ö¿âµÄ»ù´¡¡£ÎªÁËÌá¸ß¾ÛºÏµÄÐÔÄÜ¡£OracleÌṩÁËGroup By Ìõ¿îµÄÀ©Õ¹¡£
1£® CUBE, ROLLUPÀ©Õ¹
2£® 3¸ögroupingº¯Êý
......