Reputation: 21
I have managed to drop an SQL express 2008 database, that I accessed using SQL Management studio.
I don't have a backup of the database created through Management Studio or SQL, but I do have a disc copy of my entire c:
drive made prior to a machine rebuild 4 weeks ago (A previous installation of the dropped database did exist at this stage). The disc backup contains all the databases (2) and versions, that I require.
Can I restore the databases from copies of raw files form a backup disc? If so is this complicated? Which files would I need to be copy and to where?
Thanks in advance. Your help is appreciated.
Upvotes: 2
Views: 399
Reputation: 4279
If you have the old .mdf and .ldf files you can use the "attach database" option rather than restore.
Upvotes: 0
Reputation: 755491
Should be pretty easy:
(if needed) re-install SQL Server (Express) - you should make sure to install the version with the Management Studio
Copy the "raw" files (*.mdf
and *.ldf
) to the default data directory
In SQL Server Management Studio (Express), in the Object Explorer, go to the Database
node and right-click and pick Attach...
Find your *.mdf
file in question and select it
That should be all there is!
Upvotes: 2