I have a some exported rows that I want to import into a database that is currently live. Should I disable the app that interacts with the DB before doing the bulk-insert so that the BI is the only operation being performed?
I assumed that this would be best-practice but just wanted to check with the community.
Many Thanks!
I wouldn’t generally disable any other app using the database. To me, the bulk load is just another client of the database and is subject to the usual concurrency/isolation mechanisms.
There are exceptions where the bulk load is part of some long running release process or maintanance routine, in which case it’d out of hours anyway
I always use a staging table to load data though. After after processing, scrubbing, cleansing and key lookups etc, I’d flush the data to the live table in a single atomic operation. In other words, I wouldn’t mix bulk loads with other table access: I’d buffer the bulk load via a staging table