Solved

Urgent! Help! How to dump the transaction log?

Posted on 2003-10-22
5
34,212 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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