November 1, 2013 at 9:49 am
hi,
we are using sql server 2008 r2 for navision application after server crash we are taken the database files and put in another server try to attach its failed .what we done is
1.create the empty datbase with same name
2.stop the sql server
3.replace the file
4.start the sql server .still we are getting error like this
second options we follwed these steps
=============================
EXEC sp_resetstatus [YourDatabase];
ALTER DATABASE [YourDatabase] SET EMERGENCY
DBCC checkdb([YourDatabase])
ALTER DATABASE [YourDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ([YourDatabase], REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [YourDatabase] SET MULTI_USER
still in error
Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'XXX.ldf'.
Msg 5024, Level 16, State 2, Line 1
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 1
The system could not activate enough of the database to rebuild the log.
Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'XXX.ldf'.
Msg 5024, Level 16, State 2, Line 1
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 1
The system could not activate enough of the database to rebuild the log.
Msg 9004, Level 21, State 1, Line 1
An error occurred while processing the log for database 'XXXX'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
Msg 7909, Level 20, State 1, Line 1
The emergency-mode repair failed.You must restore from backup.
any one please help me
November 1, 2013 at 10:01 am
Is the original log file from the original server available? Or did it "go down with the ship"? From the error messages, it seems you have copied over all of the .MDF and .NDF files, but not the .LDF file. You can try to do an attach with a rebuild of the log, but that will depend on how much update activity there was in the database at the time of the loss of the log. if there was a lot, the database will be pretty hopelessly corrupt.
November 1, 2013 at 10:02 am
Restore from your last good backup.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 1, 2013 at 10:04 am
its any possible to recover without restore the backup
November 1, 2013 at 10:04 am
ldf file i cpoied and pasted in new server its available
November 1, 2013 at 10:06 am
Matt Crowley (11/1/2013)
From the error messages, it seems you have copied over all of the .MDF and .NDF files, but not the .LDF file.
Emergency mode repair is capable of rebuilding the log. What the errors suggest in this case is damage to the system tables (specifically the one holding data on the files in the DB) which resulted in the rebuild failing
You can try to do an attach with a rebuild of the log, but that will depend on how much update activity there was in the database at the time of the loss of the log.
That's what emergency mode repair tried to do and failed. From the errors:
Msg 5024, Level 16, State 2, Line 1
No entry found for the primary log file in sysfiles1. Could not rebuild the log.
Msg 5028, Level 16, State 2, Line 1
The system could not activate enough of the database to rebuild the log.
The log cannot be rebuilt due to the damage to the database file.
if there was a lot, the database will be pretty hopelessly corrupt.
Rebuilding a log won't make a database corrupt, transactionally inconsistent yes, possibly structurally inconsistent, but SQL will not corrupt its own databases
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 1, 2013 at 10:07 am
pradeep.k 50453 (11/1/2013)
its any possible to recover without restore the backup
No. Emergency mode repair failed. That's the absolute final resort, there are no more options left. Restore from your last good backup.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 1, 2013 at 10:09 am
thank you i try to restore from last backup
November 1, 2013 at 10:12 am
thank you i try to restore from last backup
November 1, 2013 at 10:12 am
btw, restore from backup should have been the first thing you tried. Emergency mode repair is the last resort when all else has failed and you have no backup. It should never be the first thing tried. It can leave the database transactionally inconsistent, it can result in large amounts of data loss.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply