Solved

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

Posted on 2004-09-17
7
272 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
ID: 12085628
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
ID: 12085754
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
ID: 12086737
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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:AlexPonnath
ID: 12086972
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
ID: 12087033
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
ID: 12087077
You could also try dbcc shrinkdatabase
0
 
LVL 10

Expert Comment

by:Jay Toops
ID: 12108706
did this work .. ??

did u get to try it?

JAY
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL tables, .net application and ETL connundrum 3 54
SQL Error - Query 6 25
Can > be used for a Text field 6 39
Sql server get data from a usp to use in a usp 5 16
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

776 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