Skipping LOG FILE??

  • I am importing huge data into SQL database and on each import SQL is writing all the data to database and log file as well; therefore taking around 30 mins.

    Is there any way to skip writing to log file? In Other word can we stop SQL Server from writing each insert to LOG FILE?

    Sabir

    hussain_sabir@hotmail.com

  • You can set your recovery model to bulk-logged during import. That way only the fact is recorded in the log, not each simgle operation. Right after the import, you can change it back to full, make a backup and that's it.

    But, IMHO, setting the recovery model to bulk-logged prevents you to act adequately on any corruption that might happen before the next backup.

    So, you should carefully consider if you give up the fault-tolerance of the full recovery model for the performance advantage of the bulk-logged.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thank you very much Frank.

    I will try it and then come back to you if i needed further help.

    Thanks agian,

    Sabir

    hussain_sabir@hotmail.com

  • You're welcome!

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Hi

    I had a similar problem - a script I was running took 57 minutes and increased the log file size from 287MB to 5.2GB. I changed the Automatically grow file percentage from 10% to 50%. My log file ended up being 8GB, but the script took 27 minutes, so I'm guessing that it was wasting some time incrementing the log file.

Viewing 5 posts - 1 through 4 (of 4 total)

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