
Enabling deployment-level tracing
Deployment-level tracing would enable tracing for all the server roles. However, this tracing can only be configured from a machine that has the Deployment Tool role installed.
Deployment-level tracing can only be configured using Windows PowerShell commands.
How to do it…
By following this recipe, we can enable deployment-level tracing on the machine that is running the Deployment Tool server role.
We need to perform the following steps to achieve this:
- Log in to the machine as a local administrator and launch Windows PowerShell by clicking on Start | All Programs | Accessories | Windows PowerShell | Windows PowerShell.
- In the PowerShell window, type the following command:
Add-PSSnapin Microsoft.Crm.PowerShell
- To turn on the deployment-wide tracing, type the following commands:
$Setting = Get-CrmSetting TraceSettings $Setting.Enabled = $True Set-CrmSetting $setting
- To turn off the deployment-wide tracing, type the following commands:
$Setting = Get-CrmSetting TraceSettings $Setting.Enabled = $False Set-CrmSetting $setting
- To check the current status of the deployment-wide tracing, type the following command:
Get-CrmSetting TraceSettings
Note
The trace files are located at
C:\crmdrop\logs
.
How it works…
Deployment-level tracing provides deployment-wide tracing information. This setting should be carefully enabled as this would log tracing from every server where the Dynamics CRM 2011 server roles are running.
The deployment-level trace setting is stored in the MSCRM_CONFIG
database. Use the following T-SQL command to find the deployment tracing setting in the database:
SELECT [ColumnName],[IntColumn],[BitColumn],[NVarCharColumn] FROM [MSCRM_CONFIG].[dbo].[DeploymentProperties] WHERE ColumnName LIKE'Trace%'
The default values will be as shown in the following screenshot:
