Job 'IntegrityCheck' failed

Susja 716 Reputation points
2020-12-25T23:57:46.807+00:00

Hello.
I am doing log shipping transaction from one primary database to 2 different secondary databases.
Then every morning I validate success by running the query (see attachment). My script checks that value of 'last_run_outcome' equal 1
I noticed that the value for Job 'IntegrityCheck' is 0.
I ran 'DBCC CHECKDB' against database and it completed successfully.
My question: could I disregard this failure in my query or need to troubleshoot?

Thanks51303-job-result.txt

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,963 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,652 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 112.7K Reputation points MVP
    2020-12-27T10:24:47.777+00:00

    So just above the error message about DBCC terminating abnormally, I see this being logged 80 ms earlier:

    Setting database option SINGLE_USER to ON for database 'app4_starlims_data_c2'.

    Assuming that this is done with ROLLBACK IMMEDIATE, this explains why DBCC terminated. I also made a test and verified that this operation results exactly in this message in the errorlog.

    You talk about restore - you can of course not restore a database and the same time run DBCC on the database.

    I checked that we set option 'disconnect' other users while restore database.

    That is unlikely to be the correct action. The correct action would be to reschedule the job so that the RESTORE runs and completes before DBCC. There is little point in running on DBCC on something you will throw away just a few minutes later.

    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Susja 716 Reputation points
    2020-12-27T14:57:05.843+00:00

    Well today is first time when I did not get error.
    We set to restore every 2 hours starting from midnight. Restore takes around 10 minutes.
    For now I will keep it 'disconnect from other users' i.e. in a single-user mode. It worked today hence I will monitor it for some while. In case it fail again .. I will reschedule restore operation.
    Thanks a lot for your advice.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.