Thursday 9 April 2015

How to get rid of SCCM 2012 R2 --> RBAC reporting issue (Users loose access from other forest)

Hi Team,

If you use Role Based Administration in SCCM 2012, SCCM will switch a flag in the registry. The key is HKLM\SOFTWARE\Microsoft\SMS\SRSRP, the value name is “EnableRbacReporting”. SCCM sets this value to 1, and then no user from trusted domains can run the reports, regardless what rights the user have in SCCM. When this happens, we have to set the value back to 0, and restart reportserver for it to work again. But minutes or hours later, SCCM sets the value back to 1 and we are lost again. But if you have an account in the same domain(Where SCCM is installed), you can run the reports all the time, regardless of this registry setting.

On the server where SSRS is installed.
1.)    Open ‘wbemtest’ with admin rights
2.)    Connect to: root\sms\site_<SiteCode>
3.)    In query section type following query and hit apply:
Select * from sms_sci_sysresuse where itemname like '%reporting%'

4.)    Check the populated entry to make sure it’s the reporting point where we wish to make the change:
5.)    Double click on it
6.)    Select ‘props’ from Property window:
7.)    Click ‘view embedded’:
8.)    A number of properties are populated:
9.)    We are looking for the property with name ‘EnableRbacReporting’. We will have to select each one and then click on ‘show mof’ till the time we find what we are looking for. In our test we did find it to be second from last ,however this is completely random and it may be placed somewhere else in your QA/Production environment:
10.)  Close out of the ‘show mof’ window and select ‘value ’ from property pane:
11.)  Change the value from ‘1(0x1)’ to ‘0’:
12.)  Click Save property,save object,close,save property,save object:
13.)  Repeat the same for other value: ‘value 2’
14.)  Now run the SQl query again to verify the values have changed in DB as well:
SELECT SRU.RoleName, SRU.ServerName, SRUP.* FROM vSMS_SC_SysResUse SRU
JOIN vSMS_SC_SysResUse_Properties SRUP ON SRU.ID = SRUP.ID
WHERE SRU.RoleName = 'SMS SRS Reporting Point' AND SRUP.Name = 'EnableRbacReporting'


15.)  Finally verify the value in Registry

Wednesday 14 January 2015

SQL View to pull Change Request Report in SCSM 2012, which can be integrated to QlikView (BI reporting tool)

Hello Folks,

Many times we used to think, why cant we have a separate view in SQL (DWDatamart) in SCSM dw db to pull all information on CR and Incident, as we do in reports.

Reports doesn't provide feasibility to integrate with some third party BI tools such as QlikView. But all the BI tools will support input from SQL DB directly.

In order to get wonderful reports from other BI reporting tools, we must create Views in SQL to pull all data.

I have created a View for CR and working on Incident request view to populate all data in a BI tool.

Below is the view for CR,which will pull all the information as the report does. To avoid duplication, we have added Distinct when selecting the columns. Also we have added on "Assigned to" user "Is Deleted = Null" to avoid getting multiple rows for the view.


CREATE VIEW [dbo].[Qlikview_ChangeRequest] AS

Select distinct changerequest.ID
    , changeRequest.Title
   ,
   changerequest.ChangeRequestDimKey,
   changerequest.CreatedDate,
   changerequest.ScheduledStartDate,
   changerequest.ScheduledEndDate,
   changerequest.ActualStartDate,
   changerequest.ActualEndDate,
     ISNULL(AssignedToUserDim.DisplayName, AssignedToUserDim.UserName) AS AssignedToUser,
    ISNULL(CreatedByUserDim.DisplayName, CreatedbyuserDim.UserName) AS CreatedByUser,
        PriorityEnumDS.DisplayName AS 'Priority',
ImpactEnumDS.DisplayName AS 'Impact',
ISNULL(StatusEnumDS.DisplayName, StatusEnum.ChangeStatusValue) AS Status,
AreaEnumDS.DisplayName AS 'Area',
ISNULL(CategoryEnumDs.DisplayName, CategoryEnum.ChangeCategoryValue) AS Category

    
from    ChangeRequestDimvw changerequest 
Left Outer Join    WorkItemDimvw workitem on changerequest.EntityDimKey = workitem.EntityDimKey 

Left Outer Join WorkItemAssignedToUserFactvw WIATU ON
Workitem.WorkItemDimKey = WIATU.WorkItemDimKey AND WIATU.DeletedDate IS NULL
Left Outer Join    UserDimvw AS AssignedToUserDim ON 
WIATU.WorkItemAssignedToUser_UserDimKey = AssignedToUserDim.UserDimKey 

Left Outer Join    WorkItemCreatedByUserFactvw WICBU ON
Workitem.WorkItemDimKey = WICBU.WorkItemDimKey
Left Outer Join    UserDimvw AS CreatedByUserDim ON 
WICBU.WorkItemCreatedByUser_UserDimKey = CreatedByUserDim.UserDimKey 


Left Outer Join    WorkItemAboutConfigItemFactvw AS WIACI ON
        WIACI.WorkItemDimKey = WorkItem.WorkItemDimKey

Left Outer Join ChangePriorityvw AS PriorityEnum ON 
PriorityEnum.ChangePriorityId = Changerequest.Priority_ChangePriorityId 
Left Outer Join    DisplayStringDimvw AS PriorityEnumDS ON
PriorityEnum.EnumTypeId = PriorityEnumDS.BaseManagedEntityId AND PriorityEnumDS.LanguageCode = 'ENU'

Left Outer Join ChangeStatusvw AS StatusEnum ON 
StatusEnum.ChangeStatusId = Changerequest.Status_ChangeStatusId
Left Outer Join DisplayStringDimvw AS StatusEnumDS ON
StatusEnum.EnumTypeId = StatusEnumDS.BaseManagedEntityId AND StatusEnumDS.LanguageCode = 'ENU'

Left Outer Join ChangeAreavw AS AreaEnum ON 
AreaEnum.ChangeAreaId = Changerequest.Area_ChangeAreaId 
Left Outer Join DisplayStringDimvw AS AreaEnumDS ON
AreaEnum.EnumTypeId = AreaEnumDS.BaseManagedEntityId AND AreaEnumDS.LanguageCode = 'ENU'

Left Outer Join ChangeImpactvw AS ImpactEnum ON 
ImpactEnum.ChangeImpactId = Changerequest.Impact_ChangeImpactId
Left Outer Join DisplayStringDimvw AS ImpactEnumDS ON
ImpactEnum.EnumTypeId = ImpactEnumDS.BaseManagedEntityId AND ImpactEnumDS.LanguageCode = 'ENU'

Left Outer Join ChangeCategoryvw AS CategoryEnum ON 
CategoryEnum.ChangeCategoryId = ChangeRequest.Category_ChangeCategoryId 

Left Outer Join DisplayStringDimvw AS CategoryEnumDS ON
CategoryEnum.EnumTypeId = CategoryEnumDS.BaseManagedEntityId AND CategoryEnumDS.LanguageCode = 'ENU'



GO


Thanks,
Dinesh