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

ÈçºÎ¼ì²éSQL Server CPUÆ¿¾±

--¼ì²âCPUѹÁ¦µÄÒ»¸ö·½·¨ÊǼÆËãÔËÐÐ״̬ÏµĹ¤×÷½ø³ÌÊýÁ¿£¬
--ͨ¹ýÖ´ÐÐÈçϵÄDMV²éѯ¿ÉÒԵõ½Õâ¸öÐÅÏ¢
SELECT COUNT(*) AS workers_waiting_for_cpu,t2.scheduler_id
from sys.dm_os_workers AS t1, sys.dm_os_schedulers AS t2
WHERE t1.state='RUNNABLE' AND 
t1.scheduler_address = t2.scheduler_address AND
 t2.scheduler_id<255
GROUP BY t2.scheduler_id
--Ò²¿ÉÒÔÖ´ÐÐÈçϵIJéѯµÃµ½¹¤×÷½ø³ÌÔÚ¿ÉÔËÐÐ״̬Ï»¨·ÑµÄʱ¼ä
SELECT SUM(signal_wait_time_ms) from sys.dm_os_wait_stats
--ÏÂÃæÊÇÒ»¸öDMV²éѯ£¬Ëü¿ÉÒÔÓÃÀ´ÕÒ³öÿ´ÎÖ´ÐÐÖÐÕ¼ÓÃCPU×î¶àµÄÇ®10Ϊ²éѯ£¬
--Ò²ÁгöÁËSQLÓï¾äµÄ²éѯ¼Æ»®¼°¼Æ»®±»Ö´ÐеĴÎÊý¡£Èç¹ûÒ»¸ö²éѯ´ó¼ÒËä¸ß£¬
--µ«Ö´ÐдÎÊýÉÙ£¬ÄÇÒ²¿ÉÒÔ²ÉÄÉ¡£
SELECT TOP 10
total_worker_time/execution_count AS avg_cpu_cost, plan_handle,execution_count,
    (SELECT SUBSTRING(text,statement_start_offset/2+1,
        (CASE WHEN statement_end_offset=-1
        THEN LEN(CONVERT(NVARCHAR(max),text))*2
        ELSE statement_end_offset
        END -statement_start_offset)/2)
    from sys.dm_exec_sql_text(sql_handle)
    ) AS query_text
from sys.dm_exec_query_stats
ORDER BY [avg_cpu_cost] DESC
--ÒÔÉÏDMVÖ»ÏÔʾµ±Ç°±»»º´æµÄ²éѯºÏ¼ÆÍ³¼ÆÐÅÏ¢
--ΪÁËÕÒ³ö¹¤×÷¸ººÉÖÐÔËÐÐ×îÆµ·±µÄ²éѯ£¬¾ÍÐèÒªÖ´ÐÐÏÂÃæµÄDMV²éѯ¡£
SELECT TOP 10 total_worker_time ,plan_handle,execution_count,
    (SELECT SUBSTRING(text,statement_start_offset/2+1,
        (CASE WHEN statement_end_offset=-1
        THEN LEN(CONVERT(NVARCHAR(max),text))*2
        ELSE statement_end_offset
        END -statement_start_offset)/2)
    from sys.dm_exec_sql_text(sql_handle)
    ) AS query_text
from sys.dm_exec_query_stats ORDER BY execution_count
--SQL ServerÔÚÓÅ»¯²éѯ¼Æ»®ÉÏ»¨·ÑµÄʱ¼ä¿ÉÒÔÓÃÏÂÃæµÄDM


Ïà¹ØÎĵµ£º

SQL ServerÊÂÎñÈÕÖ¾½ÒÃØ

ÊÂÎñÈÕÖ¾ÀïÃæ“²Ø”ןܶàÓÐÓõÄÐÅÏ¢¡£ËäÈ»SQL Server±¾Éí²¢Ã»ÓÐÌṩ·ÖÎö¹¤¾ß£¬µ«ÊÇÎÒÃÇ¿ÉÒÔʹÓõÚÈý·½¹¤¾ßÀ´Ò»Ì½¾¿¾¹¡£
Red GateÈí¼þÌṩÁËÒ»¿î½Ð×öSQL Log RescueµÄÃâ·Ñ¹¤¾ß£¬µ«ÊÇÖ»Ö§³ÖSQL Server 2000¡£ApexSQLºÍLumigent¹«Ë¾ÌṩµÄÁ½¿îÈí¼þ·Ö±ð½Ð×öApexSQL LogºÍLog Explorer£¬ËüÃÇÖ§³ÖSQL Server7¡¢2000ºÍ ......

sql server³£ÓÃÓï¾ä

1¡¢°´Ê±¼äÅÅÐò
select * from tbl_lms_loginhistory  order by loginhistory_logintime desc
2¡¢
  
ÔÚÒ»¸öÊý¾Ý¿âÖÐÊÇÏÂÁеÄÑù×Ó
³µ´Î Éí·ÝÖ¤ºÅ
27 1
27 2
45 1
25 1
45 2
ÏÖÔÚÎÒÏë »ñµÃµÄÊÇ
³µ´Î ³Ë×ø´ÎÊý
25 1
27 3
45 2
ÇëÎÊ£¬ÎÒµÄSQLÓï¾ä¸ÃÔõôд£¿
select ³µ´ ......

ÓÃSQLÓï¾ä´Óaspnet_profile±íÀïÈ¡Óû§µÄProfileÖµ

The aspnet_Profile table contains the following fields: UserId, PropertyNames, PropertyValuesString, PropertyValuesBinary,  and LastUpdatedDate. The PropertyNames field contains a string delimited with colons (:) that identify which profile fields are stored, what their datatype is and their of ......

ͨ¹ýHTTP·ÃÎÊSQL Server Analysis Service 2005

Ä¿µÄ£ºÍ¨¹ýHTTP·ÃÎÊMS SSAS 2005
ÅäÖ÷½·¨£º
Èç¹ûÏë·ÃÎʶÔÓ¦µÄcube£¬ÔòÐèÖ¸¶¨cubeËùÔڵķþÎñÆ÷Ãû³Æ
ʹ֮¿ÉÒÔͨ¹ýHTTPЭÒé½øÐзÃÎÊ£¬¿ÉÒÔ·µ»ØMDX²éѯËùµÃµ½µÄ½á¹û¼¯ºÍÔªÊý¾Ý
²éѯ½á¹û¼¯µÄ·½·¨ÊÇ£ºExecute()£¬ËüÄܹ»·µ»ØMDXÓï¾äµÄ²éѯ½á¹û
²éѯ½á¹û¼¯ÔªÊý¾Ý·½·¨£ºDiscover()£¬ËüÄܹ»·µ»ØMDXÓï¾äµÄÔªÊý¾ÝÐÅÏ¢¡£¸Ã·½·¨½ÏEx ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ