Solved

Urgent! Help! How to dump the transaction log?

Posted on 2003-10-22
5
34,220 Views
Last Modified: 2012-06-27
God!   I allocate not enough space for temp database, now it is full, I do not know the exact use of system procedure and so on, but I need to solve the problem soon. I need to know how to dump transaction log. Can you write the statement for me?   THANK YOU!
0
Comment
Question by:happyeveryday
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Assisted Solution

by:amitpagarwal
amitpagarwal earned 20 total points
ID: 9604962
dump transaction DATABASE_NAME with no_log
0
 
LVL 15

Assisted Solution

by:namasi_navaretnam
namasi_navaretnam earned 20 total points
ID: 9609531
0
 
LVL 2

Accepted Solution

by:
mansoor_a_khan earned 20 total points
ID: 9625233
NO_LOG is not a good option to use, it may corrupt ur database.
I would suggest.

dump transaction DATABASE_NAME with truncate_only
checkpoint

Cheers,
MAK

0
 

Expert Comment

by:rooksmith
ID: 11015417
I second that !  Dump transaction with no_log is the same as a dump transaction with truncate_only, with the exception that "no log record is written to the log" - In other words - it truncates the inactive portion of your log and does not write the log records to a file. In short it will invalidate your subsequent dump transaction commands.

So if the author of the message simply wants to back up the log, he should be doing something like this:

Time 1: dump database dbname to "dbdumpfilename"
Time 2: dump transaction dbname to "transfile1"
Time3: dump transaction dbname to "transfile2"

etc...

Recovery is the same list with the word load instead of dump..

Good luck and RTFM!   ;-)
0
 

Expert Comment

by:rooksmith
ID: 11015528
Whoops - my appologies. I should always read the entire question before posting and answer!

Your question was about Tempdb which is a different breed of cat.With Tempdb the thing to realize is that it gets created (ie, the model database is literally copied to the tempdb) from scratch each time you restart the server. So go ahead and use the "dump tran with truncate_only" command to clear out the log. If that doesnt work use "dump tran with no_log". IF all else fails reboot... In fact if you have the time reboot first.

Another option is to alter the tempdb and add more space. This is often the only solution if this keeps happening over and over again. I would caution against altering it on the master device. Master gets a lot of I/O and so does the tempdb. I would create a new device fragment on a "fast disk" somehwere (note- you might be using RAID - go for Raid level 0, or "striped only", higher throughput and no redundancy for the tempdb)....

0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

632 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