Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Script through which we cannot store data into ldf file Expand / Collapse
Author
Message
Posted Monday, December 24, 2012 3:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 24, 2012 2:51 AM
Points: 1, Visits: 0

Query:I delete a table in sql server 2008,and,i do not want this entry to go to our ldf(log files).In this way,my purpose is that,the size of ldf should remain constant.

Requirement:Now I want a script through which I can make the above feature, available in my procedures.

NOTE:Please don't answer out that the above feature can be made available by recovery models.I want a script in this regard.
Post #1399850
Posted Monday, December 24, 2012 8:13 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 12:12 PM
Points: 1,219, Visits: 1,263
ajay6789 (12/24/2012)

Query:I delete a table in sql server 2008,and,i do not want this entry to go to our ldf(log files).In this way,my purpose is that,the size of ldf should remain constant.

Requirement:Now I want a script through which I can make the above feature, available in my procedures.

NOTE:Please don't answer out that the above feature can be made available by recovery models.I want a script in this regard.

Not possible.

All transactions in a database are logged (one way or another). That's kinda the core functionality of the database system. You could truncate the table -- which logs the pages that get deallocated. See this thread: http://www.sqlservercentral.com/Forums/Topic648742-338-1.aspx

Rob
Post #1399912
Posted Tuesday, December 25, 2012 10:25 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 4:06 AM
Points: 976, Visits: 550
Transaction log is a critical component of the database system, if there is a system failure, the transaction log might be required to bring back the database to a consistent state.

Every transaction which is made in the database is logged in the transaction log for recovery/rollback purpose. So, it is not possible to stop logging any specific transaction(s).

You can truncate the table instead of deleting the rows, truncate operation is minimally logged when compared to delete operation. This helps you keeping your Tlog size small.


Regards,
Ravi.
Post #1400144
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse