Solved

backup log mydb with truncate_only

Posted on 2006-10-23
12
866 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

617 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