Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to open *.mdf file

Author  Topic 

amit_m04
Starting Member

2 Posts

Posted - 2010-01-27 : 15:10:55
Hi,

i have downloaded a *.mdf along with *.ldf file from the internet.
i have office 2003 and SQL Server 2000 and SQL Server 2005 Express installed on my system.

how can i get to see the tables that are there in this downloaded file..?

please help me with step by step if possible.

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-01-27 : 15:16:48
You need to attach the DB to the SQL instance. They aren't files that you can open.

Start up management studio, it should ask you for a server connection, so point it at the SQL 2005 express installed on your local machine. Object explorer should show a tree-view of everything in that server. Right click on the Databases folder, select attach, browse to where the mdf file is. It'll bring up a dialog of assorted options. Most are probably OK as the defaults, just check that the path to the ldf is correct. If not, use the browse button there to locate the ldf as well. You do need both.

Click OK and the DB should attach and be browsable.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

amit_m04
Starting Member

2 Posts

Posted - 2010-01-27 : 18:13:24
hey that worked thanks!!!

could u plz help me some more on this..

1) I have done this in SQL Server 2005 Express, how can i do the same in SQL Server 2000.

2) do i have to install management studio for SQL Server 2000 as well..?

3) if i have to export the database to MS Access then how can i do it..?

4) as there is a Relation chart in MS Access where we can see all the relations between all the tables at one time, can we do same in SQL Server and how..?


plz help on this
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-01-28 : 04:05:58
RE 1 and 2, you would use Enterprise Manager. I don't have that any longer, I don't recall how to use it. Also note that now that the DB has been attached to SQL 2005, it will not attach on SQL 2000

3) Right click the database (object explorer) Tasks -> Export data

4) Database diagram

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -