Showing posts with label thousand. Show all posts
Showing posts with label thousand. Show all posts

Thursday, March 29, 2012

Deleting records in the logfile

I have a database that is used to store a lot of data. We load the data on a
daily basis, several thousand records per day. The Log file is not needed,
so whats the best way to delete the records in it and reduce the size

Thanks

Derrick"Derrick King" <derrick.king@.bradford.gov.uk> wrote in message
news:c1l7ag$ejl$1@.newsreaderm1.core.theplanet.net. ..
> I have a database that is used to store a lot of data. We load the data on
a
> daily basis, several thousand records per day. The Log file is not needed,
> so whats the best way to delete the records in it and reduce the size
> Thanks
> Derrick

You don't mention which version of MSSQL you have, but assuming it's 2000,
then see "Recovery Models" in Books Online. If you don't need transaction
log backups, the easiest solution is probably to set the database to Simple
recovery mode, which will automatically recover log space if possible.

If that's not acceptable, then you can consider transaction log backups (if
you don't already do that), which will truncate the log. Truncating the log
frees up log space but does not make it physically smaller, so you may also
need to use DBCC SHRINKFILE - see "Shrinking Databases".

Simon

Friday, February 17, 2012

Delete Query

Can anyone help me with this error? I am trying to delete several
thousand records at a time, but for some reason I continue to get the
following error. I just applied SP3a for SQL2K hoping that would fix the
problem, but it has not. Thanks in advance.
delete [GA_SingleFamily] from (select top 500 * from [GA_SingleFamily]) as
stuff Where [GA_SingleFamily].ml = stuff.ml
Event Type: Error
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17055
Date: 10/6/2003
Time: 12:08:48 PM
User: N/A
Computer: DATASERVERA
Description:
17066 :
SQL Server Assertion: File: <recbase.cpp>, line=1378
Failed Assertion = 'm_offBeginVar < m_SizeRec'.
--
Doug Threewittdelete [GA_SingleFamily]
from
[GA_SingleFamily]
inner join
(select top 500 ml from [GA_SingleFamily]) as stuff --(don't use * if you
only want 1 col)
on [GA_SingleFamily].ml = stuff.ml
jobi
"Doug Threewitt" <doug@.seisystems.com> wrote in message
news:euXQhONjDHA.548@.TK2MSFTNGP11.phx.gbl...
> Can anyone help me with this error? I am trying to delete several
> thousand records at a time, but for some reason I continue to get the
> following error. I just applied SP3a for SQL2K hoping that would fix the
> problem, but it has not. Thanks in advance.
> delete [GA_SingleFamily] from (select top 500 * from [GA_SingleFamily]) as
> stuff Where [GA_SingleFamily].ml = stuff.ml
>
>
> Event Type: Error
> Event Source: MSSQLSERVER
> Event Category: (2)
> Event ID: 17055
> Date: 10/6/2003
> Time: 12:08:48 PM
> User: N/A
> Computer: DATASERVERA
> Description:
> 17066 :
> SQL Server Assertion: File: <recbase.cpp>, line=1378
> Failed Assertion = 'm_offBeginVar < m_SizeRec'.
>
> --
> Doug Threewitt
>