Solved

backup log mydb with truncate_only

Posted on 2006-10-23
12
854 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:Scott Pletcher
Scott Pletcher earned 200 total points
ID: 17789494
DBCC SHRINKFILE (log_logical_file_name)
0
 
LVL 69

Expert Comment

by:Scott Pletcher
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
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.

 
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
 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LTrim & Double Space Correction 5 40
t-sql need help on t-sql 10 27
AD and SQL Server 2016 2 29
Get Next number from Stored Procedure 8 23
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

828 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