Redigera

Dela via


Uninstall-CsDatabase

Deletes the specified Skype for Business Server database. This cmdlet was introduced in Lync Server 2010.

Syntax

Uninstall-CsDatabase
         -SqlServerFqdn <Fqdn>
         [-CentralManagementDatabase]
         [-Detach]
         [-SqlInstanceName <String>]
         [-Force]
         [-Report <String>]
         [-WhatIf]
         [-Confirm]
         [<CommonParameters>]
Uninstall-CsDatabase
         -SqlServerFqdn <Fqdn>
         -DatabaseType <DatabaseNameType>
         [-Detach]
         [-SqlInstanceName <String>]
         [-Force]
         [-Report <String>]
         [-WhatIf]
         [-Confirm]
         [<CommonParameters>]

Description

Skype for Business Server makes extensive use of SQL Server databases such as the Central Management store and the Archiving database. These databases are set up at the same time you install Skype for Business Server or at the same time you install a Skype for Business Server role that requires a database back end. After the databases have been installed, you will rarely need to uninstall them.

However, it is possible that you might need to uninstall a Skype for Business Server database at some point; for example, a hardware failure or an issue with network connectivity might make an existing database unusable. Regardless of the reason, the Uninstall-CsDatabase cmdlet provides a way for you to remove or detach any of the SQL Server databases used by Skype for Business Server.

Examples

-------------------------- Example 1 --------------------------

Uninstall-CsDatabase -CentralManagementDatabase -SqlServerFqdn atl-sql-001.litwareinc.com

The command shown in Example 1 deletes the Central Management store from the computer atl-sql-001.litwareinc.com.

-------------------------- Example 2 --------------------------

Uninstall-CsDatabase -DatabaseType User -SqlServerFqdn atl-sql-001.litwareinc.com

In Example 2, the User database is deleted from the computer atl-sql-001.litwareinc.com. When you use the DatabaseType parameter, all stores related to the specified database are deleted.

Parameters

-CentralManagementDatabase

If present, uninstalls the Central Management store. You cannot use both CentralManagementDatabase and DatabaseType in the same command.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-DatabaseType

Database to be deleted. Valid values are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

To delete the Central Management store, use the CentralManagementDatabase parameter.

Type:DatabaseNameType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Detach

If present, detaches the specified database. When a database is detached, all the file locks imposed by SQL Server are removed. This enables you to directly access the database files in order to do such things as copy those files to another computer.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

If present, forces removal of the database even if that database is currently in use.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Report

Enables you to specify a file path for the log file created when the cmdlet runs. For example: -Report "C:\Logs\UninstallDatabase.html"

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-SqlInstanceName

Name of the database instance containing the database to be removed. A database instance is a set of running processes that provides access to database files.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-SqlServerFqdn

Fully qualified domain name (FQDN) of the computer or SQL Server cluster where the database is located. For example: -SqlServer atl-sql-001.litwareinc.com.

Type:Fqdn
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

None. The Uninstall-CsDatabase cmdlet does not accept pipelined input.

Outputs

The Uninstall-CsDatabase cmdlet does not return any values or objects.