1

Last week I started testing dbccheck on my test system. I found one strange thing, and I have no idea what is the problem, last fullbackup is few hours old, but dbccheck print an error.

Following you can see my steps:

installation dba checks

  • based on the blog from chrissy lemaire (thank you chrissy,for that great job)

change configuration

Set-DbcConfig -Name policy.backup.fullmaxdays   3
Set-DbcConfig -Name policy.backup.logmaxminutes 720

first check

$server = "ALET21"
Invoke-DbcCheck -SqlInstance $server -Check LastBackup

here the result:

result DbcCheck

The dbccheck print an error

I did the same test with PS Command, following you can see the results:

result PS command

any idea what is the problem?

AdminDB DB is not new, creation date was on 23.11.2016. I also updated the policy.backup.newdbgraceperiod to 1, but I have the same problem, as you can see below:

same problem

It looks like the dbacheck module is up to date:

Version

  • You will need to use the same device and browser (without clearing cookies) if you want to use an unregistered account while retaining the ability to edit your question and comment on answers. You might find it more convenient to register instead. – Paul White Mar 27 '18 at 7:10
2

I am going to assume that this database (AdminDB) is newly created and newly backed up?

There was an issue created for this as new databases were failing these tests. https://github.com/sqlcollaborative/dbachecks/issues/207

A new configuration was created "policy.backup.newdbgraceperiod" (defaulting to value 0 for 0 hours) that excludes new databases created.
For example, it defaults to 0 so it includes all new databases e.g. (Get-Date).AddHours( - (policy.backup.newdbgraceperiod) )

New database is called QuickBackup

As you can see, the new database QuickBackup fails.

Now when we allow a grace period of 1 hour for new databases:

Set-DbcConfig -Name policy.backup.newdbgraceperiod -Value 1

Value set to 0

Our new database is excluded now:

QuickBackup is no longer there

2

I think you are using an old version of dbachecks.

Please can you check by comparing the latest version

(Find-Module dbachecks).Version

with

(Get-Module dbachecks).Version.ToString()

I think you are hitting this issue

https://github.com/sqlcollaborative/dbachecks/issues/410

as the value that is coming back for the Backup Date is null. This was fixed last week

You can get the latest version of this (and any module from the PowerShell Gallery using

Update-Module dbachecks

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.