How can I check if my Oracle DB for RDB is available?
Many reasons could be responsible for an interrupt of the connection between the WinCC OA RDB Manager and an Oracle DB. Some of the reasons are a broken network or a stopped Oracle Server.
To detect an Oracle Error it is possible to implement an own Oracle Server Watchdog within a CTRL script from WinCC OA.
Inside this script an endless loop should be implemented which trigger a periodic SQL statement in Oracle like this example:
<o:p></o:p>
main()<o:p></o:p>
{<o:p></o:p>
dyn_dyn_anytype dda;<o:p></o:p>
while(1)<o:p></o:p>
{<o:p></o:p>
runRealSQLQuery("SELECT 2 FROM DUAL", dda);<o:p></o:p>
<o:p> </o:p>
//make activities for content of dda variable<o:p></o:p>
<o:p> </o:p>
delay(60);<o:p></o:p>
}<o:p></o:p>
}<o:p></o:p>
In case where the Oracle connection is OK the “dda” Variable is filled with values otherwise it is empty. In decency of the content of this variable it is possible to set an own datapoint with an alert handler config. With this alarm it is possible to inform the operator about an Oracle Error as fast as possible.<o:p></o:p>
<o:p> </o:p>