This article has the script that will be useful to find the names of the Stored procedure that has used dynamic sql within the definition of the Stored procedure . In this post , I am creating a sample database with four stored procedures to show an example on how the script works :