Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect #6613

Merged
merged 5 commits into from
Mar 8, 2018

Conversation

asranja
Copy link
Contributor

@asranja asranja commented Mar 6, 2018

No description provided.

Write-Verbose "Reaching SqlServer to check connection by running Invoke-SqlCmd"
Write-Verbose "Invoke-Sqlcmd -ServerInstance $serverName -Username $formattedSqlUsername -Password ****** -Query `"select getdate()`" -ErrorVariable errors | Out-String"

$output = Invoke-Sqlcmd -ServerInstance $serverName -Username $formattedSqlUsername -Password $sqlPassword -Query "select getdate()" -ErrorVariable errors | Out-String
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

@@ -250,3 +265,17 @@ function ConvertParamToSqlSupported
return $param
}

function Test-CommandExists
Copy link

@Ajay-MS Ajay-MS Mar 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you can write this as single condition of if block as if (Get-Command $commandName -ErrorAction SilentlyContinue) {}

Copy link

@Ajay-MS Ajay-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Change indentation before merging.

)

try {
Get-Command -Name $commandName
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add -ErrorAction Stop explicitly as well.

@asranja asranja merged commit a035732 into master Mar 8, 2018
asranja added a commit that referenced this pull request Mar 14, 2018
* SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect

* Addressing review comments

* Added connection timeout for Invoke-Sqlcmd

* Added troubleshooting section in README

* Updated README
asranja added a commit that referenced this pull request Mar 14, 2018
…6685)

* SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect (#6613)

* SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect

* Addressing review comments

* Added connection timeout for Invoke-Sqlcmd

* Added troubleshooting section in README

* Updated README

* Updated troubleshooting link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants