Skip to content

Commit

Permalink
Updated ExecuteSQLScript.ps1 in Azure Automation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nboettcher committed Jan 11, 2018
1 parent 7222815 commit 3697d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ExecuteSQLScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ($fpadminUser)
}

$sqlCredential = Get-AutomationPSCredential -Name 'SQLCredentials'
$connectionString = "Data Source=" + $sqlServer + ";Initial Catalog=" + $database + ";User ID=" + $sqlCredential.UserName + ";Password=" + $sqlCredential.GetNetworkCredential().Password + ";Connection Timeout=90;ConnectRetryCount=3;ConnectRetryInterval=10;"
$connectionString = "Data Source=" + $sqlServer + ";Initial Catalog=" + $database + ";User ID=" + $sqlCredential.UserName + ";Password=" + $sqlCredential.GetNetworkCredential().Password + ";Connection Timeout=90;"
$connection = New-Object -TypeName System.Data.SqlClient.SqlConnection($connectionString)
$query = $createDatabase
$command = New-Object -TypeName System.Data.SqlClient.SqlCommand($query, $connection)
Expand Down

0 comments on commit 3697d19

Please sign in to comment.