Showing posts with label logs. Show all posts
Showing posts with label logs. Show all posts

Monday, March 19, 2012

DBCC Log does not show all the logs in LDF file

Hi,
I am using DBCC Log command to see all the logs in online log file. After
checkpoint these logs disaapear from the dbcc log result as expected.
But when I open the .LDF file using tools available in market to read the
.LDF file, I found that logs before checkpoint are still there in .LDF file
,
so when these logs will go from .LDF file and what I am gaining by doing
checkpoint?
How does DBCC Log command works? Does it read .LDF and explicitly ignore the
logs before the checkpoint or something else.
Please clear my thoughts on this issue.
Thanks a lot in advance.
Pushkarcould you please put the whole statement that you launch?
--
Current location: Alicante (ES)
"Pushkar" wrote:

> Hi,
> I am using DBCC Log command to see all the logs in online log file. After
> checkpoint these logs disaapear from the dbcc log result as expected.
> But when I open the .LDF file using tools available in market to read the
> ..LDF file, I found that logs before checkpoint are still there in .LDF fi
le,
> so when these logs will go from .LDF file and what I am gaining by doing
> checkpoint?
> How does DBCC Log command works? Does it read .LDF and explicitly ignore t
he
> logs before the checkpoint or something else.
> Please clear my thoughts on this issue.
> Thanks a lot in advance.
> Pushkar
>
>|||I just launch dbcc log(dbname,2)
and to read LDF file I used external tools.
"Enric" <vtam13@.terra.es.(donotspam)> wrote in message
news:5EE4F325-A80E-459C-8A8F-40B99E0C83AB@.microsoft.com...
> could you please put the whole statement that you launch?
> --
> Current location: Alicante (ES)
>
> "Pushkar" wrote:
>|||> I am using DBCC Log command to see all the logs in online log file. After checkpoint thes
e logs
> disaapear from the dbcc log result as expected.
So I assume the database is in simple recovery mode?

> But when I open the .LDF file using tools available in market to read the
.LDF file, I found that
> logs before checkpoint are still there in .LDF file, so when these logs wi
ll go from .LDF file and
> what I am gaining by doing checkpoint?
My guess that the checkpoint (when in simple recovery mode) makes the space
available for re-use,
but doesn't zero out the data. And that the log reader tools does show this
data which isn't part of
the active log, but haven't been zeroed out.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Pushkar" <pushkartiwari@.gmail.com> wrote in message news:eDjPDhMTGHA.1868@.TK2MSFTNGP09.phx
.gbl...
> Hi,
> I am using DBCC Log command to see all the logs in online log file. After
checkpoint these logs
> disaapear from the dbcc log result as expected.
> But when I open the .LDF file using tools available in market to read the
.LDF file, I found that
> logs before checkpoint are still there in .LDF file, so when these logs wi
ll go from .LDF file and
> what I am gaining by doing checkpoint?
> How does DBCC Log command works? Does it read .LDF and explicitly ignore t
he logs before the
> checkpoint or something else.
> Please clear my thoughts on this issue.
> Thanks a lot in advance.
> Pushkar
>|||About simple recovery model we had in our development databases such feature
put on
--
Current location: Alicante (ES)
"Tibor Karaszi" wrote:

> So I assume the database is in simple recovery mode?
>
> My guess that the checkpoint (when in simple recovery mode) makes the spac
e available for re-use,
> but doesn't zero out the data. And that the log reader tools does show thi
s data which isn't part of
> the active log, but haven't been zeroed out.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Pushkar" <pushkartiwari@.gmail.com> wrote in message news:eDjPDhMTGHA.1868
@.TK2MSFTNGP09.phx.gbl...
>|||Thanks!!!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:efZEXMNTGHA.5728@.tk2msftngp13.phx.gbl...
> So I assume the database is in simple recovery mode?
>
> My guess that the checkpoint (when in simple recovery mode) makes the
> space available for re-use, but doesn't zero out the data. And that the
> log reader tools does show this data which isn't part of the active log,
> but haven't been zeroed out.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Pushkar" <pushkartiwari@.gmail.com> wrote in message
> news:eDjPDhMTGHA.1868@.TK2MSFTNGP09.phx.gbl...
>

Thursday, March 8, 2012

dbcc errorlog fails

I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
Datacenter cluster. The logs for .2 through .6 change. However, the
origional errorlog does not. I do not get a new error log started. I do not
want to stop and start the sql server as this would shutdown production. Has
anyone seen this and how should I go about fixing this?
Thanks for you support.
Rick Schantz
How are you determining that the log hasn't changed? If you
are viewing the logs in Enterprise Manager, did you refresh
the view? Are you viewing the files in Explorer and
expecting a new file? The logs are cycled rather than new
files being created.
What happens if you execute sp_cycle_errorlog a few times?
If you are sure data from errorlog isn't moving to
errorlog.1, you could check for locking on the log files by
some other process.
-Sue
On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
<RickSchantz@.discussions.microsoft.com> wrote:

>I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
>Datacenter cluster. The logs for .2 through .6 change. However, the
>origional errorlog does not. I do not get a new error log started. I do not
>want to stop and start the sql server as this would shutdown production. Has
>anyone seen this and how should I go about fixing this?
>Thanks for you support.
|||I tested the command on another server. The log size for errorlog. went to
errorlog.1 and so on while a new errorlog. was created. Errorlog.6 was
deleted. I executed sp_cycle_error a few times and .2 and .3 are missing. .4
and .5 still exist. .6 never existed. All of this was viewed by Enterpise
Manager and I was refreshing it several times. I did not look for locking on
the errorlog. file. What process would be locking the errorlog file? Our
goal is to cycle the logs on a weekly basis and archive the oldest one. Any
suggestions? Thanks for your fast response.
"Sue Hoegemeier" wrote:

> How are you determining that the log hasn't changed? If you
> are viewing the logs in Enterprise Manager, did you refresh
> the view? Are you viewing the files in Explorer and
> expecting a new file? The logs are cycled rather than new
> files being created.
> What happens if you execute sp_cycle_errorlog a few times?
> If you are sure data from errorlog isn't moving to
> errorlog.1, you could check for locking on the log files by
> some other process.
> -Sue
> On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
> <RickSchantz@.discussions.microsoft.com> wrote:
>
>
|||Backup or antivirus software would be a couple of programs that could
lock a file. You can check for this using filemon from sysinternals:
http://www.sysinternals.com/
Once you figure out whatever the problem is with cycling the logs, it
should be pretty easy to set up a job to archive. You can just save .6
file off somewhere using an ActiveX script and FSO or DOS commands and
a CmdExec step and then run sp_cycle_errorlog.
-Sue
On Tue, 5 Oct 2004 07:03:06 -0700, Rick Schantz
<RickSchantz@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>I tested the command on another server. The log size for errorlog. went to
>errorlog.1 and so on while a new errorlog. was created. Errorlog.6 was
>deleted. I executed sp_cycle_error a few times and .2 and .3 are missing. .4
>and .5 still exist. .6 never existed. All of this was viewed by Enterpise
>Manager and I was refreshing it several times. I did not look for locking on
>the errorlog. file. What process would be locking the errorlog file? Our
>goal is to cycle the logs on a weekly basis and archive the oldest one. Any
>suggestions? Thanks for your fast response.
>"Sue Hoegemeier" wrote:
|||I renamed the file errorlog.6 and then ran the EXEC sp_cycle_errorlog
command. The errorlog.5 went to errorlog.6 and errorlog. when to errorlog.1.
A new errorlog. was created. Not sure what was going on but I'll monitor it
from here. I also used the filemon tool. Great tool.
Thanks
"Sue Hoegemeier" wrote:

> Backup or antivirus software would be a couple of programs that could
> lock a file. You can check for this using filemon from sysinternals:
> http://www.sysinternals.com/
> Once you figure out whatever the problem is with cycling the logs, it
> should be pretty easy to set up a job to archive. You can just save .6
> file off somewhere using an ActiveX script and FSO or DOS commands and
> a CmdExec step and then run sp_cycle_errorlog.
> -Sue
> On Tue, 5 Oct 2004 07:03:06 -0700, Rick Schantz
> <RickSchantz@.discussions.microsoft.com> wrote:
>
>

dbcc errorlog fails

I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
Datacenter cluster. The logs for .2 through .6 change. However, the
origional errorlog does not. I do not get a new error log started. I do not
want to stop and start the sql server as this would shutdown production. Has
anyone seen this and how should I go about fixing this?
Thanks for you support.
--
Rick SchantzHow are you determining that the log hasn't changed? If you
are viewing the logs in Enterprise Manager, did you refresh
the view? Are you viewing the files in Explorer and
expecting a new file? The logs are cycled rather than new
files being created.
What happens if you execute sp_cycle_errorlog a few times?
If you are sure data from errorlog isn't moving to
errorlog.1, you could check for locking on the log files by
some other process.
-Sue
On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
<RickSchantz@.discussions.microsoft.com> wrote:
>I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
>Datacenter cluster. The logs for .2 through .6 change. However, the
>origional errorlog does not. I do not get a new error log started. I do not
>want to stop and start the sql server as this would shutdown production. Has
>anyone seen this and how should I go about fixing this?
>Thanks for you support.|||I tested the command on another server. The log size for errorlog. went to
errorlog.1 and so on while a new errorlog. was created. Errorlog.6 was
deleted. I executed sp_cycle_error a few times and .2 and .3 are missing. .4
and .5 still exist. .6 never existed. All of this was viewed by Enterpise
Manager and I was refreshing it several times. I did not look for locking on
the errorlog. file. What process would be locking the errorlog file? Our
goal is to cycle the logs on a weekly basis and archive the oldest one. Any
suggestions? Thanks for your fast response.
"Sue Hoegemeier" wrote:
> How are you determining that the log hasn't changed? If you
> are viewing the logs in Enterprise Manager, did you refresh
> the view? Are you viewing the files in Explorer and
> expecting a new file? The logs are cycled rather than new
> files being created.
> What happens if you execute sp_cycle_errorlog a few times?
> If you are sure data from errorlog isn't moving to
> errorlog.1, you could check for locking on the log files by
> some other process.
> -Sue
> On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
> <RickSchantz@.discussions.microsoft.com> wrote:
> >I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
> >Datacenter cluster. The logs for .2 through .6 change. However, the
> >origional errorlog does not. I do not get a new error log started. I do not
> >want to stop and start the sql server as this would shutdown production. Has
> >anyone seen this and how should I go about fixing this?
> >
> >Thanks for you support.
>|||Backup or antivirus software would be a couple of programs that could
lock a file. You can check for this using filemon from sysinternals:
http://www.sysinternals.com/
Once you figure out whatever the problem is with cycling the logs, it
should be pretty easy to set up a job to archive. You can just save .6
file off somewhere using an ActiveX script and FSO or DOS commands and
a CmdExec step and then run sp_cycle_errorlog.
-Sue
On Tue, 5 Oct 2004 07:03:06 -0700, Rick Schantz
<RickSchantz@.discussions.microsoft.com> wrote:
>I tested the command on another server. The log size for errorlog. went to
>errorlog.1 and so on while a new errorlog. was created. Errorlog.6 was
>deleted. I executed sp_cycle_error a few times and .2 and .3 are missing. .4
>and .5 still exist. .6 never existed. All of this was viewed by Enterpise
>Manager and I was refreshing it several times. I did not look for locking on
>the errorlog. file. What process would be locking the errorlog file? Our
>goal is to cycle the logs on a weekly basis and archive the oldest one. Any
>suggestions? Thanks for your fast response.
>"Sue Hoegemeier" wrote:
>> How are you determining that the log hasn't changed? If you
>> are viewing the logs in Enterprise Manager, did you refresh
>> the view? Are you viewing the files in Explorer and
>> expecting a new file? The logs are cycled rather than new
>> files being created.
>> What happens if you execute sp_cycle_errorlog a few times?
>> If you are sure data from errorlog isn't moving to
>> errorlog.1, you could check for locking on the log files by
>> some other process.
>> -Sue
>> On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
>> <RickSchantz@.discussions.microsoft.com> wrote:
>> >I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
>> >Datacenter cluster. The logs for .2 through .6 change. However, the
>> >origional errorlog does not. I do not get a new error log started. I do not
>> >want to stop and start the sql server as this would shutdown production. Has
>> >anyone seen this and how should I go about fixing this?
>> >
>> >Thanks for you support.
>>|||I renamed the file errorlog.6 and then ran the EXEC sp_cycle_errorlog
command. The errorlog.5 went to errorlog.6 and errorlog. when to errorlog.1.
A new errorlog. was created. Not sure what was going on but I'll monitor it
from here. I also used the filemon tool. Great tool.
Thanks
"Sue Hoegemeier" wrote:
> Backup or antivirus software would be a couple of programs that could
> lock a file. You can check for this using filemon from sysinternals:
> http://www.sysinternals.com/
> Once you figure out whatever the problem is with cycling the logs, it
> should be pretty easy to set up a job to archive. You can just save .6
> file off somewhere using an ActiveX script and FSO or DOS commands and
> a CmdExec step and then run sp_cycle_errorlog.
> -Sue
> On Tue, 5 Oct 2004 07:03:06 -0700, Rick Schantz
> <RickSchantz@.discussions.microsoft.com> wrote:
> >I tested the command on another server. The log size for errorlog. went to
> >errorlog.1 and so on while a new errorlog. was created. Errorlog.6 was
> >deleted. I executed sp_cycle_error a few times and .2 and .3 are missing. .4
> >and .5 still exist. .6 never existed. All of this was viewed by Enterpise
> >Manager and I was refreshing it several times. I did not look for locking on
> >the errorlog. file. What process would be locking the errorlog file? Our
> >goal is to cycle the logs on a weekly basis and archive the oldest one. Any
> >suggestions? Thanks for your fast response.
> >
> >"Sue Hoegemeier" wrote:
> >
> >> How are you determining that the log hasn't changed? If you
> >> are viewing the logs in Enterprise Manager, did you refresh
> >> the view? Are you viewing the files in Explorer and
> >> expecting a new file? The logs are cycled rather than new
> >> files being created.
> >> What happens if you execute sp_cycle_errorlog a few times?
> >> If you are sure data from errorlog isn't moving to
> >> errorlog.1, you could check for locking on the log files by
> >> some other process.
> >>
> >> -Sue
> >>
> >> On Mon, 4 Oct 2004 12:13:03 -0700, Rick Schantz
> >> <RickSchantz@.discussions.microsoft.com> wrote:
> >>
> >> >I have ran the sp_cycle_errorlog and dbcc errorlog command on a SQL 200
> >> >Datacenter cluster. The logs for .2 through .6 change. However, the
> >> >origional errorlog does not. I do not get a new error log started. I do not
> >> >want to stop and start the sql server as this would shutdown production. Has
> >> >anyone seen this and how should I go about fixing this?
> >> >
> >> >Thanks for you support.
> >>
> >>
>

Sunday, February 19, 2012

DBCC CheckDB Repair Allow Data Loss

I have a farily large db (~450 gig) for a customer. After rebooting the
server last week, the DB came up suspect. Looking in the logs, there were
several 823 errors. Our 3rd party hardware hosting company says there are
no disk problems.
We have no back up of the DB (yea, keep your comments to this to yourself).
Running DBCC CheckDB, 2 tables were identied as having a problem. This took
58 hours to run.
Recomendation was to run dbcc checkDB repair_allow_data_loss. I'm ok with
doing this as the DB is a reporting DW database, and can be rebuilt with any
missing data. It's been running 48 hours now. Will it take the same
amount of time as the checkDB (58 hours)? Longer? Any chance after this
runs that it will not be able to repair and the DB will be not usable.
Anyone with experience with this please let me know.
Thanks.Lots of questions/comments to ask you here.
1) What is the output of the CHECKDB? Why not just rebuild the database as
you described below? Did you look through the errors do determine whether
data loss is to be expected?
2) how long does CHECKDB normally take to run on this database? 58 hours is
excessively long (unless certain errors have been found and have kicked off
other, deeper checks)
3) what's the h/w of the box (# of CPUs, IO bandwidth of IO subsystem)
4) how does the hosting company know there are no disk problems? 823s are
hard IO errors (i.e. the page on disk is bad in some way)
5) no way to tell whether any of the errors can't be repaired (there are
some documented unrepairable errors) without seeing the list...
6) repair may take longer - depends what it has to do. It usually takes the
same amount of time as the CHECKDB plus any time required to effect the
repairs.
Thanks
--
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve" <ss@.Mailinator.com> wrote in message
news:uZK3jAPpGHA.220@.TK2MSFTNGP05.phx.gbl...
>I have a farily large db (~450 gig) for a customer. After rebooting the
>server last week, the DB came up suspect. Looking in the logs, there were
>several 823 errors. Our 3rd party hardware hosting company says there are
>no disk problems.
> We have no back up of the DB (yea, keep your comments to this to
> yourself).
> Running DBCC CheckDB, 2 tables were identied as having a problem. This
> took 58 hours to run.
> Recomendation was to run dbcc checkDB repair_allow_data_loss. I'm ok with
> doing this as the DB is a reporting DW database, and can be rebuilt with
> any missing data. It's been running 48 hours now. Will it take the same
> amount of time as the checkDB (58 hours)? Longer? Any chance after this
> runs that it will not be able to repair and the DB will be not usable.
> Anyone with experience with this please let me know.
> Thanks.
>

DBCC CheckDB Repair Allow Data Loss

I have a farily large db (~450 gig) for a customer. After rebooting the
server last week, the DB came up suspect. Looking in the logs, there were
several 823 errors. Our 3rd party hardware hosting company says there are
no disk problems.
We have no back up of the DB (yea, keep your comments to this to yourself).
Running DBCC CheckDB, 2 tables were identied as having a problem. This took
58 hours to run.
Recomendation was to run dbcc checkDB repair_allow_data_loss. I'm ok with
doing this as the DB is a reporting DW database, and can be rebuilt with any
missing data. It's been running 48 hours now. Will it take the same
amount of time as the checkDB (58 hours)? Longer? Any chance after this
runs that it will not be able to repair and the DB will be not usable.
Anyone with experience with this please let me know.
Thanks.Lots of questions/comments to ask you here.
1) What is the output of the CHECKDB? Why not just rebuild the database as
you described below? Did you look through the errors do determine whether
data loss is to be expected?
2) how long does CHECKDB normally take to run on this database? 58 hours is
excessively long (unless certain errors have been found and have kicked off
other, deeper checks)
3) what's the h/w of the box (# of CPUs, IO bandwidth of IO subsystem)
4) how does the hosting company know there are no disk problems? 823s are
hard IO errors (i.e. the page on disk is bad in some way)
5) no way to tell whether any of the errors can't be repaired (there are
some documented unrepairable errors) without seeing the list...
6) repair may take longer - depends what it has to do. It usually takes the
same amount of time as the CHECKDB plus any time required to effect the
repairs.
Thanks
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstor...ne/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steve" <ss@.Mailinator.com> wrote in message
news:uZK3jAPpGHA.220@.TK2MSFTNGP05.phx.gbl...
>I have a farily large db (~450 gig) for a customer. After rebooting the
>server last week, the DB came up suspect. Looking in the logs, there were
>several 823 errors. Our 3rd party hardware hosting company says there are
>no disk problems.
> We have no back up of the DB (yea, keep your comments to this to
> yourself).
> Running DBCC CheckDB, 2 tables were identied as having a problem. This
> took 58 hours to run.
> Recomendation was to run dbcc checkDB repair_allow_data_loss. I'm ok with
> doing this as the DB is a reporting DW database, and can be rebuilt with
> any missing data. It's been running 48 hours now. Will it take the same
> amount of time as the checkDB (58 hours)? Longer? Any chance after this
> runs that it will not be able to repair and the DB will be not usable.
> Anyone with experience with this please let me know.
> Thanks.
>