Showing posts with label expected. Show all posts
Showing posts with label expected. 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 fails, why?

Every time I run DBCC to do an integrity check I get the following errors...
and the first one i dont understand it says Expected value 0_PCT_FULL,
actual value 100_PCT_FULL, I checked and it was set to 0...
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:628) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:632) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:640) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:3410) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:3510) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:4948) in object ID
949578421, index ID 0, partition ID 72057594042253312, alloc unit ID
72057594046644224 (type LOB data). Expected value 0_PCT_FULL, actual value
100_PCT_FULL.
CHECKDB found 0 allocation errors and 6 consistency errors in table
'sysmaintplan_logdetail' (object ID 949578421).
CHECKDB found 0 allocation errors and 6 consistency errors in database
'msdb'.
repair_allow_data_loss is the minimum repair level for the errors found by
DBCC CHECKDB (msdb).
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:158) in object ID 60, index
ID 1, partition ID 281474980642816, alloc unit ID 71776119065149440 (type
LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:161) in object ID 60, index
ID 1, partition ID 281474980642816, alloc unit ID 71776119065149440 (type
LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:338) in object ID 60, index
ID 1, partition ID 281474980642816, alloc unit ID 71776119065149440 (type
LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.
Msg 8914, Level 16, State 1, Line 1
Incorrect PFS free space information for page (1:448) in object ID 60, index
ID 1, partition ID 281474980642816, alloc unit ID 71776119065149440 (type
LOB data). Expected value 0_PCT_FULL, actual value 100_PCT_FULL.
CHECKDB found 0 allocation errors and 4 consistency errors in table
'sys.sysobjvalues' (object ID 60).
CHECKDB found 0 allocation errors and 4 consistency errors in database
'BENE_Testing'.
repair_allow_data_loss is the minimum repair level for the errors found by
DBCC CHECKDB (BENE_Testing).
here is the SQL used for this
USE [master]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [model]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [msdb]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [BENE_Live]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [BENE_Users]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [BDB_FileTransferImports]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [RESC_Intranet]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [RPTS_Reports]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [RSMN_Messaging]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [BUGS_GeminiWeb]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [BENE_Testing]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [ReportServer]
GO
DBCC CHECKDB WITH NO_INFOMSGS
GO
USE [ReportServerTempDB]
GO
DBCC CHECKDB WITH NO_INFOMSGSYou have a corruption in your database. I'm surprised that allow data loss i
s considered as the
minimum repair level for these messages. Download Books Online for SQL Serve
r 2000, and search for
the error numbers there for further explanations (these error numbers isn't
documented yet in BOL
2005). Also, you might want to check out
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian Henry" <nospam@.nospam.com> wrote in message news:ulc0G36YGHA.4620@.TK2MSFTNGP04.phx.g
bl...
> Every time I run DBCC to do an integrity check I get the following errors.
.
> and the first one i dont understand it says Expected value 0_PCT_FULL, act
ual value 100_PCT_FULL,
> I checked and it was set to 0...
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:628) in object ID 9495784
21, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:632) in object ID 9495784
21, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:640) in object ID 9495784
21, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:3410) in object ID 949578
421, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:3510) in object ID 949578
421, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:4948) in object ID 949578
421, index ID 0,
> partition ID 72057594042253312, alloc unit ID 72057594046644224 (type LOB
data). Expected value
> 0_PCT_FULL, actual value 100_PCT_FULL.
> CHECKDB found 0 allocation errors and 6 consistency errors in table 'sysma
intplan_logdetail'
> (object ID 949578421).
> CHECKDB found 0 allocation errors and 6 consistency errors in database 'ms
db'.
> repair_allow_data_loss is the minimum repair level for the errors found by
DBCC CHECKDB (msdb).
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:158) in object ID 60, ind
ex ID 1, partition ID
> 281474980642816, alloc unit ID 71776119065149440 (type LOB data). Expected
value 0_PCT_FULL,
> actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:161) in object ID 60, ind
ex ID 1, partition ID
> 281474980642816, alloc unit ID 71776119065149440 (type LOB data). Expected
value 0_PCT_FULL,
> actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:338) in object ID 60, ind
ex ID 1, partition ID
> 281474980642816, alloc unit ID 71776119065149440 (type LOB data). Expected
value 0_PCT_FULL,
> actual value 100_PCT_FULL.
> Msg 8914, Level 16, State 1, Line 1
> Incorrect PFS free space information for page (1:448) in object ID 60, ind
ex ID 1, partition ID
> 281474980642816, alloc unit ID 71776119065149440 (type LOB data). Expected
value 0_PCT_FULL,
> actual value 100_PCT_FULL.
> CHECKDB found 0 allocation errors and 4 consistency errors in table 'sys.s
ysobjvalues' (object ID
> 60).
> CHECKDB found 0 allocation errors and 4 consistency errors in database 'BE
NE_Testing'.
> repair_allow_data_loss is the minimum repair level for the errors found by
DBCC CHECKDB
> (BENE_Testing).
>
>
> here is the SQL used for this
>
> USE [master]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [model]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [msdb]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [BENE_Live]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [BENE_Users]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [BDB_FileTransferImports]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [RESC_Intranet]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [RPTS_Reports]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [RSMN_Messaging]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [BUGS_GeminiWeb]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [BENE_Testing]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [ReportServer]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
> GO
> USE [ReportServerTempDB]
> GO
> DBCC CHECKDB WITH NO_INFOMSGS
>|||well I repaired one of them successfully with no data loss... but the msdb
databsae of course i cant repair with that allow data loss because it
requires single user mode, but you cant take a system db into that... so a
little lost on what to do with that one
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uyYjlM7YGHA.4916@.TK2MSFTNGP04.phx.gbl...
> You have a corruption in your database. I'm surprised that allow data loss
> is considered as the minimum repair level for these messages. Download
> Books Online for SQL Server 2000, and search for the error numbers there
> for further explanations (these error numbers isn't documented yet in BOL
> 2005). Also, you might want to check out
> http://www.karaszi.com/SQLServer/in..._suspect_db.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian Henry" <nospam@.nospam.com> wrote in message
> news:ulc0G36YGHA.4620@.TK2MSFTNGP04.phx.gbl...
>|||RESTORE DATABASE msdb ? Assuming of course you do backup of your system data
bases.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian Henry" <nospam@.nospam.com> wrote in message news:OaEPGX7YGHA.1764@.TK2MSFTNGP05.phx.g
bl...
> well I repaired one of them successfully with no data loss... but the msdb
databsae of course i
> cant repair with that allow data loss because it requires single user mode
, but you cant take a
> system db into that... so a little lost on what to do with that one
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:uyYjlM7YGHA.4916@.TK2MSFTNGP04.phx.gbl...
>|||we do backups, but the big problem is, apparently this has been like this
for months now!...
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u3rbdM8YGHA.428@.TK2MSFTNGP02.phx.gbl...
> RESTORE DATABASE msdb ? Assuming of course you do backup of your system
> databases.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian Henry" <nospam@.nospam.com> wrote in message
> news:OaEPGX7YGHA.1764@.TK2MSFTNGP05.phx.gbl...
>|||Come to think about it, how did you conclude that you can't set msdb to sing
le user? I just tried it
on both a 2000 sp3 instance as well as 2005 instance. Both were successful.
You have to stop Agent
first, of course.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian Henry" <nospam@.nospam.com> wrote in message news:uyZEFr8YGHA.4936@.TK2MSFTNGP05.phx.g
bl...
> we do backups, but the big problem is, apparently this has been like this
for months now!...
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:u3rbdM8YGHA.428@.TK2MSFTNGP02.phx.gbl...
>|||didn't try stoping the anget, just tried altering the db to single user mode
and it failed and said it couldnt be... ill try it without the agent and see
what happens (this is sql 2005 btw)
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23eo3O58YGHA.3704@.TK2MSFTNGP03.phx.gbl...
> Come to think about it, how did you conclude that you can't set msdb to
> single user? I just tried it on both a 2000 sp3 instance as well as 2005
> instance. Both were successful. You have to stop Agent first, of course.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian Henry" <nospam@.nospam.com> wrote in message
> news:uyZEFr8YGHA.4936@.TK2MSFTNGP05.phx.gbl...
>|||it works with stoping the agent, thanks! wouldnt of thought of that..
"Brian Henry" <nospam@.nospam.com> wrote in message
news:%238qrve9YGHA.3448@.TK2MSFTNGP04.phx.gbl...
> didn't try stoping the anget, just tried altering the db to single user
> mode and it failed and said it couldnt be... ill try it without the agent
> and see what happens (this is sql 2005 btw)
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:%23eo3O58YGHA.3704@.TK2MSFTNGP03.phx.gbl...
>