We have a SSIS package which loads the data from csv files to DB. It only loads the new entries ie if the row already exists in the tables than it doesn't insert it. For this we load the CSV to temp tables for respective schemas and than those are compared with base tables of respective schemas and inserted new rows. For this we use Merge statement.
It take few minutes but the problem is many times it locks the entire DB during this process.
Can anyone kindly help to troubleshoot this problem?