Skip to content

Commit 5a0c009

Browse files
Fixed permissions for tempdb space tips
1 parent 7939d84 commit 5a0c009

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

sqldb-tips/get-sqldb-tips-compat-level-100-only.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,11 @@ END CATCH;
14851485
-- For tips that follow, VIEW DATABASE STATE is insufficient.
14861486
-- Determine if we have VIEW SERVER STATE empirically, given the absense of metadata to determine that otherwise.
14871487
BEGIN TRY
1488-
DECLARE @a int = (SELECT 1 FROM sys.dm_os_sys_info);
1488+
DECLARE @a int = (
1489+
SELECT 1 FROM sys.dm_os_sys_info
1490+
UNION
1491+
SELECT 1 FROM tempdb.sys.dm_db_log_space_usage
1492+
);
14891493
END TRY
14901494
BEGIN CATCH
14911495
IF ERROR_NUMBER() <> 0

sqldb-tips/get-sqldb-tips.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,11 @@ END CATCH;
14801480
-- For tips that follow, VIEW DATABASE STATE is insufficient.
14811481
-- Determine if we have VIEW SERVER STATE empirically, given the absense of metadata to determine that otherwise.
14821482
BEGIN TRY
1483-
DECLARE @a int = (SELECT 1 FROM sys.dm_os_sys_info);
1483+
DECLARE @a int = (
1484+
SELECT 1 FROM sys.dm_os_sys_info
1485+
UNION
1486+
SELECT 1 FROM tempdb.sys.dm_db_log_space_usage
1487+
);
14841488
END TRY
14851489
BEGIN CATCH
14861490
IF ERROR_NUMBER() <> 0

0 commit comments

Comments
 (0)