The Microsoft Application Virtualization (App-V) 4.5 Management Server may appear to run out of available licenses and clients may receive the following error:
The stored procedure sp_SFTclosesessions in the management server database is used to close orphaned sessions, license sessions, application usage and licenses assignments that are stale. An example of when this occurs is when the management server or the client crashes/restarts and did not close the appropriate sessions.
There is an issue with this stored procedure that may prevent it from working properly in certain situations.
First, here is an overview of what the stored procedure does:
In order for the stored procedure to work properly, modification needs to be made at step 2 as follows:
For example, here is the relevant part of dbo.sp_SFTclosesessions prior to modification:
Here is the relevant part of dbo.sp_SFTclosesessions after modification:
What can happen is that the stored procedure does not find any entries in MESSAGE_LOG for server start up that matches "41217." As such, the stored procedure may not work as expected. One can observe that when the App-V 4.5 server service is restarted, the only entries added to MESSAGE_LOG table are:
Whereas in the past with the 4.1 server, when it starts up, an entry with msd_id == 41217 does exist.
Once the transaction code has been changed to 44951, the stored procedure is able to determine the cutoff date from the new startup message and cleans up the sessions. The number of available licenses will be up to date and users will able to launch applications again.
You can find the latest version of this new Knowledge Base article at the link below:
KB2447513: The number of concurrent licenses are not reset when the Application Virtualization Management Server service restarts
J.C. Hornbeck | System Center Knowledge Engineer
The App-V Team blog: http://blogs.technet.com/appv/ The WSUS Support Team blog: http://blogs.technet.com/sus/ The SCMDM Support Team blog: http://blogs.technet.com/mdm/ The ConfigMgr Support Team blog: http://blogs.technet.com/configurationmgr/ The OpsMgr Support Team blog: http://blogs.technet.com/operationsmgr/ The SCVMM Team blog: http://blogs.technet.com/scvmm/ The MED-V Team blog: http://blogs.technet.com/medv/ The DPM Team blog: http://blogs.technet.com/dpm/ The OOB Support Team blog: http://blogs.technet.com/oob/ The Opalis Team blog: http://blogs.technet.com/opalis