I'm using a query to pull query plans across all databases in a SQL Server instance. When I run this in SQL Studio the query runs against all databases in the instance, however my Go program only returns query plans from msdb. My Go program's connection only supplies the host, port, username, and password. Is there a way via connection configuration to query across all databases or do I need to list the databases and then query them individually?
I'm using a query to pull query plans across all databases in a SQL Server instance. When I run this in SQL Studio the query runs against all databases in the instance, however my Go program only returns query plans from
msdb
. My Go program's connection only supplies the host, port, username, and password. Is there a way via connection configuration to query across all databases or do I need to list the databases and then query them individually?Thanks in advance.