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



Thursday, 11 September 2014

Sunday, 15 April 2012

All POWERSHELL Scripts !!!!!!

  • ConfigMgr 2007 (SCCM)
  • DPM 2007
  • DPM 2010
  • OpsMgr 2007 (SCOM)
  • SCE 2007 / 2010 (Essentials) 
  • SCVMM / Hyper-V
  • Service Manager (SCSM) 2010 / 2012
  • Miscellaneous
ConfigMgr 2007 (SCCM)
 Top of Page
DPM 2007 (DPM 2010/2012 Compatible)
Top of Page
OpsMgr 2007 (SCOM)
Automating Agent Discovery and Failover Configuration
OpsMgr Groups
Series: Exploring OpsMgr Class Lineage
MP Authoring and SDK
Series: How to create two-state monitors in OpsMgr with R2 PowerShell modules
Series: How to create two-state monitors in OpsMgr with R2 PowerShell modules
Additional Authoring and SDK
Monitoring
FTP Monitoring
Top of Page
SCE 2007 / 2010 (Essentials) 
Top of Page
SCVMM / Hyper-V
Hyper-V PowerShell Series
Top of Page
Service Manager 2010 / 2012
Top of Page
Miscellaneous
File System
SQL
Admin and Automation
FTP

Monday, 12 March 2012

System Center (DPM) 2012 CTP for Windows Server "8" Beta support

The CTP enables the Data Protection Manager component's repository and agents to run on Windows Server ‘8” as well as providing protection in Windows Server “8” environments. The CTP also adds protection for new features in Windows Server “8”:

image
  • Hyper-V Virtual Machines on Cluster Shared Volumes 2.0 (CSV2.0)
  • Hyper-V Virtual Machines on remote SMB share
  • Files on De-Duplicated Volumes
More and download here

DPM - Replica inconsistent and insufficient disk space on BMR (Bare Metal Recovery) Backup

System Center Data Protection Manager 2010 (DPM 2010) offers with its new console in the creation of a protection group in System Protection, a new option called "Bare Metal Recovery".

This option saves the operating system files (System State) and critical volumes (excluding user data) to restore it very quickly to new hardware.  This feature existed in DPM 2007 with Software Removal Tool.

The problem is that sometimes the BMR backup "Bare Metal Recovery" is not working properly and fails with the message "Replica inconsistent" caused by "insufficient disk space".

Cause:

DPM 2010 does not calculate the size of BMR data source, but assumes 30 GB for all servers. Admins should change the value as per the size of BMR backups expected on their environments.

The size of BMR backup is approximately equal to the amount of space used on all critical volumes.

Critical volumes = Boot Volume + System Volume + Volume hosting system state data such as AD DIT/log volumes.

Solution:

We need to run the BMR backup Manually (without DPM) to know the disk size needed on DPM:

1. Create a shared folder with enough space to store the BMR backup, for example \ \ server_name \ BMR
2. On the production server, launch the command prompt with administrative privileges
3. Then type the following command:

wbadmin.exe start backup -allcritical -quiet -backuptarget:\\server_name\bmrshare 

4. Once the backup is complete, check the disk space consumed by the BMR backup and make sure that the same amount of disk space or more have been allocated to the replica volume.
5. Also increase the disk space of volume recovery point.
6. Then in the DPM console, starts the consistency check on our replica inconsistent

Once these operations are completed the BMR backup will be created and recovery points are available.

External Link :
http://technet.microsoft.com/en-us/library/ff634208.aspx

DPM - EUR not working in combination with DFS

It is not possible for users to restore (their own) files using EUR in situations where DFS (Distributed File System) is in place for the file servers.

Users receive the error message: "There are no previous versions available."

Cause
Previous versions of a file or of a folder in a DFS share are not listed if you access the share through a nested DFS link from a computer that is running Windows 7 or Windows Server 2008 R2.

Hotfix

A supported hotfix is available from Microsoft for the following Operating Systems.
  • Windows 7
  • Windows 7 Service Pack 1 (SP1)
  • Windows Server 2008 R2
  • Windows Server 2008 R2 Service Pack 1 (SP1)
The hotfix is available using this Support link: http://support.microsoft.com/default.aspx?scid=kb;EN-US;2466048

Our experience
The support article describes that this issue only occurs when you try to access the share by DFS name. <\\DFS\fileshare> When you access the share by the file server name it should work. <\\fileserver\fileshare>. However we experienced the issue also when accessing the share using the server name. Both issues where solved by the hotfix.

More info about End User Recovery (EUR)