You are viewing limited content. For full access, please sign in.

Question

Question

Number of licenses we own--in the database?

asked on February 22, 2021

Is it possible to query the Laserfiche databases and determine the number of licenses we own?  I don't mean the number assigned, or the number in use.  I need to know how many we've bought.  For reporting purposes, it needs to come from a SQL query of the database.

0 0

Replies

replied on June 27, 2023

Just came across the need for this myself.  Looks like the user_licenses table in the LF_LFDS database has an entry for each license whether in use or not.   I don't know what each license type represents but in our case our standard licenses all had a license type of '9bba0d89-9a13-455f-ada9-83cf071d46b9' on them.  Doing this I was able to get a list of the last login date for each license:

SELECT 
      cache.[name],
      [login].last_login,
      lic.[sid],
      lic.[type]

  FROM [LF_LFDS].[dbo].[user_licenses] as lic
  LEFT OUTER JOIN [User_logins] as [login] on lic.[sid]=[login].sid
  LEFT OUTER JOIN [account_cache] as cache on cache.[sid]=lic.[sid]
  WHERE 
    lic.[type] like '9bb%'
  ORDER BY 1

1 0
replied on February 23, 2021

Hi Pete,

 

If you ever need to know this, this is availble on the Laserfiche support site under your LSAP card details page.

 

You could probably get this information from the SQL database somewhere, but this will only be relevant/correct to the last activation.

 

In a nutshell, go to support.laserfiche.com, sign in (if you don't already have an account) or register if you need to. To find your serial number go to Help>About in the Laserfiche client, and you'll see it there. Then go to the top right and select company profile.

 

Hope this helps! yes

0 0
replied on February 23, 2021

Assuming your current license info is loaded, you can access it from the Laserfiche Admin console.  But I don't believe that this info is stored in the database.

You can run a query like this to find any column across all the tables/views in the database.  This example is looking for any column with admin in the name.

SELECT      COLUMN_NAME AS 'ColumnName'
            ,TABLE_NAME AS  'TableName'
FROM        INFORMATION_SCHEMA.COLUMNS
WHERE       COLUMN_NAME LIKE '%admin%'
ORDER BY    TableName
            ,ColumnName;

I ran this query looking for admin, license, lic, named, and a few others - I'm not having any luck.  Unless it is fairly cryptic in the naming of the column, I don't think it is there.

0 0
replied on February 23, 2021 Show version history

If you are using the Laserfiche Directory Server you can query the database for that information. One example is shown. 

,'Total Users' = (Select Count(*) 
                                                    From [Database_Name].[dbo].[directory_objects] DO
                                                    WHERE DO.type = 0
                                                    AND DO.container_id = [directory_objects].[id])

'Allocated Full User' =  (Select Case 
                                                     -- to account for seperate Master license
                                                     When [directory_objects].[name] = 'xxxxxx'  Then 60
                                                     ELSE
                                                     ISNULL((SELECT [instances]
                                                    FROM [Database_Name].[dbo].[container_limits]
                                                    WHERE [container_limits].[resource_uuid]= '9bba0d89-9a13-455f-ada9-83cf071d46b9'
                                                    AND [container_limits].[id] = [directory_objects].[id]),0)
                                                    END)

0 0
replied on March 3, 2021

In our system, the "container_limits" table is empty.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.