ʹÓà Tkprof ·ÖÎö ORACLE ¸ú×ÙÎļþ
TkprofÊÇÒ»¸öÓÃÓÚ·ÖÎöOracle¸ú×ÙÎļþ²¢ÇÒ²úÉúÒ»¸ö¸ü¼ÓÇåÎúºÏÀíµÄÊä³ö½á¹ûµÄ¿ÉÖ´Ðй¤¾ß¡£Èç¹ûÒ»¸öϵͳµÄÖ´ÐÐЧÂʱȽϵͣ¬Ò»¸ö±È½ÏºÃµÄ·½·¨ÊÇͨ¹ý¸ú×ÙÓû§µÄ»á»°²¢ÇÒʹÓÃTkprof¹¤¾ßʹÓÃÅÅÐò¹¦Äܸñʽ»¯Êä³ö£¬´Ó¶øÕÒ³öÓÐÎÊÌâµÄSQLÓï¾ä¡£
Ò». TKPROF ÃüÁîÓï·¨£º
TKPROF filename1, filename2 [ SORT = [ opion][,option] ]
[ PRINT = integer ]
[ AGGREGATE = [ YES | NO ] ]
[ INSERT = filename3 ]
[ SYS = [ YES | NO ] ]
[ [ TABLE = schema.table ] | [ EXPLAIN = user/password ] ]
[ RECORD = filename ]
Ïà¹Ø˵Ã÷£º
filename1 Ö¸¶¨µÄÊäÈëÎļþ£¬¿ÉÒÔÊǶà¸öÎļþÁªÆðÀ´¡£
Filename2 ¸ñʽ»¯Êä³öÎļþ¡£
SORT ÔÚÊä³öµ½Êä³öÎļþÇ°£¬ÏȽø³ÌÅÅÐò¡£Èç¹ûÊ¡È¥£¬Ôò°´ÕÕʵ¼ÊʹÓõÄ˳ÐòÊä³öµ½ÎļþÖС£ÅÅÐòÑ¡ÏîÓÐÒÔ϶àÖÖ£º
prscnt number of times parse was called
prscpu cpu time parsing
prsela elapsed time parsing
prsdsk number of disk reads during parse
prsqry number of buffers for consistent read during parse
prscu number of buffers for current read during parse
prsmis number of misses in library cache during parse
execnt number of execute was called
execpu cpu time spent executing
exeela elapsed time executing
exedsk number 
Ïà¹ØÎĵµ£º
select count(1) from dictionary;
select * from dba_data_files;
select count(1) from dba_objects t where t.owner='BESTTONE';
select * from dba_tablespaces t where t.tablespace_name='BESTTONE';
select count(1) from dba_tables t where t.owner='BESTTONE';
select t.table_name,t.comments from diction ......
ÍøÉÏËѼ¯µÄ£¬ÕûÀíÏÂ
1¡¢substr(string string, int a, int b)
²ÎÊý1:string Òª´¦ÀíµÄ×Ö·û´®
²ÎÊý2£ºa ½ØÈ¡×Ö·û´®µÄ¿ªÊ¼Î»Öã¨ÆðʼλÖÃÊÇ0£©
²ÎÊý3£ºb ½ØÈ¡µÄ×Ö·û´®µÄ³¤¶È(¶ø²»ÊÇ×Ö·û´®µÄ½áÊøλÖÃ)
ÀýÈ磺
substr("ABCDEFG", 0); //·µ»Ø£ºABCDEFG£¬½ØÈ¡ËùÓÐ×Ö·û
substr("ABCDEFG", 2); //·µ»Ø£ºCDEFG£¬½ØÈ¡´ÓC¿ ......
ÎÒÃÇ´ó¼Ò¶¼ÖªµÀÿ¸öOracleÊý¾Ý¿â¶¼»áÓÐÒ»¸ö»òÊǶà¸öÎïÀíµÄOracleÊý¾ÝÎļþ,Êý¾Ý¿âÐÅÏ¢(½á¹¹,Êý¾Ý)µÄÖ÷Òª×÷ÓÃÊÇÀ´±£´æÔÚÕâЩÏà¹ØµÄÊý¾ÝÎļþ,¶øÇÒÖ»ÓÐÕâЩÏà¹ØµÄÎļþOracle²ÅÄܹ»½âÊÍÓë¹ÜÀíÕâЩ´æ´¢.OracleÊý¾ÝÎļþ¾ßÓÐÒÔÏÂһЩÌØÐÔ:
1.Ò»¸öÊý¾ÝÎļþ½ö½ö¹ØÁªÒ»¸öÊý¾Ý¿â,OracleÊý¾ÝÎļþÓëÊý¾Ý¿âÖ®¼ä¶ÔÓ¦¹ØϵÊÇÒ»¶ÔÒ»¹Øϵ,µ±È»· ......
Oracle AWR ½éÉÜ(AWR -- Automatic Workload Repository)
http://blog.csdn.net/tianlesoftware/archive/2009/10/17/4682300.aspx
Ò». ADDM¸ÅÊö
ADDM(Automatic Database Diagnostic Monitor) ÊÇÖ²ÈëOracleÊý¾Ý¿âµÄÒ»¸ö×ÔÕï¶ÏÒýÇæ.ADDM ͨ¹ý¼ì²éºÍ ......
Oracle ÎÞ¼àÌý³ÌÐò
½üÈÕ±¾µØµÄOracleÊý¾Ý¿âÎÞ·¨Á¬½Ó£¬Å׳öÎÞ¼àÌý³ÌÐò´íÎó£¬baigoogleduһϣ¬×ܽáÁËÈçϽâ¾ö·½°¸£º
First£º
Ò»¡¢ÔËÐмàÌýÆ÷
¡¡¡¡ÔÚCMDÖÐÊäÈëÒÔÏÂÄÚÈÝ:
C:>lsnrctl
LSNRCTL for 32-bit Windows: Version 8.1.6.0.0 - Production on 14-3ÔÂ -2003 14:17
: ......