Thursday, May 14, 2026

Minute-by-Minute Migration War Room Script (Banking System: Oracle to MongoDB on Azure VM)

 

Minute-by-Minute Migration War Room Script (Banking System: Oracle → MongoDB on Azure VM)

This is a real-world, production-grade war room script designed for a mission-critical banking migration with:

  • 10TB–100TB data

  • Near-zero downtime

  • Full auditability

Senior DBA will act as the Migration Commander.


WAR ROOM TEAM STRUCTURE (Assign Before Start)

Each role must be assigned clearly:

  • Migration Commander (Senior DBA) → decision maker

  • Oracle DBA → source system control

  • MongoDB Engineer → target system

  • Application Owner → app switch

  • Network Engineer → connectivity

  • Audit/Compliance Officer → logging & approvals

  • Scribe (very important) → records every action


T-60 MINUTES (1 Hour Before Cutover)

Objective: Final readiness check


Commander Says:

“Team, we are entering T-60. Confirm readiness.”


Checklist

✔ All migration scripts tested
✔ MongoDB cluster healthy

rs.status()

✔ Disk space verified

df -h

✔ Backup completed (FINAL Oracle backup)

expdp system/password FULL=Y DUMPFILE=final_backup.dmp

✔ Rollback plan confirmed


Decision Gate:

If ANY issue → DELAY migration


T-45 MINUTES

Objective: Freeze non-essential systems


Commander Says:

“Freeze all non-critical jobs.”


✔ Stop batch jobs
✔ Disable scheduled jobs

BEGIN
  DBMS_SCHEDULER.DISABLE('JOB_NAME');
END;

✔ Notify business users


T-30 MINUTES

Objective: Prepare for final sync


✔ Verify last incremental sync timestamp

✔ Run pre-cutover incremental extraction:

SELECT * FROM transactions
WHERE last_updated > :last_sync_time;

✔ Prepare MongoDB import scripts


Commander Checkpoint

“Is incremental pipeline ready?”


T-15 MINUTES

Objective: Enter controlled shutdown mode


Commander Says:

“Prepare to stop writes.”


✔ Application switched to READ-ONLY mode

✔ Confirm:

  • No new transactions

  • No writes happening


T-10 MINUTES

Objective: Stop Oracle writes completely


✔ Stop application services

✔ Confirm zero active sessions:

SELECT COUNT(*) FROM v$session WHERE status='ACTIVE';

Must be 0 or near zero


T-5 MINUTES (CRITICAL POINT)

Objective: Final incremental sync


Commander Says:

“Execute FINAL SYNC now.”


✔ Extract final delta:

SELECT * FROM transactions
WHERE last_updated > :cutover_time;

✔ Convert to JSON
✔ Load into MongoDB:

mongoimport --file final_delta.json --collection transactions


T-0 (CUTOVER MOMENT)

Objective: Switch system to MongoDB


Commander Says (Very Clearly):

“Cutover initiated. Switch application to MongoDB.”


✔ Update application connection string

✔ Start application services


✔ Smoke test:

  • Login works

  • Transactions work

  • Queries return results



T+5 MINUTES

Objective: Immediate validation


✔ Check MongoDB health:

db.serverStatus()

✔ Check replication:

rs.status()

✔ Run transaction test:

db.transactions.findOne()


T+10 MINUTES

Objective: Financial validation (MOST IMPORTANT)


Commander Says:

“Run financial reconciliation.”


✔ Oracle total:

SELECT SUM(amount) FROM transactions;

✔ MongoDB total:

db.transactions.aggregate([
  { $group: { _id: null, total: { $sum: "$amount" } } }
])

Decision:

  •  Match → continue

  • Mismatch → ROLLBACK immediately



T+15 MINUTES

Objective: Monitor system stability


✔ Check logs:

tail -f /var/log/mongodb/mongod.log

✔ Check errors
✔ Check latency



T+30 MINUTES

Objective: Business validation


✔ Business users test:

  • Account balance

  • Transaction history

  • Payments


Commander Question:

“Business, do you confirm system correctness?”



T+45 MINUTES

Objective: Performance monitoring


✔ Check slow queries

db.setProfilingLevel(1)

✔ Check CPU / Memory



T+60 MINUTES (STABILIZATION COMPLETE)


Objective: Declare success


Commander Says:

“Migration successful. Entering monitoring phase.”


✔ Keep Oracle in read-only fallback mode
✔ Do NOT decommission yet



ROLLBACK PLAN (IF SOMETHING FAILS)


Trigger Conditions:

  • Financial mismatch

  • Missing transactions

  • Application failure


Rollback Steps


Commander Says:

“Rollback initiated. Reverting to Oracle.”


✔ Stop application
✔ Reconnect to Oracle
✔ Restart services


✔ Validate Oracle system


Target rollback time:< 15 minutes



Example Dialogue

Commander:
“Team, confirm MongoDB primary is healthy.”

Mongo Engineer:
“Primary is stable, replication lag 0 seconds.”


Commander:
“Oracle DBA, confirm no active transactions.”

Oracle DBA:
“Confirmed, zero active sessions.”


Commander:
“Proceed with final sync.”


Scribe logs everything.



COMMON FAILURE SCENARIOS

 Issue 1: Missing Transactions

Fix:

  • Re-run incremental sync

  • Compare IDs


Issue 2: Slow MongoDB Queries

Fix:

  • Add index immediately

db.transactions.createIndex({ account_id: 1 })


Issue 3: Replication Lag

Fix:

  • Check network

  • Reduce write load



POST-WAR ROOM (FIRST 24 HOURS)


✔ Monitor every 15 minutes
✔ Keep full team on standby
✔ Do NOT relax monitoring



FINAL ADVICE (FROM REAL MIGRATIONS)


  • The cutover is only 5% of the work

  • The validation is 95%

  • Always trust numbers, not assumptions


No comments:

Post a Comment

MINUTE BY MINUITE PRODUCTION RUNBOOK FOR FULLY AUTOMATED MIGRATION FROM SAP ASE TO SQL Server Azure VM

MINUTE BY MINUITE PRODUCTION RUNBOOK FOR  FULLY AUTOMATED MIGRATION FROM SAP ASE TO SQL Server Azure VM --- OVERALL STRUCTURE Breaking execu...