Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¾Oracle¡¿SQLÓÅ»¯µÄÖØÒª¹¤¾ß AUTOTRACE

¡¾AUTOTRACE¡¿SQLÓÅ»¯µÄÖØÒª¹¤¾ß--AUTOTRACE
Ìáµ½SQLÓÅ»¯£¬²»Äܲ»ÌáAUTOTRACEµÄÇ¿´ó¹¦ÄÜ¡£Ê¹ÓÃÆðÀ´·Ç³£±ã½Ý£¬²»¹ýÔÚÊÇʹÓÃ֮ǰ£¬ÐèÒª×öһЩÅäÖõŤ×÷¡£¼òÒªµÄÃèÊöÒ»ÏÂÕâ¸ö¹ý³Ì£¬¹©Ã»ÓÐʹÓùýµÄÅóÓѲο¼¡£
1.ʹÓÃsysÓû§Ö´ÐÐplustrce½Å±¾
sys@ora10g> @?/sqlplus/admin/plustrce
sys@ora10g> drop role plustrace;
drop role plustrace
          *
ERROR at line 1:
ORA-01919: role 'PLUSTRACE' does not exist
sys@ora10g> create role plustrace;
Role created.
sys@ora10g> grant select on v_$sesstat to plustrace;
Grant succeeded.
sys@ora10g> grant select on v_$statname to plustrace;
Grant succeeded.
sys@ora10g> grant select on v_$mystat to plustrace;
Grant succeeded.
sys@ora10g> grant plustrace to dba with admin option;
Grant succeeded.
sys@ora10g> set echo off
2.½«plustraceÊÚȨ¸øpublicÓû§£¬ÒԱ㱣֤ËùÓÐÓû§¶¼ÓÐȨʹÓÃautotrace¹¦ÄÜ
sys@ora10g> grant plustrace to public;
Grant succeeded.
3.Á¬½Óµ½¾ßÌåµÄÓû§ÖУ¬ÕâÀïÊÇsecÓû§
sys@ora10g> conn sec/sec
Connected.
4.ʹÓÓset autotrace”²é¿´autotraceµÄÃüÁîÌáʾ
sec@ora10g> set autotrace
Usage: SET AUTOT[RACE] {OFF | ON | TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
5.ÕâÀïÑÝʾһÖÖÉèÖ÷½·¨
sec@ora10g> set autotrace traceonly
sec@ora10g> select * from cat;
20 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 3442307057
--------------------------------------------------------------------------------
| Id  | Operation             | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
--------------------------------------------------------------------------------
|   0 | SELECT STATEMENT      |        |   646 | 47804 |    33   (4)| 00:00:01 |
|*  1 |  FILTER  &nbs


Ïà¹ØÎĵµ£º

SQL ServerÈçºÎ½Ø¶Ï(Truncate)ºÍÊÕËõ(Shrink)ÊÂÎñÈÕÖ¾

µ±SQL Server½Ø¶ÏÊÂÎñÈÕ־ʱ£¬Ëü½ö½öÊÇÔÚÐéÄâÈÕÖ¾ÎļþÖÐ×ö¸ö±ê¼Ç£¬ÒԱ㲻ÔÙʹÓÃËü£¬È»ºó×¼±¸ÒÔÖØÓÃÐÎʽÀ´×ö±¸·Ý(¼ÙÈçÔËÔØÔÚÍêÕû»òÊÇÅúÁ¿ÈÕÖ¾»Ö¸´Ä£ÐÍ)¡£Ò²¾ÍÊÇ˵£¬ÔÚʹÓüòµ¥»Ö¸´Ä£ÐÍʱ£¬ÊÂÎñÈÕÖ¾°üÀ¨ÈçϵÄÈÕÖ¾¼Ç¼£º

µ±checkpoint·¢Éúʱ£¬ÐéÄâÈÕÖ¾Îļþ1¡¢2²»ÔÙ±»Ê¹Óã¬ÒòΪÊÂÎñ1¡¢2ÒѾ­±»Ìá½»ÁË£¬¶øÇÒÈÕÖ¾¼Ç¼Ҳ²»ÔÙÐ ......

C#´ò°üSQLÊý¾Ý¿â²¿Êð°²×°


²Î¿¼¡¶ASP.NETÓëSQLÒ»Æð´ò°ü²¿Êð°²×°¡·
£¬ÕâƪÎÄÕÂÊÇÕë¶ÔVB.NETÓëSQL Ò»Æð´ò°üµÄ,µ«ÊÇÎÒʹÓõÄÊÇC#,µ±È»Ö»ÒªÐÞ¸ÄÒ»ÏÂÖ÷Òª°²×°Àà¿â¾ÍÐÐÁË!C#µÄÀà¿â´úÂëÈçÏÂ:DBCustomAction.cs
using System;
using System.Collections;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Configuration.Inst ......

´¥·¢Æ÷»ñÈ¡Ð޸ıíµÄSQLÓï¾ä


/*
´¥·¢Æ÷»ñÈ¡SQLÓï¾äÔöÁ¿´«Êä
¹¦ÄÜ£º²¶×½Ð޸ıíµÄSQLÓï¾ä
ʹÓÃ˵Ã÷£º 1¡¢ÏÈн¨Ò»±íÊÖ¶¯Ð´ÈëÖ÷¼üÐÅÏ¢»òÕßΨһË÷Òý
   Create table prmary_key
   (tab_name varchar(255),
    key_name varchar(255))
   --´Ë±í½öÔÚ½¨Á¢´¥·¢Æ÷ʱʹÓ㬽¨ÍêËùÓд¥·¢Æ÷ºó ¼ÇµÃ ......

Top 10 Features of SQL 2008 R2

Introduction
Microsoft SQL Server 2008 R2 is the latest release of SQL Server. This article will introduce the top 10 features and benefits of SQL Server 2008 R2. The “R2” tag indicates this is an intermediate release of SQL Server and not a major revision. However, there are a number o ......

sql ²é±í¿Õ¼äÓï¾ä

SELECT UPPER(F.TABLESPACE_NAME) "±í¿Õ¼äÃû",
       D.TOT_GROOTTE_MB "±í¿Õ¼ä´óС(M)",
       D.TOT_GROOTTE_MB - F.TOTAL_BYTES "ÒÑʹÓÿռä(M)",
       TO_CHAR(ROUND((D.TOT_GROOTTE_MB - F.TOTAL_BYTES) / D.TOT_G ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ