Fix error displayed when insights files can't be found and fix server-report insights in dev build (#18635)

* Fix error

* fix queries
This commit is contained in:
Charles Gagnon
2022-03-04 13:10:35 -08:00
committed by GitHub
parent 9e3d678536
commit 1c83aa61d7
17 changed files with 12 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
with fs
as
(
select database_id, type, size * 8.0 / 1024 size
from sys.master_files
)
select
name,
(select sum(size) from fs where type = 0 and fs.database_id = db.database_id) DataFileSizeMB,
(select sum(size) from fs where type = 1 and fs.database_id = db.database_id) LogFileSizeMB
from sys.databases db
where database_id > 4