Hey
I have developed a asp.net 2 system on my local machine using a local sql2000 server.
Now i'm trying to deploy it to a windows 2003 server, using a sql2000 server on another windows 2003 server. I thought the only thing i had to do was to create a ODBC connection to the sql server, and change the connectionstring. But no :)
What kind of changes do i need to do. Do i need to change the dataprovider.
I get this error:
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)
But i don't use a sql 2005 server.
Pleace help :)
When I got this error the reason was SQL Server service in SQL Server 2000 was off but I had SQL Server 2005 installed also so check to see if your SQL Server service is on. Hope this helps.|||
I can connect to the database through enterprise mananger, and if i create an ODBC connection. So i'm quite sure the service is running.
But i'm not sure how to connect to a shared sql server on another server. Do i need to use ODBC? Do i need to change some providers? How would the connectionstring look like.
Thanks
|||No you don't need ODBC to connect to SQL Server because the ODBC standard is very old. Try the link below for connection strings. Hope this helps.
http://www.connectionstrings.com
|||That's what i thougt to. But i can only get my application to work when using my local sql server. If i try to use a sql server on another server i get this error.
But is this correct:
Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;"
Where Aron1 is servername(not sql server name)??
Pubs is the database.
Is this enough information?
Thanks for your help.
|||Aron1 is the SQL Server instance name and all the information you need is in that site but if you need to know more about connection and SQL Server ANSI SQL permissions try the link below for a Microsoft provided tutorial. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000010.asp
|||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)
Change to the TCP/IP Provider and see if your problem goes away.
|||Found my problem. A firewall on the server was blocking this kind of traffic.