TSQL queries-Look into SQL Server Db!!! sysobjects,syscomments,information_schema,sysjobs,sysjobsteps
When I need to change anything in my database or I need to analyze something in it I generally try to play safe and I hope we all try to do so :) !!! I mean, I research on the flow and dependencies and then will jump on any conclusion/solution. Here I just want to share few T-SQL queries which I use for this purpose. These queries also helps in regression. First Query to find presence of particular text in any SQL object. Text can be a table name (in order to find out where all this table is getting used), it can be a procedure or view's name. SQL objects can be procedures, views etc.. SELECT NAME FROM SYSOBJECTS WHERE ID IN ( SELECT ID FROM SYSCOMMENTS WHERE TEXT LIKE '%TEXT GOES HERE%' ) Second Query to find out the dependencies between SQL objects. e.g Table A is getting used in View B. Then the below mentioned query will give you Table A's name as output as View B has dependecy on Table A. Note : if View B is further used in View C and we use V...