• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2001
  • Last Modified:

how to verify number of Crystal Report license sessions


I need to monitor the current number of Crystal report (licensed )
session via a script & if this number of session hit 17, I'll restart
(using another script, see further below) Crystal report services.

Increasing the Crystal licence is not an option.

Anyone knows what's the TCP destination port number when a
user runs Crystal report generation?

Our licence is 18 & when this limit of concurrent sessions is hit,
users' report generation will fail (though I've never been able
to get from the users what's the error message)

From the config file below, I noticed that the executable utility
crystalLicenseMonitor.exe could do this but this utility runs only
once every 5-10 minutes & is quite slow to report.

On Crystal Management console (browser-based), I would click
"Home", Metrics & see "Concurrent Logged On" to verify this
& I suppose this is reported by crystalLicenseMonitor.exe.

Is there any way to check this at Windows command prompt, say,
using "netstat -an | find/i "TCP_port#" or any other commands
(say 'sc queryex' or the likes)?

<?xml version="1.0" encoding="utf-8" ?>
    <add key ="Institutions" value="DC1 and DC2" />  
    <add key ="Interval" value="300000" />  <!--Time interval is 5 mins,300000-->
    <add key ="SMSSwitch" value="8"/>
    <add key ="ServiceSwitch" value="100"/>
    <add key ="SMSContent" value=">=8"/>
    <add key ="LOG_FILE_DIR" value="D:\SCN\SSS_MonitorCrystalLicense_DC2\bin" />
    <!-- Crystal Enterprise Logon -->
    <add key="CE_SERVERNAME" value="SSSDC2prn001" />
    <add key="CE_ADMIN_USERNAME" value="Administrator" />
    <add key="CE_ADMIN_PASSWORD" value="passwordXX" />
    <add key="CE_AUTHENTICATION_TYPE" value="secEnterprise" />

    <add key="SMS" value="True"/>
    <!--add key="SMSNumber" value="99998888:99998887:99998886:99998885" -->
    <add key="SMSNumber" value="99998888:99998887:99998886:99998885:98989898:90008989" />
    <add key="SMSPort" value ="COM1" />    
      <!-- This section defines the logging configuration for My.Application.Log -->
      <source name="DefaultSource" switchName="DefaultSwitch">
          <add name="FileLog"/>
          <!-- Uncomment the below section to write to the Application Event Log -->
          <!--<add name="EventLog"/>-->
      <add name="DefaultSwitch" value="Information" />
      <add name="FileLog"
           type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
      <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to

the Application Event Log -->
      <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"

initializeData="APPLICATION_NAME"/> -->

======== script to restart if # of Crystal sessions hit 17 ============
REM netstat -ano | find/i "9180" | find/i ":4568" | find/V "ESTAB"
if 'number_of_sessions >= 17' then
sc stop "CacheServer" = Crystal Cache Server
sc stop "CrystalMS" = Crystal Management Server : stop 1st
sc stop "CrystalInputFileServer" - skip as takes too long to restart
sc stop "CrystalOutputFileServer" - skip as takes too long
sc stop "JobServer_Report" - Cryst Rp Job Svr : this is the licence session?
sc stop "pageserver" = Crystal Page Svr
sc stop "WebCompServer" = Cryst Web Component Svr
sc start "all the above in any sequence"

We don't really have that many users logged on, just that we believe
some sessions were not dropped, resulting in the licence utilized
exceeding the licensed limit.  

Any suggestions are most welcome
  • 3
  • 2
2 Solutions
sunhuxAuthor Commented:
I also found that there's a screen to detect the cms port# to get the
number of sessions as given below but somehow Tcp 6400 doesn't
appear to be the port used in our environment's Crystal report:
How did you arrive at 18 as the limit?

Licenses and connections are usually bundled in groups of 5.

It would be better to figure out why connections are not being released.

sunhuxAuthor Commented:
I'm not familiar with Crystal report & just joined that team &
was told that when the concurrent licence sessions hit 18, users
can't generate reports.

Ok, I will appreciate if you can provide a fix to solve or if this is
not possible, then the next best option is to monitor the # of
sessions & restart those services.  Any idea?
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

WHat tools are you using to run the reports?

Did your team write the applications or do you have commercial report viewing tools?
If commercial which ones?

I am aware of tools that only use a session or connection for as long as it takes to read the data and then the session or connection is freed.

sunhuxAuthor Commented:
I'll go down to the site tomorrow to find out what's that
tool but I recall it's just a browser session which I login
to some sort of Crystal report management page

I'll get the html source code of that page : maybe it
will help & give a clue on how it obtain the number of
licenced sessions
mlmcc is correct. Concurrent licenses are sold in batches of 5 as far as I know. We have a web page to monitor licenses on each of our web servers.

Response.ExpiresAbsolute = now()-1
dim oApp
dim nLicensed
dim nActive
dim bIsActive
Set oApp = Server.CreateObject("CrystalRuntime.Application")
bIsActive = oApp.GetLicenseStatus (nLicensed, nActive)
set oApp = nothing

Function GetNLicensed
if nLicensed = 2147483647 then
      GetNLicensed = "Unlimited"
      GetNLicensed = nLicensed
end if
end function

Function GetNActive
if bIsActive = True then
      GetNActive = nActive-1
      GetNActive = nActive
end if
end function


<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>RDC Runtime License Status</TITLE>
<P align=center><STRONG><FONT size=4 face="Courier New">RDC Runtime License Status
</FONT></STRONG>     </P>
<TABLE align=center border=1 borderColor=blue cellPadding=1 cellSpacing=1
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Server Activity</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Concurrent Users</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNLicensed%></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNActive%></TD></TR></TABLE>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now