Skip to content

Commit 9bca896

Browse files
authored
WMS# 11934 - PR for Migration from NDCS to OCI OS (#866)
* NDCS to OCI OS Migration * Addressed PM comments * WMS#11934 Fixed Lint check issues
1 parent f7b0096 commit 9bca896

29 files changed

+669
-0
lines changed
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# Create a Migrator Configuration File
2+
3+
## Introduction
4+
5+
A configuration file defines all the parameters required for the migration activity. You pass this configuration file as a single parameter to the **runMigrator** command from the Cloud Shell.
6+
7+
This lab walks you through the steps to identify important source and sink parameters. You will create an Oracle NoSQL Migrator configuration file in the Cloud Shell to migrate data from an Oracle NoSQL Database Cloud Service table to an OCI Object Storage bucket.
8+
9+
Estimated Lab Time: 10 minutes
10+
11+
### Objectives
12+
13+
In this lab you will:
14+
* Identify the source and sink for migrating data.
15+
* Create a migrator configuration file.
16+
17+
### Prerequisites
18+
19+
* An Oracle Free Tier, Always Free, Paid or LiveLabs Cloud Account.
20+
* Oracle NoSQL Database Cloud Service table in the subscribed region as the source for data migration.
21+
* OCI Object Storage bucket in the subscribed region as the sink to store the migrated data.
22+
* Privileges to write objects in the Object Storage Bucket. For more details on setting the policies, see **[Let users write objects to Object Storage buckets](https://docs.oracle.com/en-us/iaas/Content/Identity/policiescommon/commonpolicies.htm#write-objects-to-buckets)**.
23+
24+
## Task 1: Identify the Source Parameters
25+
26+
To configure the Migrator utility to copy data from an Oracle NoSQL Database Cloud Service table, you need the following source parameters: **table, compartment, endpoint**.
27+
28+
1. From your Oracle Cloud console's navigation menu, select **Databases** and then select **Tables** under **Oracle NoSQL Database**. See **Get Started** lab for detailed steps to access the Oracle Cloud Console.
29+
30+
2. Select your compartment from the drop-down menu to view the tables.
31+
32+
3. Identify the Oracle NoSQL Database Cloud Service table whose data you want to migrate and note down the table name.
33+
34+
Here, you will use the **NDCSupload** table from the **Training_NoSQL** compartment in the **Ashburn** region with following sample data:
35+
36+
```
37+
<copy>
38+
{"id":1,"name":"Tracy","email":"Tracy@mymail.com","age":20,"income":1000}
39+
{"id":2,"name":"Benita","email":"Benita@mymail.com","age":22,"income":22000}
40+
{"id":3,"name":"John","email":"John@mymail.com","age":24,"income":24000}
41+
{"id":4,"name":"Adam","email":"Adam@mymail.com","age":26,"income":26000}
42+
...
43+
</copy>
44+
```
45+
46+
4. Select the **NDCSupload** table. From the *Table details* page, hover over the Compartment OCID field and select the copy option. This copies the compartment OCID of your source table to the clipboard. Save the compartment OCID value.
47+
48+
Note down the endpoint for your source table. You can locate your subscribed region at the upper right corner of the console. For the details on the end points for your subscribed region, see **[Data Regions and Associated Service URLs](https://docs.oracle.com/en/cloud/paas/nosql-cloud/fnsxl/index.html#FNSXL-GUID-D89BB422-A394-404E-8759-1A620C7D8125)**.
49+
50+
![NoSQL table details](images/console-tabledetails.png)
51+
52+
At the end of this step, you will have values for the following parameters:
53+
54+
```
55+
<copy>
56+
endpoint: "<endpoint for your subscribed region>"
57+
compartment: "<Compartment OCID>"
58+
table: "NDCSupload"
59+
</copy>
60+
```
61+
62+
For example,
63+
64+
```
65+
<copy>
66+
endpoint: "us-ashburn-1"
67+
compartment: "ocid1.compartment.oc1..aaaaaaaahcrgrgptoaq4cgpoymd32ti2ql4sdpu5puroausdf4og55z4tnya"
68+
table: "NDCSupload"
69+
</copy>
70+
```
71+
72+
The **endpoint** and **compartment** parameter values differ based on your tenancy.
73+
74+
## Task 2: Identify the Sink Parameters
75+
76+
To configure the Migrator utility to copy data into the Object Storage bucket, you need the following sink parameters: **endpoint, prefix, bucket, namespace**.
77+
78+
1. From the Oracle Cloud console navigation menu, select **Storage** and then select **Buckets**.
79+
80+
2. Select your compartment and then select the bucket.
81+
82+
Here, you will use the **Migrate\_oci** bucket from the **Training_NoSQL** compartment in the **Ashburn** region.
83+
84+
From the bucket details page, copy the **Namespace** name to use in sink configuration parameters.
85+
86+
![Bucket details](images/objectstorage_latest.png)
87+
88+
3. Identify the endpoint of the OCI Object Storage bucket. You can locate your subscribed region at the upper right corner of the console. For the details on the OCI Object Storage service endpoints for your subscribed region, see **[Object Storage Endpoints](https://docs.oracle.com/en-us/iaas/api/#/en/objectstorage/20160918/)**.
89+
4. Decide a prefix, which serves as the directory to store the migrated data within the OCI Object Storage bucket. Oracle NoSQL Migrator copies data to the supplied directory in the OCI Object Storage bucket.
90+
91+
Here, you will use **Delegation** as the prefix.
92+
93+
At the end of this step, you will have values for the following parameters:
94+
95+
```
96+
<copy>
97+
endpoint: "<endpoint for your subscribed region>"
98+
bucket: "Migrate_oci"
99+
prefix: "Delegation"
100+
namespace: "<namespace name>"
101+
</copy>
102+
```
103+
104+
For example,
105+
106+
```
107+
<copy>
108+
endpoint: "us-ashburn-1"
109+
bucket: "Migrate_oci"
110+
prefix: "Delegation"
111+
namespace: "oradbclouducm"
112+
</copy>
113+
```
114+
115+
The **endpoint** and **namespace** parameter values differ based on your tenancy.
116+
117+
## Task 3: Create a Configuration File
118+
119+
1. Launch the Cloud Shell from the **Developer tools** menu on your Oracle Cloud console. The web browser opens your home directory.
120+
2. Navigate to the directory where you extracted the NoSQL Database Migrator utility. See **Lab - Download Migrator Utility and Upload to Cloud Shell**.
121+
122+
```
123+
<copy>cd V1048015-01/nosql-migrator-1.7.0</copy>
124+
```
125+
126+
3. Create the configuration file template in a notepad as follows. Update the source and sink parameters with the values that you noted in Task 1 and Task 2 of this lab.
127+
128+
*Note: The endpoints, compartment, and namespace values will differ based on your tenancy.*
129+
130+
```
131+
<copy>
132+
{
133+
"source" : {
134+
"type" : "nosqldb_cloud",
135+
"endpoint" : "us-ashburn-1",
136+
"table" : "NDCSupload",
137+
"compartment" : "ocid1.compartment.oc1.. aaaaaaaahcrgrgptoaq4cgpoymd32ti2ql4sdpu5puroausdf4og55z4tnya",
138+
"useDelegationToken" : true,
139+
"readUnitsPercent" : 90,
140+
"includeTTL" : true,
141+
"requestTimeoutMs" : 5000
142+
},
143+
"sink" : {
144+
"type" : "object_storage_oci",
145+
"format" : "json",
146+
"endpoint" : "us-ashburn-1",
147+
"namespace" : "oradbclouducm",
148+
"bucket" : "Migrate_oci",
149+
"prefix" : "Delegation",
150+
"chunkSize" : 32,
151+
"compression" : "",
152+
"useDelegationToken" : true
153+
},
154+
"abortOnError" : true,
155+
"migratorVersion" : "1.7.0"
156+
}
157+
</copy>
158+
```
159+
160+
To run the Migrator utility from the Cloud Shell, you must use the delegation token authentication. Therefore, set the **useDelegationToken** parameter to true. For a list of all the supported parameters, see **[Oracle NoSQL Database Cloud Service](https://docs.oracle.com/en/cloud/paas/nosql-cloud/onscl/#GUID-5A70801B-F281-4FA2-91A9-77CCCC3C3098)** source and **[OCI Object Storage bucket](https://docs.oracle.com/en/cloud/paas/nosql-cloud/onscl/#GUID-B79ED267-0F42-40CE-B672-9F7AB65BDA1D)** sink.
161+
162+
*Note: The Oracle NoSQL Migrator utility also provides an option to create the configuration file interactively when you run the utility from the Cloud Shell's CLI.*
163+
164+
4. Use the vi editor to create the **migrator-config.json** configuration file.
165+
166+
Copy the configuration file template from the notepad to the configuration file and save it.
167+
168+
```
169+
<copy>vi migrator-config.json</copy>
170+
```
171+
172+
You may proceed to the next lab.
173+
174+
## Learn More
175+
176+
* **[Using Console to Create Tables in Oracle NoSQL Database Cloud Service](https://docs.oracle.com/en/cloud/paas/nosql-cloud/wqqvo/index.html#articletitle)**
177+
* **[Terminology used with Oracle NoSQL Database Migrator](https://docs.oracle.com/en/cloud/paas/nosql-cloud/cjphq/index.html#GUID-3F02818F-0589-4366-9D1E-8230FADFDFE8)**
178+
* **[Source Configuration Templates](https://docs.oracle.com/en/cloud/paas/nosql-cloud/onscl/index.html#ONSCL-GUID-FF56A474-C6EC-40DA-8AAA-9EBA6B616630)**
179+
* **[Sink Configuration Templates](https://docs.oracle.com/en/cloud/paas/nosql-cloud/onscl/index.html#ONSCL-GUID-832FE48D-2A90-4DCA-95A6-40687CA7F39B)**
180+
181+
## Acknowledgements
182+
* **Author** - Ramya Umesh, Principal UA Developer, DB OnPrem Tech Svcs & User Assistance
183+
* **Last Updated By/Date** - Ramya Umesh, Principal UA Developer, DB OnPrem Tech Svcs & User Assistance, August 2025
149 KB
Loading
128 KB
Loading
133 KB
Loading
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Create Oracle NoSQL table and OCI Object Storage Bucket
2+
3+
## Introduction
4+
5+
Oracle NoSQL Database Cloud Service is a fully managed database cloud service designed for database operations that require predictable, single digit millisecond latency responses to simple queries.
6+
7+
Object Storage service offers a high-performance storage platform to store data of any content type. You can access the OCI Object Storage buckets through the Object Storage endpoints.
8+
9+
This lab walks you through the steps to create an Oracle NoSQL Database Cloud Service table and an OCI Object Storage bucket. The Oracle NoSQL Database Cloud Service table serves as the source for data migration, while OCI Object Storage bucket serves as the target for the migrated data.
10+
11+
Estimated Lab Time: 10 Minutes
12+
13+
### Objectives
14+
15+
In this lab you will:
16+
* Access the Oracle Cloud Console.
17+
* Create an Oracle NoSQL Database Cloud Service table with 50 rows of user data.
18+
* Create an OCI Object Storage bucket.
19+
20+
### Prerequisites
21+
22+
* An Oracle Free Tier, Always Free, Paid or LiveLabs Cloud Account
23+
* Download the **[NDCSupload_rows.json](https://c4u04.objectstorage.us-ashburn-1.oci.customer-oci.com/p/EcTjWk2IuZPZeNnD_fYMcgUhdNDIDA6rt9gaFj_WZMiL7VvxPBNMY60837hu5hga/n/c4u04/b/livelabsfiles/o/labfiles%2FNDCSupload_rows.json)** file to your system.
24+
25+
## Task 1: Create an Oracle NoSQL Database Cloud Service table and upload data
26+
27+
1. Open the Oracle Cloud Console. See **Get Started** lab for detailed steps to access the Oracle Cloud Console.
28+
2. From the navigation menu, select **Databases** and then select **Tables** under **Oracle NoSQL Database**.
29+
30+
![Databases menu](images/console-Nosqlmenu.png)
31+
32+
3. Select your compartment from the drop-down menu and then select **Create table**.
33+
34+
*Note: Oracle NoSQL Database Cloud Service resources are created in a compartment and are scoped to that compartment. It is recommended not to create the Oracle NoSQL Database Cloud Service table in the "root" compartment, but to create them in your own compartment created under "root".*
35+
36+
![Create NoSQL tables](images/console-createtable.png)
37+
38+
4. In the **Create Table** dialog, select **Simple input** for *Table Creation Mode*. Retain the default capacity mode to **Provisioned Capacity**. Enter the capacity values for the table. In the **Name** field, enter a table name that is unique to your tenancy. In this lab, you will create **NDCSupload** table.
39+
40+
![Create table dialog](images/console-createtable-name.png)
41+
42+
5. In the *Primary Key Columns* section, enter primary key details.
43+
44+
![Primary key](images/console-createtable-PK.png)
45+
46+
6. In the *Columns* section, enter non-primary column details and select **Create Table**.
47+
48+
![Columns](images/console-createtable-columns.png)
49+
50+
This creates the **NDCSupload** table.
51+
52+
*Note: You can see the **[Creating Singleton Tables](https://docs.oracle.com/en/cloud/paas/nosql-cloud/wqqvo/#GUID-1E86F6AE-6F02-478D-BB71-6088330FE838)** topic to understand the various other options available while creating an Oracle NoSQL Database Cloud Service table.*
53+
54+
7. To add data to the table, select the **NDCSupload** table. On the *Table details* page, select **Upload data** to bulk upload data from a local file into the table.
55+
56+
![Upload dialog](images/console-table-upload.png)
57+
58+
8. Select the **NDCSupload_rows.json** that you downloaded as a pre-requisite. The upload begins immediately and the progress is displayed on the page.
59+
60+
After uploading successfully, the console displays the total number of rows that were inserted. You can close the window.
61+
62+
![Upload rows](images/console-table-uploadrows.png)
63+
64+
9. To verify, you can scroll down to **Explore data**. The SQL query to fetch all the table rows is displayed by default.
65+
66+
Select **Execute** to view the table rows.
67+
68+
69+
## Task 2: Create an OCI Object Storage bucket
70+
71+
1. Open the Oracle Cloud Console. See **Get Started** lab for detailed steps to access the Oracle Cloud Console.
72+
2. From the navigation menu, select **Storage** and then select **Object Storage & Archive Storage**.
73+
74+
![Storage menu](images/select-object-storage.png)
75+
76+
3. Select your compartment to create the bucket and then select **Create bucket**.
77+
78+
*Note: It is recommended not to create the Object Storage bucket in the "root" compartment, but to create them in your own compartment created under "root".*
79+
80+
![Object Storage & Archive Storage page](images/object-storage-create.png)
81+
82+
4. Supply a descriptive name for the bucket. Here, we will use **Migrate_oci**.
83+
5. Under the Default storage tier, select **Standard**.
84+
85+
![Create Bucket page](images/object-storage-create-bucket-name.png)
86+
87+
6. Scroll down and select your desired encryption. Here, we will use the default value **Encrypt using Oracle managed keys**.
88+
7. Select **Create bucket**.
89+
90+
![Create Bucket](images/object-storage-create-bucket-encryption.png)
91+
92+
This creates **Migrate_oci** bucket in your subscribed region.
93+
94+
You may proceed to the next lab.
95+
96+
## Learn More
97+
98+
* [Using Console to Create Tables in Oracle NoSQL Database Cloud Service](https://docs.oracle.com/en/cloud/paas/nosql-cloud/wqqvo/#GUID-1E86F6AE-6F02-478D-BB71-6088330FE838)
99+
* [OCI Object Storage bucket](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/managingbuckets.htm)
100+
101+
102+
## Acknowledgements
103+
* **Author** - Ramya Umesh, Principal UA Developer, DB OnPrem Tech Svcs & User Assistance
104+
* **Last Updated By/Date** - Ramya Umesh, Principal UA Developer, DB OnPrem Tech Svcs & User Assistance, August 2025
96.8 KB
Loading
14.8 KB
Loading
45.8 KB
Loading
49.1 KB
Loading
271 KB
Loading

0 commit comments

Comments
 (0)