Link to home
Start Free TrialLog in
Avatar of Eric3141
Eric3141Flag for Afghanistan

asked on

DB Mail Configuration Wizard hangs & is not responding

I've installed SQL Server 2008 R2 and applied SP1.
Tried to configure db mail but the Database Mail Configuration Wizard hangs and says "Not Responding".  

No error is thrown on-screen.  

No error in db logs in SQL Server.

Event Viewer on the server has this informational message:
"Login failed for user '<domain\user_id>'.  Reason Failed to open the explicitly specified database. [Client:<my_ip_address_here>]"

The userid given in the message is the one that both the MSSQLSERVER and SQL Server Agent services use.  SQL Server isn't having any other problems so I'm confused as to how there could be a problem with the userid.  Have no idea what "explicitly specified database" means.

Help!
Avatar of Eric3141
Eric3141
Flag of Afghanistan image

ASKER

That error is in the event viewer every 1 minute so may or may not have anything to do with the db mail configuration wizard.
Go to the Login properties of that user, check the default database specified, make sure that the user has access to the DB and the DB exists in the instance.
Default db = master.  

This userid has sysadmin privileges, and I had already explicitly granted it db_owner on the Master db as well.  

After I had granted sysadmin and db_owner privileges to the user, I disconnected from db instance in SSMS (I had logged on with with another account) and tried to reconnect with the problem user.  I get this error:

Login failed for user'domain\my_user'.  Error 18456.

Log file shows state 38 as well.
State 38 means either the default database is missing or the user is not authorized to connect to the given database. Looks odd, can you confirm you are using correctlogins?
OK, I found out the userid in question is a service account & cannot log into the domain directly.  Thus failed to log into SSMS when I tried.  Howerver, the 2 services that SQL is using are using this userid and users not getting errors and can connect via their applications.  And error I gave you is showing up in the event viewer every 1 minute.

The user already had sysadmin privileges.  I then explicitly granted db_owner on the default db (master) and restarted the services.  Errors persist.  

Our other db server uses the same network service userid and has sysadmin privileges and has no problem.  That db server is SQL 2008 while the problem one is 2008 R2 SP1.

Ideas?
Its recommended to use a domain account for running Services, can you try using this?
I put my network userid as the logon for the service and the errors in event viewer went away.  Put the non-domain userid back and they returned.

This was not a problem on SQL 2008 on our stand alone box.  
New server (that I'm having this trouble with) is virtual and SQL 2008 R2.

Our network god is not going to want to approve the user of a domain account for a service as we've never done that here.  

Can you point me to documentation that says a regular domain account should be used?

Ideas on why this was not a problem with SQL 2008?

** Any idea the impact this will have if I don't change it?  Our webapp can connect to the database and I can log onto the db instance in SSMS.  Network god will ask me the impact (other than these entries in event viewer) if we don't change it.
Avatar of Alpesh Patel
Try using the sa credentials.
ASKER CERTIFIED SOLUTION
Avatar of Eric3141
Eric3141
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey guys, I would award you credit for helping but I want to add this solution to the knowledge base in case it helps others who have a similar problem.  So I had to specify my solution as the only one.

Thx again a bunch for helping.