This recipe describes how to run a query on multiple instances of SQL Server on multiple platforms. Managing multiple servers on this cross-platform operating system has always had its own challenges.
Running cross-platform T-SQL queries on multiple servers
Getting ready
Let's get started by capturing the server's details in an input CSV file:
- Prepare the input file with instance and credentials details, separated by a comma:
InstanceName,UserName,Password
10.2.6.50,SA,whoVista@2018
10.2.6.55,SA,whoVista@2019
- Save the PowerShell script in a file and open the PowerShell Core console to execute the PowerShell script file.