Question

We need to execute a query on a SQL Server 2005 database to get some stats about the longest executions on it.

We've found the next query:

select top 10 source_code,stats.total_elapsed_time/1000000 as seconds,
last_execution_time from sys.dm_exec_query_stats as stats 
cross apply
(SELECT text as source_code FROM sys.dm_exec_sql_text(sql_handle))
AS query_text
order by total_elapsed_time desc

It works fine, but it requires the database has a 90 compatibility level (SQL Server 2005). This database has a 80 level (SQL Server 2000). If we change it to 90... could it be dangerous to the daily tasks? I mean, could our applications crash if we change it?

Thank's and sorry for my English.

Was it helpful?

Solution

Finally I didn't need it. There was another database that had the 90 compatibility level and I used that one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top