Solved

Urgent! Help! How to dump the transaction log?

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This problem is more common than not and I will show you some things to check to solve this problem.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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