< Back
Use-AzureRmSqlServerAuditingPolicy
Post
NAME Use-AzureRmSqlServerAuditingPolicy
SYNOPSIS
Specifies that a database uses the auditing policy of its host server.
SYNTAX
Use-AzureRmSqlServerAuditingPolicy [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> [-DefaultProfile
<IAzureContextContainer>] [-PassThru] [<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.
PARAMETERS
-DatabaseName <String>
Specifies the name of the database that will use the auditing policy.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group to which the server is assigned.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the server that hosts the database that uses the auditing policy.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.Security.Model.DatabaseAuditingPolicyModel
NOTES
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tingpolicy
Get-AzureRmSqlDatabaseAuditingPolicy
Get-AzureRmSqlServerAuditingPolicy
Set-AzureRmSqlDatabaseAuditingPolicy
Set-AzureRmSqlServerAuditingPolicy
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/
SYNOPSIS
Specifies that a database uses the auditing policy of its host server.
SYNTAX
Use-AzureRmSqlServerAuditingPolicy [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> [-DefaultProfile
<IAzureContextContainer>] [-PassThru] [<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.
PARAMETERS
-DatabaseName <String>
Specifies the name of the database that will use the auditing policy.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group to which the server is assigned.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ServerName <String>
Specifies the name of the server that hosts the database that uses the auditing policy.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Sql.Security.Model.DatabaseAuditingPolicyModel
NOTES
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tingpolicy
Get-AzureRmSqlDatabaseAuditingPolicy
Get-AzureRmSqlServerAuditingPolicy
Set-AzureRmSqlDatabaseAuditingPolicy
Set-AzureRmSqlServerAuditingPolicy
SQL Database Documentation https://docs.microsoft.com/azure/sql-database/