Skip to content

Commit c5a5d4f

Browse files
authored
Update Get-SQLServerLinkHistory.sql
1 parent 66b9fbf commit c5a5d4f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/tsql/Get-SQLServerLinkHistory.sql

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Script:
33
Get-SQLServerLinkHistory
44
55
Goal:
6-
Identify linked server usage by qurying the pla cache.
6+
Identify linked server usage by qurying the plan cache.
77
88
Potential Solution:
99
You can modify the query below to identify openquery, openrowset and specific link name usage (would require appending names to query).
@@ -13,7 +13,8 @@ Requiremets:
1313
Sysadmin or required SELECT privileges.
1414
1515
Known limitations:
16-
- If linked server is used via view/function it may not appear in your result set.
16+
- If linked server is used via view/function it may not appear in your result set. In these instances you would have to search the
17+
source code for link name references in functions/views, then search the plan cache for those function/views.
1718
- It will only include any sql that is in the plan cache.
1819
- The plan cache is cleared on restart.
1920
- SQL Server will clear out old plans from the cache once it's size limits are reached (can we check when it was last cleared?)

0 commit comments

Comments
 (0)