When you create a database in 12C it now creates a resource in HAS/CRS , which isn’t a problem
However, when you come to recreate a standby database, probably because it has got such a big lag that it is quicker to recreate than recover the log files, then you will see the following error message :-
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 07/22/2015 15:45:57 RMAN-05501: aborting duplication of target database RMAN-03015: error occurred in stored script Memory Script RMAN-03009: failure of sql command on clone_default channel at 07/22/2015 15:45:57 RMAN-11003: failure during parse/execution of SQL statement: alter system set db_unique_name = 'STAN' comment= '' scope=spfile ORA-32017: failure in updating SPFILE ORA-65500: could not modify DB_UNIQUE_NAME, resource exists
It did stump me for a while and I thought it was around having files in the ASM DATA group from the previous incarnation but removing them did not solve it.
The word ‘resource’ gave me a clue and looking at the resources using srvctl I could see that the database STAN already existed
srvctl status database -d STAN
Database is not running.
So the fix was obvious – and indeed the error message was accurate.
srvctl remove database -d STAN
Remove the database STAN? (y/[n]) Y
