Relative Content

Tag Archive for sql-serverpowershellsql-server-2019

SQL Server performance optimize bulk copy large volume of data using powershell

We receive daily SQL Server database backups from a third-party vendor that we restore. After the database is online we use bcp to export all of the tables data as .csv files for other applications and vendors to consume this data. The problem I run into is when the database size is small ~ 20 GB it works alright but when the data volume is large > 50 GB everything slows down. These are nightly jobs and sometimes even after 10 hours I see the process in a hanged state with partial data in the storage. Are there any other options to performance optimize powershell script.