Sometimes a situation comes were NAV Job stops and we keep on debugging but yet unable to stump the real cause. Even after continuously tracing in Event Viewer we dint found any solid reason for this. So to solve my scenario I decided to write a SP(Stored Procedure) which eventually I attached it as a SQL Job which is supposed to be one of the best scheduler in Programming World.
A login stored procedure is a stored procedure that you can use to perform predefined functions after a user logs on to Microsoft Dynamics NAV with Microsoft SQL Server. A typical function would be to generate a message informing the user that the database is currently in single-user mode so that an administrator can perform database maintenance tasks and is therefore inaccessible.