1

Last week I deployed dbccheck on the production environment. I found strange thing and have no idea what the problem is. We have 40 db vm's which are not domain joined. Each of db vm's have same windows login credential and DB with sql server authentication having sysadmin privilege and are configured as below.

Set-DbcConfig -Name policy.storage.backuppath -Value \\backup\userfull

Set-DbcConfig -Name app.sqlinstance -Value 10.1.1.1

Set-DbcConfig -Name app.computername -Value DB-22

Set-DbcConfig -Name app.sqlcredential (Get-Credential Username)

Set-DbcConfig -Name policy.ola.userfullretention -value 47

Whenever I run the below command with manually passed credentials, it works fine but if I remove the (-SqlCredential (Get-Credential username)) and run. it fails.

Invoke-DbcCheck backuppathaccess, UserFull,FailedJob, olainstalled, Storage -SqlCredential (Get-Credential username) -Show Summary -PassThru | Update-DbcPowerBiDataSource -Environment Production Start-DbcPowerBi

Running Invoke-DbcCheck   backuppathaccess, UserFull,FailedJob, olainstalled, Storage

I need to run without providing credential manually.

It looks like the dbachecks module is up to date:

Dbachecks Version

3
  • Did you pass the SQL Server authentication credentials to the Invoke-DbcCheck command?
    – user580950
    Feb 3 at 21:22
  • yes, Passing SQL Server authentication credentials to Invoke-DBccheck works perfectly, but i want to avoid passing credential every time i need report. I need it to work without passing SQL Server authentication Credential even though i have save Credential using Set-DbcConfig -Name app.sqlcredential (Get-Credential Username) . , I need BI report by only running this Invoke-DbcCheck backuppathaccess, UserFull,FailedJob, olainstalled, Storage .............................I would be grateful if have idea or suggestion regarding this.
    – kedar
    Feb 4 at 13:02
  • To run Invoke-DbcCheck without manually passing the SQL Server authentication credentials, you need to store the credentials in an encrypted form in a secure location, and then retrieve them in your script when needed. This can be done using the Windows Data Protection API (DPAPI). Try that.
    – user580950
    Feb 5 at 21:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.