I need to write a batch file that will, among other things, connect to a MS SQL server and extract all the content of 3 tables (dbo.Group, dbo.Membership and dbo.Person) to 3 separate CSV files. The CSV files should be with headers (column names in the tables), semicolon separated and UTF-8.
The machine running the batch file will be Windows 10 or Server 2012, connecting to another server on the network running MS SQL Server.
Any ideas how to go about this?