Skip to content

Latest commit

 

History

History
139 lines (101 loc) · 3.73 KB

Use-AzureRmSqlServerAuditingPolicy.md

File metadata and controls

139 lines (101 loc) · 3.73 KB
external help file Module Name ms.assetid online version schema
Microsoft.Azure.Commands.Sql.dll-Help.xml
AzureRM.Sql
381F5B34-983C-4733-B384-35D6579B79A2
2.0.0

Use-AzureRmSqlServerAuditingPolicy

SYNOPSIS

Specifies that a database uses the auditing policy of its host server.

SYNTAX

Use-AzureRmSqlServerAuditingPolicy [-PassThru] [-ServerName] <String> [-DatabaseName] <String>
 [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

DESCRIPTION

The Use-AzureRmSqlServerAuditingPolicy cmdlet specifies that a database uses the auditing policy of its host server. Specify the ResourceGroupName, ServerName, and DatabaseName parameters to identify the database. If no auditing policy is defined for the database server, this cmdlet fails. If the host uses server level auditing, threat detection is removed.

EXAMPLES

Example 1: Configure a database to use the auditing policy of its server

PS C:\>Use-AzureRmSqlServerAuditingPolicy -ResourceGroupName "ResourceGroup01" -ServerName "Server02" -DatabaseName "Database01"

This command specifies that the database named Database01 on Server02 uses the auditing policy of the server.

PARAMETERS

-DatabaseName

Specifies the name of the database that will use the auditing policy.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResourceGroupName

Specifies the name of the resource group to which the server is assigned.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ServerName

Specifies the name of the server that hosts the database that uses the auditing policy.

Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String

OUTPUTS

Microsoft.Azure.Commands.Sql.Auditing.Model.AuditingPolicyModel

NOTES

RELATED LINKS

Get-AzureRmSqlDatabaseAuditingPolicy

Get-AzureRmSqlServerAuditingPolicy

Set-AzureRmSqlDatabaseAuditingPolicy

Set-AzureRmSqlServerAuditingPolicy

SQL Database Documentation