[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Can't connect to SQL Server from local Enterprise Manager; can connect from remote Enterprise Manager?

Posted on 2007-11-29
19
Medium Priority
?
4,178 Views
Last Modified: 2010-04-21
Hey all!

Our MS SQL server (2003) started acting shady yesterday/today, don't know why exactly.

Anyway, there are some strange symptoms:
- The database is up and running; client applications function normally

- The local Enterprise Manager cannot connect to the database; error message below :
          "A connection could not be established to SRV12\XXXXX_DB.
          Reason: SQL Server does not exist or access denied.
          ConnectionOpen (Connect())..
          Please verify SQL Server is running and check your SQL Server registration properties (by   right-clicking on the SRV12\XXXXX_DB node) and try again."
However, the Manager can connect to an other database on the same machine.

- Enterprise Manager on a remote computer *can* connect to the database (at least there's something working).

- SQL Server Agent won't start:
When trying to start from the remote Enterprise Manager these are in the error log:
     "[000] Unable to connect to server 'SRV12\XXXXX_DB'; SQLServerAgent cannot start"
     "[298] SQLServer Error: 10049, ConnectionOpen (Connect()). [SQLSTATE 01000]"
     "[298] SQLServer Error: 17, SQL Server does not exist or access denied. [SQLSTATE 08001]"

When trying to start the service from the services manager:
     "The SQLAgent$XXXXX_DB service on Local Computer started and then stopped.  Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service."

When trying to start from the command line using 'd:\PROGRA~1\MICROS~1\MSSQL$~1\binn\sqlagent.exe -i XXXXX_DB' it's this error: "StartServiceCtrlDispatcher failed (error 6)."

Things I've done so far:
- Restart SQL services
- Reboot server
- Delete and recreate the server registration in local Enterprise Manager
- Create a server registration on a remote server (via which I can manage the server now)
- Set server authentication to both 'SQL Server and Windows'
- Used 'cliconfg' to enable named pipes and tcp/ip protocols on both servers.
- Pulled my hair out ;-)

So, does anyone have a clue why I cannot connect to the server from the local Enterprise Manager, and why SQL Server Agent won't start?
Which steps do I take to repair these problems?

Thanks in advance for any efforts to help!

Best regards,
Outin
0
Comment
Question by:Outin
  • 10
  • 9
19 Comments
 
LVL 5

Accepted Solution

by:
MrNetic earned 2000 total points
ID: 20374906
Have you tried to put a '.' on the server address registration. ?
0
 
LVL 9

Author Comment

by:Outin
ID: 20380481
Hi MrNEtic,

Thanks for your comment; I created a server registration connecting to '.\XXXXX_DB' and now I can indeed connect to the db with local Enterprise Manager.

Problem that remains is the SQL Server Agent that won't start...(for error codes etc see original post)

Info that might help towards finding the problem: when creating a server registration using the 'Register SQL Server Wizard', the wizard shows a list of available servers. 'SRV12\XXXXX_DB' appears twice in this list, while other servers only appear once....

Best regards,
Outin
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20380632
Outin,

Could you please tell me the output of the \LOG\SQLAGENT.OUT ?
Check the account that is used to run SQL SERVER AGENT.
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 9

Author Comment

by:Outin
ID: 20380677
Contents of SQLAGENT.OUT:
2007-11-30 09:07:48 - ! [298] SQLServer Error: 17, SQL Server does not exist or access denied. [SQLSTATE 08001]
2007-11-30 09:07:48 - ! [298] SQLServer Error: 10049, ConnectionOpen (Connect()). [SQLSTATE 01000]
2007-11-30 09:07:48 - ! [000] Unable to connect to server 'SRV12\XXXXX_DB'; SQLServerAgent cannot start
2007-11-30 09:07:49 - ? [098] SQLServerAgent terminated (normally)

The logon information as retrieved from the MS Management Console
SQLSERVERAGENT service: local system account (this service is up and running)
SQLAgent$XXXXX_DB service: local system account (this service won't start)
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20380706
Outin,

What is the configuration in the connection tab of the sql server agent properties ?
0
 
LVL 9

Author Comment

by:Outin
ID: 20380717
MrNetic,

Settings in the connection tab of SQL Server Agent properties:
SQL Server connection: Use Windows Authentication
Local host server: (default)
0
 
LVL 5

Assisted Solution

by:MrNetic
MrNetic earned 2000 total points
ID: 20380756
Outin,

Just for testing purposes, could you use SQL SERVER AUTH, specify the user = SA or other user with System Administrator Rights.
0
 
LVL 9

Author Comment

by:Outin
ID: 20380779
That doesn't do any good I'm afraid....entered user sa, but Server Agent still won't start....
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20380832
Have you read the eventlog (app/sec/sys). ?
0
 
LVL 9

Author Comment

by:Outin
ID: 20380910
Jup....
Only thing it says (app log) is
Error:  "SQLServerAgent could not be started (reason: Unable to connect to server 'SRV12\XXXXX_DB'; SQLServerAgent cannot start)."
and
Informational: "SQLServerAgent service successfully stopped."

But that doesn't give any more info than we already had....
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20380972
Outin,

Have you cheched the named pipes configuration of the server ?
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20380981
Outin,

You named pipe default pipe should be something like :

\\.\pipe\MSSQL$XXXXX_DB\sql\query

Hope this helps,

Best Regards,

Paulo Condeça
0
 
LVL 5

Assisted Solution

by:MrNetic
MrNetic earned 2000 total points
ID: 20381083
Outin,

As last resource, you could go to the client network utility on the server, go to the aliases tab, and check the configuration for the 'SRV12\XXXXX_DB' .

Hope this helps,

Best Regards,

Paulo Condeça
0
 
LVL 9

Author Comment

by:Outin
ID: 20381249
MrNetic,

I changed the server alias in the client network utility (= cliconfg I assume) to .\XXXXX_DB just to see if that would help.
It didn't, so I changed it back to SRV12\XXXXX_DB
But now I cannot connect to the db anymore using the local Enterprise Manager (still can do it through remote Enterprise Mgr)

Default pipe setting for named pipes = 'sql\query'
0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20381957
Outin,

In the CLICONFIG, remove the alias SRV12\XXXXX_DB.


0
 
LVL 5

Expert Comment

by:MrNetic
ID: 20382065
Sorry i took long time... Lunch :)
0
 
LVL 9

Author Comment

by:Outin
ID: 20382998
MrNetic,

Thanks again for your efforts.
Removed the alias, didn't work (it only caused 1 of the 2 duplicate entries in the 'available servers' list to disappear.

Extra info: I called the guys who created the application depending on this server to see if they could help out.
I was told that since there are 2 databases running on the server one has to run on a different port, so I changed the server config so that TCP/IP is now on port 2000 for this troubled db. Not that it made a difference......


PS: It's  5 o'clock here...WEEKEND :-)
I might read this thread before monday, or not; I won't be disappointed if no further comments are made during the weekend....
0
 
LVL 9

Author Comment

by:Outin
ID: 20394240
We decided to reinstall Enterprise Manager.
After this, and an MS SQL SP4 update, it works again.

Still don't know why it broke down though.....

MrNetic, thanks for your efforts!

Regards,
Outin
0
 
LVL 9

Author Closing Comment

by:Outin
ID: 31411672
Solved part of the problem myself...
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question