Friday, August 7, 2009

ORA-01620 while creating a RAC standby for non-RAC primary

Today I was trying to test some thing and had to create a RAC standby for a Non-RAC (single-instance) Primary database. I know, it doesn't make sense to have a RAC standby for a single-instance primary, but that's not the point. First instance was mounted without any problems, but when attempted to mount the second standby instance got the following error message:

SQL> alter database mount standby database;
alter database mount standby database
*
ERROR at line 1:
ORA-01620: no public threads are available for mounting


I couldn't find quick notes on the web to get around this issue and therefore had to find my own for this unique situation (having a RAC standby for SI-Primary). Here is what I did on Primary:

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 group 13 size 5M;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 group 14 size 5M;

Database altered.

SQL> alter database enable public thread 2;

Database altered.


Then created new copy of standby controlfile and shipped it over to standby and attempted to mount both the instances, it worked fine! Of course, had the primary been a RAC, we wouldn't have seen this in first place :-) BTW, this is on Oracle11g 11.1.0.7