Posts

Showing posts from April, 2025

RMAN Duplicate To Another Server With Different SID

Cloning MYDBPROD → MYDBTEST with RMAN DUPLICATE Sometimes we need a quick, up‑to‑date copy of production for troubleshooting or functional testing. The fastest route is RMAN duplicate from active database , which streams the data files over the network—no backup & restore cycle required. Environment snapshot oracle1 → production server (SID MYDBPROD ) oracle2 → test server (SID MYDBTEST ) Database names: MYDBP (prod) → MYDBT (test) OS: Oracle Linux 8 SELinux Permissive , firewalld disabled. Only the Oracle binaries are installed on the test host—no database. 1  Configure the listener on the test server LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle2.localdomain)(PORT = 1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1) (SID_NAME = MYDBTEST) ) ) Start (or reload) it: lsnrctl start listener 2  Add tnsnames.ora en...

Moving Oracle Datafiles and Log Files in Windows Server

Oracle 19c – Offline Relocation of Datafiles & Redo Logs Consolidating Oracle 19c Datafiles & Redo Logs onto a Single Drive Contents 0 · Executive Summary 1 · Pre‑Start Requirements 2 · Inventory & Duplicate‑Name Audit 3 · Dry‑Run on a Test Tablespace 4 · Generate Rename Scripts 5 · Shutdown & Robocopy 6 · Update Controlfile Pointers 7 · Temp Tablespace Plan 8 · (Option) Moving Controlfiles 9 · Post‑Migration Checks 10 · Rollback Plan Appendix A · FAQ 0 · Executive Summary We will shut down the Oracle instance, move every datafile and redo‑log file from drives D: , E: and G: to the new drive H: using ROBOCOPY /MOV , then update the controlfile pointers and reopen the database. A quick test with a disposable tablespace proves the commands before the real move. 1 · Pre‑Start Requirements ✔️  New drive ready: H: must have enough free space for all datafiles + redo logs + ≈...