Use-AzureSqlServerAuditingPolicy
Use-AzureSqlServerAuditingPolicy
Specifies that a database uses the auditing policy of its hosting server.
Syntax
Parameter Set: Default
Use-AzureSqlServerAuditingPolicy [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> [-PassThru] [-Profile <AzureProfile> ] [ <CommonParameters>]
Detailed Description
The Use-AzureSqlServerAuditingPolicy 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.
Parameters
-DatabaseName<String>
Specifies the name of the database to use the auditing policy.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Profile<AzureProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ResourceGroupName<String>
Specifies the name of the resource group that contains the database to use the auditing policy.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
-ServerName<String>
Specifies the name of the server that hosts the database to use the auditing policy.
Aliases |
none |
Required? |
true |
Position? |
2 |
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.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Define for a database to use the auditing policy of its server
This command specifies that the database named Database01 on Server02 uses the auditing policy of its server.
PS C:\> Use-AzureSqlServerAuditingPolicy -ResourceGroupName "ResourceGroup11" -ServerName "Server02" -DatabaseName "Database01"
Related topics
Get-AzureSqlDatabaseAuditingPolicy
Get-AzureSqlServerAuditingPolicy