Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
| Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 6th, 2007, 04:58 PM
Friend of Wrox
 
Join Date: Apr 2006
Location: , , .
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot connect to MYSERVER\SQLEXPRESS

Hi,

i installed Sql server 2005 express edition on an windows xp professionel sp2 system, which is alos the IIS server..
Of course i first installed .net Framework 2.0.

I installed it with an administrator account and used following options:
local system
services sql server / sql browser
windows authentification
enable user instance
add user to sql server adminsys role

Further i went to Sql server Configuration Manager and did:
protocols for MSSQLSERVER (service): TCP/IP and shared memory enabled

Finaaly, i went to Sql server Surface Area and did: remote connections:
local and remote connections
using TCP/IP only (and later i also tried: using TCP/IP and named pipes)

My problem is:
--------------
 when starting Sql server Management Studio express, everything seems ok: i see the server name, authentification (windows), user name (the admin account), but when clicking on "connect" button, after a while, i get the error:
"Cannot connect to MYSERVER\SQLEXPRESS.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)".

1) the optiion 'remote connections' is enabled (with tcp/ip)
2) i even don't use remote connections because sql server is installed on the same server as the IIS server.

I really have no idea what's the problem and how to solve this. I
uninstalled everything twice (.net framework included) but still same error.

Thanks for help.
Hertendreef




 
Old April 7th, 2007, 08:32 AM
Authorized User
 
Join Date: Dec 2006
Location: Lake Wylie, SC, USA.
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Don't worry too much about remote connections unless you want to use TCP/IP or Named Pipes. When connecting locally, shared memory will be used unless a specific protocol has been specified.

The part of the error message that makes more sense is ... Error Locating Server/Instance Specified...
Check your SQL ERRORLOG for, the exact name of the server/instance.

If you need help reading the ERRORLOG, post it here.

Remote connections does not control only the true 'remote' connections, it simply manages the protocols available to local and remote connections. When the Remote Connections setting is set to 'local only', the protocols TCP/IP and Named Pipes are disabled.

Adam Gossage
Lake Wylie, SC, USA
 
Old April 7th, 2007, 08:37 AM
Authorized User
 
Join Date: Dec 2006
Location: Lake Wylie, SC, USA.
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another possibility, you can find in the ERRORLOG, shared memory is not enabled or working correctly.
Look for the line(s)... (this shows that shared memory is listening)
Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].
Server local connection provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].


Adam Gossage
Lake Wylie, SC, USA
 
Old April 8th, 2007, 09:02 AM
Friend of Wrox
 
Join Date: Apr 2006
Location: , , .
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Adam, i found it:

i reinstalled sqk server express, but it changed the instance name to
MYSERVER (instead of .\SQLEXPRESS). So the connection strings didn't work
and generated that error which has nothing to do woth remoting connections.

Thanks anyway







Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLEXPRESS deployment with Windows application hkec SQL Server 2005 1 February 7th, 2007 01:13 PM
SqlExpress Support for Intant Results SoftMind BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 September 15th, 2006 08:35 AM
SQLExpress right issue mar0364 ASP.NET 1.0 and 1.1 Basics 0 April 13th, 2005 05:59 AM
SQLExpress Beta1 stu9820 SQL Server 2000 1 October 25th, 2004 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.