Showing posts with label connections. Show all posts
Showing posts with label connections. Show all posts

Tuesday, March 27, 2012

Connecting to SQL Server 2005 - Not Allow Remote Connections

I use ASP.NET 2.0 and VS.NET 2005.

I have the following expression in my code:

string connectionString = "server=\'localhost\'; user id=\'sa\'; password=\'\'; Database=\'Northwind\'";

When I executed the code I have the following error message:

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

The Microsoft Access was successfully connected in the Server Explorer window.

How do I solve this problem?

Thanks,

Andy.

Try this thread for the two links you need to get it going. Hope this helps.

http://forums.asp.net/thread/1381596.aspx

|||

From your link, I found the following link http://support.microsoft.com/default.aspx?scid=kb%3bEN-US%3b914277. I have followed all the instructions from that page, but I still receive the same error message.

I am not sure which version of SQL I am using. From the "start" -> "All Programs", I can only see "Microsoft SQL Server". It was installed, when I installed Microsoft Visual Studio 2005 Professional.

Andy.

|||If you have the professional you should have the Developer edition CD separately, copy the content to your hard drive and install it as a named instance and then use the instructions for the developer edition. Hope this helps.

Sunday, March 25, 2012

Connecting to SQL error 40

I'm trying to connect to an SQL server, but I'm unable. It suggests this is because SQL server does not allow remote connections, and points me to the named pipes provider, error 40 Could not open a connection to SQL server.

I am running SQL express service pack 2 under Vista. I am a member of SQL administrators (set during installation).

Under the SQL Server Configuration manager, SQL server and Browser are running, the protocols for sqlexpress and the native client have enabled shared memory, named pipes, and tcp/ip.

I tried removing and creating a new database. Now it sits under the database Engine section of Management Studio Express, with a white circle on the database icon. When I try to connect to this database, using either windows authentication or sql server authentication, it fails.

What else is there to try? If there was a troubleshooting guide, that would be helpful.

We can ignore this question. After 'fiddling around' it is now working. Couldn't describe what I did though. I think the error message is misleading though.

Connecting to SQL dbfs with existing code

We recently moved our Access databases to SQL and are
trying to get our pages to open the connections to the
server. I've set the system DSNs on the server as needed.
However, no connections are made. After reviewing several
books, microsoft.com, etc...I'm severely frustrated. The
only thing I can think that would possibly be an issue is
that our webserver (Win2003) is not setup as a Primary
Domain Server and we have to connect via http.
Any suggestions are appreciated. THANKS!Does the System DSN connect if you Test it from the IIS server?
If not what is the OS error returned?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Thursday, March 22, 2012

Connecting to SQL 2005 from other machines

The April CTP was working well but both the June and Sept CTP seem to be having problems with connections outside the local machine. It does not seem to matter how the connection is to be established (from code, from SQL managment studio etc) the same error comes up repeatedly.

Cannot connect to SEPTCTP.

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

Any suggestions besides rolling back to the April CTP (our current solution)?

Is the Named Pipes protocol enabled on server?
On server machine, run SQL Server configuration manager,
open SQL Server Network Configurations and enable Named Pipes.
Or switch client to use TCP/IP protocol rather than Named Pipes.

Thanks,
Michael.

P.S. This seems to be general SQL question, you might
get better response in SQL Server Database Engine group,
rather than in this SSIS-specific group.|||I'm not sure why, but we needed to access remote servers with their IP address AND a specific non-standard port once we upgraded to the newest CTP. This seemed fine for our test applications (we're not releasing anything until the final version is released).

Josh|||

This should be fine, provided that client is also configured

to use TCP/IP protocol and appropriate port. But the error

indicates the connection is using Named Pipes protocol.

It seems like the connection or SQL Client defaults is not

configured properly.

I'm not really a pro in SQL Client configuration, forum
SQL Server Database Engine might have people more
knowlegable in this area.

The answer may depend on whether you are using OLEDB or
ADO.NET connection managed, and in former case - SQL Native
OLEDB provider or Microsoft OLEDB provider for SQL Server.

Tuesday, March 20, 2012

Connecting to ODBC Connections with Report Services

I have just migrated from SQL 2000 to SQL 2005 and in the process upgraded to new hardware. I am now running SQL2005 (64 Bit) on Windows 2003 R2 (64 Bit). The problem is that when i deploy some reports to the new server that use ODBC to connect to the data, reporting services is erroring with :

Data source name not found and no default driver specified

The ODBC connections are set up exactly the same on the old server and the new server. Is it because it is looking for a 64 bit ODBC driver and not the 32 Bit one I have installed. If i go into the SysWOW64 and run the odbcad32.exe i can see the drivers and the connection. The connection test works fine from here.

Thanks

Has anyone got any ideas on this ?|||Did you find a resolution? I have the same problem.|||I am waiting for a company called Openlink to get back to me they are currently developing some drivers|||Thanks. My client is switching to 32-bit software to resolve this. Good luck.|||

Did anyone get this resolved? I am having the same problem. I fear I may have to revert back to the 32-Bit OS.

Any advice or suggestion are welcomed.

Thanks,

Andy

Connecting to ODBC Connections with Report Services

I have just migrated from SQL 2000 to SQL 2005 and in the process upgraded to new hardware. I am now running SQL2005 (64 Bit) on Windows 2003 R2 (64 Bit). The problem is that when i deploy some reports to the new server that use ODBC to connect to the data, reporting services is erroring with :

Data source name not found and no default driver specified

The ODBC connections are set up exactly the same on the old server and the new server. Is it because it is looking for a 64 bit ODBC driver and not the 32 Bit one I have installed. If i go into the SysWOW64 and run the odbcad32.exe i can see the drivers and the connection. The connection test works fine from here.

Thanks

Has anyone got any ideas on this ?|||Did you find a resolution? I have the same problem.|||I am waiting for a company called Openlink to get back to me they are currently developing some drivers|||Thanks. My client is switching to 32-bit software to resolve this. Good luck.|||

Did anyone get this resolved? I am having the same problem. I fear I may have to revert back to the 32-Bit OS.

Any advice or suggestion are welcomed.

Thanks,

Andy

Connecting to ODBC Connections with Report Services

I have just migrated from SQL 2000 to SQL 2005 and in the process upgraded to new hardware. I am now running SQL2005 (64 Bit) on Windows 2003 R2 (64 Bit). The problem is that when i deploy some reports to the new server that use ODBC to connect to the data, reporting services is erroring with :

Data source name not found and no default driver specified

The ODBC connections are set up exactly the same on the old server and the new server. Is it because it is looking for a 64 bit ODBC driver and not the 32 Bit one I have installed. If i go into the SysWOW64 and run the odbcad32.exe i can see the drivers and the connection. The connection test works fine from here.

Thanks

Has anyone got any ideas on this ?|||Did you find a resolution? I have the same problem.|||I am waiting for a company called Openlink to get back to me they are currently developing some drivers|||Thanks. My client is switching to 32-bit software to resolve this. Good luck.|||

Did anyone get this resolved? I am having the same problem. I fear I may have to revert back to the 32-Bit OS.

Any advice or suggestion are welcomed.

Thanks,

Andy

Friday, February 24, 2012

Connecting remotely without any issues.

I already have local and remote connections enabled. What else do I have to
enable? Also, I have installed all components I thought possible. How do I
access or install Data Transforation Project in 2005?
"Geoff N. Hiten" wrote:

> Login locally to the server and run the SQL Surface Area Configuration Too
l.
> SQL 2005 is "secure by default". One aspect of this is the SQL server
> disables all external network connections by default. You can connect
> locally on the box, but not across the network. This allows a DBA to load
> and patch a SQL server without exposing it to network attacks like a SQL
> 2000 system.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVPericzaj wrote:
> I already have local and remote connections enabled. What else do I have t
o
> enable? Also, I have installed all components I thought possible. How do I
> access or install Data Transforation Project in 2005?
>
Do you mean DTS (Data Transformation Services)? That no longer exists
in SQL 2005, it has been replaced with SSIS (SQL Server Integration
Services).
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Connecting remotely without any issues.

I already have local and remote connections enabled. What else do I have to
enable? Also, I have installed all components I thought possible. How do I
access or install Data Transforation Project in 2005?
"Geoff N. Hiten" wrote:
> Login locally to the server and run the SQL Surface Area Configuration Tool.
> SQL 2005 is "secure by default". One aspect of this is the SQL server
> disables all external network connections by default. You can connect
> locally on the box, but not across the network. This allows a DBA to load
> and patch a SQL server without exposing it to network attacks like a SQL
> 2000 system.
>
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVPericzaj wrote:
> I already have local and remote connections enabled. What else do I have to
> enable? Also, I have installed all components I thought possible. How do I
> access or install Data Transforation Project in 2005?
>
Do you mean DTS (Data Transformation Services)? That no longer exists
in SQL 2005, it has been replaced with SSIS (SQL Server Integration
Services).
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Sunday, February 12, 2012

Connect to SQL Server from Client Using Windows Authentication

On a newly installed workgroup computer, the client, I've been able to
establish connections to the SQL Server on a different computer using SQL
authentication via ODBC and Query Analyzer.
Now I am trying to figure out how to connect with WIndows authentication.
On the client computer (PCMAX04), when I try to login to SQL Server via QA,
the error reads "Login failed for user DELLJAN2005\Guest" even though I am
logged in to the client computer as MST.
DELLJAN2005 is the name of the SQL Server and the computer on which it is
installed.
In SQL Server, there is a login named "DELLJAN2005\MST".
How can it arrange it so that when I log on from the client computer using
Windows authentication, SQL Server interprets the login as being for "MST"?
Many thanks,
Mike Thomas
You don't mention the specific operating systems involved.
With XP home, authentication is done using the guest account
as simple file sharing is always enabled on XP Home. You
could hit the issue with XP Pro if simple file sharing is
used. It's optional but is the default with XP Pro. How you
address the issue depends somewhat on what specific
operating systems are involved. Refer to the following for
more info:
SQL Server clients are authenticated as guests if Simple
File Sharing is enabled
http://support.microsoft.com/?id=831133
-Sue
On Fri, 18 Feb 2005 09:38:43 -0500, "Mike Thomas"
<mike@.ease.com> wrote:

>On a newly installed workgroup computer, the client, I've been able to
>establish connections to the SQL Server on a different computer using SQL
>authentication via ODBC and Query Analyzer.
>Now I am trying to figure out how to connect with WIndows authentication.
>On the client computer (PCMAX04), when I try to login to SQL Server via QA,
>the error reads "Login failed for user DELLJAN2005\Guest" even though I am
>logged in to the client computer as MST.
>DELLJAN2005 is the name of the SQL Server and the computer on which it is
>installed.
>In SQL Server, there is a login named "DELLJAN2005\MST".
>How can it arrange it so that when I log on from the client computer using
>Windows authentication, SQL Server interprets the login as being for "MST"?
>Many thanks,
>Mike Thomas
>
>
>
>

Connect to SQL Server from Client Using Windows Authentication

On a newly installed workgroup computer, the client, I've been able to
establish connections to the SQL Server on a different computer using SQL
authentication via ODBC and Query Analyzer.
Now I am trying to figure out how to connect with WIndows authentication.
On the client computer (PCMAX04), when I try to login to SQL Server via QA,
the error reads "Login failed for user DELLJAN2005\Guest" even though I am
logged in to the client computer as MST.
DELLJAN2005 is the name of the SQL Server and the computer on which it is
installed.
In SQL Server, there is a login named "DELLJAN2005\MST".
How can it arrange it so that when I log on from the client computer using
Windows authentication, SQL Server interprets the login as being for "MST"?
Many thanks,
Mike ThomasYou don't mention the specific operating systems involved.
With XP home, authentication is done using the guest account
as simple file sharing is always enabled on XP Home. You
could hit the issue with XP Pro if simple file sharing is
used. It's optional but is the default with XP Pro. How you
address the issue depends somewhat on what specific
operating systems are involved. Refer to the following for
more info:
SQL Server clients are authenticated as guests if Simple
File Sharing is enabled
http://support.microsoft.com/?id=831133
-Sue
On Fri, 18 Feb 2005 09:38:43 -0500, "Mike Thomas"
<mike@.ease.com> wrote:

>On a newly installed workgroup computer, the client, I've been able to
>establish connections to the SQL Server on a different computer using SQL
>authentication via ODBC and Query Analyzer.
>Now I am trying to figure out how to connect with WIndows authentication.
>On the client computer (PCMAX04), when I try to login to SQL Server via QA,
>the error reads "Login failed for user DELLJAN2005\Guest" even though I am
>logged in to the client computer as MST.
>DELLJAN2005 is the name of the SQL Server and the computer on which it is
>installed.
>In SQL Server, there is a login named "DELLJAN2005\MST".
>How can it arrange it so that when I log on from the client computer using
>Windows authentication, SQL Server interprets the login as being for "MST"?
>Many thanks,
>Mike Thomas
>
>
>
>