I need to modify function and I need to know what the impact might be by looking other object that depending on this function such as stored procedure, function etc etc. Now, is there anyway I can find this that can go through all codes? I have a lot of stored procedure/functions on this.
There is possibility within storedproc that have a dynamic constructed query such as @SQL = ‘SELECT BLA BLA’
Is there any third party tools that can be used to detect this?
Thank you
Third Party Tools
Redgate SQL Refactor or Dependency Tracker might be best actually.
Apex SQL Clean
Home Made Solutions
You can use
sp_dependsbut this depends on the dependency information being up to date.Running
sp_refreshsqlmoduleon all objects in the database can update this if there is any missing dependency information.This won’t find places where you have used it in dynamic SQL though. You may be able to track these down with.
Assuming that your dynamic SQL string doesn’t bizarrely split the function name up.