-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathcreateSSISCatalog.ps1
More file actions
26 lines (18 loc) · 1.11 KB
/
createSSISCatalog.ps1
File metadata and controls
26 lines (18 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# from https://github.com/teach-for-america/ssiscicd/blob/master/docker/mssqlssis/create_ssis_catalog.ps1
# script to create ssis catalog and deploy ssis ispac file
# Load the IntegrationServices Assembly
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.IntegrationServices")
# Store the IntegrationServices Assembly namespace to avoid typing it every time
$ISNamespace = "Microsoft.SqlServer.Management.IntegrationServices"
Write-Host "Connecting to server ..."
# Create a connection to the server
$sqlConnectionString = "Data Source=localhost;Initial Catalog=master;Integrated Security=SSPI;"
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionString
Write-Host "connection string: "+$sqlConnectionString
Write-Host "connection: "+$sqlConnection
# Create the Integration Services object
$integrationServices = New-Object $ISNamespace".IntegrationServices" $sqlConnection
# Provision a new SSIS Catalog
$catalog = New-Object $ISNamespace".Catalog" ($integrationServices, "SSISDB", "P@assword1")
$catalog.Create()
Write-Host "Catalog created: "+$catalog