Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Application Server and Alerts when Request is Not Completed

(0) ShareShare
ReportReport
Posted on by 1,350

We use Application Server module.  It is on a virtual server.  We use it currently to run some simple crystal reports on a set schedule for some folks.  It is nice.

My biggest issue is that I find out that reports haven't run.  I check the Application Server queue and I see reports in a "incomplete" or "late" status.  I found out that the Application Server has either had the SL application freeze up/error out (because SL occassionally just likes to error out, OR the power goes off - and we forget to restart), or somehow the virtual server is logged off, etc.

 Anyway....I want to be able to get an email alert when application server fails.  I actually know what tool I would use (outside of SL) that can send an alert, but my problem is I don't know how to write the SQL query that would give me any "incomplete" or "late" application server requests.

The SL system database has 2 tables I have looked at: 1) appsrvrequest, and 2) statusrequestAppsrvrequest gives me the application server requests and even a status - but not the status from the queue that I really need.  So I turn my attention to Statusrequest (because when I am in customization manager on the SL screen that is what the status seems to refer to).  However, when I go to the Statusrequest table it is always blank (no records).  ??? 

 So....I was hoping some super smart customer or partner can help me out.  (I know it won't be Microsoft that helps me out because they never respond to any of these posts - even though I was told personally by Microsoft that they do.  Yeah right!)

Thanks for helping out a fellow user!  Dave

*This post is locked for comments

  • RedStorm Profile Picture
    RedStorm 1,350 on at
    Re: Re: Application Server and Alerts when Request is Not Completed

    This is exactly what I needed (I think).  I'll add to our test and see if it works.  Thanks for this great tip!

  • csims9158 Profile Picture
    csims9158 320 on at
    Re: Application Server and Alerts when Request is Not Completed

    Here is what I use:

     


    -- Application Server Monitor
    declare @intMin as integer
    declare @intcount as integer
    DECLARE @msg varchar(255)

    select @intcount = count(*)
     from appsrvrequest
     where status = 0 and Priority <>  '4'  and AppServerName =  'PMANAGER'

    if @intcount > 0
    begin
     select @intMin = max(datediff(mi,ScheduleOptions,getdate()))
      from appsrvrequest
      where status = 0 and Priority <>  '4'  and AppServerName =  'PMANAGER'
     if @intMin > 15
     begin
      select @msg = 'App Server for PMANAGER is backed up '+ str(@intMin) +' Minutes behind plan'
      Exec msdb.dbo.sp_send_dbmail @profile_name = 'SQLService',
       @Recipients = 'put email address here',
       @Body = @msg,
       @subject = 'App Server is Backed up'
     end
    end

     

    Run it against your system database.  I have this setup as a step in a job that runs every 3 minutes.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,492 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans