Copy Data Server to Server - Batch size like DTS ?

  • I have millions of records to archive from Server A to Server B, based on a date range. If using DTS, I know that in the DTS Data Transform task I can set a batch size of 10,000 or 20,000. How does DTS do that ?

    I will probaly do it 1 month at a time (about 400,000 per month). If I archive outside of DTS, perhaps using T-SQL in a stored Proc or job, is there a way to batch records, or get the same benefit ?

  • Yes, you can set it on the destination for SQL Server in the advanced properties or right on the OLE DB page.

    CEWII

  • Sorry, I don't follow. Do you mean advanced properties of a job ?

  • No, within a dataflow you can use either an OLEDB destination or a SQL server destination. To get to the property we are looking for on the SQL Server destination you have to choose the advanced editor on the SQL Server destination within the dataflow.

    Not sure if that is any clearer if not I'll build an example..

    CEWII

  • I'm sorry, I might not have been clear. I'm familiar with how to set batch size in DTS. I was wondering if there's a way to control batch size when using other methods of transferring data in the same way that DTS does. And what are good alternatives ?

  • Yes, in SSIS it is just as I described.

    CEWII

  • Hey Homebrew you may do it using BCP, please find more info in the link below.

    Managing Batches for Bulk Import


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Does BCP and Bulk Insert work from SQL to SQL ? All the examples show .csv or some type of non-SQL file involved. I tried to write some code to bulk insert from 1 sql database to another, but didn't seem to work.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply