I have a MSSQL with several DB's and I want to get logspace info (DBCC SQLPERF(logspace)) about each of these DB's.How can I do this if I don't know how many DB's are on this MSSQL server?
I would recommend leveraging AppInsights to monitor your SQL Instance: https://documentation.solarwinds.com/en/Success_Center/SAM/Content/SAM-AppInsight-for-SQL-sw1261.htm