switch_database
Switch the active database context to a specified database. Use this to change the current database for subsequent queries.
Instructions
Switch the active database context.
Changes the current database using the USE statement. The database must
exist, be online, and not be in the blocklist (MSSQL_BLOCKED_DATABASES).
Args:
database_name: Name of the database to switch to
Returns:
Dictionary with:
- status: "switched" on success, "error" on failure
- database: The new active database name
- previous_database: The previously active database
- error: Error message if switch failed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||