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
 Express Edition and Compact Edition (2005)
 Share a SQL database across an ethernet connection

Author  Topic 

BradH
Starting Member

6 Posts

Posted - 2012-08-23 : 23:55:09
I am trying to share an mdf file between two laptops connected via an ethernet connection. The environment is: Main laptop is called "BandMJ-PC" and the "Slave" laptop is called "BRAD-LAPTOP". I want the Main laptop to be running a particular application accessing ALAMEIN.mdf while the Slave laptop is running a different application also accessing ALAMEIN.mdf on the Main laptop. Both apps are written in vb 2010 Express. So far I have introduced a login for "BandMJ-PC\Guest" in SQL Server Management Studio and given that login full access to the folder containing the data files.
My connection string is:
"Data Source=BandMJ-PC\SQLEXPRESS;AttachDbfFilename=Y:\Test Auctions\ALAMEIN.mdf;Integrated Security=True;User Instance=False"
Where "Y" is the Network drive for the Main laptop.
When I run the application on the Slave I get "An attempt to attach an auto-named database for file "Y:\Test Auctions\ALAMEIN.mdf failed. A database with the same name exists, or specified file canot be opened, or it is located on UNC share."
I have spent days trying to google a solution but there seems to be a huge amount of solutions but I've yet to find one that works for me.
Any help would be greatly appreciated.
   

- Advertisement -