Skip to content

Commit d3a0cc1

Browse files
Merge branch 'BrentOzarULTD:dev' into dev
2 parents da4d6f3 + 0eab78e commit d3a0cc1

3 files changed

Lines changed: 301 additions & 81 deletions

File tree

sp_BlitzCache.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,7 @@ BEGIN
15791579
RAISERROR('Checking for Read intent databases to exclude',0,0) WITH NOWAIT;
15801580

15811581
EXEC('INSERT INTO #ReadableDBs (database_id) SELECT DBs.database_id FROM sys.databases DBs INNER JOIN sys.availability_replicas Replicas ON DBs.replica_id = Replicas.replica_id WHERE replica_server_name NOT IN (SELECT DISTINCT primary_replica FROM sys.dm_hadr_availability_group_states States) AND Replicas.secondary_role_allow_connections_desc = ''READ_ONLY'' AND replica_server_name = @@SERVERNAME OPTION (RECOMPILE);');
1582+
EXEC('INSERT INTO #ReadableDBs VALUES (32767) ;'); -- Exclude internal resource database as well
15821583
END
15831584

15841585
RAISERROR(N'Checking plan cache age', 0, 1) WITH NOWAIT;

0 commit comments

Comments
 (0)