My transaction log file (.LDF) has reached 53GB on
a (now full) 80GB hard drive.
Is it safe to delete the log file after a check point
is reached (upon DB shut down, for instance?) And why
does the log file not automatically shrink after check-
points?
Thanks,
Andrew> Is it safe to delete the log file after a check point
> is reached
You can not delete the log file, you can run a backup log dbname with
truncate_only if you do not require point in time recovery, of course, if
you don't require point in time recovery you should set the recovery mode of
the database to simple.
>>And why
> does the log file not automatically shrink after check-
> points?
There are two answers here, one, the data stays in the log even after
checkpoint so you can back it up and have the ability to transactionally
recover. Shrinking is another subject, you can not shrink the actual log
file footprint until it is empty, done by either backing up or truncating
it. Also, if you are doing regular backups of the log and your log file is
growing, it doesn't make sense to keep shrinking it only for it to cause you
a performance hit when it auto-grows again.
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Andrew" <anonymous@.discussions.microsoft.com> wrote in message
news:0a5201c3c57f$8bfb3340$a301280a@.phx.gbl...
> My transaction log file (.LDF) has reached 53GB on
> a (now full) 80GB hard drive.
> Is it safe to delete the log file after a check point
> is reached (upon DB shut down, for instance?) And why
> does the log file not automatically shrink after check-
> points?
> Thanks,
> Andrew
>
Showing posts with label point. Show all posts
Showing posts with label point. Show all posts
Friday, March 9, 2012
LOG Error Mssgs
I've found very little information on the following error mssg's, can someone
point me in the correct direction or offer advice. It appears this may be
related to our backup software - Veritas but I don't think this is the only
issue. Below are 4 of many error mssgs.
Thanks,
Liz
BlkHeader from strip 1 At 409e4db400 ExpectedAt 5e021000 Size 3936 PrevSize
3939
BACKUP failed to complete the command BACKUP log [Genesis] TO
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0',
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_1',
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2' with
blocksize=65536, stats=5, maxtransfersize=72
BackupIoRequest::WaitForIoCompletion: write failure on backup device
'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error 995(The
I/O operation has been aborted because of either a thread exit or an
application request.).
Internal I/O request 0x421C4048: Op: Write, pBuffer: 0x15970000, Size:
720896, Position: 1093337088, UMS: Internal: 0x20202020, InternalHigh:
0x20202020, Offset: 0x20202020, OffsetHigh: 0x46202020, m_buf: 0x15970000,
m_len: 25857, m_actualBytes: 0, m_errcode: 995, BackupFile:
VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2
BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device
'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error 995(The
I/O operation has been aborted because of either a thread exit or an
application request.).Hi
Looks like the backup software aborts the backup. Been having backup
failures lately?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Liz" <Liz@.discussions.microsoft.com> wrote in message
news:95070D4A-81C6-4F84-8E69-5F1F0CD73DF9@.microsoft.com...
> I've found very little information on the following error mssg's, can
someone
> point me in the correct direction or offer advice. It appears this may be
> related to our backup software - Veritas but I don't think this is the
only
> issue. Below are 4 of many error mssgs.
> Thanks,
> Liz
> BlkHeader from strip 1 At 409e4db400 ExpectedAt 5e021000 Size 3936
PrevSize
> 3939
> BACKUP failed to complete the command BACKUP log [Genesis] TO
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0',
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_1',
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2' with
> blocksize=65536, stats=5, maxtransfersize=72
> BackupIoRequest::WaitForIoCompletion: write failure on backup device
> 'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error
995(The
> I/O operation has been aborted because of either a thread exit or an
> application request.).
> Internal I/O request 0x421C4048: Op: Write, pBuffer: 0x15970000, Size:
> 720896, Position: 1093337088, UMS: Internal: 0x20202020, InternalHigh:
> 0x20202020, Offset: 0x20202020, OffsetHigh: 0x46202020, m_buf: 0x15970000,
> m_len: 25857, m_actualBytes: 0, m_errcode: 995, BackupFile:
> VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2
> BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup
device
> 'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error
995(The
> I/O operation has been aborted because of either a thread exit or an
> application request.).
>
>
point me in the correct direction or offer advice. It appears this may be
related to our backup software - Veritas but I don't think this is the only
issue. Below are 4 of many error mssgs.
Thanks,
Liz
BlkHeader from strip 1 At 409e4db400 ExpectedAt 5e021000 Size 3936 PrevSize
3939
BACKUP failed to complete the command BACKUP log [Genesis] TO
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0',
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_1',
VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2' with
blocksize=65536, stats=5, maxtransfersize=72
BackupIoRequest::WaitForIoCompletion: write failure on backup device
'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error 995(The
I/O operation has been aborted because of either a thread exit or an
application request.).
Internal I/O request 0x421C4048: Op: Write, pBuffer: 0x15970000, Size:
720896, Position: 1093337088, UMS: Internal: 0x20202020, InternalHigh:
0x20202020, Offset: 0x20202020, OffsetHigh: 0x46202020, m_buf: 0x15970000,
m_len: 25857, m_actualBytes: 0, m_errcode: 995, BackupFile:
VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2
BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device
'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error 995(The
I/O operation has been aborted because of either a thread exit or an
application request.).Hi
Looks like the backup software aborts the backup. Been having backup
failures lately?
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Liz" <Liz@.discussions.microsoft.com> wrote in message
news:95070D4A-81C6-4F84-8E69-5F1F0CD73DF9@.microsoft.com...
> I've found very little information on the following error mssg's, can
someone
> point me in the correct direction or offer advice. It appears this may be
> related to our backup software - Veritas but I don't think this is the
only
> issue. Below are 4 of many error mssgs.
> Thanks,
> Liz
> BlkHeader from strip 1 At 409e4db400 ExpectedAt 5e021000 Size 3936
PrevSize
> 3939
> BACKUP failed to complete the command BACKUP log [Genesis] TO
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0',
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_1',
> VIRTUAL_DEVICE='VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2' with
> blocksize=65536, stats=5, maxtransfersize=72
> BackupIoRequest::WaitForIoCompletion: write failure on backup device
> 'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error
995(The
> I/O operation has been aborted because of either a thread exit or an
> application request.).
> Internal I/O request 0x421C4048: Op: Write, pBuffer: 0x15970000, Size:
> 720896, Position: 1093337088, UMS: Internal: 0x20202020, InternalHigh:
> 0x20202020, Offset: 0x20202020, OffsetHigh: 0x46202020, m_buf: 0x15970000,
> m_len: 25857, m_actualBytes: 0, m_errcode: 995, BackupFile:
> VDI_70893368-C194-4AAA-8290-F50940D1C1E4_2
> BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup
device
> 'VDI_70893368-C194-4AAA-8290-F50940D1C1E4_0'. Operating system error
995(The
> I/O operation has been aborted because of either a thread exit or an
> application request.).
>
>
Monday, February 20, 2012
Log
Please correct my concept, as I am thinking when log backup it auto shrink
the file to its mininum point like when I take the log backup and see the
size it's still on the same size but yes when I shrink the log then it's
goes into minimum size so now the
point is like I do take only the log backup every day after every 15 mins
but the log is not shrinking... can any one update me like what I have to do
for this ?
You should turn off autoshrink. Let the log file (and data files) stay at
the size it needs to do it's work plus some free space. Shrinking is
generally a bad thing not a good one.
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:er5TNnXVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> Please correct my concept, as I am thinking when log backup it auto shrink
> the file to its mininum point like when I take the log backup and see the
> size it's still on the same size but yes when I shrink the log then it's
> goes into minimum size so now the
> point is like I do take only the log backup every day after every 15 mins
> but the log is not shrinking... can any one update me like what I have to
> do
> for this ?
>
|||I have a backup strategy to take the full backup daily and log every after
15 mins. that's why I am asking like if log backup then the size should also
decrease.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> You should turn off autoshrink. Let the log file (and data files) stay at
> the size it needs to do it's work plus some free space. Shrinking is
> generally a bad thing not a good one.
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Andrew J. Kelly SQL MVP
>
> "Joh" <joh@.mailcity.com> wrote in message
> news:er5TNnXVFHA.3152@.TK2MSFTNGP12.phx.gbl...
shrink[vbcol=seagreen]
the[vbcol=seagreen]
mins[vbcol=seagreen]
to
>
|||Andrew, should I disable to autoshrink so when the log will shrink? never ?
"Joh" <joh@.mailcity.com> wrote in message
news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
> I have a backup strategy to take the full backup daily and log every after
> 15 mins. that's why I am asking like if log backup then the size should
also[vbcol=seagreen]
> decrease.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...
at[vbcol=seagreen]
> shrink
> the
it's
> mins
> to
>
|||If you turn it off it will never shrink. That is the desired effect. As
long as you issue regular log backups it should not continue to grow past a
size that it needs to operate on a regular basis. That is as long as you
don't have any very long running open transactions that will prevent the log
from being truncated during the backup.
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:ujF9p6YVFHA.2540@.tk2msftngp13.phx.gbl...
> Andrew, should I disable to autoshrink so when the log will shrink? never
> ?
> "Joh" <joh@.mailcity.com> wrote in message
> news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
> also
> at
> it's
>
|||If you had a long running open transaction it may not be able to shrink
until the transaction is committed.
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
>I have a backup strategy to take the full backup daily and log every after
> 15 mins. that's why I am asking like if log backup then the size should
> also
> decrease.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...
> shrink
> the
> mins
> to
>
|||Joh wrote:
> Andrew, should I disable to autoshrink so when the log will shrink?
> never ?
>
When you backup the log, it is truncated. The physical size does not
change, but the backed-up data in the log is removed. You should already
have the size set to avoid an auto-grow operations during normal
operation. There's no reason to shrink the physical log files unless
you're dealing with a runaway transaction that caused the log to grow to
an enormous size.
David Gugick
Imceda Software
www.imceda.com
|||Hi,
To add on to Andrew, just execute DBCC OPENTRAN command to check if there
is any open active transactions. If there is not then try to
shrink the LDF file manually and see if you could shrink. See DBCC
SHRINKFILE in books online. Perform a transaction log backup before the
shrink file command.
Thanks
Hari
SQL Server MVP
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23%232divZVFHA.3152@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> If you had a long running open transaction it may not be able to shrink
> until the transaction is committed.
> --
> Andrew J. Kelly SQL MVP
>
> "Joh" <joh@.mailcity.com> wrote in message
> news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
after[vbcol=seagreen]
have
>
|||Thanks Hari, like in a day there are 24 Logfiles exists in one folder so in
the job I can mention after the log backup to shrink the log file but the
problem is there is there any query like
If Exists(
DBCC OpenTran
)
Begin
DBCC ShrinkFile(logFileName,EMPTYFILE)
End
what you prefer should I use EMPTYFILE or TRUNCATEONLY or NOTRUNCATE
Thanks and waiting for your reply
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:#EESi7cVFHA.2328@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> Hi,
> To add on to Andrew, just execute DBCC OPENTRAN command to check if there
> is any open active transactions. If there is not then try to
> shrink the LDF file manually and see if you could shrink. See DBCC
> SHRINKFILE in books online. Perform a transaction log backup before the
> shrink file command.
> Thanks
> Hari
> SQL Server MVP
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%23%232divZVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> after
should[vbcol=seagreen]
stay[vbcol=seagreen]
see[vbcol=seagreen]
15
> have
>
the file to its mininum point like when I take the log backup and see the
size it's still on the same size but yes when I shrink the log then it's
goes into minimum size so now the
point is like I do take only the log backup every day after every 15 mins
but the log is not shrinking... can any one update me like what I have to do
for this ?
You should turn off autoshrink. Let the log file (and data files) stay at
the size it needs to do it's work plus some free space. Shrinking is
generally a bad thing not a good one.
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:er5TNnXVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> Please correct my concept, as I am thinking when log backup it auto shrink
> the file to its mininum point like when I take the log backup and see the
> size it's still on the same size but yes when I shrink the log then it's
> goes into minimum size so now the
> point is like I do take only the log backup every day after every 15 mins
> but the log is not shrinking... can any one update me like what I have to
> do
> for this ?
>
|||I have a backup strategy to take the full backup daily and log every after
15 mins. that's why I am asking like if log backup then the size should also
decrease.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> You should turn off autoshrink. Let the log file (and data files) stay at
> the size it needs to do it's work plus some free space. Shrinking is
> generally a bad thing not a good one.
> http://www.karaszi.com/SQLServer/info_dont_shrink.asp
> --
> Andrew J. Kelly SQL MVP
>
> "Joh" <joh@.mailcity.com> wrote in message
> news:er5TNnXVFHA.3152@.TK2MSFTNGP12.phx.gbl...
shrink[vbcol=seagreen]
the[vbcol=seagreen]
mins[vbcol=seagreen]
to
>
|||Andrew, should I disable to autoshrink so when the log will shrink? never ?
"Joh" <joh@.mailcity.com> wrote in message
news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
> I have a backup strategy to take the full backup daily and log every after
> 15 mins. that's why I am asking like if log backup then the size should
also[vbcol=seagreen]
> decrease.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...
at[vbcol=seagreen]
> shrink
> the
it's
> mins
> to
>
|||If you turn it off it will never shrink. That is the desired effect. As
long as you issue regular log backups it should not continue to grow past a
size that it needs to operate on a regular basis. That is as long as you
don't have any very long running open transactions that will prevent the log
from being truncated during the backup.
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:ujF9p6YVFHA.2540@.tk2msftngp13.phx.gbl...
> Andrew, should I disable to autoshrink so when the log will shrink? never
> ?
> "Joh" <joh@.mailcity.com> wrote in message
> news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
> also
> at
> it's
>
|||If you had a long running open transaction it may not be able to shrink
until the transaction is committed.
Andrew J. Kelly SQL MVP
"Joh" <joh@.mailcity.com> wrote in message
news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
>I have a backup strategy to take the full backup daily and log every after
> 15 mins. that's why I am asking like if log backup then the size should
> also
> decrease.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:eqfxpIYVFHA.3424@.TK2MSFTNGP09.phx.gbl...
> shrink
> the
> mins
> to
>
|||Joh wrote:
> Andrew, should I disable to autoshrink so when the log will shrink?
> never ?
>
When you backup the log, it is truncated. The physical size does not
change, but the backed-up data in the log is removed. You should already
have the size set to avoid an auto-grow operations during normal
operation. There's no reason to shrink the physical log files unless
you're dealing with a runaway transaction that caused the log to grow to
an enormous size.
David Gugick
Imceda Software
www.imceda.com
|||Hi,
To add on to Andrew, just execute DBCC OPENTRAN command to check if there
is any open active transactions. If there is not then try to
shrink the LDF file manually and see if you could shrink. See DBCC
SHRINKFILE in books online. Perform a transaction log backup before the
shrink file command.
Thanks
Hari
SQL Server MVP
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23%232divZVFHA.3152@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> If you had a long running open transaction it may not be able to shrink
> until the transaction is committed.
> --
> Andrew J. Kelly SQL MVP
>
> "Joh" <joh@.mailcity.com> wrote in message
> news:erYxm0YVFHA.2700@.TK2MSFTNGP12.phx.gbl...
after[vbcol=seagreen]
have
>
|||Thanks Hari, like in a day there are 24 Logfiles exists in one folder so in
the job I can mention after the log backup to shrink the log file but the
problem is there is there any query like
If Exists(
DBCC OpenTran
)
Begin
DBCC ShrinkFile(logFileName,EMPTYFILE)
End
what you prefer should I use EMPTYFILE or TRUNCATEONLY or NOTRUNCATE
Thanks and waiting for your reply
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:#EESi7cVFHA.2328@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> Hi,
> To add on to Andrew, just execute DBCC OPENTRAN command to check if there
> is any open active transactions. If there is not then try to
> shrink the LDF file manually and see if you could shrink. See DBCC
> SHRINKFILE in books online. Perform a transaction log backup before the
> shrink file command.
> Thanks
> Hari
> SQL Server MVP
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%23%232divZVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> after
should[vbcol=seagreen]
stay[vbcol=seagreen]
see[vbcol=seagreen]
15
> have
>
Subscribe to:
Posts (Atom)