November 2018
Intermediate to advanced
566 pages
17h 15m
English
In this topic, the database named PackPub is created on the entire listed instances of the CSV file. The CSV file provides the required data to build and manipulate the SQL instances. The reading of the CSV file is done through the Import-Csv cmdlet. The CSV file has Linux and Windows SQL instance IP addresses.
The Import-Csv cmdlet reads the text from the CSV file. To manipulate SQL Server instances and its objects programmatically, first, we need to instantiate the SMO class libraries by creating an object. The main object is created and referred for the instance type using the Microsoft.SqlServer.Management.Smo.Server namespace, like so:
$SQLServerObject=New-Object Microsoft.SqlServer.Management.Smo.Server $SQLServer
Read now
Unlock full access