Saturday, February 25, 2012

Restore mdf file

Hi all,
I need a urgent help. My server crashed yesterday because of the harddisk
problem. I lost my backup file and only got this *.mdf and *.ldf file.
I tried to restore these using attach database method and also by creating a
database...stop the sql service... overwrite the created database with the my
*.mdf and *.ldf file.
First method was showing this message "The File you've specified is not a
valid SQL server database file"
Second method ... Database is in Suspect mode ...If I tried to click on the
database, it will show "Error 823: I/O error (bad page ID) detected during
read at offset (0x0000000012000 in the file 'C:\Program Files\Microsoft SQL
Server\MSSQL\Data\GTS_MY.mdf"
Pls advise what I have to do to restore the above file...
Million Thanks in advance for any help regarding this...
Regards
SajithTake a look at this magic page:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
HTH, Jens Suessmeyer.|||Hi
Most of the articles relating to error 823
(http://search.msdn.microsoft.com/search/results.aspx?view=msdn&st=a&na=81&qu=&qp=bad+page+ID&qa=&qn=&c=10&s=1)
assume that the database is already attached, therefore you may want to raise
a call with PSS to get this resolved. Alternatively if you have a backups
(full/log) you may be able to restore upto a point in time (although there
will almost certainly be some loss of data).
John
"Sajith" wrote:
> Hi all,
> I need a urgent help. My server crashed yesterday because of the harddisk
> problem. I lost my backup file and only got this *.mdf and *.ldf file.
> I tried to restore these using attach database method and also by creating a
> database...stop the sql service... overwrite the created database with the my
> *.mdf and *.ldf file.
> First method was showing this message "The File you've specified is not a
> valid SQL server database file"
> Second method ... Database is in Suspect mode ...If I tried to click on the
> database, it will show "Error 823: I/O error (bad page ID) detected during
> read at offset (0x0000000012000 in the file 'C:\Program Files\Microsoft SQL
> Server\MSSQL\Data\GTS_MY.mdf"
> Pls advise what I have to do to restore the above file...
> Million Thanks in advance for any help regarding this...
> Regards
> Sajith|||see this link
http://www.mrdk.nl/FAQ/dbrepair.txt
regards
Michel Posseth [MCP]
"Sajith" <Sajith@.discussions.microsoft.com> wrote in message
news:A612F8D4-2D2C-4FB2-855C-2080619DC938@.microsoft.com...
> Hi all,
> I need a urgent help. My server crashed yesterday because of the harddisk
> problem. I lost my backup file and only got this *.mdf and *.ldf file.
> I tried to restore these using attach database method and also by creating
> a
> database...stop the sql service... overwrite the created database with the
> my
> *.mdf and *.ldf file.
> First method was showing this message "The File you've specified is not a
> valid SQL server database file"
> Second method ... Database is in Suspect mode ...If I tried to click on
> the
> database, it will show "Error 823: I/O error (bad page ID) detected during
> read at offset (0x0000000012000 in the file 'C:\Program Files\Microsoft
> SQL
> Server\MSSQL\Data\GTS_MY.mdf"
> Pls advise what I have to do to restore the above file...
> Million Thanks in advance for any help regarding this...
> Regards
> Sajith|||hi
let me thank you for replying to my mail.
dbcc rebuild_log('GTS_MY','C:\Program Files\Microsoft Sql
Server\mssql\data\GTS_MY_log.ldf')
above is my command... message also says completed successfuly... But I
cant see the *.ldf file in the folder . database is still in suspect mode..
what could be the problem..
Thanks again...
Regards
Sajith
"m.posseth" wrote:
> see this link
> http://www.mrdk.nl/FAQ/dbrepair.txt
>
>
> regards
> Michel Posseth [MCP]
>
>
>
> "Sajith" <Sajith@.discussions.microsoft.com> wrote in message
> news:A612F8D4-2D2C-4FB2-855C-2080619DC938@.microsoft.com...
> > Hi all,
> >
> > I need a urgent help. My server crashed yesterday because of the harddisk
> > problem. I lost my backup file and only got this *.mdf and *.ldf file.
> >
> > I tried to restore these using attach database method and also by creating
> > a
> > database...stop the sql service... overwrite the created database with the
> > my
> > *.mdf and *.ldf file.
> > First method was showing this message "The File you've specified is not a
> > valid SQL server database file"
> >
> > Second method ... Database is in Suspect mode ...If I tried to click on
> > the
> > database, it will show "Error 823: I/O error (bad page ID) detected during
> > read at offset (0x0000000012000 in the file 'C:\Program Files\Microsoft
> > SQL
> > Server\MSSQL\Data\GTS_MY.mdf"
> >
> > Pls advise what I have to do to restore the above file...
> >
> > Million Thanks in advance for any help regarding this...
> >
> > Regards
> > Sajith
>
>|||Hi Sajithy,
you are doing the DBCC for the log file where your originally error was
stating the mdf file had the problem.
Try following that line to resolve this issue.
Good Luck and post back your results and resolution
Cheers
Steve L

No comments:

Post a Comment