透過 Azure Arc 啟用的 SQL Server 的資料收集和報告

適用於:SQL Server

本文描述透過 Azure Arc 啟用的 SQL Server 傳輸至 Microsoft 的資料。 透過 Azure Arc 啟用的 SQL Server 收集使用方式資料,如本文以及監視透過 Azure Arc 啟用的 SQL Server 中所述。

透過 Azure Arc 啟用的 SQL Server 不會收集任何個人識別資訊 (PII) 或終端使用者識別資訊,或儲存任何客戶資料。

透過 Azure Arc 啟用的 SQL Server 會使用下列產品:

  • 已啟用 Azure Arc 的伺服器 (英文)

Azure Arc 執行個體啟用的 SQL Server

下列資料會收集至 Azure,供透過 Azure Arc 啟用的 SQL Server 使用:

Description 屬性名稱 屬性類型
SQL Server 版本 Edition string
裝載 Azure Arc for Servers 資源的資源識別碼 ContainerResourceId string
建立資源的時間 CreateTime string
SQL Server 執行個體所使用的邏輯處理器數目 VCore string
雲端連線狀態 Status string
SQL Server 更新層級 PatchLevel string
SQL Server 定序 Collation string
SQL Server 目前的版本 CurrentVersion string
SQL Server 執行個體名稱 InstanceName string
SQL Server 使用的動態 TCP 通訊埠 TcpDynamicPorts string
SQL Server 使用的靜態 TCP 通訊埠 TcpStaticPorts string
SQL Server 產品識別碼 ProductId string
SQL Server 佈建狀態 ProvisioningState string

下列 JSON 文件是 SQL Server - Azure Arc 資源的範例

{
    "name": "<server name>",
    "version": "SQL Server 2022",
    "edition": "Enterprise",
    "containerResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/arc-eastasia/providers/Microsoft.HybridCompute/machines/<server name>",
    "vCore": "8",
    "status": "Connected",
    "patchLevel": "16.0.1000.6",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "currentVersion": "16.0.1000.6",
    "instanceName": "<instance name>",
    "tcpDynamicPorts": "61394",
    "tcpStaticPorts": "",
    "productId": "00488-00010-05000-AB944",
    "licenseType": "PAYG",
    "azureDefenderStatusLastUpdated": "2023-02-08T07:57:37.5597421Z",
    "azureDefenderStatus": "Protected",
    "provisioningState": "Succeeded"
}

SQL Server 資料庫 - Azure Arc

Description 屬性名稱 屬性類型
資料庫名稱 name string
定序 collationName string
Database creation date databaseCreationDate System.DateTime
相容性層級 compatibilityLevel string
資料庫狀態 state string
唯讀模式 isReadOnly boolean
復原模式 recoveryMode boolean
自動關閉已啟用 isAutoCloseOn boolean
自動壓縮已啟用 isAutoShrinkOn boolean
自動建立統計資料已啟用 isAutoCreateStatsOn boolean
自動更新統計資料已啟用 isAutoUpdateStatsOn boolean
遠端資料封存已啟用 isRemoteDataArchiveEnabled boolean
記憶體最佳化已啟用 isMemoryOptimizationEnabled boolean
加密已啟用 isEncrypted boolean
可信任模式已啟用 isTrustworthyOn boolean
備份資訊 backupInformation object
佈建狀態 provisioningState string

下列 JSON 文件是 SQL Server 資料庫 - Azure Arc 資源的範例。

{
    "name": "newDb80",
    "collationName": "SQL_Latin1_General_CP1_CI_AS",
    "databaseCreationDate": "2023-01-09T03:40:45Z",
    "compatibilityLevel": 150,
    "state": "Online",
    "isReadOnly": false,
    "recoveryMode": "Full",
    "databaseOptions": {
        "isAutoCloseOn": false,
        "isAutoShrinkOn": false,
        "isAutoCreateStatsOn": true,
        "isAutoUpdateStatsOn": true,
        "isRemoteDataArchiveEnabled": false,
        "isMemoryOptimizationEnabled": true,
        "isEncrypted": false,
        "isTrustworthyOn": false
    },
    "backupInformation": {},
    "provisioningState": "Succeeded"
}

擴充功能記錄

此延伸模組會將關於延伸模組事件的記錄傳送至 Azure。

延伸模組記錄檔位於:

C:\ProgramData\GuestConfig\extension_logs\Microsoft.AzureData.WindowsAgent.SqlServer\

記錄檔名稱取決於適用於 SQL Server 的 Azure 延伸模組版本,針對最新版本的適用於 SQL Server 的 Azure 延伸模組,記錄檔為:

unifiedagent.log

針對延伸模組版本和更早版本 1.1.24724.69,記錄檔為:

ExtensionLog_0.log

移轉評定計量

移轉評定會自動產生移轉至 Azure 的評定。 深入了解使用移轉評定 (預覽版) 選取最佳 Azure SQL 目標 - 透過 Azure Arc 啟用的 SQL Server

  • CPU 使用率 (%)
  • 記憶體使用率 (%)
  • 讀取 IO/s 與寫入 IO/s (資料與記錄檔)
  • 讀取 MB/s 與寫入 MB/s (輸送量)
  • IO 作業的延遲
  • 總資料總大小和資料庫檔案組織

監視資料

代理程式會將 SQL Server 監視資料傳送至 Azure。 您可以啟用和停用收集的監視資料。 請參閱監視透過 Azure Arc 啟用的 SQL Server (預覽版)

下列清單會反映啟用監視功能時,透過 Azure Arc 啟用的 SQL Server 上 DMV 資料集所收集的監視資料。 不會收集個人識別資訊 (PII)、終端使用者識別資訊 (EUII) 或客戶內容。

使用中工作階段

描述:執行要求的工作階段是封鎖程式,或具有開啟的交易。
資料集名稱:SqlServerActiveSessions
收集頻率:30 秒
收集的欄位:

  • connection_id
  • database_id
  • database_name
  • machine_name
  • sample_time_utc
  • session_id
  • session_status
  • sql_server_instance_name

CPU 使用率

描述:一段時間的 CPU 使用率。
資料集名稱:SqlServerCPUUtilization
收集頻率:10 秒
收集的欄位:

  • avg_cpu_percent
  • idle_cpu_percent
  • machine_name
  • other_process_cpu_percent
  • process_sample_time_utc
  • sample_time_utc
  • sql_process_cpu_percent
  • sql_server_instance_name

資料庫屬性

描述:包含資料庫選項和其他資料庫中繼資料。
資料集名稱:SqlServerDatabaseProperties
收集頻率:5 分鐘
收集的欄位:

  • collation_name
  • collection_time_utc
  • compatibility_level
  • containment_desc
  • count_suspect_pages
  • create_date
  • database_id
  • database_name
  • delayed_durability_desc
  • force_last_good_plan_actual_state
  • is_accelerated_database_recovery_on
  • is_auto_create_stats_on
  • is_auto_shrink_on
  • is_auto_update_stats_async_on
  • is_auto_update_stats_on
  • is_broker_enabled
  • is_cdc_enabled
  • is_change_feed_enabled
  • is_distributor
  • is_encrypted
  • is_in_standby
  • is_ledger_on
  • is_merge_published
  • is_parameterization_forced
  • is_primary_replica
  • is_published
  • is_read_committed_snapshot_on
  • is_read_only
  • is_subscribed
  • last_good_checkdb_time
  • log_reuse_wait_desc
  • machine_name
  • notable_db_scoped_configs
  • page_verify_option_desc
  • query_store_actual_state_desc
  • query_store_query_capture_mode_desc
  • recovery_model_desc
  • sample_time_utc
  • snapshot_isolation_state
  • sql_server_instance_name
  • state_desc
  • 可更新性
  • user_access_desc

資料庫儲存體使用率

描述:包含其儲存體使用量和持續版本存放區。
資料集名稱:SqlServerDatabaseStorageUtilization
收集頻率:1 分鐘
收集的欄位:

  • collection_time_utc
  • count_data_files
  • count_log_files
  • data_size_allocated_mb
  • data_size_used_mb
  • database_id
  • database_name
  • is_primary_replica
  • log_size_allocated_mb
  • log_size_used_mb
  • machine_name
  • online_index_version_store_size_mb
  • persistent_version_store_size_mb
  • sample_time_utc
  • sql_server_instance_name

記憶體使用率

描述:Clerk 的記憶體 Clerk 和記憶體使用量。
資料集名稱:SqlServerMemoryUtilization
收集頻率:10 秒
收集的欄位:

  • machine_name
  • memory_size_mb
  • memory_clerk_name
  • memory_clerk_type
  • sample_time_utc
  • sql_server_instance_name

效能計數器 (通用)

描述:包含 SQL Server 記錄的通用效能計數器。
資料集名稱:SqlServerPerformanceCountersCommon
收集頻率:1 分鐘
收集的計數器:

  • Active Temp Tables
  • Active Transactions
  • Background writer pages/sec
  • Batch Requests/sec
  • Buffer cache hit ratio
  • 快取點擊率
  • Checkpoint pages/sec
  • Errors/sec
  • Free Space in tempdb (KB)
  • Granted Workspace Memory (KB)
  • Latch Waits/sec
  • Lazy writes/sec
  • Lock Memory (KB)
  • 鎖定的頁面配置 (KB)
  • Log Bytes Received/sec
  • Log Flushes/sec
  • Logical Connections
  • Logins/sec
  • Logouts/sec
  • Number of Deadlocks/sec
  • OS 可用的實體記憶體 (KB)
  • 記憶體不足計數
  • Page life expectancy
  • Page reads/sec
  • Page writes/sec
  • 處理使用中的實體記憶體 (KB)
  • 處理實體記憶體不足
  • Processes blocked
  • Readahead pages/sec
  • SQL Attention rate
  • SQL Compilations/sec
  • SQL Re-Compilations/sec
  • 系統記憶體訊號狀態高
  • 系統記憶體訊號狀態低
  • Target Server Memory (KB)
  • Temp Tables Creation Rate
  • Total Server Memory (KB)
  • Transactions/sec
  • User Connections
  • Write Transactions/sec

效能計數器 (詳細)

描述:包含 SQL Server 記錄的詳細效能計數器。
資料集名稱:SqlServerPerformanceCountersDetailed
收集頻率:1 分鐘
收集的計數器:

  • Average Wait Time (ms)
  • Backup/Restore Throughput/sec
  • Bulk Copy Rows/sec
  • Bulk Copy Throughput/sec
  • Cache Object Counts
  • Connection Memory (KB)
  • 資料檔案大小 (KB)
  • Database pages
  • Errors/sec
  • Failed Auto-Params/sec
  • Free list stalls/sec
  • 大型頁面配置 (KB)
  • Local Node page lookups/sec
  • 鎖定逾時 (timeout > 0)/秒
  • 記錄檔大小 (KB)
  • 記錄檔已用大小 (KB)
  • Log Flush Wait Time
  • Log Growths
  • Log Shrinks
  • Optimizer Memory (KB)
  • Page lookups/sec
  • Percent Log Used
  • 處理虛擬記憶體不足
  • Remote node page lookups/sec
  • Shrink Data Movement Bytes/sec
  • Temp Tables For Destruction
  • Version Cleanup rate (KB/s)
  • Version Generation rate (KB/s)
  • Version Store Size (KB)
  • XTP Memory Used (KB)

儲存體 I/O

描述:包含累積 IOPS、輸送量和延遲統計資料。
資料集名稱:SqlServerStorageIO
收集頻率:10 秒
收集的欄位:

  • database_id
  • database_name
  • file_id
  • file_max_size_mb
  • file_size_mb
  • file_type
  • io_stall_queued_read_ms
  • io_stall_queued_write_ms
  • io_stall_read_ms
  • io_stall_write_ms
  • machine_name
  • num_of_bytes_read
  • num_of_bytes_written
  • num_of_reads
  • num_of_writes
  • sample_time_utc
  • size_on_disk_bytes
  • sql_server_instance_name

等候統計資料

描述:包含資料庫引擎執行個體的等候類型和等候統計資料。
資料集名稱:SqlServerWaitStats
收集頻率:10 秒
收集的欄位:

  • machine_name
  • max_wait_time_ms
  • resource_wait_time_ms
  • sample_time_utc
  • signal_wait_time_ms
  • sql_server_instance_name
  • wait_category
  • wait_time_ms
  • wait_type
  • waiting_tasks_count