2025年4月2日 星期三

[研究]SQL Server 那些版本、等級支援 SQL Server Audit ?

[研究]SQL Server 那些版本、等級支援 SQL Server Audit ?

2025-04-02

ChatGPT 說在 SQL Server 中,「伺服器稽核(Server Audit)」功能只有在 Enterprise 版和特定的高階版本(如 Datacenter 或 Developer)才可用,而 Standard 版及更低版本(如 Express)不支援 這個功能。敝人實際測試並非如此。

根據下面網址,至少 SQL Server 2016 有 ,但沒提到要 Enterprise 才支援
https://learn.microsoft.com/zh-tw/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions?view=sql-server-2016

3.2. SQL Server Audit Support in Different Editions and Versions
https://logbinder.helpspot.com/index.php?pg=kb.page&id=79 
根據這篇,有更詳細說明

Edition \ VersionSQL Server 2008 and 2008 R2SQL Server 2012 and 2014SQL Server 2016* and 2017
EnterpriseServer- and database-levelServer- and database-levelServer- and database-level
DeveloperServer- and database-levelServer- and database-levelServer- and database-level
DatacenterServer- and database-levelN/AN/A
Business IntelligenceNoneServer-levelN/A
StandardNoneServer-levelServer- and database-level*
WebNoneServer-levelServer- and database-level*
ExpressNoneServer-levelServer- and database-level*

* Database-level auditing for Standard, Web and Express editions are available starting SQL Server 2016 SP1

********************************************************************************

​以下是 SQL Server Audit 中伺服器層級(Server-Level)和資料庫層級(Database-Level)稽核的適用情境、優缺點,以及彼此無法取代的功能的比較:

層級適用情境優點缺點彼此無法取代的功能
伺服器層級 需要監控整個 SQL Server 執行個體的活動,例如登入事件、伺服器配置變更、資料庫的建立或刪除等。 希望統一管理所有資料庫的稽核策略,確保一致性。 能夠集中監控整個伺服器的活動,提供全局視角。 設定簡單,適用於需要統一監控的情境。 無法針對特定資料庫或物件進行細緻的稽核設定。 可能會產生大量的稽核資料,增加儲存需求。 能夠監控整個伺服器的活動,例如登入和伺服器配置變更,這些是資料庫層級稽核無法覆蓋的。
資料庫層級 需要監控特定資料庫內的活動,例如對特定表格的 SELECT、INSERT、UPDATE、DELETE 操作。 不同資料庫需要不同的稽核策略,以滿足各自的安全性和合規性要求。 提供更細緻的控制,能夠針對特定資料庫或物件設定稽核策略。 有助於滿足特定的合規性要求,針對敏感資料進行監控。 需要在每個資料庫中單獨設定和管理稽核策略,增加管理複雜度。 如果同時啟用伺服器層級和資料庫層級稽核,可能會導致重複記錄相同的事件,增加儲存成本。 能夠針對特定資料庫內的物件和操作進行細緻監控,這是伺服器層級稽核無法實現的。

********************************************************************************

(完)

沒有留言:

張貼留言