Friday, February 24, 2012

how do i empty the transaction log

good day to everybody

I have here again encountered the problem that the transaction log came too big that it consume my 10 gig hardisk. How do I empty this in a simplest way.

I follow the error message to backup the transaction log to empty the table, but i think it's still the same. I did not see the difference, in short nothing happens. it doesn't empty the transaction log.

So what I did is make another database with different name (ex. tempdatabase), and import the tables including the recordSleep on the original database... then delete the original database which the transaction log got too big, and after that make a new database with the name of the original database and again import from the tempdatabase, and manually create the index for every table. It works OK, but is there any other way aside from my own way which is much easier and not time consuming.?

Thank you very much . . . and any help is very much appreciated.
MadixHi Madix,

Do you have any replications on the database whose log is too large? And if there is, is it transactional or merge replication? And what is the recovery mode of your database?

BACKUP LOG without NO TRUNCATE should help to make the logical log file shorter. But it may not reduce the size of a physical log file. You may consider to shrink the log (see BOL "Shrinking the transaction log").

Thanks,
-Peng|||actually sir, i use SQL Server database as my back-end database for my VISUAL FOXPRO front-end, and it has no other problem except that one. So I did not bother to study some of the feature of SQL capabilities. I do not know what the sql server is doing inside of my system.

I make a database, add a table, & select a key field in SQL Server then close it, set the back-up time, that's all i know in SQL. that is why when i encounter this problem, i've got a headache using my own way. it waste time. Maybe its time to know and ask from the experts what is the shortiest solution to solve this problem.

so far that is the only problem i encounter using it in Visual Foxpro.

Thanks for any help..

madix|||The simplest way to resolve this is to change the recovery mode to Simple.
This will remove the need for a transaction log, but may not meet your DR requirements.|||Hi,

U can also try this command below

DUMP TRAN <DATABASE NAME> WITH NO_LOG

Regards
Sachin

No comments:

Post a Comment