title: How to find out the dependencies of stored procedure using sql
body: <p>I want a script which will show the dependencies of stored procedure in database. Actually when we manually do view dependency it will take a lot of time I have more than 500 stored procedures. So, I wanted to know that these stored procedures are used in database or not so that I can remove the useless stored procedure. </p>
  
  <p><code>sp_depends</code> is not showing all results because I want all objects that depends on this stored procedure 'usp_Constant_Get_Pvt' and objects on which it depends.</p>
  
  <pre><code>EXEC sp_depends @objname = N'usp_Constant_Get_Pvt'
  </code></pre>