File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
Get-SQLServerLinkHistory
4
4
5
5
Goal:
6
- Identify linked server usage by qurying the pla cache.
6
+ Identify linked server usage by qurying the plan cache.
7
7
8
8
Potential Solution:
9
9
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:
13
13
Sysadmin or required SELECT privileges.
14
14
15
15
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.
17
18
- It will only include any sql that is in the plan cache.
18
19
- The plan cache is cleared on restart.
19
20
- 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?)
You can’t perform that action at this time.
0 commit comments