FIX INSTANCE ENVIRONMENT SWAP
One-time fix: swaps CONNECTIONS.INSTANCE_ID/ENVIRONMENT_ID and the INSTANCE/ENVIRONMENT reference tables, correcting a long-standing data inversion. Takes a backup first. Run once per CDF only.
Arguments
(none)
Examples
FIX INSTANCE ENVIRONMENT SWAP;
Notes
One-time correction for a CDF created before this fix: CONNECTIONS.INSTANCE_ID/ ENVIRONMENT_ID, and the INSTANCE/ENVIRONMENT reference tables, have always held each other's data - every connection's "instance" value is actually a deployment stage (e.g. DEV, QA, PROD) and its "environment" value is actually a product/application name (e.g. DESK, SALES). See docs/TECHNICAL_CHANGE.md, 2026-09-05, "Instance/ Environment data swap" for the full investigation.
FIX INSTANCE ENVIRONMENT SWAP takes a timestamped backup of the CDF's data file first (backupCdfFile), then physically swaps both
- nothing is created, deleted, or reinterpreted, only relocated to the column/table whose name actually matches what it holds (
swapInstanceAndEnvironment).
Run this exactly once per CDF. There is no way to detect automatically whether it has already been applied - both INSTANCE_ID/ENVIRONMENT_ID and INSTANCE/ ENVIRONMENT exist before and after, just with contents exchanged. Running it a second time on an already-corrected CDF silently swaps the data right back to wrong.
Last modified in release 5.1.2.
BroadSQL