July 24, 2013 at 9:42 am
Is there any free script or software for SQL dependycy?
Red-gate has one but need to purchase.
July 24, 2013 at 9:46 am
July 25, 2013 at 1:35 pm
In SSMS, you can right click an object and select 'View Dependencies'.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
July 25, 2013 at 1:45 pm
It works for me. Thanks.
July 25, 2013 at 2:03 pm
Eric M Russell (7/25/2013)
In SSMS, you can right click an object and select 'View Dependencies'.
As far as I know, those dependencies are only within the database. If there are objects outside the database referencing objects inside the the database, they won't appear.
July 25, 2013 at 2:11 pm
Luis Cazares (7/25/2013)
Eric M Russell (7/25/2013)
In SSMS, you can right click an object and select 'View Dependencies'.As far as I know, those dependencies are only within the database. If there are objects outside the database referencing objects inside the the database, they won't appear.
Someone earlier suggested a link to a script that queries system tables, but SQL Server doesn't keep track of cross-databse dependencies. For dependencies outside the database, the tool would have to perform T-SQL code parsing and analysis.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
July 25, 2013 at 2:21 pm
at least in SQL2008 and above, for cross database or cross server references, references are at least tracked in the current database, but not enforced of course
this query has two specific columns to peed peek at for non-nulls:
referenced_server_name and referenced_database_name
those get populated for non-dynamic SQL procedures, and for any other objects that get created automatically.
SELECT objz.name,
fn.*
FROM sys.objects objz
CROSS APPLY sys.dm_sql_referenced_entities(schema_name(schema_id) + '.' + objz.name,'OBJECT')fn
Lowell
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply