restore_database
Restore a SQL Server database from a .bak backup file, with options to replace existing database, move files, and auto-disconnect users.
Instructions
Restore a SQL Server database from a .bak file
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"databaseName": "<databaseName>",
"backupPath": "<backupPath>"
},
"name": "restore_database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileMoves | No | Optional map of logical file names to new physical paths | |
| backupPath | Yes | Full path to the backup file (e.g., /var/opt/mssql/backup/mydb.bak) | |
| withReplace | No | Replace existing database if it exists (default: false) | |
| databaseName | Yes | Name of the database to restore | |
| autoDisconnect | No | Automatically disconnect users before restore (default: false) |