This content has been marked as final. Show 3 replies
I may be able to describe a trick... Try setting the "test table" property of the DataGuard DataSource
to some update statement, ideally one to a otherwise unused table. eg:
SQL update myJunkTable set foo = 1 where 1 = 0
This won't actually update the table (which could have zero rows even) but I hope the
read-only DBMS would throw an exception anyway, and this will give WLS the impression
it can't get healthy connections, and That DataSource won't be used, until the read-only
status is removed.
However, from a standard point of view, a read-only DBMS may be perfectly useful for some applications,
so that is not of itself a reason for WLS not to use it.
Thanks, I will try that, someone else just suggested updating the DUAL table itself to its existing value (as in SQL SELECT 1 FROM DUAL) but I don't know if that is a bad idea or not.
Try it. If you can come up with an update SQL to DUAL that works or not depending on the read-only status, cool.
maybe "SQL delete DUAL where 1 = 0"