

# Step-by-step Amazon RDS for Oracle to Amazon Redshift migration walkthrough


In the following sections, you can find step-by-step instructions for migrating an Amazon RDS for Oracle database to Amazon Redshift. These steps assume that you have already prepared your source database as described in preceding sections.

**Topics**
+ [

# Step 1: Launch the RDS Instances in a VPC by Using the AWS CloudFormation Template
](chap-rdsoracle2redshift.steps.launchrdswcloudformation.md)
+ [

# Step 2: Install the SQL Tools and AWS Schema Conversion Tool on Your Local Computer
](chap-rdsoracle2redshift.steps.installsct.md)
+ [

# Step 3: Test Connectivity to the Oracle DB Instance and Create the Sample Schema
](chap-rdsoracle2redshift.steps.connectoracle.md)
+ [

# Step 4: Test the Connectivity to the Amazon Redshift Database
](chap-rdsoracle2redshift.steps.connectredshift.md)
+ [

# Step 5: Use AWS SCT to Convert the Oracle Schema to Amazon Redshift
](chap-rdsoracle2redshift.steps.convertschema.md)
+ [

# Step 6: Validate the Schema Conversion
](chap-rdsoracle2redshift.steps.validateschemaconversion.md)
+ [

# Step 7: Create an AWS DMS Replication Instance
](chap-rdsoracle2redshift.steps.createreplicationinstance.md)
+ [

# Step 8: Create AWS DMS Source and Target Endpoints
](chap-rdsoracle2redshift.steps.createsourcetargetendpoints.md)
+ [

# Step 9: Create and Run Your AWS DMS Migration Task
](chap-rdsoracle2redshift.steps.createmigrationtask.md)
+ [

# Step 10: Verify That Your Data Migration Completed Successfully
](chap-rdsoracle2redshift.steps.verifydatamigration.md)
+ [

# Step 11: Delete Walkthrough Resources
](chap-rdsoracle2redshift.steps.deleteresources.md)

# Step 1: Launch the RDS Instances in a VPC by Using the AWS CloudFormation Template


Before you begin, you’ll need to download an AWS CloudFormation template. Follow these instructions:

1. Download the following archive to your computer: `http://docs.aws.amazon.com/dms/latest/sbs/samples/dms-sbs-RDSOracle2Redshift.zip` 

1. Extract the AWS CloudFormation template (`Oracle_Redshift_For_DMSDemo.template`) from the archive.

1. Copy and paste the `Oracle_Redshift_For_DMSDemo.template` file into your current directory.

Now you need to provision the necessary AWS resources for this walkthrough.

1. Sign in to the AWS Management Console and open the AWS CloudFormation console at [https://console.aws.amazon.com/cloudformation](https://console.aws.amazon.com/cloudformation/).

1. Choose **Create stack**.

1. On the **Select Template **page, choose **Upload a template to Amazon S3**.

1. Click **Choose File**, and then choose the `Oracle_Redshift_For_DMSDemo.template` file that you extracted from the `dms-sbs-RDSOracle2Redshift.zip` archive.

1. Choose **Next**. On the **Specify Details** page, provide parameter values as shown following.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.launchrdswcloudformation.html)  
![\[Specify Details page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift3.png)

1. Choose **Next**. On the **Options** page, choose **Next**.

1. On the **Review** page, review the details, and if they are correct choose **Create**.  
![\[replication instance\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift5.png)

1.  AWS can take about 20 minutes or more to create the stack with an Amazon RDS for Oracle instance and an Amazon Redshift cluster.  
![\[Create Stack page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift6.png)

1. After the stack is created, select the **OracletoRedshiftDWusingDMS** stack, and then choose the **Outputs** view. Record the JDBC connection strings, **OracleJDBCConnectionString** and **RedshiftJDBCConnectionString**, for use later in this walkthrough to connect to the Oracle and Amazon Redshift databases.

# Step 2: Install the SQL Tools and AWS Schema Conversion Tool on Your Local Computer


Next, you need to install a SQL client and AWS SCT on your local computer.

This walkthrough assumes you will use the SQL Workbench/J client to connect to the RDS instances for migration validation.

1. Download SQL Workbench/J from [the SQL Workbench/J website](http://www.sql-workbench.net/downloads.html), and then install it on your local computer. This SQL client is free, open-source, and DBMS-independent.

1. Download the JDBC driver for your Oracle database release. For more information, go to https://www.oracle.com/jdbc.

1. Download the Amazon Redshift driver file, `RedshiftJDBC41-1.1.17.1017.jar`, as described following.

   1. Find the Amazon S3 URL to the file in [Previous JDBC Driver Versions](https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc-previous-versions.html) of the *Amazon Redshift Cluster Management Guide*.

   1. Download the driver as described in [Download the Amazon Redshift JDBC Driver](https://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html#download-jdbc-driver) of the same guide.

1. Using SQL Workbench/J, configure JDBC drivers for Oracle and Amazon Redshift to set up connectivity, as described following.

   1. In SQL Workbench/J, choose **File**, then choose **Manage Drivers**.

   1. From the list of drivers, choose **Oracle**.

   1. Choose the **Open** icon, then choose the `ojdbc.jar` file that you downloaded in the previous step. Choose **OK**.  
![\[driver management\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift7.png)

   1. From the list of drivers, choose **Redshift**.

   1. Choose the **Open** icon, then choose the Amazon Redshift JDBC driver that you downloaded in the previous step. Choose **OK**.  
![\[driver management\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift8.png)

Next, install AWS SCT and the required JDBC drivers.

1. Download AWS SCT from [Installing, verifying, and updating the Schema Conversion Tool](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Installing.html).

1. Follow the instructions to install AWS SCT.

1. Launch AWS SCT.

1. In AWS SCT, choose **Global settings** from **Settings**.

1. Choose **Settings**, **Global settings**, then choose **Drivers**, and then choose **Browse** for **Oracle driver path**. Locate the Oracle JDBC driver and choose **OK**.

1. Choose **Browse** for **Amazon Redshift driver path**. Locate the Amazon Redshift JDBC driver and choose **OK**. Choose **OK** to close the dialog box.  
![\[Connecting to the Oracle DB instance\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sct-drivers.png)

# Step 3: Test Connectivity to the Oracle DB Instance and Create the Sample Schema


After the AWS CloudFormation stack has been created, test the connection to the Oracle DB instance by using SQL Workbench/J and then create the HR sample schema.

1. In SQL Workbench/J, choose **File**, then choose **Connect window**. Create a new connection profile using the following information.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.connectoracle.html)

1. Test the connection by choosing **Test**. Choose **OK** to close the dialog box, then choose **OK** to create the connection profile.  
![\[Connecting to the Oracle DB instance\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift9.png)
**Note**  
If your connection is unsuccessful, ensure that the IP address you assigned when creating the AWS CloudFormation template is the one you are attempting to connect from. This issue is the most common one when trying to connect to an instance.

1. Create the **SH** schema you will use for migration using a custom `Oraclesalesstarschema.sql` SQL script. To obtain this script, do the following:
   + Download the following archive to your computer: `http://docs.aws.amazon.com/dms/latest/sbs/samples/dms-sbs-RDSOracle2Redshift.zip` 
   + Extract the `Oraclesalesstarschema.sql` SQL script from the archive.
   + Copy and paste the `Oraclesalesstarschema.sql` file into your current directory.

     1. Open the SQL script in a text editor. Copy the entire script.

     1. In SQL Workbench/J, paste the SQL script in the Default.wksp window showing **Statement 1**.

     1. Choose **SQL**, then choose **Execute All**.  
![\[SQL script to install the demo schema\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift9.5.png)

1. Verify the object types and count in **SH** Schema were created successfully by running the following SQL query.

   ```
   Select OBJECT_TYPE, COUNT(*) from dba_OBJECTS where owner='SH'
   GROUP BY OBJECT_TYPE;
   ```

   The results of this query should be similar to the following.

   ```
   OBJECT_TYPE     | COUNT(*)
   ----------------+---------
   INDEX PARTITION |       40
   TABLE PARTITION |        8
   TABLE           |        5
   INDEX           |       15
   ```

1. Verify the total number of tables and number of rows for each table by running the following SQL query.

   ```
   Select table_name, num_rows from dba_tables where owner='SH'  order by 1;
   ```

   The results of this query should be similar to the following.

   ```
   TABLE_NAME | NUM_ROWS
   -----------+---------
   CHANNELS   |        5
   CUSTOMERS  |        8
   PRODUCTS   |       66
   PROMOTIONS |      503
   SALES      |      553
   ```

1. Verify the integrity in tables. Check the number of sales made in different channels by running the following SQL query.

   ```
   Select b.channel_desc,count(*) from SH.SALES a,SH.CHANNELS b where a.channel_id=b.channel_id
   group by b.channel_desc
   order by 1;
   ```

   The results of this query should be similar to the following.

   ```
   CHANNEL_DESC | COUNT(*)
   -------------+---------
   Direct Sales |      710
   Internet     |       52
   Partners     |      344
   ```

**Note**  
The preceding examples are representative of validation queries. When you perform actual migrations, you should develop similar queries to validate the schema and the data integrity.

# Step 4: Test the Connectivity to the Amazon Redshift Database


Next, test your connection to your Amazon Redshift database.

1. In SQL Workbench/J, choose **File**, then choose **Connect window**. Choose the **Create a new connection profile** icon. Connect to the Amazon Redshift database in SQL Workbench/J by using the information shown following.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.connectredshift.html)

1. Test the connection by choosing **Test**. Choose **OK** to close the dialog box, then choose **OK** to create the connection profile.  
![\[Connecting to the Amazon Redshift DB instance\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift10.png)
**Note**  
If your connection is unsuccessful, ensure that the IP address you assigned when creating the AWS CloudFormation template is the one you are attempting to connect from. This issue is the most common one when trying to connect to an instance.

1. Verify your connectivity to the Amazon Redshift DB instance by running a sample SQL command, such as `select current_date;`.

# Step 5: Use AWS SCT to Convert the Oracle Schema to Amazon Redshift


Before you migrate data to Amazon Redshift, you convert the Oracle schema to an Amazon Redshift schema. [This video covers all the steps of this process](https://youtu.be/ZK7J74VJT04).

To convert an Oracle schema to an Amazon Redshift schema using AWS Schema Conversion Tool (AWS SCT), do the following:

1. Launch AWS SCT. In AWS SCT, choose **File**, then choose **New Project**. Create a new project named `DWSchemaMigrationDemoProject`, specify the **Location** of the project folder, and then choose **OK**.

1. Choose **Add source** to add a source Oracle database to your project, then choose **Oracle**, and choose **Next**.

1. Enter the following information, and then choose **Test Connection**.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.convertschema.html)  
![\[Connecting to an Amazon RDS for Oracle DB instance\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift11.png)

1. Choose **OK** to close the alert box, then choose **Connect** to close the dialog box and to connect to the Oracle DB instance.

1. Choose **Add target** to add a target Amazon Redshift database to your project, then choose **Amazon Redshift**, and choose **Next**.

1. Enter the following information and then choose **Test Connection**.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.convertschema.html)

1. Choose **OK** to close the alert box, then choose **Connect** to connect to the Amazon Redshift DB instance.

1. In the tree in the left panel, select only the **SH** schema. In the tree in the right panel, select your target Amazon Redshift database. Choose **Create mapping**.  
![\[Creating a mapping rule\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift12.png)

1. Choose **Main view**.

1. In the tree in the left panel, right-click the **SH** schema and choose **Collect Statistics**. AWS SCT analyzes the source data to recommend the best keys for the target Amazon Redshift database. For more information, see [Collecting or Uploading Statistics](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Converting.DW.html#CHAP_Converting.DW.Statistics).
**Note**  
If the **SH** schema does not appear in the list, choose **Actions**, then choose **Refresh from Database**.

1. In the tree in the left panel, right-click the **SH** schema and choose **Create report**. AWS SCT analyzes the **SH** schema and creates a database migration assessment report for the conversion to Amazon Redshift.

1. Check the report and the action items it suggests. The report discusses the type of objects that can be converted by using AWS SCT, along with potential migration issues and actions to resolve these issues. For this walkthrough, you should see something like the following:  
![\[Database migration report\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift13.png)

1. Review the report summary. To save the report, choose either **Save to CSV** or **Save to PDF**.

1. Choose the **Action Items** tab. The report discusses the type of objects that can be converted by using AWS SCT, along with potential migration issues and actions to resolve these issues.

1. In the tree in the left panel, right-click the **SH** schema and choose **Convert schema**.

1. Choose **Yes** for the confirmation message. AWS SCT then converts your schema to the target database format.
**Note**  
The choice of the Amazon Redshift sort keys and distribution keys is critical for optimal performance. You can use key management in AWS SCT to customize the choice of keys. For this walkthrough, we use the defaults recommended by AWS SCT. For more information, see [Optimizing Amazon Redshift](https://docs.aws.amazon.com/SchemaConversionTool/latest/userguide/CHAP_Converting.DW.RedshiftOpt.html).

1. In the tree in the right panel, choose the converted **sh** schema, and then choose **Apply to database** to apply the schema scripts to the target Amazon Redshift instance.

1. In the tree in the right panel, choose the **sh** schema, and then choose **Refresh from Database** to refresh from the target database.

The database schema has now been converted and imported from source to target.

# Step 6: Validate the Schema Conversion


To validate the schema conversion, you compare the objects found in the Oracle and Amazon Redshift databases using SQL Workbench/J.

1. In SQL Workbench/J, choose **File**, then choose **Connect window**. Choose the **RedshiftConnection** you created in an earlier step. Choose **OK**.

1. Run the following script to verify the number of object types and count in **SH** schema in the target Amazon Redshift database. These values should match the number of objects in the source Oracle database.

   ```
   SELECT 'TABLE' AS OBJECT_TYPE,
          TABLE_NAME AS OBJECT_NAME,
          TABLE_SCHEMA AS OBJECT_SCHEMA
   FROM information_schema.TABLES
   WHERE TABLE_TYPE = 'BASE TABLE'
   AND   OBJECT_SCHEMA = 'sh';
   ```

   The output from this query should be similar to the following.

   ```
   object_type | object_name | object_schema
   ------------+-------------+--------------
   TABLE       | channels    | sh
   TABLE       | customers   | sh
   TABLE       | products    | sh
   TABLE       | promotions  | sh
   TABLE       | sales       | sh
   ```

1. Verify the sort and distributions keys that are created in the Amazon Redshift cluster by using the following query.

   ```
   set search_path to '$user', 'public', 'sh';
   
   SELECT tablename,
          "column",
          TYPE,
          encoding,
          distkey,
          sortkey,
          "notnull"
   FROM pg_table_def
   WHERE (distkey = TRUE OR sortkey <> 0);
   ```

   The results of the query reflect the distribution key (`distkey`) and sort key (`sortkey`) choices made by using AWS SCT key management.

   ```
   tablename  | column              | type                        | encoding | distkey | sortkey | notnull
   -----------+---------------------+-----------------------------+----------+---------+---------+--------
   channels   | channel_id          | numeric(38,18)              | none     | true    |       1 | true
   customers  | cust_id             | numeric(38,18)              | none     | false   |       4 | true
   customers  | cust_gender         | character(2)                | none     | false   |       1 | true
   customers  | cust_year_of_birth  | smallint                    | none     | false   |       3 | true
   customers  | cust_marital_status | character varying(40)       | none     | false   |       2 | false
   products   | prod_id             | integer                     | none     | true    |       4 | true
   products   | prod_subcategory    | character varying(100)      | none     | false   |       3 | true
   products   | prod_category       | character varying(100)      | none     | false   |       2 | true
   products   | prod_status         | character varying(40)       | none     | false   |       1 | true
   promotions | promo_id            | integer                     | none     | true    |       1 | true
   sales      | prod_id             | numeric(38,18)              | none     | false   |       4 | true
   sales      | cust_id             | numeric(38,18)              | none     | false   |       3 | true
   sales      | time_id             | timestamp without time zone | none     | true    |       1 | true
   sales      | channel_id          | numeric(38,18)              | none     | false   |       2 | true
   sales      | promo_id            | numeric(38,18)              | none     | false   |       5 | true
   ```

# Step 7: Create an AWS DMS Replication Instance


After we validate the schema structure between source and target databases, as described preceding, we proceed to the core part of this walkthrough, which is the data migration. The following illustration shows a high-level view of the migration process.

![\[migration process\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift-Step7-DMSOverview.png)


A DMS replication instance performs the actual data migration between source and target. The replication instance also caches the transaction logs during the migration. How much CPU and memory capacity a replication instance has influences the overall time required for the migration.

To create an AWS DMS replication instance, do the following:

1. Sign in to the AWS Management Console, open the AWS DMS console at https://console.aws.amazon.com/dms/v2/, and choose **Create Migration**. If you are signed in as an AWS Identity and Access Management (IAM) user, you must have the appropriate permissions to access AWS DMS. For more information about the permissions required, see [IAM Permissions](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Security.html#CHAP_Security.IAMPermissions).

1. Choose **Create migration** to start a database migration.

1. On the **Welcome** page, choose **Next**.

1. On the **Create replication instance** page, specify your replication instance information as shown following.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createreplicationinstance.html)

1. For the **Advanced** section, leave the default settings as they are, and choose **Next**.

# Step 8: Create AWS DMS Source and Target Endpoints


While your replication instance is being created, you can specify the source and target database endpoints using the [AWS Management Console](https://console.aws.amazon.com/). However, you can only test connectivity after the replication instance has been created, because the replication instance is used in the connection.

1. Specify your connection information for the source Oracle database and the target Amazon Redshift database. The following table describes the source settings.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createsourcetargetendpoints.html)

   The following table describes the target settings.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createsourcetargetendpoints.html)

   The completed page should look like the following.  
![\[Advanced section\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift19.5.png)

1. Wait for the status to say **Replication instance created successfully.**.

1. To test the source and target connections, choose **Run Test** for the source and target connections.

1. Choose **Next**.

# Step 9: Create and Run Your AWS DMS Migration Task


Using an AWS DMS task, you can specify what schema to migrate and the type of migration. You can migrate existing data, migrate existing data and replicate ongoing changes, or replicate data changes only. This walkthrough migrates existing data only.

1. On the **Create Task** page, specify the task options. The following table describes the settings.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createmigrationtask.html)

   The page should look like the following.  
![\[Create task page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift23.png)

1. On the **Task Settings** section, specify the settings as shown in the following table.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createmigrationtask.html)

   The section should look like the following.  
![\[Create task page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift23.5.png)

1. In the **Selection rules** section, specify the settings as shown in the following table.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/dms/latest/sbs/chap-rdsoracle2redshift.steps.createmigrationtask.html)

   The section should look like the following:  
![\[Add selection rule page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift24.png)

1. Choose **Add selection rule**.

1. Choose **Create task**. The task begins immediately. The **Tasks** section shows you the status of the migration task.

![\[Tasks page\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift25.5.png)


# Step 10: Verify That Your Data Migration Completed Successfully


When the migration task completes, you can compare your task results with the expected results.

1. On the navigation pane, choose **Tasks**.

1. Choose your migration task (`migrateSHschema`).

1. Choose the **Table statistics** tab, shown following.  
![\[Table statistics tab\]](http://docs.aws.amazon.com/dms/latest/sbs/images/sbs-rdsor2redshift26.png)

1. Connect to the Amazon Redshift instance by using SQL Workbench/J, and then check whether the database tables were successfully migrated from Oracle to Amazon Redshift by running the SQL script shown following.

   ```
   select "table", tbl_rows
   from svv_table_info
   where
   SCHEMA = 'sh'
   order by 1;
   ```

   Your results should look similar to the following.

   ```
   table      | tbl_rows
   -----------+---------
   channels   |        5
   customers  |        8
   products   |       66
   promotions |      503
   sales      |     1106
   ```

1. To verify whether the output for tables and number of rows from the preceding query matches what is expected for RDS Oracle, compare your results with those in previous steps.

1. Run the following query to check the relationship in tables; this query checks the departments with employees greater than 10.

   ```
   Select b.channel_desc,count(*) from SH.SALES a,SH.CHANNELS b where a.channel_id=b.channel_id
   group by b.channel_desc
   order by 1;
   ```

   The output from this query should be similar to the following.

   ```
   channel_desc | count
   -------------+------
   Direct Sales |   355
   Internet     |    26
   Partners     |   172
   ```

1. Verify column compression encoding.

   DMS uses an Amazon Redshift COPY operation to load data. By default, the COPY command applies automatic compression whenever loading to an empty target table. The sample data for this walkthrough is not large enough for automatic compression to be applied. When you migrate larger data sets, COPY will apply automatic compression.

   For more details about automatic compression on Amazon Redshift tables, see [Loading Tables with Automatic Compression](https://docs.aws.amazon.com/redshift/latest/dg/c_Loading_tables_auto_compress.html).

   To view compression encodings, run the following query.

   ```
   SELECT *
   FROM pg_table_def
   WHERE schemaname = 'sh';
   ```

Now you have successfully completed a database migration from an Amazon RDS for Oracle DB instance to Amazon Redshift.

# Step 11: Delete Walkthrough Resources


After you have completed this walkthrough, perform the following steps to avoid being charged further for AWS resources used in the walkthrough. It’s necessary that you do the steps in order, because some resources cannot be deleted if they have a dependency upon another resource.

To delete AWS DMS resources, do the following:

1. On the navigation pane, choose **Tasks**, choose your migration task (`migratehrschema`), and then choose **Delete**.

1. On the navigation pane, choose **Endpoints**, choose the Oracle source endpoint (`orasource`), and then choose **Delete**.

1. Choose the Amazon Redshift target endpoint (`redshifttarget`), and then choose **Delete**.

1. On the navigation pane, choose **Replication instances**, choose the replication instance (`DMSdemo-repserver`), and then choose **Delete**.

Next, you must delete your AWS CloudFormation stack, `DMSdemo`. Do the following:

1. Sign in to the AWS Management Console and open the AWS CloudFormation console at [https://console.aws.amazon.com/cloudformation](https://console.aws.amazon.com/cloudformation/).

   If you are signed in as an IAM user, you must have the appropriate permissions to access AWS CloudFormation.

1. Choose your AWS CloudFormation stack, `OracletoRedshiftDWusingDMS`.

1. For **Actions**, choose **Delete stack**.

The status of the stack changes to DELETE\$1IN\$1PROGRESS while AWS CloudFormation cleans up the resources associated with the `OracletoRedshiftDWusingDMS` stack. When AWS CloudFormation is finished cleaning up resources, it removes the stack from the list.