Loading ...
Sorry, an error occurred while loading the content.
 

db file got corrupted.

Expand Messages
  • sunil john
    Dear all, We have database on one machine, unfortunately the C: drive of the machine got corrupted and the admin formated the drive, the db was on D: drive.
    Message 1 of 3 , Jun 2, 2008
      Dear all,

      We have database on one machine, unfortunately the C:\ drive of the machine got corrupted and the admin formated the drive, the db was on D:\ drive. Now when i tried to attach the db files its giving error. Both sp_attach_db and single file also tried no result. The error am getting is 'Could not open new database 'dbbame'. CREATE DATABASE is aborted. SQL Server detected a logical consistency-based I/O error: torn page'. we don't have a backup also. please guide me on with the possible way were i can get the db back.
      we are using windows XP prof and sql 2005.


      Best Regards


      Sunil John


      Send instant messages to your online friends http://uk.messenger.yahoo.com

      [Non-text portions of this message have been removed]
    • Gigme Chittayath
      Hey Sunil, attach will work only if the sql server gracefully shutdown. you could try this http://www.nigelrivett.net/RecoverCorruptDatabase.html or contact
      Message 2 of 3 , Jun 2, 2008
        Hey Sunil,
        attach will work only if the sql server gracefully shutdown.
        you could try this
        http://www.nigelrivett.net/RecoverCorruptDatabase.html
        or contact Microsoft support.Also if you are successful please let us know.

        regards
        Gigme.


        sunil john <suniljk7@...> wrote:
        Dear all,

        We have database on one machine, unfortunately the C:\ drive of the machine got corrupted and the admin formated the drive, the db was on D:\ drive. Now when i tried to attach the db files its giving error. Both sp_attach_db and single file also tried no result. The error am getting is 'Could not open new database 'dbbame'. CREATE DATABASE is aborted. SQL Server detected a logical consistency-based I/O error: torn page'. we don't have a backup also. please guide me on with the possible way were i can get the db back.
        we are using windows XP prof and sql 2005.

        Best Regards

        Sunil John

        Send instant messages to your online friends http://uk.messenger.yahoo.com

        [Non-text portions of this message have been removed]







        [Non-text portions of this message have been removed]
      • sunil john
        Dear Gigme, Thanks for ur reply, the link helped to certain extents. What i did was:- Created a new db with the same name. stoped the server Replaced the new
        Message 3 of 3 , Jun 3, 2008
          Dear Gigme,

          Thanks for ur reply, the link helped to certain extents.
          What i did was:-
          Created a new db with the same name.
          stoped the server
          Replaced the new mdf file with the old mdf file which i have (which was corrupted).
          started the server again.
          Then i can see the database but can't open it. Gives error as datafile is corrupted.
          Then i went for the below script, there was some data loss still i recovered the db.

          EXEC sp_resetstatus 'yourDBname';
          ALTER DATABASE yourDBname SET EMERGENCY
          DBCC checkdb('yourDBname')
          ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
          DBCC CheckDB ('yourDBname', REPAIR_ALLOW_DATA_LOSS)
          ALTER DATABASE yourDBname SET MULTI_USER


          It was a bad luck that we don't have a proper backup. but still got the db back with some data loss.

          Best Regards

          Sunil John



          ----- Original Message ----
          From: Gigme Chittayath <gigmepc@...>
          To: sqlcon@yahoogroups.com
          Sent: Monday, June 2, 2008 18:13:24
          Subject: Re: MUGH-SQLCON db file got corrupted.


          Hey Sunil,
          attach will work only if the sql server gracefully shutdown.
          you could try this
          http://www.nigelriv ett.net/RecoverC orruptDatabase. html
          or contact Microsoft support.Also if you are successful please let us know.

          regards
          Gigme.


          sunil john <suniljk7@yahoo. com> wrote:
          Dear all,

          We have database on one machine, unfortunately the C:\ drive of the machine got corrupted and the admin formated the drive, the db was on D:\ drive. Now when i tried to attach the db files its giving error. Both sp_attach_db and single file also tried no result. The error am getting is 'Could not open new database 'dbbame'. CREATE DATABASE is aborted. SQL Server detected a logical consistency- based I/O error: torn page'. we don't have a backup also. please guide me on with the possible way were i can get the db back.
          we are using windows XP prof and sql 2005.

          Best Regards

          Sunil John

          Send instant messages to your online friends http://uk.messenger .yahoo.com

          [Non-text portions of this message have been removed]

          [Non-text portions of this message have been removed]



          Send instant messages to your online friends http://uk.messenger.yahoo.com

          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.