Solved

Dow can i delete records without creating a entry in transaction log

Posted on 2004-09-17
7
245 Views
Last Modified: 2010-08-05
I have a DB server which is almost out of space and i need to delete some data / rows in a large table to make space.
my problem is that when i try to delete the row the system is trying to write to the translog but there is no more space to grow it.

is there a way to temp disable any logging while i delete the records ? Or any othere way to make this happen ?
0
Comment
Question by:AlexPonnath
7 Comments
 
LVL 10

Accepted Solution

by:
Jay Toops earned 300 total points
Comment Utility
change your logmode to simple
THEN ..
if it still wont do that transaction
you will have to delete a FEW records at a time like
delete from MYTABLE where id > 1 and id < 1000

OR

simply add annother LOGFILE in the database setup
you could EVEN use a network drive if your desperate..
of course this will be VERY slow

JAY
0
 
LVL 10

Expert Comment

by:imrancs
Comment Utility
if you are deleting all the record from the table then you have another option; you can use TRUNCATE TABLE <tablName>. TRUNCATE is not a logged operation.


Imran
0
 
LVL 42

Expert Comment

by:EugeneZ
Comment Utility
TRUNCATE table as imrancs  told is the answer
additionally if it is sql server 2000
you cab try to chenge recovery mode to simple recovery mode

 simple recovery mode does is, it truncates the log
each time SQL Server performs a checkpoint

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:AlexPonnath
Comment Utility
that does not help, i can not dump the whole table and and doing simple has no impact, when i delete more then 200 K rows it fails becaus
of log is full....
0
 
LVL 10

Expert Comment

by:Jay Toops
Comment Utility
THEN ..
if it still wont do that transaction
you will have to delete a FEW records at a time like
delete from MYTABLE where id > 1 and id < 1000
or by some other column that you can slice the table up into pieces with

JAY
0
 
LVL 6

Assisted Solution

by:mcp111
mcp111 earned 200 total points
Comment Utility
You could also try dbcc shrinkdatabase
0
 
LVL 10

Expert Comment

by:Jay Toops
Comment Utility
did this work .. ??

did u get to try it?

JAY
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now