Skip to main content

Notifications

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
    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
    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans