Wednesday, December 21, 2016

Hi,
Microsoft Dynamics CRM Database can be giant because many reason..
The main reason is files into CRM DB.

Attached to this article two queries.
First query to get database size per table.
Second query to get number of records – filee in Annotation table.

Enjoy,
Rami Heleg

SELECT 
 so.object_id AS ObjectID, 
 so.name AS ObjectName,        
 (CONVERT(decimal(20,4),(SUM (ps.reserved_page_count) * 8))) / 1024 As Reserved_MB, 
 (CONVERT(decimal(20,4),SUM ( 
             CASE 
                   WHEN (ps.index_id < 2) THEN (ps.in_row_data_page_count + ps.lob_used_page_count + ps.row_overflow_used_page_count) 
                   ELSE ps.lob_used_page_count + ps.row_overflow_used_page_count 
             END 
             ) * 8)) / 1024 As Data_MB, 
 (CONVERT(decimal(20,4),(CASE WHEN (SUM(used_page_count)) > 
             (SUM(CASE 
                   WHEN (ps.index_id < 2) THEN (ps.in_row_data_page_count + ps.lob_used_page_count + ps.row_overflow_used_page_count) 
                   ELSE ps.lob_used_page_count + ps.row_overflow_used_page_count 
             END 
             )) THEN (SUM(used_page_count) -           
             (SUM(CASE 
                   WHEN (ps.index_id < 2) THEN (ps.in_row_data_page_count + ps.lob_used_page_count + ps.row_overflow_used_page_count) 
                   ELSE ps.lob_used_page_count + ps.row_overflow_used_page_count 
             END 
             ))) ELSE 0 END) * 8)) / 1024 As Index_MB, 
 (SUM ( 
             CASE 
                   WHEN (ps.index_id < 2) THEN ps.row_count 
                   ELSE 0 
             END 
             )) AS [RowCount] 
 FROM sys.dm_db_partition_stats AS ps 
 INNER JOIN sys.objects AS so ON so.object_id = ps.object_id 
 WHERE so.object_id > 100 
 GROUP BY so.object_id, so.name 
 ORDER BY [Reserved_MB]Desc

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

SELECT  e.logicalname, e.ObjectTypeCode,COUNT( e.ObjectTypeCode) AS NumberOfRecords 
FROM Annotation a inner join Entity e
on a.ObjectTypeCode = e.ObjectTypeCode
GROUP BY  e.ObjectTypeCode , e.logicalname
order by NumberOfRecords desc

Saturday, December 17, 2016

Dynamic CRM: Change Binding HTTP to HTTPS

Changed CRM binding URL from Http to Https:
Server includes a few organizations.
Sound easy, why should be complex with this definition? Only add 's' to the http and change the port from 5555 to 443
If you need to do it don't forget to start in Development environment then QA and after check all system in Production
The first thing is to arrange the list we all the required changes.
I created my task and I assume your tasks should be the same -/+.
1.    Changing Binding Type in Deployment Tool
2.    Define binding in IIS Microsoft Dynamics CRM site to work Https + add certification.
Create a valid Certificate and don’t forget to remove the http records.
3.    Register: under HLM\SOFTWARE\Microsoft\MSCRM, change manual the ServerUrl to Https
4. Jobs: Change CRM URL in app Config.
5. User Windows Services: I assume app config contains CRM URL change
connections.
6. Custom Website that opens CRM pages for instance invokes CRM pages or requesting CRM SDK: update web.config
7. Update code/configuration file in custom website that CRM call to services from this sites.
Site from binding HTTPS call to service from HTTP binding for instance WCF can be security problem.
Another example calls window.openModalDialog unable to get response to CRM in JS.
8. SSIS update parameters.
9. Java Script: check in all file if use hard coded http.
10. Plugins the same search for hard coded.
11. Configuration file. Almost every CRM implementation contain configuration entity change records if needed
12. Telephone integration or third company which calls to CRM should change the path.
13. Open port in firewall. I assume 443.

This is not easy special if Dynamics CRM exists a few years but can be done. :-)

Thanks, 
Rami Heleg.
+972-52-5695114

Saturday, December 10, 2016

Dynamics CRM: Loading all CRM pages is very slow

Dynamics CRM: Loading all CRM pages is very slow

I started to work with Dynamics CRM on premise or online and all the system works very slowly

Loading pages is very slow, and all the system looks busy.

Dynamics CRM is vanilla then develop reason cannot cause to this bad performance.


One of the options can be Antivirus.

When you work with CRM and open some pages for instance Edit.aspx not only the edit.aspx is downloaded from server many JavaScript + CSS + other linked pages is downloaded too

If antivirus is working check if Antivirus is scanning all the scripts and pages when you request page from CRM.

Disabled scanning CRM pages in Antivirus. I got this critical issue when MCAfee was installed on all client stations.

workaround
http://support.microsoft.com/kb/924341

https://kc.mcafee.com/corporate/index?page=content&id=KB65382&actp=search&viewlocale=en_US&searchid=1278011200919

Thanks,
Rami Heleg.
Eytan computers

+972-52-5695114