What's the ORACLE_SID???? Your ORACLE_SID should be the new ORACLE_SID before you see the new database name from that query.