Remove-FabricSQLDatabase
Deletes a SQL Database from a specified workspace in Microsoft Fabric by ID or exact name.
Syntax
Remove-FabricSQLDatabase -WorkspaceId <guid> -SQLDatabaseId <guid> [-WhatIf] [-Confirm]
[<CommonParameters>]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
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -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