Esempio di API REST per il parametro GTIDSET

Questo argomento mostra esempi per l'utilizzo del parametro GTIDSET con la richiesta successiva all'API REST ADD EXTRACT, la richiesta REST ALTER EXTRACT e quindi la verifica dell'estrazione con il valore set GTID utilizzando il comando INFO EXTRACT.

Esempio 1: la richiesta successiva all'API REST per aggiungere un'estrazione è la seguente:

{
    "credentials": {
        "alias": "ggeast"
    },
    "source": "tranlogs",
    "begin": {
        "at": {
            "atGtidSet": [
                     "2174B383-5441-11E8-B90A-C80AA9429562:1-3",
                     "3174B383-5441-11E8-B90A-C80AA9429562:1-3",
                     "4174B383-5441-11E8-B90A-C80AA9429562:1-3"
            ]
        }
    }
}

La richiesta REST di esempio per aggiungere Extract è formata:

> POST /services/{version}/extracts/exte
{
    "source": "tranlogs",
    "begin": {
        "at": {
            "atGtidSet": "1d380bee-0c24-11ee-b338-00001701f1ea:1-8"
        }
    }
}

La richiesta REST di esempio per modificare Extract è formata come segue:

> PATCH /services/{version}/extracts/exte
{
    "begin": {
        "at": {
            "atGtidSet": "1d380bee-0c24-11ee-b338-000017015555:12-19"
        }
    }
}

Dopo aver aggiunto il set Extract by GTID, utilizzare il comando INFO EXTRACT con showch per visualizzare il set GTID come posizione, come mostrato nell'esempio seguente:

OGG (http://localhost:9011/ GTIDMAIN) 6> info extract exte, showch

Extract    EXTE   Initialized  2023-07-17 19:00   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:06 ago)
VAM Read Checkpoint  First Record
00000000000000000000:cd6f98b1-1fbd-11ee-b73f-00001701f1ea:20
GTID Set             cd6f98b1-1fbd-11ee-b73f-00001701f1ea:1-20
Encryption Profile   LocalWallet