Friday, August 12, 2016

List all stored procedures which are modified recently in a SQL Server database

In SQL Server Management Studio:

  1. Navigate to your database > Programmability 
  2. Press F7 (or) View > Object Explorer Details
  3. In the Object Explorer Details window right click anywhere on the header row and select "Date Last Modified" field (in case it isn't selected already)




T-SQL Script to achieve the same result:

Option 1:

SELECT
    name,
    create_date,
    modify_date
FROM sys.procedures
WHERE modify_date > '2016-08-09'
ORDER BY modify_date DESC;

Option 2:

SELECT
specific_name,
created,
last_altered
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_type = N'PROCEDURE'
and last_altered > '2016-08-09' 
ORDER BY last_altered DESC;

No comments: