diff --git a/recipes/newrelic/infrastructure/ohi/sql/ms-sql.yml b/recipes/newrelic/infrastructure/ohi/sql/ms-sql.yml index d24badc8a..51e347905 100644 --- a/recipes/newrelic/infrastructure/ohi/sql/ms-sql.yml +++ b/recipes/newrelic/infrastructure/ohi/sql/ms-sql.yml @@ -265,12 +265,12 @@ install: if (Test-Path $NriSqlFile) { Remove-Item $NriSqlFile } Add-Content -Path $NriSqlFile -Value $SQL -Force 2>&1 # Try with env if passed in - if ($NR_SQL_USERNAME -and $NR_SQL_PASSWORD) { + if ($NEW_RELIC_MSSQL_SQL_USERNAME -and $NEW_RELIC_MSSQL_SQL_PASSWORD) { Write-Host "sqlcmd with credentials" - $SqlOutput=(sqlcmd -U $NR_SQL_USERNAME -P $NR_SQL_PASSWORD -S $connection -i $NriSqlFile 2>&1) + $SqlOutput=(sqlcmd -U $NEW_RELIC_MSSQL_SQL_USERNAME -P $NEW_RELIC_MSSQL_SQL_PASSWORD -S $connection -i $NriSqlFile 2>&1) } # Env failed or blank, try with default - if ([string]::IsNullOrWhiteSpace($NR_SQL_USERNAME) -or ($SqlOutput.Length -lt 3)){ + if ([string]::IsNullOrWhiteSpace($NEW_RELIC_MSSQL_SQL_USERNAME) -or ($SqlOutput.Length -lt 3)){ Write-Host "sqlcmd with no credentials" $SqlOutput=(sqlcmd -S $connection -i $NriSqlFile 2>&1) }