We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

backup log mydb with truncate_only

pinaldave
pinaldave asked
on
Medium Priority
896 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.
Comment
Watch Question

Commented:
Keep in mind that those command will purge ONLY committed transactions and will not change the size of transacion log.
Scott PletcherSenior DBA
CERTIFIED EXPERT
Most Valuable Expert 2018
Distinguished Expert 2019
Commented:
DBCC SHRINKFILE (log_logical_file_name)

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Scott PletcherSenior DBA
CERTIFIED EXPERT
Most Valuable Expert 2018
Distinguished Expert 2019

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

EXEC mydb.dbo.sp_helpfile
CERTIFIED EXPERT

Author

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

Backup log MyDatabaseName with Truncate_Only
dbcc shrinkfile("MyDatabaseLogFileName",0)
Sorry scott.. you posted whilst I was looking up syntax
CERTIFIED EXPERT

Author

Commented:
MNelson,
I tried that but it would not do the trick. That is the problem.
CERTIFIED EXPERT

Author

Commented:
Still need help.
verify the logical file name of the log
CERTIFIED EXPERT

Author

Commented:
i did that. but it is correct.
CERTIFIED EXPERT

Author

Commented:
One of the process were interfearing to backup process. I killed that process and my original command worked.

Thank you for guidance.

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.