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-AzureSqlServerAuditingSetting

Set-AzureSqlServerAuditingSetting

microsoft.azure.commands.sql.dll

Synopsis

Sets an Azure Sql database server's auditing setting.

Syntax

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

Detailed Description

The Set-AzureSqlServerAuditingSetting cmdlet changes the auditing setting of an Azure Sql database server. To use the cmdlet, use the ResourceGroupName and ServerName parameters to identify the database server, 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.The auditing settings of a database server apply to all the databases in this server that are marked as using the server's auditing settings, as well as all newly created databases.If the command succeeds and the PassThru switch is on, it returns an object describing the current auditing setting used as well as the server's identifiers (i.e., ResourceGroupName and ServerName)

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

-PassThru <SwitchParameter>

Returns an object describing the auditing setting as well as the database server's identifiers (i.e., ResourceGroupName, ServerName and DatabaseName) when the cmdletsucceeds. 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 databases that rely on this server's auditing settings. 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. 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 server. 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