Solved

backup log mydb with truncate_only

Posted on 2006-10-23
12
840 Views
Last Modified: 2008-01-09
backup log mydb with truncate_only
backup log mydb with no_log

is not working and does not truncate the log file of mydb ? how can I fix it.
0
Comment
Question by:pinaldave
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 9

Expert Comment

by:gpompe
ID: 17789483
Keep in mind that those command will purge ONLY committed transactions and will not change the size of transacion log.
0
 
LVL 69

Assisted Solution

by:ScottPletcher
ScottPletcher earned 200 total points
ID: 17789494
DBCC SHRINKFILE (log_logical_file_name)
0
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 17789505
If you don't know the logical file name, use the first column of this output to find out :-) :

EXEC mydb.dbo.sp_helpfile
0
 
LVL 21

Author Comment

by:pinaldave
ID: 17789515
Yes, I would like to purge the file. Shrinkfile does not work either I already tried.
0
 
LVL 15

Expert Comment

by:MNelson831
ID: 17789520
Use MyDatabaseName
go

Backup log MyDatabaseName with Truncate_Only
dbcc shrinkfile("MyDatabaseLogFileName",0)
0
 
LVL 15

Expert Comment

by:MNelson831
ID: 17789529
Sorry scott.. you posted whilst I was looking up syntax
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 21

Author Comment

by:pinaldave
ID: 17789537
MNelson,
I tried that but it would not do the trick. That is the problem.
0
 
LVL 21

Author Comment

by:pinaldave
ID: 17789550
Still need help.
0
 
LVL 15

Expert Comment

by:MNelson831
ID: 17789589
verify the logical file name of the log
0
 
LVL 21

Author Comment

by:pinaldave
ID: 17789593
i did that. but it is correct.
0
 
LVL 15

Accepted Solution

by:
MNelson831 earned 300 total points
ID: 17789622
0
 
LVL 21

Author Comment

by:pinaldave
ID: 17790101
One of the process were interfearing to backup process. I killed that process and my original command worked.

Thank you for guidance.

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now