mssql_copy_between_databases
Copy data between two SQL Server databases using connection strings, with optional schema, row filter, batch size, and truncate target.
Instructions
Copy data between two SQL Server databases
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | Filter for source rows (WHERE clause without the keyword) | |
| schema | No | Schema name on both sides (defaults to dbo) | |
| batchSize | No | ||
| tableName | Yes | Table name (same on both sides) | |
| truncateTarget | No | TRUNCATE the target table inside the copy transaction first | |
| sourceConnectionString | Yes | Source connection string (requires --allow-tool-connection-string) | |
| targetConnectionString | Yes | Target connection string (requires --allow-tool-connection-string) |