is there any bug when connecting visual studio express 2012 web that is installed on windows 7 to connect to SQL Server Express 2012 or 2008R2?
the error message is this:
> A network-related or instance-specific error occurred while
> establishing a connection to SQL Server. The server was not found or
> is not accessible. Verify that the instance name is correct and that
> SQL Server name is configured to allow remote connections. (provider:
> SQL Network Interfaces, error: 26 - Error Locating Server/Instance
> Specified.)
in my situation, VS connects to SQL only if from server OS to Server OS
or it is from win7 OS to win7 OS ?
here is the scenario I got in my environment : we have 4 machines
1-win2012Srv: -Virtual machine -windows 2012 serverSQL Server Express 2012 visual studio express 2012 web -Symantec antivirus (disabled) -firewall is disabled -Static IP address
2- win08r2srv: -Virtual machine -windows 2008 R2 server -SQL Express 2008 R2 -visual studio express 2012 web -no antivirus -firewall is disabled -Static IP address
3- Win7PC1: -Real machine (PC) -windows 7 -SQL Express 2012 -visual studio express 2012 web -Avast antivirus (removed already) -firewall is disabled -Dynamic IP address
4- Win7PC2: -Real machine (PC) -windows 7 -visual studio express 2012 web -Avast antivirus (Running) -firewall is disabled -Dynamic IP address
the result is:
> Legend :)
>
> VS = visual studio express 2012 web
> --> = connect (i.e. I can connect to the SQL Server database)
> X--> = cannot connect (i.e. cannot add database connection)
vs on win2012Srv --> SQL on win08r2srv
vs on win08r2srv --> SQL on win2012Srv
vs on Win7PC1 X--> SQL on win2012Srv
vs on Win7PC1 X--> SQL on win08r2srv
vs on Win7PC2 X--> SQL on win2012Srv
vs on Win7PC2 X--> SQL on win08r2srv
vs on Win7PC2 ---> SQL on Win7PC1
thanks
Hasan
I really appreciate your valuable inputs. My hair about to fall because of this problem :(
Tom, thanks, I have gone through that article weeks ago, but no luck :)
The Summary:
I have made a work around to resolve my problem. I have created a new virtual server on the second physical DELL server (with SQL Express 2012).
The problem seems to be a network issue on the hyper-V virtual switch!!
More details:
As described previously, VS connects to SQL service within the same Hyper-V only, although all configuration are right. From any PC within my domain, I can connect to the SQL server on the first Hyper-V service using the ODBC or the connection string file (.UDL), BUT not through the “visual studio express 2012 web” !!!!!!!!!
Now, I can connect from any PC (using visual studio express 2012 web) to any SQL server Express 2012 on the second Hyper-V .
I have made 4 virtual service on the first hyperV and 4 on the second HyperV. All with the same result:
•VS on PC's can connect normally to any SQL server on the second HyperV•VS on PC's can NOT connect to any SQL server on the first HyperV
•VS on virtual servers on first HyperV can connect normally to any SQL server on the same physical machine/Same hyperV .
•VS on virtual servers on first HyperV can connect normally to any SQL server on the second physical machine/Second hyperV .
•VS on virtual servers on the second HyperV can connect to any SQL server on PC's or on the second HyperV/Same physical machine.
•VS on virtual servers on the second HyperV can NOT connect SQL servers on the first HyperV
Long story that last more than one month :(
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.