Author |
Topic |
Matti Kalijarvi
Starting Member
5 Posts |
Posted - 2011-10-18 : 22:23:57
|
So im attempting to fix a screw up from a client.long story shortserver died, old IT guy ....long goneRecovered the MDF and LDF but.....i get the "log scan number passed to log scan in database is not valid."So i attach an old Backup, turn off sql service and copy over the MDF and LDF files.Then i get the DB attached but stuck in suspect mode.Then put the database in Emergency mode using this command.1.ALTER DATABASE dbname SET EMERGENCYThe next step was to run DBCC CHECKDB against that database.1.DBCC CHECKDB (dbname) WITH ALL_ERRORMSGSbamscrewedCannot open database 'dbname' version 655. Upgrade the database to the latest version.Im sure im using the same sql version as they were as their old sql errorlog from the recovered server shows 10.50.1600.1and im using sql2008 r2 expresswhich im sure is 10.50.1600.1How can i get this db restored, not to concerned with minor data loss at this point |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Matti Kalijarvi
Starting Member
5 Posts |
Posted - 2011-10-18 : 22:37:08
|
no dude ... i wouldn't be doing this if i had a Bak.... well i have a bak file.... but from 2009 |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-10-18 : 23:26:49
|
Lovely. Is complete loss of the database acceptable? What version was this database on? 2005 or 2008? You should not ever try to upgrade a damaged database, it generally doesn't work.--Gail ShawSQL Server MVP |
 |
|
Matti Kalijarvi
Starting Member
5 Posts |
Posted - 2011-10-18 : 23:33:17
|
The database was on 2008r2but the strange thing is im using sql2008r2 |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-10-18 : 23:36:27
|
Are you absolutely, completely sure of that? Because version 655 is SQL 2008, not SQL 2008 R2. R2 is 660.--Gail ShawSQL Server MVP |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Matti Kalijarvi
Starting Member
5 Posts |
Posted - 2011-10-19 : 01:04:04
|
So you were both right it was R1 But..... now .....I trick it by creating a dummmy database, turning off sql coppying over the med and ldfIn suspect mode now so i tryALTER DATABASE DBName SET EMERGENCY;GOALTER DATABASE DBName SET SINGLE_USER;GODBCC CHECKDB (DBName, REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS;GOBAM ---- TRAIN WRECKED AGAIN :(Msg 5123, Level 16, State 1, Line 1CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file 'c:\SQL DATABASE\DMNAME_1.LDF'.Msg 5024, Level 16, State 2, Line 1No entry found for the primary log file in sysfiles1. Could not rebuild the log.Msg 5028, Level 16, State 2, Line 1The system could not activate enough of the database to rebuild the log.Msg 7909, Level 20, State 1, Line 1The emergency-mode repair failed.You must restore from backup. |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-10-19 : 01:59:24
|
quote: Originally posted by Matti Kalijarvi Msg 5123, Level 16, State 1, Line 1CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file 'c:\SQL DATABASE\DMNAME_1.LDF'.
Does the path exist?--Gail ShawSQL Server MVP |
 |
|
Matti Kalijarvi
Starting Member
5 Posts |
Posted - 2011-10-19 : 08:28:43
|
Yes the path does exist....that's why im so confused. |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-10-19 : 10:24:05
|
In that case...quote: Msg 7909, Level 20, State 1, Line 1The emergency-mode repair failed.You must restore from backup.
Pretty much says it all. Restore to your last good backup or declare the DB a complete loss and recreate completely.--Gail ShawSQL Server MVP |
 |
|
|