Hi all,
I am trying to deploy an SSIS project with SQL server authentication, using powershell to a virtual machine.
As far as I am aware, SSIS deployment is possible with SQL Server authentication. Do I need to change something on the server side?
Script:
$ServerName = "XX.XX.XX.XX" $UserName = "test" $UserPassword = "test" $SSISCatalog = "SSISDB" $ProjectFilePath = "C:\ReleaseProcess\Test.ispac" $ProjectName = "Test" $FolderName = "Test" # 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=$ServerName;Initial Catalog=master;User ID=$UserName;Password=$UserPassword;TrustServerCertificate=True;" $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionString Write-Host "Connected" $integrationServices = New-Object "$ISNamespace.IntegrationServices" $sqlConnection $catalog = $integrationServices.Catalogs["SSISDB"] $folder = $catalog.Folders[$FolderName] # Read the project file, and deploy it to the folder Write-Host "Deploying Project ..." [byte[]] $projectFile = [System.IO.File]::ReadAllBytes($ProjectFilePath) $folder.DeployProject($ProjectName, $projectFile)
So I get the below error:
Exception calling "DeployProject" with "2" argument(s): "The operation cannot be started by an account that uses SQL Server Authentication. Start the operation with an account that uses Integrated Authentication." At line:38 char:1+ $folder.DeployProject($ProjectName, $projectFile)+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException+ FullyQualifiedErrorId : SqlException