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.
| Author |
Topic |
|
JohnJohn73
Yak Posting Veteran
57 Posts |
Posted - 2007-11-14 : 18:25:27
|
| hello all!I am having trouble with the remote aspects of SS 2005. When I run the client program (on the same machine), I am getting this SQLException message (.NET 2.0):The file "\\MONZA-UB\MonzaDB\MonzaDB.mdf" is on a network path that is not supported for database files.An attempt to attach an auto-named database for file \\MONZA-UB\MonzaDB\MonzaDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.I read some articles and they said that SS 2005 does not have remote access to it configured by default. So I used Microsoft's instructions to change all of the properties to include remote access (TCP/IP, Named Pipes, and VIA).I still get the same errors.My connection string is:"Data Source=.\SQLEXPRESS;AttachDbFilename=\\MONZA-UB\MonzaDB\MonzaDB.mdf;Integrated Security=True;Connect Timeout=30;User Instance=False;Asynchronous Processing=true"I also came across this article http://forums.asp.net/t/1126721.aspxand went through all the steps the guy outlined. Still no good.Even worse, when I decided to return everything back to normal (connection string, sql express properties defaults), I got a different error! Now I can't even use the program at all.If anybody can help or point me in the right direction, please!Thanks in advance |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-11-14 : 21:35:06
|
I don't think you can use UNC paths to a MDF file.I think you must use a drive letter. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
JohnJohn73
Yak Posting Veteran
57 Posts |
Posted - 2007-11-15 : 09:27:40
|
| How do I set that up? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-11-15 : 23:00:07
|
| For remote access, your data source should be host\sqlexpress. Try something like c:\MonzaDB\MonzaDB.mdf for AttachDbFilename. |
 |
|
|
JohnJohn73
Yak Posting Veteran
57 Posts |
Posted - 2007-11-16 : 09:44:17
|
| Thanks rmiao. i will try that ASAP. |
 |
|
|
JohnJohn73
Yak Posting Veteran
57 Posts |
Posted - 2007-11-16 : 09:52:08
|
| Oh, when you say "host\sqlexpress", do you mean the machine name, address, or just the word "host"? |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-11-17 : 01:25:41
|
| Replace it with machine name. |
 |
|
|
|
|
|
|
|