1,105,594 Community Members

sharing the mdf file on the network

Member Avatar
ndodi
Newbie Poster
10 posts since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi everyone, I wish to share the mdf file on the network so that other computers can use the file to capture or retrieve the data. Is there any way I can do this on MS SQL SERVER 2005?

Member Avatar
kingsonprisonic
Posting Whiz in Training
265 posts since Nov 2009
Reputation Points: 42 [?]
Q&As Helped to Solve: 54 [?]
Skill Endorsements: 0 [?]
 
0
 

Yes you can if you have a fixed IP address then you can make your mdf file use as server. So that each client connect the database....

Member Avatar
adam_k
Veteran Poster
1,056 posts since Jun 2011
Reputation Points: 239 [?]
Q&As Helped to Solve: 212 [?]
Skill Endorsements: 17 [?]
 
1
 

I'm curious, why share the mdf and not connect to the SQL server?

Member Avatar
ndodi
Newbie Poster
10 posts since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thanks for your response guys, adam can I still connect on the mdf file if I don't have a server. I use three normal computers with windows xp on it and I want to use the other pc to host the mdf file. Kingsonprisonic can this be possible?

Member Avatar
BitBlt
Practically a Posting Shark
895 posts since Feb 2011
Reputation Points: 442 [?]
Q&As Helped to Solve: 163 [?]
Skill Endorsements: 16 [?]
Featured
 
0
 

You can't really just "connect" to an mdf file. The mdf file is "owned" by a database engine instance that accepts requests, retrieves data from the mdf file and delivers it to the requester. What your "normal" machines have to connect to is the database engine that owns the mdf file.

Depending on how your network is configured, you can reference that database engine instance by name, or (as @kingsonprisonic says) by the IP address and port of the machine where the database engine instance is running (assuming you have proper security permissions on that SQL Server instance).

I hope that was clear enough?

Member Avatar
adam_k
Veteran Poster
1,056 posts since Jun 2011
Reputation Points: 239 [?]
Q&As Helped to Solve: 212 [?]
Skill Endorsements: 17 [?]
 
0
 

For this limited number of PCs (and from that I assume also limited number of concurent connections can be achieved) you would need an Express edition SQL server. Its free and it's major limitation is the number of concurent connections, which doesn't seem to be a problem.
You can have your clients connect to the service and the server will take care of the data.
Trying to share the db my sharing the mdf file will get you nothing, as BitBlt has already explained.

Member Avatar
ndodi
Newbie Poster
10 posts since Aug 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thank you very much guys, now everything is clear, from your answers I can tell where I was making a mistake: I created an mdf file using SQL SERVER, then extracted the mdf file and located it to the other hard-drive, my mistake was there. now I understand that I have to leave it in the SQL SERVER and connect direct to the sql server. I will try it and I don't doubt it will work. thanks A LOT.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article