I have an oracle 19C database I needed to upgrade for a test application. Before I ran my database upgrade scripts, I used RMAN to make a backup using the following steps:
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;
BACKUP DATABASE PLUS ARCHIVELOG;
This was the output:
piece handle=C:\USERS\ADMINISTRATOR\DOWNLOADS\WINDOWS.X64_193000_DB_HOME\DATABASE\04VFR0AS_1_1
tag=TAG20201118T115123 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 18-NOV-20
Now I want to restore my backup as the upgrade was not successful and I used these commands:
shutdown immediate;
startup mount;
restore database;
recover database;
alter database open;
Both the restore and recover processes finished successfully but I don't think the database was completely restored to the previous state before the backup. For e.g, some of the newly created tables and altered table spaces etc from the failed upgrade scripts still exist. How do I restore my database to exactly how it was before the attempted upgrade? I want all new tables any new alterations to tablespaces, settings etc reset to the previous state. What I'm I doing wrongly?