Can no longer login to SQL Server 2008 R2

Go To StackoverFlow.com

2

Not sure what might have caused it, I ended task on some SQL processes in task manager then restarted the computer. Now I can no longer login to SQL Server 2008 R2. This is the error I get when attempting to login:

==================================

Cannot connect to JSMITH.

===================================

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

------------------------------ For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------ Error Number: 2 Severity: 20 State: 0

------------------------------ Program Location:

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) 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.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) 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 Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server) at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

2012-04-04 03:02
by tweetypi
Did you move to SQL Server 2008 R2 from a previous version relatively recently? Was it in-place upgrade or fresh installation - Jirka Hanika 2012-04-04 03:06


3

I would suggest to check the following:

  1. Check if SQL Server service is running, if not check EventLog for any service-related errors.

  2. Check that names pipes are enabled in Config Manager. You also might want to try switching to using TCP/IP instead. If you're switching to TCP/IP, you'll need to make sure that SQL Server Browser service is enabled/running as well.

2012-04-04 03:10
by BluesRockAddict
+1 I would wager that the service isn't running.. - Michael Fredrickson 2012-04-04 03:27
SQLServer.exe is running in processes, in services SQLWriter, SQLSERVERAGENT, SQLBrowser, SQLAgent$SqlExpress is running... which service should I be looking for - tweetypi 2012-04-04 03:41


1

Try restarting your computer. If someone else has admin rights to your server it is possible they could have changed your password.

2012-04-04 03:16
by zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
In that case, there would be a authentication error not connection error - BluesRockAddict 2012-04-04 03:30
Authentication errors look something like Login failed for user 'username'. (Microsoft SQL Server, Error: 18456) - Michael Fredrickson 2012-04-04 03:34


1

I solved the problem by executing this in commandprompt:

net start "SQL Server (MSSQLSERVER)"

Im not sure why this fixed it or why the service wasn't starting automatically on windows boot though.

2012-04-04 03:52
by tweetypi


0

Run Services.msc, Go to SQL Server Agent, Start the service if its not running.

about the service: Executes jobs, monitors SQL Server, fires alerts, and allows automation of some administrative tasks.

2016-08-08 05:46
by Vinayak Gopan
Ads