bulk-logging recovery model question

  • I am migrating data from one database to another, making funtional changes to the data. Most of the operations are accomplished with the following pattern:

    INSERT INTO target

    SELECT FROM several joined source tables

    I have tried using both simple and bulk-logging recovery model. Both are producing the exact same logs. The logs are many many times the size of the target database. My primary experience is not SQLServer, but I thought that "mass change" operations like mine were minimally logged when using the bulk-logging recovery model.

    This does not seem to be the case.

     

    Regards,

    Keith

     

  • Keith,

    INSERT... SELECT is not minimally logged, but SELECT... INTO is.

    If your migration strategy allows, see what results you get from say:

    SELECT columns|*

    INTO target /* must not already exist */

    FROM several joined source tables

     


    Cheers,
    - Mark

  • Thanks! It wasn't clear to me that SELECT INTO wasn't INSERT SELECT. Microsoft documentation is often inprecise. I'll look into this. We cannot change most of the SQL, but we can take advantage of this in some spots. My experience is primarily with Oracle and DB2.

    Regards,

    Keith

Viewing 3 posts - 1 through 2 (of 2 total)

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