Oracle ´´½¨³ÌÐò°ü
´Ó¸ÅÄʾÀý—Oracle´´½¨³ÌÐò°ü
Ò»¡¢³ÌÐò°üµÄÏà¹Ø֪ʶ
1.¶¨ÒåÓë˵Ã÷
a. Ïà¹Ø¶ÔÏóµÄ·â×°
b. ³ÌÐò°üµÄ¸÷²¿·Ö
- ³ÌÐò°ü¹æ¸ñ˵Ã÷
ÉùÃ÷×Ó³ÌÐò
- ³ÌÐò°üÖ÷Ìå
¶¨Òå×Ó³ÌÐò
2.ʹÓóÌÐò°üµÄÓŵã
- Ä£¿é»¯
- ¸üÇáËɵÄÓ¦ÓóÌÐòÉè¼Æ
- ÐÅÏ¢Òþ²Ø
- ÐÂÔö¹¦ÄÜ
- ÐÔÄܸü¼Ñ
3.¹«ÓÐÏîºÍ˽ÓÐÏîµÄÇø±ð
¹«ÓÐÏÔÚ³ÌÐò°ü˵Ã÷²¿·Ö¶¨ÒåµÄ±äÁ¿¡¢¹ý³Ì¡¢º¯Êý
˽ÓÐÏÔÚ³ÌÐò°üÖ÷Ì岿·Ö¶¨ÒåµÄ±äÁ¿¡¢¹ý³Ì¡¢º¯Êý
¹«ÓÐÏî ˽ÓÐÏî
¿ÉÒÔÔÚ³ÌÐò°üÖ®ÍâÒýÓà ²»ÄÜÔÚ³ÌÐò°üÖ®ÍâÒýÓÃ
ÊÇÔÚ³ÌÐò°ü¹æ¸ñ˵Ã÷Öж¨ÒåµÄ ÊÇÔÚ³ÌÐò°üÖ÷ÌåÖж¨ÒåµÄ
ÓÃÓÚÈ«¾ÖÄ¿µÄ ÓÃÓÚ¾Ö²¿Ä¿µÄ
¶þ¡¢³ÌÐò°ü´´½¨ËµÃ÷
1.³ÌÐò°ü¹æ¸ñ˵Ã÷
(1)¡¢Ê¹ÓÃCreate PackageÃüÁî½øÐд´½¨
(2)¡¢°üº¬¹«ÓöÔÏóºÍÀàÐÍ
(3)¡¢ÉùÃ÷ÀàÐÍ¡¢³£Á¿¡¢±äÁ¿¡¢Òì³£¡¢ÓαêºÍ×Ó³ÌÐò
(4)¡¢¿ÉÒÔÔÚûÓгÌÐò°üÖ÷ÌâµÄÇé¿öÏ´æÔÚ
(5)¡¢¿ÉÒÔÖØÔØ
- ³ÌÐò°üÖеĶà¸ö×Ó³ÌÐò¿ÉÒÔ¾ßÓÐÏàͬµÄÃû³Æ
- ËüÃǵÄÐβÎÊDz»Í¬µÄ
- Ö»ÄÜλÓÚ´ò°üµÄ×Ó³ÌÐòÖÐ
- ÏÞÖÆ
a. Èç¹û×Ó³ÌÐòµÄ²ÎÊý½öÃû³Æ»òģʽ²»Í¬£¬Ôò²»ÄÜÖØÔØ
b. ²»ÄÜ»ùÓÚÆä·µ»ØÀàÐÍÖØÔØ×Ó³ÌÐò
2.³ÌÐò°üÖ÷Ìå
(1)¡¢Ê¹ÓÃCreate Package body ÃüÁî½øÐд´½¨
(2)¡¢°üº¬×Ó³ÌÐòºÍÓαêµÄ¶¨Òå
(3)¡¢°üº¬Ë½ÓÐÉùÃ÷
(4)¡¢²»ÄÜÔÚÃ
Ïà¹ØÎĵµ£º
Ò»¡¢ ÄÚ´æ½á¹¹
¹²Ïí³Ø£º·ÖΪ¿â¸ßËÙ»º´æºÍ×Öµä¸ßËÙ»º³åÇø
¿â¸ßËÙ»º´æ£¬ÓÃÓÚ´æ´¢¾¹ýÓï·¨·ÖÎö²¢ÇÒÕýÈ·µÄSQLÓï¾ä£¬²¢Ëæʱ׼±¸Ö´ÐС£
×Öµä¸ßËÙ»º³åÇø£¬´æ´¢µÇ½µ½ORACLEµÄÓû§Ãû£¬¼°ÕâЩÓû§ÓÐÄÄЩÊý¾Ý¿â¶ÔÏóÒÔ¼°ÕâЩÊý¾Ý¿â¶ÔÏóµÄλÖá£
Êý¾Ý»º ......
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "Provider=OraOLEDB.Oracle.1;Persist Security Info= ......
´¥·¢Æ÷
q ´¥·¢Æ÷Êǵ±Ìض¨Ê¼þ³öÏÖʱ×Ô¶¯Ö´ÐеĴ洢¹ý³Ì
q Ìض¨Ê¼þ¿ÉÒÔÊÇÖ´ÐиüеÄDMLÓï¾äºÍDDLÓï¾ä
q ´¥·¢Æ÷²»Äܱ»ÏÔʽµ÷ÓÃ
q ´¥·¢Æ÷µÄ¹¦ÄÜ£º
q ......
²»´íµÄ×ÊÁÏ,ת¹ýÀ´,·½±ãÈÕºó²é¿´Ê¹ÓÃ!!!
--¼à¿ØË÷ÒýÊÇ·ñʹÓÃ
alter index &index_name monitoring usage;
alter index &index_name nomonitoring usage;
select * from v$object_usage where index_name =
&index_name;
--ÇóÊý¾ÝÎļþµÄI/O·Ö²¼
select
df.name,phyrds,phywrts,phyblkrd,phyblkwrt,sin ......
SQLµÄÓÅ»¯Ó¦¸Ã´Ó5¸ö·½Ãæ½øÐе÷Õû£º
1.È¥µô²»±ØÒªµÄ´óÐͱíµÄÈ«±íɨÃè
2.»º´æСÐͱíµÄÈ«±íɨÃè
3.¼ìÑéÓÅ»¯Ë÷ÒýµÄʹÓÃ
4.¼ìÑéÓÅ»¯µÄÁ¬½Ó¼¼Êõ
5.¾¡¿ÉÄܼõÉÙÖ´Ðмƻ®µÄCost
SQLÓï¾ä£º
ÊǶÔÊý¾Ý¿â(Êý¾Ý)½øÐвÙ×÷µÄΩһ;¾¶£»
ÏûºÄÁË70%~90%µÄÊý¾Ý¿â×ÊÔ´£»¶ÀÁ¢ÓÚ³ÌÐòÉè¼ÆÂß¼£¬Ïà¶ÔÓÚ¶Ô³ÌÐòÔ´´úÂëµÄÓÅ»¯£¬¶ÔSQLÓï¾äµÄÓÅ»¯Ô ......