FabricTools v0.33.0 Public Preview

Remove-FabricSQLDatabase

Deletes a SQL Database from a specified workspace in Microsoft Fabric by ID or exact name.

Syntax

Parameter set: ById (Default)
Remove-FabricSQLDatabase -WorkspaceId <guid> -SQLDatabaseId <guid> [-WhatIf] [-Confirm]
 [<CommonParameters>]
Parameter set: ByName
Remove-FabricSQLDatabase -WorkspaceId <guid> -SQLDatabaseName <string> [-WhatIf] [-Confirm]
 [<CommonParameters>]

Description

When a name is provided, exactly one SQL Database in the workspace must match. If no database or multiple databases match, no deletion is performed.

Examples

Example 1

Deletes the SQL Database with ID "67890" from workspace "12345".

Remove-FabricSQLDatabas -WorkspaceId "12345" -SQLDatabaseId "67890"

Example 2

Deletes the SQL Database with the exact name "MyDatabase" from workspace "12345".

Remove-FabricSQLDatabase -WorkspaceId "12345" -SQLDatabaseName "MyDatabase"

Parameters

NameTypeReq.Pos.PipelineDescription
-SQLDatabaseId guid ✓Required Named –

The ID of the SQL Database to be deleted.

-SQLDatabaseNamealias: Name string ✓Required Named –

The exact name of the SQL Database to be deleted. Supports the alias Name. Use SQLDatabaseId if the name is ambiguous.

-WorkspaceId guid ✓Required Named –

(Mandatory) The ID of the workspace containing the SQLDatabase to delete.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Validates token expiration before making the API request.

Author: Kamil Nowinski