April 14, 2016 at 4:50 am
i copy scripts from msdn https://technet.microsoft.com/en-us/library/ms181929(v=sql.105).aspx
then run at sqlserver 2008 r2 with sp3 ,report error
SELECT TOP 5
total_worker_time / execution_count AS [Avg CPU Time] ,
SUBSTRING(st.text, ( qs.statement_start_offset / 2 ) + 1,
( ( CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END - qs.statement_start_offset ) / 2 ) + 1) AS statement_text
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st --message 102,lever 15,statss 1,row 9 '.' near with error
ORDER BY total_worker_time / execution_count DESC;
what should i do ?
April 14, 2016 at 5:36 am
Have you Googled the error message?
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
April 14, 2016 at 10:28 am
Using copy/paste from your post, I tried the query on my database (which is SQL Server 2012, so not the same version) and it ran without error.
Can you repost the complete error message using copy/paste from the error window? (I see some typos in the error message so I assume you typed it here instead of using copy/paste).
When you double-click the error message, what line in the query window is highlighted?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply