cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select from UnlicensedInstalls view

Hi there, 

I've run into a problem, and hope to get some tips. 
We are on-prem and I'm trying to run simple query Select * from UnlicensedInstalls against FNMSCompliance DB. 
When I run it while logged into the DB as the service account that was created when we installed FNMS, it works OK - returns bunch of records. 
But I have created another account in the DB that has exactly the same access rights on the DB (unless I missed something) and when I run the same query while logged in as this account, it returns 0 rows. 
Any idea what I might be missing?

(1) Solution

Hi @bfaller
I have reached out to the support regarding this, and posting their (much appreciated) answer here for others: 

It's potentially an issue of context.
The way that a number of FNMS views work is that the underlying data is returned, then filtered by any context filtering the Operator's Roles might be applying.
It refers to a table of all active Operators, then filters it down based on their unique context -- for example, ruling out devices from any Locations they might be restricted seeing.

When I'm querying the database, and trying to see things as a Web UI operator might, I use the following:

===========================================================================

DECLARE @OperatorID int; SET @OperatorID = 2
--Change the @operatorID to reflect the Operator you're interested in - this is a reference to the ComplianceOperator table

DECLARE @ctx varbinary(6) 
SET @ctx=CAST(ISNULL(@OperatorID, 0) AS varbinary(4))
SET CONTEXT_INFO @ctx
 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
--Not necessary, but useful to ensure your queries don't interfere with other WebUI operations

SELECT * FROM UnlicensedInstalls

===========================================================================

Best, 
Paweł

View solution in original post

(2) Replies

Hello, maybe db2 rights is one point, but scoping (application rights) is an other.

Regards.

 

Hi @bfaller
I have reached out to the support regarding this, and posting their (much appreciated) answer here for others: 

It's potentially an issue of context.
The way that a number of FNMS views work is that the underlying data is returned, then filtered by any context filtering the Operator's Roles might be applying.
It refers to a table of all active Operators, then filters it down based on their unique context -- for example, ruling out devices from any Locations they might be restricted seeing.

When I'm querying the database, and trying to see things as a Web UI operator might, I use the following:

===========================================================================

DECLARE @OperatorID int; SET @OperatorID = 2
--Change the @operatorID to reflect the Operator you're interested in - this is a reference to the ComplianceOperator table

DECLARE @ctx varbinary(6) 
SET @ctx=CAST(ISNULL(@OperatorID, 0) AS varbinary(4))
SET CONTEXT_INFO @ctx
 
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
--Not necessary, but useful to ensure your queries don't interfere with other WebUI operations

SELECT * FROM UnlicensedInstalls

===========================================================================

Best, 
Paweł