AuditLevel Property
未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。
The AuditLevel property exposes SQL Server Authentication logging behavior.
語法
object
.AuditLevel [= value]
Parts
- object
An expression that evaluates to an object in the Applies To list.
- value
A long integer specifying an authentication outcome as described in Settings.
Data Type
Long, enumerated
Modifiable
Read/write
Prototype (C/C++)
HRESULT GetAuditType(SQLDMO_AUDIT_TYPE* pRetVal);
HRESULT SetAuditType(SQLDMO_AUDIT_TYPE NewValue);
Settings
Constant | Value | Description |
---|---|---|
SQLDMOAudit_All |
3 |
Logs all authentication attempts regardless of success or failure. |
SQLDMOAudit_Failure |
2 |
Logs failed authentication. |
SQLDMOAudit_None |
0 |
Does not log authentication attempts. |
SQLDMOAudit_Success |
1 |
Logs successful authentication. |
備註
SQL Server Authentication logging writes log entries to both the Microsoft SQL Server error log and the Windows application log.
For more information about SQL Server security and access control, see 保全 Notification Services