stored_procedure

Hello, my name is Mauricio Junior and today I will show you how to check the modified date from a Stored Procedure inside the SQL Server database. The same can be executed inside the Azure SQL Server database.

I had a problem because I didn't know when the stored procedure was updated inside the database. Just to you know, the sys.objects can record all the stories about the stored procedure create and modify date.

SELECT
	name, create_date, modify_date
FROM 
	sys.objects
WHERE 
	type='P' and name ='<SP_NAME>'
ORDER BY 
	modify_date DESC
	

In WHERE condition I need to put type='P' and the name of the stored procedure, in my case SP_GetContainerDetailsForSeedView. It's not necessary to be in master, you can be logged in the same database and server that you have your stored procedure.

Check the results...

Result

Image

I hope I helped you and any issues we can keep in touch via web site mauriciojunior.net