Solved

backup log mydb with truncate_only

Posted on 2006-10-23
12
860 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

751 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