You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns information from an audit file created by a server audit in [!INCLUDE [ssNoVersion](../../includes/ssnoversion-md.md)]. For more information, see [SQL Server Audit (Database Engine)](../security/auditing/sql-server-audit-database-engine.md).
> Consider using [sys.fn_get_audit_file_v2](sys-fn-get-audit-file-v2-transact-sql.md) instead. `sys.fn_get_audit_file_v2` introduces time-based filtering at both the file and record levels, providing significant performance improvements, particularly for queries targeting specific time ranges.
33
+
> [!TIP]
34
+
> Consider using [sys.fn_get_audit_file_v2](sys-fn-get-audit-file-v2-transact-sql.md) instead. The `sys.fn_get_audit_file_v2` function introduces time-based filtering at both the file and record levels, providing significant performance improvements, particularly for queries targeting specific time ranges.
35
+
36
+
::: moniker-end
37
+
::: moniker range="=fabric"
38
+
39
+
> [!TIP]
40
+
> For Fabric Data Warehouse, `sys.fn_get_audit_file` is supported but [sys.fn_get_audit_file_v2 (Transact-SQL)](sys-fn-get-audit-file-v2-transact-sql.md) is recommended. The `sys.fn_get_audit_file_v2` function introduces time-based filtering at both the file and record levels, providing significant performance improvements, particularly for queries targeting specific time ranges. For more information and examples, see [Configure Auditing in Fabric Data Warehouse](/fabric/data-warehouse/configure-sql-audit-logs).
41
+
42
+
::: moniker-end
43
+
::: moniker range="= fabric-sqldb"
44
+
45
+
> [!TIP]
46
+
> For SQL database in Fabric, `sys.fn_get_audit_file` is supported but [sys.fn_get_audit_file_v2 (Transact-SQL)](sys-fn-get-audit-file-v2-transact-sql.md) is recommended. The `sys.fn_get_audit_file_v2` function introduces time-based filtering at both the file and record levels, providing significant performance improvements, particularly for queries targeting specific time ranges. For more information and examples, see [Configure Auditing in Fabric SQL database](/fabric/database/sql/auditing).
35
47
36
48
::: moniker-end
37
49
@@ -71,6 +83,12 @@ This argument is used to specify a blob URL (including the storage endpoint and
71
83
72
84
-`<Storage_endpoint>/<Container>/<ServerName>/<DatabaseName>/<AuditName>/<CreationDate>/<FileName>.xel` - collects a specific audit file (blob).
73
85
86
+
## [Fabric](#tab/fabric)
87
+
88
+
This argument is used to specify a blob URL (including the storage endpoint and container in Fabric OneLake). While it doesn't support an asterisk wildcard, you can use a partial file (blob) name prefix (instead of the full blob name) to collect multiple files (blobs) that begin with this prefix. For example:
@@ -165,6 +183,21 @@ Requires the `CONTROL DATABASE` permission.
165
183
166
184
- Blobs that don't meet the above criteria are skipped (a list of skipped blobs is displayed in the query output message). The function returns logs only from blobs for which access is allowed.
167
185
186
+
## [Fabric](#tab/fabric)
187
+
188
+
### Permissions required in Fabric SQL database
189
+
190
+
To manage auditing using Fabric workspace roles, users must have membership in the Fabric workspace **Contributor** role or higher permissions.
191
+
To manage auditing with SQL permissions:
192
+
- To configure the database audit, users must have ALTER ANY DATABASE AUDIT permission.
193
+
- To view audit logs using T-SQL, users must have the VIEW DATABASE SECURITY AUDIT permission.
194
+
195
+
For more information, see [Auditing in Fabric SQL database](/fabric/database/sql/auditing).
196
+
197
+
### Permissions required in Fabric Data Warehouse
198
+
199
+
Users must have the Fabric item `Audit` permission. For more information, see [Permissions](/fabric/data-warehouse/sql-audit-logs#permissions).
200
+
168
201
---
169
202
170
203
## Examples
@@ -215,6 +248,15 @@ GO
215
248
216
249
For information on setting up Azure SQL Database auditing, see [Get Started with SQL Database auditing](/azure/sql-database/sql-database-auditing).
217
250
251
+
## [Fabric](#tab/fabric)
252
+
253
+
For Fabric Data Warehouse and SQL database in Fabric, `sys.fn_get_audit_file` is supported but [sys.fn_get_audit_file_v2 (Transact-SQL)](sys-fn-get-audit-file-v2-transact-sql.md) is recommended.
254
+
255
+
For more information and examples, see:
256
+
257
+
-[Configure Auditing in Fabric SQL database](/fabric/database/sql/auditing)
258
+
-[Configure Auditing in Fabric Data Warehouse](/fabric/data-warehouse/configure-sql-audit-logs)
Copy file name to clipboardExpand all lines: docs/relational-databases/system-functions/sys-fn-get-audit-file-v2-transact-sql.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,15 @@ Requires the `CONTROL DATABASE` permission.
180
180
181
181
- Blobs that don't meet the above criteria are skipped (a list of skipped blobs is displayed in the query output message). The function returns logs only from blobs for which access is allowed.
182
182
183
+
### Permissions required in Fabric SQL database
184
+
185
+
To manage auditing using Fabric workspace roles, users must have membership in the Fabric workspace **Contributor** role or higher permissions.
186
+
To manage auditing with SQL permissions:
187
+
- To configure the database audit, users must have ALTER ANY DATABASE AUDIT permission.
188
+
- To view audit logs using T-SQL, users must have the VIEW DATABASE SECURITY AUDIT permission.
189
+
190
+
For more information, see [Auditing in Fabric SQL database](/fabric/database/sql/auditing).
191
+
183
192
### Permissions required in Fabric Data Warehouse
184
193
185
194
Users must have the Fabric item `Audit` permission. For more information, see [Permissions](/fabric/data-warehouse/sql-audit-logs#permissions).
0 commit comments