Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 876
  • Last Modified:

backup log mydb with truncate_only

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
pinaldave
Asked:
pinaldave
  • 5
  • 4
  • 2
  • +1
2 Solutions
 
gpompeCommented:
Keep in mind that those command will purge ONLY committed transactions and will not change the size of transacion log.
0
 
Scott PletcherSenior DBACommented:
DBCC SHRINKFILE (log_logical_file_name)
0
 
Scott PletcherSenior DBACommented:
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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
pinaldaveAuthor Commented:
Yes, I would like to purge the file. Shrinkfile does not work either I already tried.
0
 
MNelson831Commented:
Use MyDatabaseName
go

Backup log MyDatabaseName with Truncate_Only
dbcc shrinkfile("MyDatabaseLogFileName",0)
0
 
MNelson831Commented:
Sorry scott.. you posted whilst I was looking up syntax
0
 
pinaldaveAuthor Commented:
MNelson,
I tried that but it would not do the trick. That is the problem.
0
 
pinaldaveAuthor Commented:
Still need help.
0
 
MNelson831Commented:
verify the logical file name of the log
0
 
pinaldaveAuthor Commented:
i did that. but it is correct.
0
 
pinaldaveAuthor Commented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now