List New Stored Procedures

programming-transactsql

Sometimes people add new stored procedures to your SQL Server database without your knowledge. You need a way to detect new stored procedures using Transact-SQL.

SELECT name,sys.objects.create_date
FROM sys.objects
WHERE type='P'
AND DATEDIFF(D,sys.objects.create_date,GETDATE());

Just change the value of “D” to match the number of days to check. If you use a “7”, this script will show those stored procedures created in the last 7 days.

Advertisements

1 thought on “List New Stored Procedures”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s