Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 MS SQL Connection problem through real IP

Author  Topic 

hasibul2363
Starting Member

1 Post

Posted - 2010-05-20 : 03:27:41
Sir,

I have a problem with sql connection.

As I know, if I want to connect with MS SQL that is located on web then It(MS sql hosted server) requires remote connection mode enabled.

I have hosted my application provide by one of hosting service.

http://hasibul.cz.cc/Default1.aspx

http://e-rains.com/


I have hosted my MS data base on somee.com.



Here is the connection string for connection with my data base.

workstation id=erainsrbrl.mssql.somee.com;packet size=4096;user id=xxx;pwd=xxx;data source=erainsrbrl.mssql.somee.com;persist security info=False;initial catalog=erainsrbrl

using this connection string I can make connection from

http://hasibul.cz.cc/Default1.aspx and http://e-rains.com/



My Database server and My application server is different. I can connect my database server from my application server although they are different hosting company and different pc.

If I can connect from my application server, then why I cannot connect from my desktop pc which is connected with internet.

If I want to connect from my pc then if shoes following error (although I have internet connection and real IP.)


My Question summery.

If i can connect from my web application(although web server and database server is different) then why i cannot connect from my desktop.


----------------------------------------------------------------------------------------

System.Data.SqlClient.SqlException: 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) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at _Default.Button2_Click(Object sender, EventArgs e)

----------------------------------------


Hasibul
hasibul2363@yahoo.com
   

- Advertisement -