A read-only database (database1) is updated via log shipping every minute, then a procedure queries multiple tables in it and refreshes a large table on database2.
For this process I
run an "expensive" query against database1 and generate a new Table in database2 (Table_A_TEMP)
BEGIN TRAN DROP TABLE Table_A RENAME Table_A_TEMP to Table_A COMMIT
Does it look too ugly? Otherwise I would have to create a very complex verifications and updates.
Suggestions to minimize locks?