SQL Server does not exist or access denied.
-
This thing is very strange.I have been using the following connection string all these days data source=server;initial catalog=NIA;password=tpassword;persist security info=True;user id=sa But now all of my .net application is not getting connected to sqlserver [SqlException: SQL Server does not exist or access denied.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 NewNia.WebForm2.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\NewNia\WebForm2.aspx.vb:40 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731 Though i can acces my server through query analyzer.Please help
-
This thing is very strange.I have been using the following connection string all these days data source=server;initial catalog=NIA;password=tpassword;persist security info=True;user id=sa But now all of my .net application is not getting connected to sqlserver [SqlException: SQL Server does not exist or access denied.] System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472 System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372 System.Data.SqlClient.SqlConnection.Open() +384 NewNia.WebForm2.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\NewNia\WebForm2.aspx.vb:40 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731 Though i can acces my server through query analyzer.Please help
since your datasource is "server" I assume it's a different machine? if that's the case, have you recently installed SP2 or SP1 (in Server 2003)? They change the security model and as a result you won't be able to connect to sql server over a network connection unless you tweak some settings. Search for SP2 in Microsoft and then SQL Server and you will find a work around. If it's not SP 2, then there is some problem with your connection, or SQL server is not running, or the database NIA is not started, there are a number of reasons why this can happen.