Re: transaction log file
From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/25/04
- Next message: Jan Schmidt: "Re: Date / Time select Problem"
- Previous message: Bruce: "Can a whole query be a variable in stored procudure?"
- In reply to: mike: "transaction log file"
- Next in thread: Louis Davidson: "Re: transaction log file"
- Reply: Louis Davidson: "Re: transaction log file"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 11:44:04 -0400
Do you need full recovery model? If not, you can reduce growth in the long
run by using simple or bulk logged. In the meantime, you can apply a
band-aid by:
BACKUP LOG db_name WITH TRUNCATE_ONLY
GO
Then executing DBCC SHRINKFILE against the log file. See sp_helpfile to get
the logical file name for the log, and see books online for usage of DBCC
SHRINKFILE. If you still can't shrink the log, there is likely an open
transaction; try DBCC OPENTRAN and it will tell you who the user is, and you
can track them through sp_who2 etc. and find out if you can just kill them
or if it is something you need to wait on.
See http://www.aspfaq.com/2471 and http://www.aspfaq.com/2446 (the latter is
*not* solely for tempdb).
But, if you don't change anything else, it will just get that big again in
the future...
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ "mike" <anonymous@discussions.microsoft.com> wrote in message news:109D1D3A-C36E-40C7-99C0-E965ACD468AA@microsoft.com... > Hello, > Here's my problem: I have a sql server 2000, the transaction log for the database is about 9GB and it's getting bigger, running out of space on the HDD ang got the message: " the log file for database 'dbname' is full. back up the transaction log for the database to free up some log space." Recovery mode for the database is set to Full. How can I empty the transaction log, or shrink it like a lot!!! > Thanks!
- Next message: Jan Schmidt: "Re: Date / Time select Problem"
- Previous message: Bruce: "Can a whole query be a variable in stored procudure?"
- In reply to: mike: "transaction log file"
- Next in thread: Louis Davidson: "Re: transaction log file"
- Reply: Louis Davidson: "Re: transaction log file"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|