Recovering Database Problem….Urgent!!! | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Recovering Database Problem….Urgent!!!

Mi problem is that the DBA leaves the enterprise and nobody knew the password so, they decided to re-install the sql-server.. and how they can’t do a backup of the databases they just copy the *.MDF and *.LDF files in a Cd.. the question is .. how i can recover this databases?.. i try to import them using import data, but doesn’ work. Pd:
I speak spansih, so if you don’t understand something.. please sorry Atte.
César Azúa
You can attach the two files with the following SQL: EXEC sp_attach_db @dbname = N’DBName’,
@filename1 = N’e:sqldataDatafile.mdf’,
@filename2 = N’e:sqldataLogfile.ldf’ You will need to create the database first, then reattacht the files to it. Charlie
Realcomp II

Thanks..It works fine.
César Azúa
Keep in mind after attching on target server execute DBCC checks and other maintenance tasks which would ensure better performance and fix for the attached db. HTH Satya SKJ