Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureSqlDatabaseAuditingSetting

Set-AzureSqlDatabaseAuditingSetting

microsoft.azure.commands.sql.dll

Synopsis

Sets an Azure Sql database's auditing setting.

Syntax

Set-AzureSqlDatabaseAuditingSetting [-DatabaseName] [-PassThru] [-StorageAccountName] [-EventType] [-ServerName] [-ResourceGroupName] [<CommonParameters>]

Detailed Description

The Set-AzureSqlDatabaseAuditingSetting cmdlet changes the auditing setting of an Azure Sql database. To use the cmdlet, use the ResourceGroupName, ServerName and DatabaseName parameters to identify the database, the StorageAccountName parameter to specify the storage account to be used for the audit logs and the EventType parameter to define which event types to audit.After the successful execution of the cmdlet, auditing of the database is enabled. These settings override the server default auditing settings. If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing setting used as well as the database identifiers (ResourceGroupName, ServerName and DatabaseName)

It is important to note that this cmdlet can be executed only in Azure Resource Manager mode. To switch to that mode run: Switch-AzureMode AzureResourceManager

Parameters

-DatabaseName <String>

Specifies the name of the database. Wildcards are not permitted.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Returns an object describing the auditing setting as well as the database's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdlet succeeds. By default, this cmdlet does not return any output.

Aliases

None

Required?

false

Position

named

Default value

none

Accept pipeline input?

false

Accept wildcard characters?

false

-StorageAccountName <String>

Specifies the name of the storage account to be used when auditing the database. Wildcards are not permitted.Note that this parameter is not required. When this parameter is not provided, the cmdlet would use the storage account that was defined previously as part of the auditing setting of the database. If this is the first time an auditing setting is defined for the database and this parameter is not provided, the cmdlet will fail.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-EventType <String[]>

Specifies the event types to audit Valid values are: -- DataAccess -- DataChanges -- SchemaChanges -- SecurityExceptions -- RevokePermissions -- All -- None Note that is possible to specify several event types. You can specify 'All' to audit all of the event types or 'None' to specify that none of the events will be audited. Specifying 'All' or 'None' alongside other event types would result in failure to execute the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ServerName <String>

Specifies the name of the database server holding the database. Wildcards are not permitted.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-ResourceGroupName <String>

Specifies the name of the resource group of the database. Wildcards are not permitted.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

Input Type

None

Return Type

Microsoft.Azure.Commands.Sql.Security.Model.AuditingPolicy

Notes

Examples