SQL Server ErrorLog
תÖÁhttp://mbtk.blog.sohu.com/150003773.html £¬²¢²¹³äһЩÏà¹Ø֪ʶ¡£
DBCC ErrorLog £ºÈç¹ûºÜÉÙÖØÆðmssqlserver·þÎñ£¬ÄÇô·þÎñÆ÷µÄÈÕÖ¾»áÔö³¤µÃºÜ¿ì£¬¶øÇÒ´ò¿ªºÍ²é¿´ÈÕÖ¾µÄËÙ¶ÈÒ²»áºÜÂý¡£Ê¹ÓÃÕâ¸öÃüÁ¿ÉÒԽضϵ±Ç°µÄ·þÎñÆ÷ÈÕÖ¾£¬Ö÷ÒªÊÇÉú³ÉÒ»¸öеÄÈÕÖ¾¡£¿ÉÒÔ¿¼ÂÇÉèÖÃÒ»¸öµ÷¶ÈÈÎÎñ£¬Ã¿ÖÜÖ´ÐÐÕâ¸öÃüÁî×Ô¶¯½Ø¶Ï·þÎñÆ÷ÈÕÖ¾¡£Ê¹Óô洢¹ý³Ìsp_cycle_errorlogÒ²¿ÉÒԴﵽͬÑùµÄÄ¿µÄ¡£
ĬÈÏÇé¿öÏ£¬SQL Server ±£´æ 7 ¸ö ErrorLog Îļþ£¬ÃûΪ£º
ErrorLog
ErrorLog.1
ErrorLog.2
ErrorLog.3
ErrorLog.4
ErrorLog.5
ErrorLog.6
ÔÚ APACS OS °æ±¾ 6.1 ÖУ¬ErrorLog Îļþ±£´æÔÚ c:\Program Files\Microsoft SQL Server\MSSQL$WINCC\LOG Îļþ¼ÐÖС£
ÔÚ APACS OS °æ±¾ 7.0 ÖУ¬ErrorLog Îļþ±£´æÔÚ c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG Îļþ¼ÐÖС£
ErrorLog Îļþ°üº¬×îÐÂÐÅÏ¢£»ErrorLog.6 Îļþ°üº¬×îÀϵÄÐÅÏ¢¡£Ã¿´ÎÖØÆô¶¯ SQL Server ʱ£¬ÕâЩÈÕÖ¾Îļþ¶¼ÈçÏÂÑ»·£º
ɾ³ý ErrorLog.6 ÎļþÖеÄËùÓÐÊý¾Ý£¬²¢´´½¨Ò»¸öÐ嵀 ErrorLog Îļþ¡£
Éϸö ErrorLog ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.1 ÎļþÖС£
Éϸö ErrorLog.1 ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.2 ÎļþÖС£
Éϸö ErrorLog.2 ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.3 ÎļþÖС£
Éϸö ErrorLog.3 ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.4 ÎļþÖС£
Éϸö ErrorLog.4 ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.5 ÎļþÖС£
Éϸö ErrorLog.5 ÎļþÖеÄËùÓÐÊý¾Ý±»Ð´Èëµ½ ErrorLog.6 ÎļþÖС£
Èç¹ûÆäÖÐÒ»¸ö ErrorLog ÎļþÒѺܴó£¬Ôò¿Éͨ¹ýÔËÐÐ sp_cycle_errorlog ´æ´¢¹ý³ÌÊÖ¶¯Ñ»·ÕâЩ ErrorLog Îļþ¡£×¢ÒâÊÂÏ¾ÉµÄ ErrorLog ÎļþÖеÄÊý¾Ý½«±»¸²¸Ç£¡Èç¹û±ØÐë±£´æ¾ÉµÄ ErrorLog ÎļþÖеÄÊý¾Ý£¬Ôò¿É½«ÕâЩ¾ÉµÄ ErrorLog Îļþ¸´ÖƵ½Ä³¸öÍⲿ´æ´¢½éÖÊÖС£
ÔÚ APACS OS °æ±¾ 6.1 ÖУ¬¿ÉÀûÓà SQL Query Analyzer Tool ´Ó SQL Server Enterprise Manager ÔËÐÐ sp_cycle_errorlog ´æ´¢¹ý³Ì¡£ÔÚ APACS OS °æ±¾ 7.0 ÖУ¬¿É´Ó SQL Server Management Studio ÔËÐÐ sp_cycle_errorlog ´æ´¢¹ý³Ì¡£
ËùÒÔÐèÒª¶¨ÆÚÄÜÇл»Ð´Èëerror log . Ò»°ã¿ÉÒÔʹÓÃDBCC errorlogÃüÁîÀ´²Ù×÷ ¡£
Exec('DBCC ErrorLog')
»òÕß¿ÉÒÔͨ¹ýÒÔÏÂÃüÁ½«sp ·ÅÔÚJobÖж¨ÆÚÖ´ÐС£
create procedure sp_cycle_errorlog
if (not (is_srvrol
Ïà¹ØÎĵµ£º
asc °´ÉýÐòÅÅÁÐ
desc °´½µÐòÅÅÁÐ
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý ......
<!--MySql Çý¶¯³ÌÐò eg. mysql-connector-java-5.0.4-bin.jar-->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<!-- JDBC URL -->
......
ÎÄÕÂÀ´Ô´£ºIT¹¤³Ì¼¼ÊõÍø http://www.systhinker.com/?viewnews-11609
ÌúÂÉÒ»£ºÌìÏÂûÓÐÃâ·ÑµÄÎç²Í£¬Ê¹ÓÃË÷ÒýÊÇÐèÒª¸¶³ö´ú¼ÛµÄ¡£
¡¡¡¡Ë÷ÒýµÄÓŵãÓÐÄ¿¹²¶Ã£¬µ«ÊÇ£¬È´ºÜÉÙÓÐÈ˹ØÐĹý²ÉÓÃË÷ÒýËùÐèÒª¸¶³öµÄ³É±¾¡£ÈôÊý¾Ý¿â¹ÜÀíÔ±Äܹ»¶ÔË÷ÒýËùÐèÒª¸¶³öµÄ´ú¼ÛÓÐÒ»¸ö³ä·ÖµÄÈÏʶ£¬Ò²¾Í²»» ......
[MySQLÓÅ»¯] -- ÈçºÎʹÓÃSQL Profiler ÐÔÄÜ·ÖÎöÆ÷
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:diesou
mysql µÄ sql ÐÔÄÜ·ÖÎöÆ÷Ö÷ÒªÓÃ;ÊÇÏÔʾ sql Ö´ÐеÄÕû¸ö¹ý³ÌÖи÷Ïî×ÊÔ´µÄʹÓÃÇé¿ö¡£·ÖÎöÆ÷¿ÉÒÔ¸üºÃµÄչʾ³ö²»Á¼ SQL µÄÐÔÄÜÎÊÌâËùÔÚ¡£ ÏÂÃæÎÒÃǾÙÀý½éÉÜһϠMySQL SQL Profiler µÄʹÓ÷½·¨£º Ê×ÏÈ£¬¿ªÆô MySQL SQL ......
[MySQLÓÅ»¯] -- ÈçºÎ²éÕÒSQLЧÂʵØϵÄÔÒò
ʱ¼ä:2010-2-28À´Ô´:HaCMS¿ªÔ´ÉçÇø ×÷Õß:chusong
²éѯµ½Ð§ÂÊµÍµÄ SQL Óï¾ä ºó£¬¿ÉÒÔͨ¹ý EXPLAIN »òÕß DESC ÃüÁî»ñÈ¡ MySQL ÈçºÎÖ´ÐÐ SELECT Óï¾äµÄÐÅÏ¢£¬°üÀ¨ÔÚ SELECT Óï¾äÖ´Ðйý³ÌÖбíÈçºÎÁ¬½ÓºÍÁ¬½ÓµÄ˳Ðò£¬±ÈÈçÎÒÃÇÏë¼ÆËã 2006 ÄêËùÓй«Ë¾µÄÏúÊ۶ÐèÒª¹ØÁª sales ......