I have a SQL Server 2005, which works fine and on some time it starts to use 100% of CPU. Then website is slow, get timeout messages etc.
I used this query to find current queries:
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
When I run query above, it shows me about 40 records, and most of them are code for creating stored procedures. Same like when you go in Management Studio "Script stored procedure As", and then select "CREATE to".
So, it looks like these 3 stored procedures are constantly re-created.
After a while, I restarted the server and now it works fine. But, it repeats this behavior every day.
Anyone have an idea what could cause this?