Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Log file growth

Author  Topic 

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2009-12-01 : 13:58:45
The database is in Simple recovery mode.
MDF=1 Gig
LDF=13 Gig

I just took a full backup hoping that the trans log file size would be reduced, but the log file's size remains the same.

Will this work if I execute the below statement:
"BACKUP LOG xyz WITH NO_LOG"
and then shrink the file.
I don't want to lose any data.

Just curious what will this "BACKUP LOG xyz WITH NO_LOG" do? Will this truncate the log file and the MDF's size would increase?

Please suggest.

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 2009-12-01 : 14:34:12
Someone please reply. If my question isn't clear, I'll try to reprase it but I need your help pretty urgent...
Go to Top of Page

john.burns
Posting Yak Master

100 Posts

Posted - 2009-12-02 : 11:45:52
-- Truncate inactive portion of log

backup log hhapp with truncate_only

--)Shrink Tlog file to recover space

USE hhapp
GO
DBCC SHRINKFILE (hhapp_log, 500)
GO

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-02 : 11:58:18
Just to be clear, it would not cause the MDF size to increase, and you won't lose any data.

Your database is in SIMPLE recovery model, so you only need to shrink it with DBCC SHRINKFILE.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -