搜尋本站文章

2017-07-20

[SQL Server] Log Path of Failover Cluster Instance Diagnostics, sys.dm_os_server_diagnostics_log_configurations 容錯移轉叢集診斷記錄檔的存放路徑


使用 sys.dm_os_server_diagnostics_log_configurations,可取得 SQL Server 容錯移轉叢集診斷記錄檔的存放路徑等相關資訊。

以 SQL Server 2016 為例,容錯移轉叢集診斷記錄檔的存放路徑,預設是:
C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log

-- 使用 sys.dm_os_server_diagnostics_log_configurations,查詢 SQL Server 容錯移轉叢集診斷記錄檔的存放路徑
USE master
GO
SELECT is_enabled, path, max_size, max_files
FROM sys.dm_os_server_diagnostics_log_configurations
GO

-- 01_使用 sys.dm_os_server_diagnostics_log_configurations,查詢 SQL Server 容錯移轉叢集診斷記錄檔的存放路徑




-- 02_檔案總管_ 查詢 SQL Server 容錯移轉叢集診斷記錄檔的存放路徑













參考資料

[SQL Server] ServerProperty('ErrorLogFileName') , Error log file location 錯誤紀錄檔: 目前最新的完整檔案路徑與檔案名稱
http://sharedderrick.blogspot.tw/2017/07/sql-server-serverpropertyerrorlogfilena.html

sys.dm_os_server_diagnostics_log_configurations
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-os-server-diagnostics-log-configurations

sys.dm_os_server_diagnostics_log_configurations
https://technet.microsoft.com/zh-tw/library/gg471697(v=sql.110).aspx

View and Read Failover Cluster Instance Diagnostics Log
https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/view-and-read-failover-cluster-instance-diagnostics-log