We have a 6 step where we copy tables from one database to another. Each step is executing a stored procedure.
- Remove tables from destination database
- Create tables in destination database
- Shrink database log before copy
- Copy tables from source to destination
- Shrink the database log
- Back up desstination database
during the step 4, our transaction log (ldf file) grows very large to where we now have to consistently increase the max size on the sql server and soon enough (in the far furture) we believe it may eat up all the resources on our server. It was suggested that in our script, we commit each transaction instead of waiting til the end to commit the transactions.
Any suggestions?