Sunday, 11 August 2013

Installing and Configuring Active Directory Rights Management Service in a Cluster on Windows Server 2012

In this article, I will cover the installation and configuration of Active Directory Information Rights Management Service as a cluster on Windows Server 2012 with databases on SQL Server Always on Group on SQL Server 2012.

This is a prep work for configuring the Information Rights Management for SharePoint 2013 which I will cover later.

Overview of the demo environment I am using.

  • Contoso DC: DNS, Active Directory Domain Controller
  • Contoso IRM: Active Directory Rights Management Service A
  • Contoso CA: Active Directory Rights Management Service B
  • SQL01: Primary Replica SQL Server 2012
  • SQL02: Secondary Replica SQL Server 2012
  • SQLAAG01: Always on Availability Group 01
  • FIM01: SharePoint 2013 Server



Installation and Configuration of AD RMS on the First Server and configuring the Cluster:

I will start with the 
  • Installation of Active Directory Rights Management Service on the first server i.e ContosoIRM
  • Configuriation of the Additional Steps and creating the cluster

Launch the Server Manager , Click on Add Roles and Features




Click on Next


Click on Next 

Select the Server, Click Next 


Select Active Directory Rights Management Services, Click Next


 Click Next 


Click Next 


Select AD RMS  , Click Next 


Click Install to Start the Installation Process.


Installation may consume around 15 minutes or less


Installation Complete, Click on Close


In the Server Manager, Click on the Falg to Perform the Additional Configuration 


Click on Next

Select Create a new AD RMS root cluster, Click Next


In this scenerio , I am using Always on Availability Group, Click on Specify a Database Server and a Database Instance

I have specified the AAG name  and Selectthe Database Instance

Click Next


Specify the Service Account that has access to the Database Server


 I have gone with the Cryptographic Mode 2 option, click Next


Its good to have a centrally managed key storage but depending upon the required select what you need 


Specify the Cluster Key Password, this will be used while joining the AD RMS Server B in the cluster


Select the Web Site , I have already named the website as ContosoIRM

You can pre-configure the website with DNS Host entry


I will go with http instead of https though the screenshot is for https 


Name the server Licensor Certificate 

This is an important step to register the SCP , I will register it via the configuration wizard. If you have already attempted to install AD RMS on the same server, you will have to delete the RMS from AD Sites and Services to install it again


Click Install to Configure it. Note if you use https the databases will have 443 in the suffix of the database names. 

Click Install to proceed


This may consume again upto 15 minutes


Installation Complete


Now log off and log in back

Launch the Active Directory Rights Management Services  from the metro menu


Here we go the Cluster is configured


Following 3 databases have been created in Always On Group primary replica, I will add the the databases in AAG group later. As I am using http all databases have 80 in the suffix.



2) Installation and Configuration of AD RMS on Server B i.e. ContosoCA

Launch the Server Manager
Install the Active Directory Rights Management Services as covered above.
Once installed, Click on the Flag in Server Manager to perform Additional Configuration Steps , I will cover the steps from here.

Click on Perform Additional Configuration
 


This launches the Configuration Wizard for AD RMS, Click Next


Select Join an existing AD RMS Cluster, Click Next


Specify the Database Server Name , in my case Iwill provide the Always on Availabilty Group name click on Select 
Select Default Instance from the List

It should pick up the Configuration Database name, if not click on the drop down to select the Config database name

Click Next


Specify the same Cluster Key which was used while creating the Cluster i.e. centrally managed key

Click Next

Specify the database service account by clicking on Specify 


Now that I have specified the Service Account details , Click Next


Select the website, you can pre-configuring by creating a blank website with fqdn and bindings. This is important if you want to load balance the AD RMS website.

You can do this by using Microsoft NLB for POC purpose but in real world you would want to use Hardware Load Balancer like F5 or Barracuda to achieve load balancer I won't get into the details of this here as there are good articles which cover the same somewhere else.

In this scenario I'm selecting the default website I created, Click Next.



Click on Install to start the Installation and Configuration




The installation is complete now


Log off and Log in Back, Launch AD RMS






The installation and  configuration of the AD RMS is completed and we created the cluster as well all on Windows 2012 and databases highly available on SQL Server 2012 Always on Group.

There is more to AD RMS i.e. Trust Policies , User Execution, Security policies, policy templates etc. This article is just to illustrate the installation of AD RMS and configuration of the cluster for demo purpose. For more information please refer to the relevant tech net article.

I will configure AD RMS for SharePoint 2013 ad will cover this in some other article.



Monday, 8 July 2013

SharePoint 2013 SQL Server Always On

We will go through the process of using always on Availability group with a Content Farm 1 which is on SharePoint 2013, all components on Windows 2012

Environments
Server
Role
Operating System
SQL01
Primary Replica SQL Server 2012
Windows 2012 Standard
SQL02
Secondary Replica SQLServer 2012
Windows 2012 Standard
ContentFarmB
SharePoint 2013 Enterprise Edition
Windows 2012 Standard
ContosoDC
AD Domain Controller
Windows 2012 Standard
SQLAAG01
Always on Availability Group 1


I have used a script to install SharePoint 2013 and have mentioned a SQL Alias called ContentFarm1 pointing to Always on Availability Group 1 named SQLAAG01

If installing using the vanilla interface you can create a SQL Alias and point it to Always on Availability Group 1 or you can also use Always on Availability Group name

I have already configured Always on Availability group named SQLAAG01 consisting of two replica’s primary SQL01 and secondary SQL02

After you have installed SharePoint server and run the configuration wizard, all databases i.e. the configuration, admin and content databases are created on Primary replica.

You will have to manually add the databases into Always on Availability Group. Here are the steps to follow

The scripted install created two databases i.e. 


  • ContentFarm1_Config
  • ContentFarm1_Admin

We don't have it yet in the Always on Group.


First take a backup of the two databases as its a prerequisite to have the backup in the tail log


 Expand the AAG Group, Right Click on Availability Database, Click on Add Database


Click on Next 


Select the Database , Click Next



Specify  Data Synchronization location, I have already configured a shared network location called Backup 


Connect to the Secondary Replica , click on Connect


This does an availability group validation , Click Next



Click Next




Now I have got the databases synchronized 


Expand the Availability Database to check if the Databases have been added 


There we have it. Ideally I would script this when doing it in Production environment. This is just for the capturing this in the demo.

















Tuesday, 9 April 2013

Project Web App (PWA) site loading pretty slow in Project Server 2013



We had an issue when trying to view My Tasks on Project Web App site on Project Server 2013 it consumed 20-30 seconds to load this. Here is how I started troubleshooting this

1)      Started with the ULS logs but couldn’t go any further.

2)     From some MSDN article suggestion was to disable the proxy server as it can cause the issue. Did so but didn’t help to solve the issue.

There is a good blog which talks about if server not connected to internet can result in PWA loading slow due to validation of certificate , having SP cert in Trusted root store etc.

Performed all those but it wasn’t applicable in my case as each and every unique environment is different.

3)     Enabled the Developer Dashboard, replicated by navigating to My Tasks

·         Understood from Developer Dashboard, that web services consumed lot of time to fetch the info from MS schemas
·         The stored procedures from SQL Server was taking time to respond to the application request

Developer Dashboard was handy to identify the bottle neck. Performed the following steps to resolve this:

  • ·         DBCC SHOWCONTIG displays fragmentation information for the data and indexes
  • ·         Rebuild the indexes on PWA DB
  • ·         Updated the statistics

1) Run DBCC SHOWCONTIG

2) Rebuild the indexes on Project Web App DB:

DECLARE @TableName VARCHAR(255)
DECLARE @sql NVARCHAR(500)
DECLARE @fillfactor INT
SET @fillfactor = 90
DECLARE TableCursor CURSOR FOR
SELECT OBJECT_SCHEMA_NAME([object_id])+'.'+name AS TableName
FROM sys.tables
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN
SET @sql = 'ALTER INDEX ALL ON ' + @TableName + ' REBUILD WITH (FILLFACTOR = ' + CONVERT(VARCHAR(3),@fillfactor) + ')'
EXEC (@sql)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor
GO


You can change the number for SET @fillfactor between 70 to 100.

3) Update Statistics:

sp_updatestats