官术网_书友最值得收藏!

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:

  1. Log in to the machine as a local administrator and launch Windows PowerShell by clicking on Start | All Programs | Accessories | Windows PowerShell | Windows PowerShell.
  2. In the PowerShell window, type the following command:
    Add-PSSnapin Microsoft.Crm.PowerShell
    
  3. To turn on the deployment-wide tracing, type the following commands:
    $Setting = Get-CrmSetting TraceSettings
    $Setting.Enabled = $True 
    Set-CrmSetting $setting
    
  4. To turn off the deployment-wide tracing, type the following commands:
    $Setting = Get-CrmSetting TraceSettings
    $Setting.Enabled = $False 
    Set-CrmSetting $setting
    
  5. 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:

主站蜘蛛池模板: 巴南区| 满洲里市| 漾濞| 焉耆| 海口市| 遂昌县| 江门市| 中方县| 囊谦县| 湘阴县| 邛崃市| 广河县| 汉沽区| 托克托县| 衡水市| 锡林浩特市| 邵东县| 安吉县| 宁河县| 启东市| 扬州市| 中西区| 耿马| 洱源县| 瑞安市| 汕头市| 玉溪市| 上饶县| 收藏| 德江县| 扶余县| 榆林市| 宕昌县| 屏南县| 临颍县| 盱眙县| 河间市| 横峰县| 嘉荫县| 乌什县| 塔河县|