Context: I have a sql server database engine called DB4, and it's updating all its databases from another database engine called DB5 through the Sql server agent every 5 hours. I don't have access to DB5, but I have been told DB5 is also updating from somewhere else.
Problem: The problem is that sometimes the two database engines will update their databases simultaneously, so the DB4 cannot update completely.
Question: Is there any way I can detect if DB5 is updating? Then I can write in the sql server agent jobs, says if the DB5 is not updating then update DB4, otherwise do nothing.
PS: The way DB4 updates is processed by many Agent Jobs. Somebody wrote many scripts in the jobs. Basically, the scripts are like this format:
TRUNCATE Table_Name
INSERTINTO Table_Name
SELECT field_name1,field_name2......
FROM DB5.database_name.table_Name