Remove-ASMonitoringSqlDatabase

Remove-ASMonitoringSqlDatabase

Removes the monitoring database objects (schema) from a SQL database.  If there are no additional objects in the database, or if the store is a dedicated monitoring database (there are no other schemas or objects co-located with the monitoring schema objects), the cmdlet will also delete (drop) the database.

Syntax

Parameter Set: DatabaseNameAndServerName
Remove-ASMonitoringSqlDatabase -Database <String> [-Server <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


Parameters

-ConnectionString<String>

SQL Server connection string.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Database<String>

Name of the SQL database.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Server<String>

SQL Instance Name (e.g. MachineA or MachineA/SQLEXPRESS).


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None


Outputs

The output type is the type of the objects that the cmdlet emits.

  • None


Examples

Example 1

Running this cmdlet will remove the MyServiceStore database from the MICROSO-XNMDH06 server. If the operation is successful, there will be no output.


Remove-ASMonitoringSqlDatabase -Database "MyServiceStore" -Server "MICROSO-XNMDH06"
Show: