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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How To Open MDF in SQL Server 2005

Author  Topic 

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 07:17:32
I have two files.

AdventureWorks_Data.mdf
AdventureWorks_Data.ldf

I am connected to the server.

How to open this database into my current connected SQL Server ?

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 07:21:34
I am using SQL Server Management Studio Express
Go to Top of Page

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 07:25:59
Now Wehn I tried to attach database, it's not showing on the path it's exits :(
Go to Top of Page

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 07:26:24
Ohh....I got my mistake ;)
Go to Top of Page

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 07:27:03
I have connected SQL Server from differnet PC, and it's shwoing the files of that PC and not of my PC :( How to solve this now ?
Go to Top of Page

sanoj_av
Posting Yak Master

118 Posts

Posted - 2009-10-07 : 07:33:49
What do you want to do infact? when u browse the directory structure it will always show the Files and directory in the server where SQL Server is hosted and not the client.You have to copy the mdf file to the server if it is in some other machines. Then issue the following
sp_attach_db <DTABASE_NAME>,<File Location>.
Remember that the file path is always relative to the server and not the client.
Go to Top of Page

arithforu
Starting Member

9 Posts

Posted - 2009-10-07 : 08:08:19
Yup, Thanks, that's wwhat I ll have to do...I will have to copy my db onto the Server :D
Go to Top of Page
   

- Advertisement -