Monday, March 26, 2012

Establish connection to the server

Hi,

I have a problem editing my SQL databases in Visual Studio 2005, i have searched the web for answers, but those were not clear enough to me, somthing about changing my settings for SQL server, but i didn't follow it all to well, the current error mesage I get when i click in the Server Explorer on my data connections is:

An error has occured 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I do have followed some tips, bit end to this error mesage every time. Bevore i followed that tips the error said:

(provider: TCP/IP, error ... i dont remember anymore...)

I have tried to delete SQL and Visual Studio but it didn't help, and reinstall it.

Please can somebody help me, i am realy fFrustrated about the fact i cant fix it!By default SQL Server Express does not have remote connections enabled. You can do this using the following instructions: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx|||Yes, i have seen these instructions before, and i apply them again. But again without any succes. the error i now get is:

Connecting to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251

I downloaded the file, open it. It recognizes the Named Instance as SQLExpress but then it said:

Name: Microsoft SQL Server 2005 Express Edition (SQLEXPRESS)

Allowed Action: Maintain (Action is only available from Add or Remove Programs)

Reason: Cannot maintain product, to maintain the product go to Add or Remove Programs

And the things i have in my Add or Remove Programs are:

Microsoft SQL Server 2005
Microsoft SQL Server 2005 Mobile
Microsoft SQL Server Native Client
Microsoft SQL Server Settup supporting files
Microsoft SQL Server VSS writer

What must i do?

|||

I encountered the same error message while trying to create a data connection from Visual Studio 2005 using the Server Explorer.

This is what I did:

# 1. Started Visual Studio 2005

# 2. Opened the Server Explorer (View | Server Explorer)

# 3. Right-clicked the Data Connections node

# 4. Selected Create New SQL Server Database... from the context menu

# 5. Selected my computer from the Server Name dropdown list

# 6. Selected authentication method (Use Windows Authentication)

# 7. Typed a name in the New Database Name field

# 8. Hit the OK button

That's when I received the following error message

An error has occured 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: Named Pipes Provider, error:40 – Could not open a connection to SQL Server)

It made absolutely no sense. I wasn't trying to connect to a remote computer. I was simply trying to connect to the SQL Server 2005 Express Edition which was installed on my local computer during the Visual Studio 2005 installation.

After numerous attempts on several computers, I finally realized what I was doing wrong. By adding the database instance name to the server name (# 5), it actually worked. Instead of selecting <server name> from the dropdown list, I entered <server name>\SQLExpress manually. That was obviously the problem.

SQL Server 2005 Express Edition is obviously installed as a named instance, since one has to provide the instance name in addition to the server name (even when there is only one instance running on the requested server).

|||

Hi

Have to tried

sp_configure 'remote admin connections',1

go

Reconfigure

go

No comments:

Post a Comment