Job Suspended - WHY???

  • Why would a push subscription job be suspended immediately after I create it?

    I just don't understand - boo hoo!

    Thanks

    julie

  • I should clarify that this is a snapshot. The agent is running.

    I have created this before with no problems, but it was acting up so I deleted and recreated it (the publication) and this just keeps happening. I am a programmer, not a sql server admin, but I kind of get stuck doing this so I feel like a total hacker! <g>

  • Any error that you can post?

  • Suspended how? Job is disabled? Agent just not running?

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Sorry I was away. I posted this description on ms newsgroup. Only response was to verify winnt/system32/sqlsrv32.dll was set in registry correctly and it it.

    ***************

    I created my publication and then I see a new JOB in the Management/SQL

    Server Agent/Jobs which is a snapshot job and it is ATCMaster-ATCMaster-18.

    Then I push a subscription and then there is the other new job in the

    agent/jobs which is a distribution job and it is atcmater-inhousewebtest-92.

    (of course this number increases on each new attempt!<g>)

    Then I have an app where I am using sqldmo

    I create my dmo object, then my connetion to the database and then a job

    (the snapshot 18) and then I try to start the job.

    This is the right process right. First run the snapshot job then the

    distribution. I have writen a similar program without sqldmo. Instead I used

    snapshot.exe and then create a distribution object.

    So back to this application!

    Here is the code

    ******

    Dim server As New SQLDMO.SQLServer()

    server.Connect("brewster")

    Dim myjob As SQLDMO.Job =

    server.JobServer.Jobs.Item("BREWSTER-ATCMaster-ATCMaster-18")

    myjob.Start()

    *******

    Simple, right?

    It steps right through to myjob.start and then crashes when I try to start

    with this message:

    [Microsoft][ODBC SQL Server Driver][SQL Server]SQLServerAgent Error: Request

    to run job BREWSTER-ATCMaster-ATCMaster-18 (from User NT AUTHORITY\SYSTEM)

    refused because the job has been suspended.

    This leads me to look at Enterprise Mgr where I can see the evil red X next

    to the snapshot and it says Runnable=NO(the job is supended)

    Status-Suspended

    After this happend the first few times, that is when I started just fiddling

    in Ent Mgr and deletin ghte subscription and the publication, recreating and

    watching that snapshot go right to suspended status.

    boo hoo <g>

    Any ideas?

    My goal is to write a web app that will run the replication for me so that I

    can let IIS handle the security and not have to open up permissions to users

    for doing the replication. Currently I have an app role on this database so

    I am the only person who can run my original replication application which

    is a vb5 app that worked beautifully until I locked down the server. I have

    tried to get around this problem for months and this is my new theory to

    test, yet I keep getting stuck with this suspend!

    Thanks very much.

  • Interesting. I guess the first thing is to figure out why the job is suspended? If you run as SA does it work? Possibly the snapshot job is still being created or is in progress when you try to run? Dont see much in BOL about why something is suspended.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Did you open the job history to see what the failed message is all about. The fact the snapshot suspended is just that it could not run. Check the job history for more details on the root failure. Not sure but may have put more detail in SQL Logs and Event Viewer logs.

  • I realise this thread is a bit old, but I also came across a "suspended" status for my logreader as well as distribution agent for the first time, and since I couldn't find much info either about this unfamiliar "suspended" status, I thought I'll post my scenario as it might be usefull to someone.

    I was "playing" around on one of our test servers by using the distribution and msdb databases from a different test installation on my current test installation to see the effect on replication.

    After starting the SQL services, neither my logreader or distribution agent wanted to start.

    The following entries appeared in my agent's error log:

    logreader

    2008-09-19 10:21:23 - ! [LOG] Step 2 of job 'SERVER\INSTANCE-repl_testdb-1' (0x23DDF76727) cannot be run because the LogReader subsystem failed to load. The job has been suspended

    distribution agent

    2008-09-19 10:22:39 - + [000] Request to run job SERVER\INSTANCE-repl_testdb-pub_name-server\instance (from User domain\user) refused because the job has been suspended

    In my scenario, the reason for the suspension of these jobs was due to the fact that I didn't update the msdb.dbo.syssubsystems table after replacing the old msdb database files. (these files originated from a different instance and installation path)

    After updating the table with the script below, and restarting the SQL Server agent, my logreader and distribution agent's suspended statuses were removed.

    use msdb

    go

    delete from msdb.dbo.syssubsystems

    exec msdb.dbo.sp_verify_subsystems 1

    go

    So it seems the suspended status is applied to jobs that are unable to execute due to underlying problems (in my case the logreader subsystem) and not neccessarily something relating to the steps of the job

    It seems that a job can't be started while in suspended status, and as Andy mentioned above, you will need to find the cause, fix that, and after a SQL Agent restart, the status should be gone.



    What's this "backup strategy" everyone is on about?

  • "TVR" you are the best! My problem was I have restored another MSDB from another Instance. running your script worked. thanks.

  • Great post!

    Here's the article from Microsoft:

    http://support.microsoft.com/kb/914171

  • We had to re-install SQL Server and one of DBA ran a "ATLER DATABASE msdb modfiy file..." to point to the original msdb files, which worked great, but the jobs would not run. I had to create a Credential and a new proxy to repl dist. Once I change the jobs to use these I restarted the agent and started the jobs and they are all running.

    Thanks

    D

  • Hawkeye_DBA (4/26/2010)


    Great post!

    Here's the article from Microsoft:

    http://support.microsoft.com/kb/914171

    Thanks. It's resolved the issue.

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply