Friday, October 25, 2013

Wake Up IIS Websites

One of the biggest issues I have found with using authentication methods like Kerberos Constrained Delegation is that the first person who hits the site in the morning gets a 500 error until the website application pools have been rebuilt after their nightly recycle.  Recently I discovered a great module for IIS that can help prevent this.

http://www.iis.net/downloads/microsoft/application-initialization

"IIS Application Initialization for IIS 7.5 enables website administrators to improve the responsiveness of their Web sites by loading the Web applications before the first request arrives. By proactively loading and initializing all the dependencies such as database connections, compilation of ASP.NET code, and loading of modules, IT Professionals can ensure their Web sites are responsive at all times even if their Web sites use a custom request pipeline or if the Application Pool is recycled. While an application is being initialized, IIS can also be configured to return an alternate response such as static content as a placeholder or "splash page" until an application has completed its initialization tasks."

Also you will probably want a UI that allows you to do the configuration, here you go:
http://blogs.msdn.com/b/amol/archive/2013/01/25/application-initialization-ui-for-iis-7-5.aspx


Additional Resources:
http://blogs.iis.net/wadeh/archive/2012/05/01/application-initialization-part-2.aspx
http://dynamics.co.il/crm-iis-site-wake/

Thursday, October 24, 2013

Get Times for CRM Import Jobs

This script will give you the times for CRM import jobs that have been run on your system.

--Shows all import records and the amount of time they took
SELECT [Name], [StartedOn], [CompletedOn],
DATEDIFF(MINUTE, [StartedOn], [CompletedOn]) AS [Diff In Minutes]
FROM [Default_MSCRM].[dbo].[AsyncOperationBase]
WHERE OperationType IN (3,4,5) --OperationType 3,4,5 are the ones which relate to imports


--Shows total number of minutes for all imports
SELECT SUM(DATEDIFF(MINUTE, [StartedOn], [CompletedOn])) AS [Total Diff In Minutes]
FROM [Default_MSCRM].[dbo].[AsyncOperationBase]
WHERE OperationType IN (3,4,5)


--Shows total number of hours for all imports
SELECT SUM(DATEDIFF(MINUTE, [StartedOn], [CompletedOn])) /60 AS [Total Diff In Hours]
FROM [Default_MSCRM].[dbo].[AsyncOperationBase]
WHERE OperationType IN (3,4,5)

Tuesday, October 22, 2013

SSIS Speed: DefaultBufferMaxRows

SSIS can sometimes take a long time to load.  Try messing witht he DefaultBufferMaxRows setting in the package.  In a first attempt on one table changing the setting from 10,000 (the default) to 1,000 saved me about 15 minutes off my run time.

Thanks to Jamie Thomson for posting this info: http://consultingblogs.emc.com/jamiethomson/archive/2007/12/18/SSIS_3A00_-A-performance-tuning-success-story.aspx