Error in connecting remotely to database
-
hello friends..I got this error while conecting to sqlsever 2005 through Visual studio 2005 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) can anyone help me..to resolve it
-
hello friends..I got this error while conecting to sqlsever 2005 through Visual studio 2005 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) can anyone help me..to resolve it
I have just suggested here http://www.codeproject.com/script/comments/forums.asp?msg=2175289&forumid=1725#xx2175289xx[^] to check if the machine where the SQL Server is located has any firewall active.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
hello friends..I got this error while conecting to sqlsever 2005 through Visual studio 2005 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) can anyone help me..to resolve it
Well read the error message, notice it says
Amit.Jagtap.nsk wrote:
this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections
Do a google search and you'll get plenty of hits http://www.google.co.uk/search?hl=en&q=sql+server+express+enable+remote+connections&meta=[^] pick a likly looking one and work through what it says http://www.datamasker.com/SSE2005_NetworkCfg.htm[^] If your not using Express then say what edition you are using. If you have already enabled remote connections then say so.
-
Well read the error message, notice it says
Amit.Jagtap.nsk wrote:
this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections
Do a google search and you'll get plenty of hits http://www.google.co.uk/search?hl=en&q=sql+server+express+enable+remote+connections&meta=[^] pick a likly looking one and work through what it says http://www.datamasker.com/SSE2005_NetworkCfg.htm[^] If your not using Express then say what edition you are using. If you have already enabled remote connections then say so.
-
Thank you, I tried all these suggestions but still connection is not established..Please Help me
huh...could it be that your server URL is wrong by any remote chance? :)
-- If this is a post that has been helpful to you, please vote for it. Thank you! "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
huh...could it be that your server URL is wrong by any remote chance? :)
-- If this is a post that has been helpful to you, please vote for it. Thank you! "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
I write connection string as string str="server=pcname/SQLEXPRESS; Initial Catalog=databasename;user=username;password=password "; Is it right. I am using sql server 2005 express edition
Could you try:
"data source=PCName\ServerName;initial catalog=DBName;User ID=Username; Password=Password;"
and see what happens?-- If this is a post that has been helpful to you, please vote for it. Thank you! "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
Could you try:
"data source=PCName\ServerName;initial catalog=DBName;User ID=Username; Password=Password;"
and see what happens?-- If this is a post that has been helpful to you, please vote for it. Thank you! "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
-
I tried it ..But the result is the same...I also allow remote connections through TCP/IP in sql server configuration manager..
-
you are using wrong connection string Use this..
Data Source=REMOTE_SQL_SERVER;Network Library=DBMSSOCN;Initial Catalog=MY_DATABASE;User ID=MY_DB_USER;Password=MY_USER_PASSWORD;
Well the connection string I gave works perfectly for me. However, it would be interesting to try the SSPI thing:
"data source=PCName\DBServerName;initial catalog=DBName;Integrated Security=SSPI"
-- If this is a post that has been helpful to you, please vote for it. Thank you! "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook