INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

sql server newbie, needs help, sqlagent won't stay running

sql server newbie, needs help, sqlagent won't stay running

(OP)
We have an Avaya phone system with Call Accounting software running on a Windows 7 embedded PC.
TapitNova collects the calls and uses SQL Server to managed the database and create the reports from.

Here's my issue; Last month my UPS batteries failed so my whole system shut down.
Since then my TapitNova hasn't created any Call reports, I've narrowed it down to the SQL Server Agent won't stay running.(?)

If I try and start the SQL Server Agent(TAPITNOVADB), I get the following popup message:
The SQL Server Agent (TAPITNOVADB) service on Local Computer started and then stopped.
Some services stop automatically if they are not in use by other services or programs.

If I look in the Windows Logs > Application I see this:
ERROR SQLAGENT$TAPITNOVADB 103 Service Control
SQLServerAgent could not be started (reason: Error creating a new session)
EventID: 103

If I "stop" the SQL Server (TAPITNOVADB) first, then start SQL Server Agent (TAPITNOVADB), they both startup without any popup error; but a quick refresh of the Services window shows the SQL Server Agent "not running". So, it stops immediately after starting.

I'm thinking maybe the sudden shutdown from loss of power has corrupted something?

Could someone give me some insight where to go or what to do next?

RE: sql server newbie, needs help, sqlagent won't stay running

You have to try pretty hard to corrupt SQL Server.... even with a power outage.

I suggest you take a look at the "log on" tab in the services property.

If I was a betting man, I would say that you are using an active directory account for the service and that the AD account no longer exists or it's password was changed (possibly a really long time ago).

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
We don't use AD but the "Log on"; Network Service, I don't know what that password should be.

RE: sql server newbie, needs help, sqlagent won't stay running

Try "local system". See if that works.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
I looked at the SQL Services; this is what I found
it appears all the SQL services started by TapitNova are using "Network Service" as a Log ON, also I don't know what password is being used!

If I change the SQL Server Agent to Local Service, wouldn't I need to change the other two?
Where is the password coming from? Does it have to match somewhere else?

Thanks

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
I just spoke with someone at Tapit support and the Sql Server Agent doesn't need to be running full time or they're software doesn't require it.
So, that's not my direct issue.

I'm going to pull the box and test the HDD for possible flaws or damage due to the power outage before I go any further.

RE: sql server newbie, needs help, sqlagent won't stay running

Judging from

Quote:

(reason: Error creating a new session)

I would check on the msdb database on the instance. It may be corrupt or offline. If the msdb database is offline, any attempt to log in to that database will result in a login failure. If the login is failing for a different reason, the SQL Server ERRORLOG should show the reason for it.

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
OK, this is where I get lost with the sql server stuff;
Where do I go to check the msdb database on the instance? How would I know it's 'offline'?

In the event viewer I did find a "logon" line that had errors for the MSSQL $TAPITNOVADB.
Log Name: Application
Source: MSSQL$TAPITNOVADB
Date: 8/27/2015 4:02:13 PM
Event ID: 18456
Task Category: Logon
Level: Information
Keywords: Classic,Audit Failure
User: N/A
Computer: TAPITNOVA
Description:
Login failed for user 'tapit_dba'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]

My next problem I don't see nor can I find a user 'tapit_dba'.

RE: sql server newbie, needs help, sqlagent won't stay running

The user Tapit_DBA would be a user defined in SQL Server. Use SQL Server Management Studio to have a look in SQL Server to see if the MSDB database is online. Also, look at the Tapit_DBA login to see what his default database is (you should perhaps reset it to msdb).

Also have a look at the Services applet to see what user the SQL Agent service is trying to run as.

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
Sorry, I'm not familiar with SQL Server;
I've included some screen shots of my SQL Server Management Studio.



I looked at the Tapit_DBA login and all the others for comparison and they are all set to 'master'; if I'm looking in the right spot.

Also, SQL Agent service is trying to run as / Logon as Network Service.



RE: sql server newbie, needs help, sqlagent won't stay running

In the Login Properties window, click on User Mappings. Scroll down to MSDB. What permissions does that user have for MSDB?

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875: What should I know before I post?

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
the only thing is "public", under Database role membership for: msdb

RE: sql server newbie, needs help, sqlagent won't stay running

try this....change the default database to MSDB, then grant it db_datareader. See if that helps.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875: What should I know before I post?

RE: sql server newbie, needs help, sqlagent won't stay running

(OP)
SQLBill,
I tried as you suggested and that hasn't helped.

RE: sql server newbie, needs help, sqlagent won't stay running

Okay, let's get back to the main issue....SQL Server Agent not running.

Right click on SQL Server Agent. Select Properties. Is "Auto restart SQL Server Agent if it stops unexpectedly" checked or unchecked?
If it is unchecked, try checking it. Also, that screen will give you the path to the agent error log...check out the logs to see if you can tell why it is shutting down.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875: What should I know before I post?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close