fnGetActiveRoleRefresh

Return

Return Type
int

Definition

Copy

      CREATE  FUNCTION [dbo].[fnGetActiveRoleRefresh]
            (
            )
            RETURNS int
            AS
            BEGIN
                --Check if there are any role refreshes still in the active state (status = 0) and have been 
                --updated in the past hour.  The time constraint is being added in case a rolerefresh
                --gets killed in a bad status.  We don't want it to lock our refreshing forever
                return (select top 1 id from RoleRefreshLog where status < 1 and DATEDIFF(ss, UpdateDate, GETUTCDATE()) < 3600 )
            END