In this post we will discuss how we can retrieve all the stored procedures created and modified in last N days in SQL Server 2008.
Also you can check out my previous posts on:
- Working with enterprise library for data access in asp.net Part-3
- How to handle exception in sql server stored procedure?
- Forms based authentication in asp.net
Below is the query that will give us all the stored procedures that has been created in the last 30 days:
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 30
Below is the query that will give us all the stored procedures that has been modified in the last 30 days:
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 30
Hope it will be useful to you !!!
Also you can check out my previous posts on:
- Working with enterprise library for data access in asp.net Part-3
- How to handle exception in sql server stored procedure?
- Forms based authentication in asp.net
Below is the query that will give us all the stored procedures that has been created in the last 30 days:
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 30
Below is the query that will give us all the stored procedures that has been modified in the last 30 days:
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 30
Hope it will be useful to you !!!