Upload Replication : Bulk copy failed

Document ID : KB000032001
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

During execution of Upload Replication job following error appears :

Upload - Replication Job Done. Warning: though the job was completed, an error occurred: Bulk copy failed for table: inv_generalinventory_item. Please examine the log file for more details

Upload Replication Error

 

Similar error could occurs on tables inv_generalinventory_tree and ca_discovered_software :

 

Upload - Replication Job Done. Warning: though the job was completed, an error occurred: Bulk copy failed for table: inv_generalinventory_tree. Please examine the log file for more details

 

Upload - Replication Job Done. Warning: though the job was completed, an error occurred: Bulk copy failed for table: ca_discovered_software. Please examine the log file for more details

 

Explanation:

Engine is using SQL bulk copy method for replication of tables inv_generalinventory_item, inv_generalinventory_tree and ca_discovered_software.

In order to do the bulk copy, 3 tables are created on the Enterprise database :
ca_itrm.bulk_<domainid>_<engineid>_item
ca_itrm.bulk_<domainid>_<engineid>_tree
ca_itrm.bulk_<domainid>_<engineid>_software
 
 
<domainid> : it is the domainid of DOMAIN (column domain_id of table ca_n_tier)
<engineid> : it is the engine ID of Engine (column unit_id of table ca_agent)

 

Example :

Bulk Tables

 

If user ca_itrm had temporary the sysadmin privileges on Enterprise database, the bulk tables could have been created with dbo schema.

In this case same bulk tables could appear with dbo and ca_itrm schema.

Example :

Duplicate Bulk Tables

 

These duplicates tables could cause an error during Upload Replication.

 

Solution:

1- On Enterprise database, open Microsoft SQL Server Management Studio.
Go under Security - Logins.
Right click on ca_itrm and select properties.
Make sure that sysadmin is not checked in Server Roles

ca_itrm sysadmin

 

2- Do a backup of Enterprise mdb database 

 

3- Delete the bulk_* tables with dbo owner on Enterprise mdb database :
 
dbo.bulk_<domainid>_<engineid>_tree
dbo.bulk_<domainid>_<engineid>_item
dbo.bulk_<domainid>_<engineid>_software

Delete Tables