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
 General SQL Server Forums
 New to SQL Server Administration
 shriking log file

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-12-10 : 15:14:24
Why do we take full backup after shrinking log file or log backup before shriking log file?
Please clarify

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-10 : 15:22:46
Ummm, why would you do that? Your question is very confusing as that isn't a standard practice.

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

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-12-10 : 15:31:00
Hi Tkizer,

I had shrinked logfile for one of my production database 'abcd' using below command

USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO

because log file is growing abnormally. After that tlog backup job for database 'abcd' is failed and the error was no prior full backup, backup chain broke.

Then I serched in google and i found that we need to take full backup after shrinking logfile or take tlog backup before shrinking log file. so just wondering what is the reason behind this?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-10 : 15:56:32
That's why you shouldn't truncate the transaction log. You have broken the chain and now don't have point in time recovery ability until you perform a full backup.

Whatever you saw in your Google search is specifically talking about truncating the transaction log and not regular tlog backups.

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 -