Database Table Auditing Policies - Get
Gets a database's table auditing policy. Table auditing is deprecated, use blob auditing instead.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingPolicies/default?api-version=2014-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database for which the table audit policy is defined. |
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
table
|
path | True |
The name of the table auditing policy. |
|
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved the database table auditing policy. |
Examples
Get database table auditing policy
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingPolicies/default?api-version=2014-04-01
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingPolicies/Default",
"name": "Default",
"type": "Microsoft.Sql/servers/databases/auditingPolicies",
"location": "West US",
"kind": null,
"properties": {
"auditingState": "New",
"eventTypesToAudit": "PlainSQL_Success,PlainSQL_Failure,ParameterizedSQL_Success,ParameterizedSQL_Failure,StoredProcedure_Success,StoredProcedure_Failure,Login_Success,Login_Failure,TransactionManagement_Success,TransactionManagement_Failure",
"storageAccountName": null,
"storageAccountKey": null,
"storageAccountSecondaryKey": null,
"storageTableEndpoint": null,
"storageAccountResourceGroupName": null,
"storageAccountSubscriptionId": null,
"useServerDefault": "Enabled",
"fullAuditLogsTableName": "SQLDBAuditLogsBlobauditingtest2080Testdb",
"auditLogsTableName": "Blobauditingtest2080Testdb",
"retentionDays": "0"
}
}
Definitions
Name | Description |
---|---|
Database |
A database table auditing policy. |
Table |
The name of the table auditing policy. |
DatabaseTableAuditingPolicy
A database table auditing policy.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
kind |
string |
Resource kind. |
location |
string |
Resource location. |
name |
string |
Resource name. |
properties.auditLogsTableName |
string |
The audit logs table name. |
properties.auditingState |
string |
The state of the policy. |
properties.eventTypesToAudit |
string |
Comma-separated list of event types to audit. |
properties.fullAuditLogsTableName |
string |
The full audit logs table name. |
properties.retentionDays |
string |
The number of days to keep in the audit logs. |
properties.storageAccountKey |
string |
The key of the auditing storage account. |
properties.storageAccountName |
string |
The table storage account name |
properties.storageAccountResourceGroupName |
string |
The table storage account resource group name |
properties.storageAccountSecondaryKey |
string |
The secondary key of the auditing storage account. |
properties.storageAccountSubscriptionId |
string |
The table storage subscription Id. |
properties.storageTableEndpoint |
string |
The storage table endpoint. |
properties.useServerDefault |
string |
Whether server default is enabled or disabled. |
type |
string |
Resource type. |
TableAuditingPolicyName
The name of the table auditing policy.
Name | Type | Description |
---|---|---|
default |
string |