search cancel

Download Replication Warning with ca_query_version

book

Article ID: 243424

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager

Issue/Introduction

Download replication job has following Warning message :

Warning: though the job was completed, an error occurred: A database constraint violation error occurred for table: ca_query_version. Please examine the log file for more details

Environment

Client Automation - All Versions

Resolution

Execute following SQL script on Enterprise mdb database :

 

use mdb

DECLARE @query_uuid binary(16)
DECLARE @MyCursor CURSOR

SET @MyCursor = CURSOR FAST_FORWARD
FOR
SELECT query_version_uuid FROM ca_query_version

OPEN @MyCursor
FETCH NEXT FROM @MyCursor
INTO @query_uuid

WHILE @@FETCH_STATUS = 0
BEGIN

   UPDATE ca_query_version set version_number=version_number+1 where [email protected]_uuid

   FETCH NEXT FROM @MyCursor
   INTO @query_uuid

END

CLOSE @MyCursor
DEALLOCATE @MyCursor