RE: Delete Data Without Log

From: mark baekdal (markbaekdal_at_discussions.microsoft.com)
Date: 12/21/04

  • Next message: Uri Dimant: "Re: Surogate keys?"
    Date: Tue, 21 Dec 2004 00:57:02 -0800
    
    

    I can tell you how I do it for the fastest way to delete records with the
    least amount of logging...

    first step is to select all the data I want to keep into a new permanent
    table, using select into then I drop any related fks to the original table,
    drop the original table, rename the new table and rebuild my indexes, pks and
    unique constraints and re-create the foreign keys with nocheck. This can save
    alot of time when doing large deletes as there is little logging required - I
    always think of the log as something that needs to be recorded in the case of
    a rollback - this method means the information regarding individual rows is
    not required in the event of a rollback. All of the above I bound within a
    transaction.

    regards,
    Mark Baekdal
    www.dbghost.com
    +44 (0)208 241 1762
    Living and breathing database change management for SQL Server

    "Yash" wrote:

    > Hi,
    > Is there any way to delete specific records from a table with out generating
    > the transaction logs.
    > --
    > Regards,
    > Yash
    >


  • Next message: Uri Dimant: "Re: Surogate keys?"

    Relevant Pages

    • Re: Traffic stop on PIX 515
      ... I have logging on, but the only thing I see just before traffic ... Regards ... >> Sometimes the traffic just stop passing for a period of time. ... >> If I log on to the PIX via serial interface, I can see it's running, ...
      (comp.security.firewalls)
    • Cant Start Win2000
      ... But yesterday I tried logging on and kept getting a ... command prompt in regards to Administrator and password to ...
      (microsoft.public.win2000.cmdprompt.admin)
    • Re: "System32" window open on startup?
      ... System32 Folder Opens When Logging on to Windows ... ssg MS-MVP ...
      (microsoft.public.windowsxp.general)
    • Re: An unusual log entry
      ... Depends on what you are logging. ... you logging on the server in regards to apache? ... > I found this in my Apache log, among all the Nimda GET requests: ...
      (comp.os.linux.security)
    • Re: create table as select and transaction logging
      ... So are you saying that a "create table" cannot run without ... Transaction logs are used to record what you write to tables before the ... create table as select and transaction logging ... and need to avoid journaling but the table create still appears to be ...
      (comp.databases.ingres)