What's new

MSSQL 2008R2 (1 Viewer)

kaiholmes

Auditioning
Joined
Jan 28, 2016
Messages
1
Real Name
kai holmes
The situation is as follows:

MSSQL 2008R2

Base was copied into itself. As a result, mdf completely overwritten, there was only ldf.

The base was established and never backup, the log is not truncated.

mdf file size to rubbing was in the region of 300 MB

file size GB ldf 2,5

recovery model "full"

Is there any chance to recover?
 

landenjuarez

Auditioning
Joined
Feb 8, 2016
Messages
1
Real Name
landen juarez
And you can get more helpful resources on following threads, where users share their knowledge about SQL databases


http://www.fixya.com/support/t25285738-creating_new_database_using_mdf_file

http://ccm.net/forum/affich-777411-creating-a-new-database-using-an-mdf-file


Last one variant provided for completely crashed .mdf and .ldf files, when other ways can’t handle the situation https://repairsql.recoverytoolbox.com/ Recovery Toolbox for SQL Server


To find out what exactly gone wrong with database we tried following query

DBCC CHECKDB (‘YOUR_DATABASE_NAME’) WITH NO_INFOMSGS, ALL_ERRORMSGS

(It wasn’t much helpful in my case . I am just posting here in-case it hepls other !)

After a while we run another block of code , to put the database in emergency mode

EXEC sp_resetstatus ‘YOUR_DATABASE_NAME’;
ALTER DATABASE YOUR_DATABASE_NAME SET EMERGENCY
DBCC checkdb(‘YOUR_DATABASE_NAME’)
ALTER DATABASE YOUR_DATABASE_NAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘YOUR_DABASE_NAME’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE YOUR_DATABASE_NAME SET MULTI_USER


Finally we got database back online!
 

Users who are viewing this thread

Forum statistics

Threads
356,712
Messages
5,121,142
Members
144,147
Latest member
cennetkaralowa
Recent bookmarks
0
Top