+ Reply to Thread
Results 1 to 10 of 10

Attempt to fetch logical page in database

  1. Attempt to fetch logical page in database

    Hi,

    I am working on sql server 2008.
    I am getting a error that says:
    Attempt to fetch logical page(1:2986) in database 2 failed. It belongs to
    allocation unit 64.......not to 53........

    If i run that SP in sql it shows no error and return the result set.
    But if i run that sp from vb.net code it give me above error.
    Plese help

    Thanks,
    Hemant



  2. Re: Attempt to fetch logical page in database

    HP (HPattextdotcom) writes:
    > I am working on sql server 2008.
    > I am getting a error that says:
    > Attempt to fetch logical page(1:2986) in database 2 failed. It belongs to
    > allocation unit 64.......not to 53........
    >
    > If i run that SP in sql it shows no error and return the result set.
    > But if i run that sp from vb.net code it give me above error.


    The reason it works in one place but not in another, maybe due to different
    query plans, which in its turn is due to different default settings for
    ARITHABORT.

    In this case it is the error you get when you use VB .Net that is relevant,
    because it is mean that your database is corrupted. Run DBCC CHECKDB on the
    database, and pay attention to what it says about repairing the errors.

    Beware that corruption does not come out of the blue, but are likely to be
    due to hardware errors. That is, it is likely that your disk is about to
    fall into pieces. Could also be a bad memory stick.

    Is this a production database, or just a development database.


    --
    Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse

    Links for SQL Server Books Online:
    SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx


  3. Re: Attempt to fetch logical page in database

    Thanks,

    This is a production database.


    thanks,
    Hp
    "Erland Sommarskog" wrote in message
    news:Xns9DC470FE777FCYazormanat127dot0.0.1...
    > HP (HPattextdotcom) writes:
    >> I am working on sql server 2008.
    >> I am getting a error that says:
    >> Attempt to fetch logical page(1:2986) in database 2 failed. It belongs to
    >> allocation unit 64.......not to 53........
    >>
    >> If i run that SP in sql it shows no error and return the result set.
    >> But if i run that sp from vb.net code it give me above error.

    >
    > The reason it works in one place but not in another, maybe due to
    > different
    > query plans, which in its turn is due to different default settings for
    > ARITHABORT.
    >
    > In this case it is the error you get when you use VB .Net that is
    > relevant,
    > because it is mean that your database is corrupted. Run DBCC CHECKDB on
    > the
    > database, and pay attention to what it says about repairing the errors.
    >
    > Beware that corruption does not come out of the blue, but are likely to be
    > due to hardware errors. That is, it is likely that your disk is about to
    > fall into pieces. Could also be a bad memory stick.
    >
    > Is this a production database, or just a development database.
    >
    >
    > --
    > Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse
    >
    > Links for SQL Server Books Online:
    > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    > SQL 2000:
    > http://www.microsoft.com/sql/prodinf...ons/books.mspx
    >




  4. Re: Attempt to fetch logical page in database

    HP (HPattextdotcom) writes:
    > This is a production database.


    Well to make it clear: you have a problem. Again, run DBCC and inspect what
    it says. Note that if the database is big and corruption is severe, this can
    take a long time to run. If the errors are repairable you are lucky. If they
    are not: your problems are even bigger.

    In the meanwhile you can investigate what backups you have. Keep in mind
    that if the corruption has been going on for a while, the backups may also
    include the corruption. If you have maintenance jobs running that runs
    CHECKDB regularly, check the logs. This can give an indication of who long
    this has been going on.

    What you also should do is to plan a migration to new hardware. If there is
    a box available, move to it immediately. The current hardware should be
    considered tainted.

    Since you asked about this from a VB .Net perspective, I assume that you are
    only a developer, and there may be other people who are DBA or storage
    admin. In that case, these are the people to take over, and you should alert
    them.

    But whatever, you should act NOW! You may have repairable errors now, but if
    the hardware continues to be flaky, you may have unrepairable errors
    tomorrow and data loss.

    Finally, if you (or your organisation) are uncertain how to deal with this
    situations, don't shudder to open a case with Micorosoft, or find a local
    consultant to help you. It will cost you an arm and a leg, but ask yourself:
    how much would it cost to lose the entire database? (And, yeah, if there are
    multiple databases on this machine, all should be examined.)

    --
    Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse

    Links for SQL Server Books Online:
    SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx


  5. Re: Attempt to fetch logical page in database

    Hi,

    Thanks for reply

    I have run CHECKDB and get below message
    CHECKDB found 0 allocation errors and 0 consistency errors in database
    'db_Name'.

    I think there may be another issue.

    Thanks

    HP

    "Erland Sommarskog" wrote in message
    news:Xns9DC4797EE8860Yazormanat127dot0.0.1...
    > HP (HPattextdotcom) writes:
    >> This is a production database.

    >
    > Well to make it clear: you have a problem. Again, run DBCC and inspect
    > what
    > it says. Note that if the database is big and corruption is severe, this
    > can
    > take a long time to run. If the errors are repairable you are lucky. If
    > they
    > are not: your problems are even bigger.
    >
    > In the meanwhile you can investigate what backups you have. Keep in mind
    > that if the corruption has been going on for a while, the backups may also
    > include the corruption. If you have maintenance jobs running that runs
    > CHECKDB regularly, check the logs. This can give an indication of who long
    > this has been going on.
    >
    > What you also should do is to plan a migration to new hardware. If there
    > is
    > a box available, move to it immediately. The current hardware should be
    > considered tainted.
    >
    > Since you asked about this from a VB .Net perspective, I assume that you
    > are
    > only a developer, and there may be other people who are DBA or storage
    > admin. In that case, these are the people to take over, and you should
    > alert
    > them.
    >
    > But whatever, you should act NOW! You may have repairable errors now, but
    > if
    > the hardware continues to be flaky, you may have unrepairable errors
    > tomorrow and data loss.
    >
    > Finally, if you (or your organisation) are uncertain how to deal with this
    > situations, don't shudder to open a case with Micorosoft, or find a local
    > consultant to help you. It will cost you an arm and a leg, but ask
    > yourself:
    > how much would it cost to lose the entire database? (And, yeah, if there
    > are
    > multiple databases on this machine, all should be examined.)
    >
    > --
    > Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse
    >
    > Links for SQL Server Books Online:
    > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    > SQL 2000:
    > http://www.microsoft.com/sql/prodinf...ons/books.mspx
    >




  6. Re: Attempt to fetch logical page in database

    HP (HPattextdotcom) writes:
    > Thanks for reply
    >
    > I have run CHECKDB and get below message
    > CHECKDB found 0 allocation errors and 0 consistency errors in database
    > 'db_Name'.
    >
    > I think there may be another issue.



    Ah, I did not look closely on the original error message. The database which
    has corruption issues is tempdb (database 2). The good news is that there is
    no problem with data loss. Still something needs to be done. Is tempdb on
    the C: disk, or elsewhere? If it's on the C-disk, maybe all you need to do
    is to replace this disk.

    Corruption errors in tempdb may be more difficult to catch. Since tables
    gets created and dropped, allocation errors may come and go.


    --
    Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse

    Links for SQL Server Books Online:
    SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx


  7. Re: Attempt to fetch logical page in database

    Hi,

    But why i m not getting that error while running that sp in sql?
    and I have also checkdb for tempdb and no error for the same.

    Thanks,
    Hemant

    "Erland Sommarskog" wrote in message
    news:Xns9DC48BA11640CYazormanat127dot0.0.1...
    > HP (HPattextdotcom) writes:
    >> Thanks for reply
    >>
    >> I have run CHECKDB and get below message
    >> CHECKDB found 0 allocation errors and 0 consistency errors in database
    >> 'db_Name'.
    >>
    >> I think there may be another issue.

    >
    >
    > Ah, I did not look closely on the original error message. The database
    > which
    > has corruption issues is tempdb (database 2). The good news is that there
    > is
    > no problem with data loss. Still something needs to be done. Is tempdb on
    > the C: disk, or elsewhere? If it's on the C-disk, maybe all you need to do
    > is to replace this disk.
    >
    > Corruption errors in tempdb may be more difficult to catch. Since tables
    > gets created and dropped, allocation errors may come and go.
    >
    >
    > --
    > Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse
    >
    > Links for SQL Server Books Online:
    > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    > SQL 2000:
    > http://www.microsoft.com/sql/prodinf...ons/books.mspx
    >




  8. Re: Attempt to fetch logical page in database

    HP (HPattextdotcom) writes:
    > But why i m not getting that error while running that sp in sql?


    Because you probably had a different query plan. By default when you connect
    to SQL Server, the setting ARITHABORT is OFF. But when you connect with
    SSMS, SSMS set this setting ON by default. (Which you can control under
    Options->Query Execution.) ARITHABORT is a cache key, meaning that different
    settings will yield different cache entries. If the plans are created at
    different occassions, and with different input parameters (SQL Server sniffs
    the input values on compilation), you can get different plans. Normally this
    is testified in different execution times. This time the difference was a
    lot more brutal.

    The ironic things is that as long as ANSI_WARNINGS is ON (which it is by
    default), ARITHABORT has no functional impact whatsoever.

    > and I have also checkdb for tempdb and no error for the same.


    Not surprising. Since the situation in tempdb is dynamic, consistency errors
    can come and go. Still, they don't come out of nowhere. They *can* be due to
    bugs in SQL Server, but hardware errors are more likely. Then again, since
    lot of tempdb is in cache, maybe this be a token of a bug. Unless you have
    faulty a memory board. But if the latter, you would see other misery on the
    machine as well, like crashing applications etc, blue screens etc.

    I think you should keep on eye on tempdb, maybe run DBCC on it every now and
    then, provided that this is permissible with the rest of the situation on
    the server. If nothing more appears, but this query continues to error out,
    then there is probably some bug of some sort. Exactly which version of SQL
    Server do you have? That is, what does SELECT @@version report?


    --
    Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse

    Links for SQL Server Books Online:
    SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx


  9. Re: Attempt to fetch logical page in database

    Hi,
    Thanks for ur reply......
    I found solution at : http://support.microsoft.com/kb/916086

    Thanks,
    HP

    "Erland Sommarskog" wrote in message
    news:Xns9DC4AE2CB138Yazormanat127dot0.0.1...
    > HP (HPattextdotcom) writes:
    >> But why i m not getting that error while running that sp in sql?

    >
    > Because you probably had a different query plan. By default when you
    > connect
    > to SQL Server, the setting ARITHABORT is OFF. But when you connect with
    > SSMS, SSMS set this setting ON by default. (Which you can control under
    > Options->Query Execution.) ARITHABORT is a cache key, meaning that
    > different
    > settings will yield different cache entries. If the plans are created at
    > different occassions, and with different input parameters (SQL Server
    > sniffs
    > the input values on compilation), you can get different plans. Normally
    > this
    > is testified in different execution times. This time the difference was a
    > lot more brutal.
    >
    > The ironic things is that as long as ANSI_WARNINGS is ON (which it is by
    > default), ARITHABORT has no functional impact whatsoever.
    >
    >> and I have also checkdb for tempdb and no error for the same.

    >
    > Not surprising. Since the situation in tempdb is dynamic, consistency
    > errors
    > can come and go. Still, they don't come out of nowhere. They *can* be due
    > to
    > bugs in SQL Server, but hardware errors are more likely. Then again, since
    > lot of tempdb is in cache, maybe this be a token of a bug. Unless you have
    > faulty a memory board. But if the latter, you would see other misery on
    > the
    > machine as well, like crashing applications etc, blue screens etc.
    >
    > I think you should keep on eye on tempdb, maybe run DBCC on it every now
    > and
    > then, provided that this is permissible with the rest of the situation on
    > the server. If nothing more appears, but this query continues to error
    > out,
    > then there is probably some bug of some sort. Exactly which version of SQL
    > Server do you have? That is, what does SELECT @@version report?
    >
    >
    > --
    > Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse
    >
    > Links for SQL Server Books Online:
    > SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    > SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    > SQL 2000:
    > http://www.microsoft.com/sql/prodinf...ons/books.mspx
    >




  10. Re: Attempt to fetch logical page in database

    HP (HPattextdotcom) writes:
    > Hi,
    > Thanks for ur reply......
    > I found solution at : http://support.microsoft.com/kb/916086


    Ah, that's great news!

    --
    Erland Sommarskog, SQL Server MVP, esquelatsommarskogdotse

    Links for SQL Server Books Online:
    SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
    SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
    SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx


+ Reply to Thread