Keep SQL*Plus Sessions Alive with Mosh

The terminal waited, cursor blinking, the connection hanging on a fragile thread. You type a command in sqlplus. The screen freezes. The SSH session times out. Hours of work vanish into the void.

This is why you run Mosh with SQL*Plus.

Mosh (Mobile Shell) keeps your terminal alive when the network drops. It does not care if you switch Wi‑Fi networks, close your laptop, or jump between cell towers. Unlike SSH, Mosh speaks UDP and maintains a rolling state of your session. SQL*Plus, Oracle’s venerable command-line client, benefits from Mosh’s resilience. You can run long queries, navigate large datasets, and keep interactive shells running without fear that a weak connection will kill them.

To use Mosh with SQL*Plus, you need both installed locally and access to an Oracle Database server. First, connect to the remote machine with Mosh:

mosh --ssh="ssh -p 22"user@dbserver.example.com

Once inside, start sqlplus:

sqlplus username@//dbhost:1521/servicename

From here, Mosh ensures your session persists. Even if your network cuts out for several minutes, your SQL*Plus prompt will still be there when you reconnect. No re-authentication. No re-running half-complete scripts.

Performance can improve, too. Mosh renders keystrokes instantly based on predicted echoes instead of waiting for each packet to arrive. This matters when working on high-latency connections or overseas VPNs. SQL*Plus stays responsive, so you spend more time executing queries and less waiting on the network.

Security is preserved. Mosh encrypts traffic with AES‑256 and uses existing SSH keys for authentication. This keeps your database credentials protected while you gain mobility and stability.

Engineers who rely on Oracle know the pain of unstable connections. Mosh and SQL*Plus together remove that fragility. The setup takes minutes and works cross‑platform on macOS, Linux, and Windows (via WSL). Once you try it, you will not go back to plain SSH for database sessions.

Run your next SQL*Plus session on Mosh. Keep the cursor alive. Keep the work flowing. See it live in minutes — start building at hoop.dev.