SQL Server Performance Forum – Threads Archive
Recovering Database Problem….Urgent!!!Hi:
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.
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
Thanks..It works fine.
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