SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Script through which we cannot store data into ldf file


Script through which we cannot store data into ldf file

Author
Message
ajay6789
ajay6789
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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.
Rob Taylor
Rob Taylor
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3846 Visits: 1616
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
Ravi SQL
Ravi SQL
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1122 Visits: 577
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search