Skip to content

Commit

Permalink
LL 11505 OCI Data Transforms (#187)
Browse files Browse the repository at this point in the history
* Workshop 2120: Flow update and new repo validation

* Update adb.md

* Workshop 11092: Development for CloudWorld

Initial development for CloudWorld LiveLab

* Workshop 11092: Development for CloudWorld

* Update README.md

* Workshop 11092 - CloudWorld development

* Workshop 11092: Self QA

* Workshop 11092: Self QA

* Workshop 11092: Self QA

* Workshop 11092: Self QA

* Update extract.md

* Workshop 11092: Lint Checker changes

* Update create.md

* Workshop 11092: Grammarly checks

* Workshop 11148: ATP to Kafka workshop

New development

* ATP-Streaming and OCW udpates

* ATP-Stream development

* OCI GGS workshop fixes

* atp-streaming

clean up unused images

* atp-kafka clean up

* atp-streaming clean up

* bidirectional replication clean up

* atp-objectstorage cleanup

* oci-ggs cleanup

* ogg-to-ggs cleanup

* ggs-to-ogg cleanup

* atp-kafka clean up and create ggs-common/adb/images to test

* atp-objectstore consolidation

* Workshop 11092: File clean up

* Updated image references to ggs-common
* Added learn more links to labs

* Workshop 11148: File cleanup

* Updated image references to ggs-common
* Updated Learn more links
* Updated README

* Workshop 11093: File cleanup

* Update adb.md

* Workshop 11092: Replicat and monitor updates

* Update extract.md

* Workshop 2920/OCW #10

* Consolidation of duplicate image files to ggs-common
* Updates for OCW

* Updates to Workshop 4841/OCW Lab 10

Completed consolidation and update to workshop

* Removed duplicate images

* Self QA Lintchecker

Addressed Linkchecker errors in Workshops 11092 and 4841

* Lintchecker updates on Workshop 11092

* Workshop 11092: Fixed typos

* Update extract.md

Fixed typos

* Workshop 11091: MySQL to ADW

Initial development - To be released Aug 30th

* Workshop 11091: Added screenshots

* Workshop 11091: Replicate MySQL to ADW

* Updates as a result of testing
* Added screenshots

* Workshop 11092

Add screens for api key creation

* Update adb.md

Typo

* Workshop 11092: Incorporated PM feedback

* Fixed broken image link
* Elaborated on a couple steps as recommended by PM
* Expanded on a few notes as recommended by PM

* Workshop 11093: QA fixes

+ Added prerequisite steps and screens to create.md
+ Edits to other files from testing

* Workshop 11148: Self-QA

- Fixed broken image links
- Added NSG steps and screens

* Workshop 4841: Fixed broken images

* Update oggmp-atp.md

* Workshop 2920

+ Fixed broken image
+ renamed lab title

* Workshop 4841/OCW 10 - Connections

Changed Registered Databases to Connections

* Workshop 4841/OCW 10: PM validation

Updates to 4841 for OCW workshop #10
- Assign connection steps added
- common screenshots updated

* Workshop 11092/OCW 44

Updated My Profile link from User Settings

* Workshop 11092/OCW 44

PM requested updates

* Update create.md

* Updates to Workshop: 11091

* Updates to ATP to OCI Streaming lab

* Updates to 11093

* Updated README.md for bidirectional replication

* Update introduction.md

* Update create.md

Fixed typo per Kaylien's feedback

* Update create.md

* Video link updates

* Update manifest.json

* Updates for MySQL to ADW workshop

* Updates to MySQL workshop

* Update mysql.md

Fix broken image link

* Update image links

* Self-QA 11091

* 2920: Update video link

* Fixed typos 11091

* Cleanup 2920

* 11091 QA verification tasks

- Masked compartment names, IPs, ocids
- Changed estimated lab time to estimated time

* Masking images

* Update create.md

Typo

* Workshop 11092: Feedback from PMs

* Prep 11091 for green button

* Update mysql.md

Remove curl cmd per PM instructions

* Redwood updates to 2920

* Workshop 2920

-Update screens for Redwood
-Quartly self-QA

* Workshop 2920

* Workshop 2920: Fix broken image links

* Squashed commit of the following:

commit c1550c5
Author: Jenny Chan <[email protected]>
Date:   Tue Feb 21 04:42:15 2023 -0500

    Workshop 2920 (#49)

    * Workshop 2120: Flow update and new repo validation

    * Update adb.md

    * Workshop 11092: Development for CloudWorld

    Initial development for CloudWorld LiveLab

    * Workshop 11092: Development for CloudWorld

    * Update README.md

    * Workshop 11092 - CloudWorld development

    * Workshop 11092: Self QA

    * Workshop 11092: Self QA

    * Workshop 11092: Self QA

    * Workshop 11092: Self QA

    * Update extract.md

    * Workshop 11092: Lint Checker changes

    * Update create.md

    * Workshop 11092: Grammarly checks

    * Workshop 11148: ATP to Kafka workshop

    New development

    * ATP-Streaming and OCW udpates

    * ATP-Stream development

    * OCI GGS workshop fixes

    * atp-streaming

    clean up unused images

    * atp-kafka clean up

    * atp-streaming clean up

    * bidirectional replication clean up

    * atp-objectstorage cleanup

    * oci-ggs cleanup

    * ogg-to-ggs cleanup

    * ggs-to-ogg cleanup

    * atp-kafka clean up and create ggs-common/adb/images to test

    * atp-objectstore consolidation

    * Workshop 11092: File clean up

    * Updated image references to ggs-common
    * Added learn more links to labs

    * Workshop 11148: File cleanup

    * Updated image references to ggs-common
    * Updated Learn more links
    * Updated README

    * Workshop 11093: File cleanup

    * Update adb.md

    * Workshop 11092: Replicat and monitor updates

    * Update extract.md

    * Workshop 2920/OCW #10

    * Consolidation of duplicate image files to ggs-common
    * Updates for OCW

    * Updates to Workshop 4841/OCW Lab 10

    Completed consolidation and update to workshop

    * Removed duplicate images

    * Self QA Lintchecker

    Addressed Linkchecker errors in Workshops 11092 and 4841

    * Lintchecker updates on Workshop 11092

    * Workshop 11092: Fixed typos

    * Update extract.md

    Fixed typos

    * Workshop 11091: MySQL to ADW

    Initial development - To be released Aug 30th

    * Workshop 11091: Added screenshots

    * Workshop 11091: Replicate MySQL to ADW

    * Updates as a result of testing
    * Added screenshots

    * Workshop 11092

    Add screens for api key creation

    * Update adb.md

    Typo

    * Workshop 11092: Incorporated PM feedback

    * Fixed broken image link
    * Elaborated on a couple steps as recommended by PM
    * Expanded on a few notes as recommended by PM

    * Workshop 11093: QA fixes

    + Added prerequisite steps and screens to create.md
    + Edits to other files from testing

    * Workshop 11148: Self-QA

    - Fixed broken image links
    - Added NSG steps and screens

    * Workshop 4841: Fixed broken images

    * Update oggmp-atp.md

    * Workshop 2920

    + Fixed broken image
    + renamed lab title

    * Workshop 4841/OCW 10 - Connections

    Changed Registered Databases to Connections

    * Workshop 4841/OCW 10: PM validation

    Updates to 4841 for OCW workshop #10
    - Assign connection steps added
    - common screenshots updated

    * Workshop 11092/OCW 44

    Updated My Profile link from User Settings

    * Workshop 11092/OCW 44

    PM requested updates

    * Update create.md

    * Updates to Workshop: 11091

    * Updates to ATP to OCI Streaming lab

    * Updates to 11093

    * Updated README.md for bidirectional replication

    * Update introduction.md

    * Update create.md

    Fixed typo per Kaylien's feedback

    * Update create.md

    * Video link updates

    * Update manifest.json

    * Updates for MySQL to ADW workshop

    * Updates to MySQL workshop

    * Update mysql.md

    Fix broken image link

    * Update image links

    * Self-QA 11091

    * 2920: Update video link

    * Fixed typos 11091

    * Cleanup 2920

    * 11091 QA verification tasks

    - Masked compartment names, IPs, ocids
    - Changed estimated lab time to estimated time

    * Masking images

    * Update create.md

    Typo

    * Workshop 11092: Feedback from PMs

    * Prep 11091 for green button

    * Update mysql.md

    Remove curl cmd per PM instructions

    * Redwood updates to 2920

    * Workshop 2920

    -Update screens for Redwood
    -Quartly self-QA

    * Workshop 2920

    ---------

    Co-authored-by: Michelle Malcher <[email protected]>

* Update create.md

Fixed broken image link url
Renamed connection type

* 2920 Self QA

Self QA

* Update gb-intro.md

* 2920 updates

Fix typos in 2920.

* Workshop 4841 - update screens for Redwood

* Workshop 4841: self-QA

* MySQL to ATP

Updates to images in ggs-common and started quarterly QA

* MySQL-GGS screen updates

* Update oggmp-atp.md

Revert changes from PR 63

* Edits to workshop 2920 for OCW23

Minor text updates

* Workshop 2920, HOL 16

+ Unlocked GGADMIN for TargetADW

* Workshop 2920

Light edits

* Workshop 2920 / HOL 16

Updated an image, added notes

* Workshop 11091: Quarterly QA updates

* Workshop 2920 / HOL 16

Added Support Lab to manifest

* Workshop 4841: Quaterly QA

Updates to Workshop 4841 (GGS to OGG) for Quaterly QA

* Update extract.md

* Updated screenshots

* Update 03-11b-target-uri.png

* Update create-gb.md

* Workshop 4861

Quarterly QA

* Quarterly QA 4861

- removed redundant images from ggs-commons
- added missing images to ggs-commons

* Workshop 2920/HOL 16

Updates to lab instructions due to recent UI updates.

* Workshop 2920/HOL 16

Complete end to end testing with updates to lab instructions

* Workshop 11396 / HOL 21

Edits to instructions based on testing result, updates to UI, and formatting instructions for clarity.

* few more updates to ggsa-pipeline for HOL

* WMS 11396 HOL 16

Feedback from Katherine

* Quarterly QA of MySQL to GGS lab

Quarterly QA of MySQL to GGS lab

* MySQL-ADW Quarterly QA

* Update setup images

* GGS UI updates

* PM feedback, WMS 2920 testing

+ Julien feedback
+ WMS 2920 testing and udpates

* Updates to GGSA LL

* Update to ggsa images

ggsa images

* Update create-ggsa-deployment.md

* WMS: 11396

Prep for Tenancy (brown button)

* Update introduction.md

* Updates to GGSA lab

* GGSA tenancy livelab + OCI Stream connection

* LL 3410 ATP to ObjStore updates

* ggsa updates

* pubsubnet update

* ggs-bidirectional-rep: Validation testing

* Bidirectional updates after validation

* Delete 02-checkpoint-trandata.md

* Update 03-create-target-connection.md

* OCI GGSA gb updates

* OGG to GGS Workshop updates

* Updates to 4861 and 2920

* WMS 11396 GB testing

* Prereq updates

WMS: 11505 and 11396

* WMS 2920 - Updates for OCW24 HOL17

Update lab to use 23ai deployment

* WMS 2920 - OCW24 HOL 17 dev cont'd

Updates to Replicats, Monitor, and Purge labs

* WMS 2920 - FIx include paths

Fixed include paths for building blocks

* WMS 2920 HOL 17 - merge conflicts

* Update manifest.json

* WMS 2920

Update manifests to use 23i

* Modify building blocks

* WMS ID 11041 Bidirectional replication - 23ai updates

* LL 11505 Sandbox updates

---------

Co-authored-by: Michelle Malcher <[email protected]>
  • Loading branch information
jwchan0319 and malcherm authored Jul 11, 2024
1 parent 97a2785 commit a997aa0
Show file tree
Hide file tree
Showing 6 changed files with 594 additions and 17 deletions.
7 changes: 4 additions & 3 deletions oci-dt/create/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ You may now **proceed to the next lab.**

## Learn more

* [Managing deployments](https://docs.oracle.com/en/cloud/paas/goldengate-service/ebbpf/index.html)
* [Managing connections](https://docs.oracle.com/en/cloud/paas/goldengate-service/mcjzr/index.html)
* [Create a data replication deployment](https://docs.oracle.com/en/cloud/paas/goldengate-service/llyhq/#GUID-899C1348-58CA-43EE-B775-EAD3B365A7A9)
* [Connect to Oracle Autonomous Database](https://docs.oracle.com/en/cloud/paas/goldengate-service/tqrlh/)
* [Assign a connection to a deployment](https://docs.oracle.com/en/cloud/paas/goldengate-service/llyhq/#GUID-69F7C944-DD31-40FA-8589-4CB5113E74D0)

## Acknowledgements
* **Author** - Katherine Wardhana, User Assistance Developer
* **Contributors** - Jenny Chan, Consulting User Assistance Developer, Database User Assistance; Julien Testut, Database Product Management
* **Last Updated By/Date** - Katherine Wardhana, April 2024
* **Last Updated By/Date** - Jenny Chan, July 2024
302 changes: 302 additions & 0 deletions oci-dt/extract/extract-23ai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
# Create the Extract process and use Oracle Data Pump to export data

## Introduction
This lab instructs you to use the OCI GoldenGate deployment console to add transaction information to the source database, add a checkpoint table to the target database, add and run an Extract, and instantiate the target database using Oracle Data Pump.

Estimated time: 25 minutes

Watch the video below for a quick walk through of the lab.
[Watch the video](videohub:1_j398evq1)

### About the Extract process
An Extract is a process that extracts, or captures, data from a source database.

### Objectives
In this lab, you learn to:
* Log in to the OCI GoldenGate deployment console
* Connect to the source database to add transaction information
* Connect to the target database to add a checkpoint table
* Add and run an Extract
* Export data from the source database using Oracle Data Pump

### Prerequisites

* This lab assumes that you completed all preceding labs
* Your deployment is in the Active state.

## Task 1: Launch the OCI GoldenGate deployment console

[](include:01-launch-console-23ai.md)

## Task 2: Add Transaction Data and a Checkpoint Table

> **NOTE:** Ensure that you enable supplemental logging before adding an Extract or you may encounter errors. If you encounter errors, delete and add the Extract before trying again.
1. In the left navigation menu, click to expand **DB Connections**, then **SourceATP**, and then finally, **Trandata**.

![Administration Service navigation menu](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-01-nav-config-dbconnections.png " ")

3. Next to **TRANDATA Information** click **Add TRANDATA** (plus icon).

![Add TRANDATA](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-03-trandata-23ai.png " ")

4. In the Trandata panel, for **Schema Name**, enter `SRC_OCIGGLL`, and then click **Submit**.

![Schema Name field populated with SRC_OCIGGLL](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-04-schema-name-23ai.png " ")

5. To verify, enter `SRC_OCIGGLL` into the **Search for Schema** field and click **Search TRANDATA** (magnifying glass icon).

![Search icon highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-05-search-23ai.png " ")

![SRC_OCIGGLL entered in search field and search results returned](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-05-trandata-23ai.png " ")

6. In the left navigation menu, click to connect to **TargetADW**.

![Credentials list with Connect to database TargetADW highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-06-connect-targetadw-23ai.png " ")

7. Next to Checkpoint, click **Add Checkpoint** (plus icon).

![Add Checkpoint highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-07-add-checkpoint-23ai.png " ")

8. In the Checkpoint Table panel, for **Checkpoint Table**, enter `"SRCMIRROR_OCIGGLL"."CHECKTABLE"`, and then click **Submit**.

![Populated Checkpoint table field and submit button highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-08-checktable-23ai.png " ")

The Checkpoint table updates with the newly added checkpoint table.

![Updated checkpoint table](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/03-09-checktable.png " ")


## Task 3: Add and run an Extract

1. In the navigation menu, click **Extracts**.

![Click Extracts in left menu](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-01-extracts-23ai.png " ")

2. On the Extracts page, click **Add Extract** (plus icon).

![Click Add Extract](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-02-add-extract-23ai.png " ")

3. In the Add Extract panel, on the Extract Information page, for **Extract Type**, select **Integrated Extract**.

4. For **Process Name**, enter `UAEXT`, and then click **Next**.

![Extract Information](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-03-int-extract-23ai.png " ")

5. On the Extract Options page, for Source Credentials **Domain**, select **OracleGoldenGate**, and for **Alias**, select **SourceATP**.

6. For Extract Trail **Name**, enter `E1`, and then click **Next**.

![Extract Options](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-06-extract-options-23ai.png " ")

7. On the Managed Options page, enable **Critical to deployment health**, and then click **Next**.

![Critical to deployment health highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-07-dephealth-23ai.png " ")

8. On the Parameter File page, in the text area, add a new line to the existing text and add the following:

```
<copy>-- Capture DDL operations for listed schema tables
ddl include mapped
-- Add step-by-step history of ddl operations captured
-- to the report file. Very useful when troubleshooting.
ddloptions report
-- Write capture stats per table to the report file daily.
report at 00:01
-- Rollover the report file weekly. Useful when IE runs
-- without being stopped/started for long periods of time to
-- keep the report files from becoming too large.
reportrollover at 00:01 on Sunday
-- Report total operations captured, and operations per second
-- every 10 minutes.
reportcount every 10 minutes, rate
-- Table list for capture
table SRC_OCIGGLL.*;</copy>
```

![Copied and pasted script on the parameter file page](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-08-paramfile.png " ")

10. Click **Create and Run**. You return to the Extracts page, where you can find your newly created **UAEXT** Extract after a few moments.

The status updates to **Running**.

![Extract started](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/04-10-uaext-running.png " ")

## Task 4: Check for long running transactions

1. In the source database SQL window, enter the following script, and then click **Run Statement**:

```
<copy>select start_scn, start_time from gv$transaction where start_scn < (select max(start_scn) from dba_capture);</copy>
```

If the query returns any rows, then you must locate the transaction's SCN and then either commit or rollback the transaction.

![Run statement and no query results highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/05-01-sql.png " ")

## Task 5: Export data using Oracle Data Pump (ExpDP)

Before using Oracle Data Pump to export data from the source database, first create an Oracle Object Store bucket, then create yourself a Credential Token, and then use these resources to create a credential in ATP.

1. From the Oracle Cloud Console navigation menu (hamburger icon), click **Storage**, and then **Buckets**.

![Object Storage bucket in Oracle Cloud navigation menu](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-01-storage-buckets.png " ")

2. On the **Buckets in &lt;compartment-name&gt;** page, click **Create Bucket**.

![Buckets in compartment page](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-02-create-bucket.png " ")

3. In the **Create Bucket** panel, enter a unique name, such as `Bucket-<user>,` and then click **Create**.

![Create Bucket panel](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-03-bucket.png " ")

4. From the list of buckets, click the bucket you created. You're brought to the bucket Details page.

5. On the bucket details page, under Objects, click **Upload**.

6. Enter a prefix, select a file (a simple text file will do), and then click **Upload**.

7. Close the panel. The object you uploaded appears in the Objects list.

8. In the Objects list, click the three dots icon for your object, and then select **View Object Details**.

![View Object Details](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-08-view-details.png)

9. In the Object Details panel, copy the URL Path (URI) up the object name and paste it into a text editor.

> **Note:** Ignore the URL deprecation notice shown on the Object Details page. DataPump does not yet support the new URL syntax.
![Object URL Path](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-09-url-path.png)

The bucket URI should match the following syntax:

```
<copy>https://objectstorage.&lt;region&gt;.oraclecloud.com/n/&lt;namespace&gt;/b/&lt;bucket-name&gt;/o/</copy>
```

10. In the Oracle Cloud Console global header, click **Profile** (user icon), and then select your username.

![Profile menu](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-10-profile.png " ")

11. On the User Details page, under **Resources**, click **Auth Tokens**, and then click **Generate Token**.

![Resources on User Details page](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-11-auth-token.png " ")

12. In the Generate Token dialog, enter a description, and then click **Generate Token**.

![Generate Token dialog](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-12-generate-token.png " ")

13. Click **Copy**, and then click **Close**.

> **Note:** Paste the token to a text editor for use in the next step.
![Copy highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-13-copy-token.png " ")

14. In the source database SQL window, enter the following script, replace the placeholders with your user name (UPPERCASE) and token value, and then click **Run Statement**:

```
<copy>BEGIN
DBMS_CLOUD.CREATE_CREDENTIAL(
credential_name => 'ADB_OBJECTSTORE',
username => '<user-name>',
password => '<token>'
);
END;</copy>
```

> **Note:** If you're using a federated user, then the username should be in the following format: `oracleidentitycloudservice/<user-name>`.

![SQL worksheet](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-14-create-credential.png " ")

15. Run the following script to create the Export Data job using Oracle Data Pump ExpDP. Ensure that you replace the Object Store URI (`https://objectstorage.<region>.oraclecloud.com/n/<namespace>/b/<bucket-name>/o/`) with **your URI** from step 9. `SRC_OCIGGLL.dmp` is a file that will be created when this script runs.

```
<copy>DECLARE
ind NUMBER; -- Loop index
h1 NUMBER; -- Data Pump job handle
percent_done NUMBER; -- Percentage of job complete
job_state VARCHAR2(30); -- To keep track of job state
le ku$_LogEntry; -- For WIP and error messages
js ku$_JobStatus; -- The job status from get_status
jd ku$_JobDesc; -- The job description from get_status
sts ku$_Status; -- The status object returned by get_status
BEGIN
-- Create a (user-named) Data Pump job to do a schema export.
h1 := DBMS_DATAPUMP.OPEN('EXPORT','SCHEMA',NULL,'SRC_OCIGGLL_EXPORT','LATEST');
-- Specify a single dump file for the job (using the handle just returned)
-- and a directory object, which must already be defined and accessible
-- to the user running this procedure.
DBMS_DATAPUMP.ADD_FILE(h1,'https://objectstorage.&lt;region&gt;.oraclecloud.com/n/&lt;namespace&gt;/b/&lt;bucket-name&gt;/o/SRC_OCIGGLL.dmp','ADB_OBJECTSTORE','100MB',DBMS_DATAPUMP.KU$_FILE_TYPE_URIDUMP_FILE,1);
-- A metadata filter is used to specify the schema that will be exported.
DBMS_DATAPUMP.METADATA_FILTER(h1,'SCHEMA_EXPR','IN (''SRC_OCIGGLL'')');
-- Start the job. An exception will be generated if something is not set up properly.
DBMS_DATAPUMP.START_JOB(h1);
-- The export job should now be running. In the following loop, the job
-- is monitored until it completes. In the meantime, progress information is displayed.
percent_done := 0;
job_state := 'UNDEFINED';
while (job_state != 'COMPLETED') and (job_state != 'STOPPED') loop
dbms_datapump.get_status(h1,dbms_datapump.ku$_status_job_error + dbms_datapump.ku$_status_job_status + dbms_datapump.ku$_status_wip,-1,job_state,sts);
js := sts.job_status;
-- If the percentage done changed, display the new value.
if js.percent_done != percent_done
then
dbms_output.put_line('*** Job percent done = ' || to_char(js.percent_done));
percent_done := js.percent_done;
end if;
-- If any work-in-progress (WIP) or error messages were received for the job, display them.
if (bitand(sts.mask,dbms_datapump.ku$_status_wip) != 0)
then
le := sts.wip;
else
if (bitand(sts.mask,dbms_datapump.ku$_status_job_error) != 0)
then
le := sts.error;
else
le := null;
end if;
end if;
if le is not null
then
ind := le.FIRST;
while ind is not null loop
dbms_output.put_line(le(ind).LogText);
ind := le.NEXT(ind);
end loop;
end if;
end loop;
-- Indicate that the job finished and detach from it.
dbms_output.put_line('Job has completed');
dbms_output.put_line('Final job state = ' || job_state);
dbms_datapump.detach(h1);
END;</copy>
```

![SQL worksheet Run Script highlighted](https://oracle-livelabs.github.io/goldengate/ggs-common/extract/images/06-15-sql-return.png " ")

> **Note:** The Script Output displays what looks like an error, but it reports "Job has completed successfully." You can also review the **DBMS Output** tab to see the same message displayed.
You may now **proceed to the next lab.**

## Learn more

* [Add an Extract for Oracle Database](https://docs.oracle.com/en/cloud/paas/goldengate-service/eeske/index.html)

## Acknowledgements
* **Author** - Jenny Chan, Consulting User Assistance Developer, Database User Assistance
* **Contributors** - Denis Gray, Database Product Management; Katherine Wardhana, User Assistance Developer
* **Last Updated By/Date** - Jenny Chan, June 2024
2 changes: 1 addition & 1 deletion oci-dt/extract/extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In this lab, you learn to:

## Task 1: Launch the OCI GoldenGate deployment console

[](include:01-launch-console.md)
[](include:01-launch-console-23ai.md)

## Task 2: Add Transaction Data and a Checkpoint Table

Expand Down
Loading

0 comments on commit a997aa0

Please sign in to comment.