
If you’ve never used it before, it allows you to connect to a domain controller and query AD the same way you’d query any other linked server. SQL Server provides some pretty flexible integration with Active Directory through the ADSI Linked Server provider, something that’s present by default when you install SQL Server.


WHERE a.tablespace_name = b.tablespace_name TRUNC(SUM(GREATEST(bytes,maxbytes))/1024/1024) AS max_size_mb TRUNC((max_free_mb/max_size_mb) * 100) AS free_pct,
