How to check date of last change in stored procedure or function in SQL server

I need to check when function was changed last time. I know how to check creation date (it is in function properties window in SQL Server Management Studio). I found that in SQL Server 2000 it wasn’t possible to check modify date ( look at this post: Is it possible to determine when a stored … Read more

Script to kill all connections to a database (More than RESTRICTED_USER ROLLBACK)

I have a development database that re-deploy frequently from a Visual Studio Database project (via a TFS Auto Build). Sometimes when I run my build I get this error: ALTER DATABASE failed because a lock could not be placed on database ‘MyDB’. Try again later. ALTER DATABASE statement failed. Cannot drop database “MyDB” because it … Read more

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2). I’ve received “Server is unavailable” errors before, but am now seeing a connection timeout error. I’m not familiar with this – why does it occur and … Read more