Connect to Azure SQL Managed Instance using a SQL client, and then complete
the following steps:
Enter the following commands to create a GGADMIN user:
CREATE login GGADMIN with password = 'W3lcome@1234'
Create user GGADMIN for login GGADMIN
ALTER SERVER ROLE sysadmin ADD MEMBER GGADMIN
Note:
The sysadmin role
is only required to add trandata and heartbeat tables. You can then
remove the sysadmin privileges and instead use db_owner:
ALTER ROLE db_owner ADD MEMBER GGADMIN;
Enter the following command to create a database:
Create database SRC_OCIGGLL
Disconnect and reconnect as the newly created user
(GGADMIN) and database
(SRC_OCIGGLL).
To enable Change Data Capture (CDC) at the database level:
In the Oracle Cloud console, select your ATP instance from the
Autonomous Databases page to view its details.
Click Database Actions.
Enable the GGADMIN user:
Under Administration, click Database
Users.
Locate GGADMIN, and then click its ellipsis
menu (three dots) and select Edit.
In the Edit User panel, enter the GGADMIN password,
confirm the password, and then deselect Account is
Locked.
Click Apply Changes.
Load the target sample schema and data:
From the Database Actions menu, under
Development, select SQL.
Copy and paste the script from
OCIGGLL_OCIGGS_SETUP_USERS_ADW.sql into the
SQL worksheet.
Click Run Script. The Script Output tab
displays confirmation messages.
Clear the SQL worksheet and then copy and paste the
SQL from
OCIGGLL_OCIGGS_SRC_MIRROR_USER_SEED_DATA.sql.
To verify that the tables were created
successfully, close the SQL window and reopen it again. In the
Navigator tab, look for the SRC_OCIGGLL schema
and then select tables from their respective dropdowns.
Task 1: Create the OCI GoldenGate
Resources
This quickstart example requires deployments and connections for both
the source and target.
Create deployments for the
source SQL Server and target Oracle database.
Create an Azure Managed Instance connection for Azure SQL database, using
following values:
For Database, enter SRC_OCIGGLL.
For Port, enter 3342 for public
endpoints.
For Host, use the server name from Azure Managed Instance
details page in Azure console (for
example,xyz.database.windows.net).
For User, enter GGADMIN.
For Password, enter the GGADMIN user password.
For Security protocol, select Plain from the
dropdown.
On the Deployments page, select the SQL Server deployment created in Task
1.
On the deployment details page, click Launch Console.
Sign in to the source SQL Server deployment console using the Administrator
credentials specified when you created the deployment in Task 1.
Open the navigation menu, and then select Configuration.
On the Database page, in the Credentials table, under
Action, click Connect to database Azure SQL. Checkpoint,
TRANDATA Information, and Heartbeat options appear.
Next to TRANDATA Information click Add TRANDATA, and complete the
following:
For Schema Name, enter SRC_OCIGGLL.
Click Submit. The deployment console processes your request, but
does not refresh the page.
Tip:
The
screen will not refresh on submit. To confirm the TRANDATA was
added, enter the SRC_OCIGGLL into the search field
and then click Search. SRC_OCIGGLL is
returned and 6 tables are prepared for instantiation.
Next, select Tasks, select Purge Change Data and complete the
following:
Click on the Add Purge Change Data (add icon).
Enter a name.
Click Submit.
Next, click Overview in the left navigation.
On the Overview page, click Add Extract (plus icon).
On the Add Extract page, complete the following:
Select Integrated Load, and then click Next.
For Process Name, enter EINISQL.
For Credential Alias, select a credential from the dropdown
menu.
For Trail Name, enter I1.
Click Next.
On the Parameter File page, in the text area, add a new line to the
existing text and add the following: TABLE
SRC_OCIGGGLL.*
Click Create and Run. You return to the Overview page.
It may takes a few minutes for the extract to be created. The yellow
exclamation point icon changes to a green checkmark.
Select the Extract to view its details and review the Report file. It lists all
the tables and the number of exported records for each one of them.
Click Overview.
On the Overview page, click Add Extract (plus icon).
On the Add Extract page, select Change Data Capture, and then click
Next.
On the Extract Options page, complete the following:
For Process Name, enter ECDCSQL.
For Credential Alias, select a credential from the dropdown
menu.
For Trail Name, enter M1.
Click Next.
On the Parameter File page, in the text area, add a new line to the existing
text and add the following: TABLE SRC_OCIGGGLL.*
Click Create and Run. You return to the Overview page.
It may takes a few minutes for the extract to be created. The
yellow exclamation point icon changes to a green checkmark.
Launch and log in to the Oracle deployment console created in task 1.
Open the navigation menu and then click Configuration.
On the Database page, in the Credentials table, under
Action, click Connect to Autonomous Transaction Processing.
Checkpoint, TRANDATA Information, and Heartbeat options appear.
Next to TRANDATA Information click Add TRANDATA, and complete the
following:
For Schema Name, enter
SRCMIRROR_OCIGGLL.CHECKTABLE.
Click Submit. The deployment console processes your request, but
does not refresh the page.
Note:
To verify, click Search TRANDATA, and then enter
SRCMIRROR_OCIGGLL.CHECKTABLE into the Search
field and click Search.
SRCMIRROR_OCIGGLL.CHECKTABLE is returned
and 6 tables are prepared for instantiation.