Relational Database(rdbms via odbc) Interface


RDBMSPI – Output Recovery Modes (Only Applicable to Output Points)



Yüklə 1,66 Mb.
səhifə17/50
tarix07.04.2018
ölçüsü1,66 Mb.
#46960
1   ...   13   14   15   16   17   18   19   20   ...   50

RDBMSPI – Output Recovery Modes (Only Applicable to Output Points)

Recovery TS


This recovery mode is specified by the /RECOVERY=TS start-up parameter. Whether the recovery handles out-of-order data or not, depends on the Location5 attribute of an output tag. If Location5=0, then recovery starts at snapshot timestamp of the output tag (or at the recovery start-time if that is later). Only in-order data can thus be recovered. If Location5=1 then the recovery begins at the recovery start-time and can include the out-of-order data – the /OOO_OPTION then determines how the out-of-order events are handled.

Note: During the recovery, the snapshot placeholders are populated with historical (archive) values. In case the placeholder is defined as: Pn=’tagname’/VL , during the recovery, the interpolated archive value is taken.

Out-Of-Order Recovery


For output points that have Location5=1, the interface compares the source with the output tag values and detects the archive events that were added, replaced or deleted. This comparison is done immediately after the interface started on condition the comparison time-window had been specified; e.g. /RECOVERY_TIME='*-10d'.

The following two figures depict the situation before and after the out-of-order recovery.



Two New Values Added to SourceTag (green)



OutputTag (blue) Synchronized with SourceTag (green).

The Out-Of-Order recovery can be further parameterized through another start-up parameter /OOO_OPTION. This parameter defines a combination of three keywords: append, replace, and remove.

Keywords are separated by commas: /OOO_OPTION="append,replace".

Depending on these keywords, the interface only takes those actions, for which the corresponding options are set. In this case, even if there were some deletions of the source tag events, the interface will not synchronize them with the output tag (in terms of deleting the corresponding output tag entries).

The comparison results are signaled to the user via the following (Boolean) variables: @source_appended, @source_replaced, and @source_removed.

So that they can be used in an 'IF' construct that the interface is able to parse.

For example:

IF @source_appended INSERT INTO table (…);


IF @source_replaced UPDATE table SET column1 = ? …;
IF @source_removed DELETE table WHERE column1 <= ?;

Usually new source tag events come in in-order so that only the @source_appended variable is set to True (the others remain False).



Note: If no /OOO_OPTION is specified in the startup file then append is the default.

/ooo_option , Location5 and @* Variables – off line mode

/Recovery=…
/ooo_option=…

Location5

SQL Execution

@source_appended
@source_replaced
@source_removed

Comment

Source tag / Output tag event comparison matches the /ooo_option

-1

No

n/a

No Recovery for such tag

0

Yes

@source_appended=True
@source_replaced=False @source_removed=False

No out-of-order recovery
The recovery starts at snapshot time of the output tag, SQL queries are called for each source tag value after this point

1

Yes

The option that was matched is setting the correlated parameter to True

Example: /ooo_option=
"replace"
source archive event <> output archive event

@source_appended=False
@source_replaced=True
@source_removed=False










Source tag /
Output tag event comparison matches none of the /ooo_options

-1



No

n/a

No recovery for such tag

0



Yes

@source_appended=True
@source_replaced=False @source_removed=False

No out-of-order recovery
The recovery starts at snapshot time of output tag, SQL queries are called for each source tag value after this point

1

No

n/a

Not specifying a certain ooo_option means no action if the related situation is found

The table above describes the recovery-relevant settings that are valid only when the interface starts (off-line-mode). During the normal operation (on-line-mode), the interface handles the Out-Of-Order events as described in the section below:

Out-Of-Order Handling in On-Line Mode (RDBMSPI Interface Runs)


Location5=1 supports out-of-order recovery also in the on-line-mode; When the Out-Of-Order source tag events are detected, either the @source_appended or the @source_replaced is set to True (depending on the addition, or replacement of the source tag event).

Note: Deleted values are NOT recognized in on-line-mode.

Note: A new event that has the same timestamp as the current snapshot is considered an out-of-order event too!

Note: If the source tag value is edited, but remains the same, then the @source_replaced variable stays False

/ooo_option , Location5 and @* Variables – on line mode

/ooo_option=…

Location5

SQL Execution

@source_appended
@source_replaced
@source_removed

Comment

Source tag event is out of order and

Source tag/output tag event comparison matches /ooo_option



-1

No

n/a

out-of-order events ignored

0

Yes

@source_appended=True
@source_replaced=False
@source_removed=False

Backward compatibility

1

Yes

The option that was matched is set to True

e.g. /ooo_option=
"replace"
source archive event <>
output archive event

@source_appended=False
@source_replaced=True
@source_removed=False










Source tag event is out of order and

Source tag/output tag event comparison matches none of the /ooo_options



-1



No

n/a

out-of-order events ignored

0



Yes

@source_appended=True
@source_replaced=False @source_removed=False

Backward compatibility

1

No

n/a

e.g. /ooo_option=
"append"
source archive event <> output archive event

no query execution for replaced data










New source tag event (in-order)



-1



Yes

@source_appended=True
@source_replaced=False @source_removed=False

in-order events trigger query execution

0



Yes

@source_appended=True
@source_replaced=False @source_removed=False

in-order events trigger query execution

1

Yes

@source_appended=True
@source_replaced=False @source_removed=False

in-order events trigger query execution

Yüklə 1,66 Mb.

Dostları ilə paylaş:
1   ...   13   14   15   16   17   18   19   20   ...   50




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin