Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3724090
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T06:30:48+00:00 2026-05-19T06:30:48+00:00

I have a Web Server with SQL 2008 running a simulated SQL 2005 db,

  • 0

I have a Web Server with SQL 2008 running a simulated SQL 2005 db, and I have a local SQL 2005 db for testing environment.

This causes me to use scripts for backup/restoring data for testing as 2008 server backups do not restore to a 2005 server.

When I run this SQL Query to reduce the size of a Table on my production Web SQL Server (2008)

 DELETE FROM TickersDay
 WHERE (DATEDIFF(day, TickersDay.[date], GETDATE()) >= 8)
 GO

I get this message:

 Msg 9002, Level 17, State 4, Line 3
 The transaction log for database 'VTNET' is full. To find out why space in the log
 cannot be reused, see the log_reuse_wait_desc column in sys.databases

It comes up when I publish scripts also at times.

When I run this SQL Command I get the following Result:

 SELECT [name], recovery_model_desc, log_reuse_wait_desc
 FROM sys.databases

RESULT:

 [name]      recovery_model_desc       log_reuse_wait_desc

 VTNET  SIMPLE                     ACTIVE_TRANSACTION

Here are my questions and issues:

  1. I get it.. I have a transaction statement that needs a Rollback Command

< if @@Trancount > 0 Rollback > .. but I have 100 stored procedures so before I do that….

  1. IN THE MEANTIME… how can I eradicate this issue?? I have tried SHRINKING and I have tried backuping up the Db…

  2. As you can see, it is in SIMPLE mode… I do not have any idea how to backup a LOG ONLY file… (have not found how to do that)…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T06:30:49+00:00Added an answer on May 19, 2026 at 6:30 am

    You might be able to get around this issue simply by getting SQL NOT to process the entire table by use the index on only the dates required to be deleted. Rephrase it to be index friendly

    DELETE FROM TickersDay
    WHERE TickersDay.[date] <= DATEADD(day, -8, GETDATE())
    GO
    

    If you run this frequently enough (at least daily) then it only has to process 1/9th or less via an index on TickersDay([Date]) instead of having to go through the entire table if you use DATEDIFF on the field.

    If that still causes this:

    The transaction log for database
    ‘VTNET’ is full

    You really need to increase the Log size because I suspect it is not set to autogrow and is not big enough for this operation. Either that or start looking at batching the deletes (again assuming you have an index on date, so this efficiently targets only the 100 rows), e.g.

    DELETE TOP (100) FROM TickersDay
    WHERE TickersDay.[date] <= DATEADD(day, -8, GETDATE())
    GO
    

    You can either loop it (while @@rowcount > 0) or just schedule it more frequently as a trickling background delete.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that needs to fire off a long-running SQL Server
We have a production web and database server with SQL Server 2000. (However, a
I have a SQL Server 2000, C# & ASP.net web app. We want to
I have SQL server running on a legacy Windows 2003 box on IP address
Can I use a SQL Server Express database as my local database for an
I have a web server which saves cache files and keeps them for 7
I have apache web server installed as frontend and I have j2ee SAP Netweaver
I have a web server that runs my web application. If I want to
I have a web-server, that serves different domain-names, but has only one IP-address assigned.
I have a web server with my web site and I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.