aws schema conversion tool · pdf fileaws schema conversion tool user guide table of contents...

410
AWS Schema Conversion Tool User Guide Version 1.0

Upload: dinhkhanh

Post on 01-Feb-2018

315 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion ToolUser Guide

Version 1.0

Page 2: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

AWS Schema Conversion Tool: User GuideCopyright © 2018 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored byAmazon.

Page 3: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Table of ContentsWhat Is the AWS Schema Conversion Tool? ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Schema Conversion Overview .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Feedback .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Installing, Verifying, and Updating .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Installing the AWS Schema Conversion Tool ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Installing Previous Versions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Verifying the AWS Schema Conversion Tool File Download .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Verifying the Checksum of the AWS Schema Conversion Tool File ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Verifying the AWS Schema Conversion Tool RPM Files on Fedora .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Verifying the AWS Schema Conversion Tool DEB Files on Ubuntu .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Verifying the AWS Schema Conversion Tool MSI File on Microsoft Windows .... . . . . . . . . . . . . . . . . . . . . . . . . . . 7Verifying the AWS Schema Conversion Tool Application on Mac OS .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Installing the Required Database Drivers ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Installing JDBC Drivers on Linux .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Storing Driver Paths in the Global Settings .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Updating the AWS Schema Conversion Tool ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Using the AWS SCT User Interface .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

The Project Window ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Tree Filters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Importing a File List for the Tree Filter ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Hiding Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Keyboard Shortcuts ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16The Database Migration Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Storing AWS Profiles .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Storing AWS Credentials ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Setting the Default Profile for a Project ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Storing Database Passwords .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Getting Started .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Starting SCT .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Creating a Project ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Connecting to Your Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Connecting to Your Target Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Converting Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Required Database Privileges .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Source: Amazon Redshift ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Source: Greenplum ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Source: Microsoft SQL Server ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Source: Microsoft SQL Server Data Warehouse .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Source: MySQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Source: Netezza .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Source: Oracle .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Source: Oracle Data Warehouse .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Source: PostgreSQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Source: Teradata .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Source: Vertica .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Target: Amazon Aurora (MySQL) .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Target: Amazon Aurora (PostgreSQL) .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Target: Amazon Redshift ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Target: Microsoft SQL Server ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Target: MySQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Target: Oracle .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Target: PostgreSQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Version 1.0iii

Page 4: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Getting Started Converting Database Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Converting Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Applying the Converted Schema to Your Target DB Instance .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Getting Started Converting Data Warehouse Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Choosing Optimization Strategies and Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Collecting or Uploading Statistics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Converting Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Managing and Customizing Keys .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Applying the Converted Schema to Your Target Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Connecting to Your Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Connecting to an Amazon Redshift Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Connecting to a Greenplum Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Connecting to a Microsoft SQL Server Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Connecting to a Microsoft SQL Server Data Warehouse Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Connecting to a MySQL Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Connecting to a Netezza Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Connecting to an Oracle Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Connecting to an Oracle Data Warehouse Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Connecting to a PostgreSQL Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Connecting to a Teradata Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Using LDAP Authentication with a Teradata Source .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Connecting to a Vertica Source Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Converting Database Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Creating Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Creating Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Creating Mapping Rules for Objects ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Exporting Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Converting Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Converting Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Editing Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Clearing a Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Creating and Using the Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Creating a Database Migration Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Summary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Action Items .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Saving the Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Handling Manual Conversions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Modifying Your Source Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Modifying Your Target Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Updating and Refreshing Your Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Saving and Applying Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Saving Your Converted Schema to a File ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Applying Your Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86The Extension Pack Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Comparing Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Related Transformed Objects ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Converting Dynamic SQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Converting Data Warehouse Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Choosing Optimization Strategies and Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Collecting or Uploading Statistics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Creating Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Version 1.0iv

Page 5: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Creating Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Viewing Mapping Rules for Objects ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Exporting Mapping Rules .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Converting Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Converting Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Editing Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Clearing a Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Managing and Customizing Keys .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Creating and Using the Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Creating a Database Migration Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Summary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Action Items .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Saving the Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Handling Manual Conversions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Modifying Your Source Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Modifying Your Target Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Updating and Refreshing Your Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Saving and Applying Your Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Saving Your Converted Schema to a File ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Applying Your Converted Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109The Extension Pack Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Python Libraries ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Optimizing Amazon Redshift ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Optimizing Your Amazon Redshift Database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Working with the AWS Database Migration Service Using the AWS Schema Conversion Tool ... . . . . . . . . . . . . . . . . . . 113Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Credentials ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Creating a Task .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Running and Monitoring a Task .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Using an AWS SCT Replication Agent with AWS DMS .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

Using Data Extraction Agents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116Prerequisite Settings .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

S3 Settings .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Security Settings .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Installing Agents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Configuring Agents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Starting Agents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Registering Agents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Hiding and Recovering Information for an AWS SCT Agent .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Creating Data Extraction Filters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Sorting Data .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Creating, Running, and Monitoring an AWS SCT Task .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Data Extraction Using a AWS Snowball Device .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Data Extraction Task Output .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Using Virtual Partitioning .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Limits When Creating Virtual Partitioning .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130RANGE Partition Type .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130LIST Partition Type .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130DATE AUTO SPLIT Partition Type .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Working with LOBs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Best Practices and Troubleshooting .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Converting Application SQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Overview of Converting Application SQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Creating Application Conversion Projects ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Analyzing and Converting Your SQL Code .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Version 1.0v

Page 6: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Creating and Using the Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Creating an Application Assessment Report ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

Editing and Saving Your Converted SQL Code .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Using the Extension Pack .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Using the Extension Pack DB Schema .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142The Custom Python Library for the Extension Pack .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Using AWS Services to Upload Custom Python Libraries ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Applying the Extension Pack .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

The Lambda Functions from the Extension Pack .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Using AWS Services to Emulate Database Functionality ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Before You Begin .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Applying the Extension Pack .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

Best Practices .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147General Memory Management and Performance Options .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Configuring Additional Memory .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Troubleshooting .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Cannot load objects from an Oracle source database .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Reference .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Microsoft SQL Server to MySQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Statements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Procedures .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Flow Control ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Functions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154Operators ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Transactions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Data Definition Language (DDL) ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Cursors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Microsoft SQL Server to PostgreSQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Data Definition Language (DDL) ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169Data Manipulation Language (DML) .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Database Mail ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Functions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180Operators ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190Other .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192Service Broker .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193SQL Server Agent .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194SQL Server Backup .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197T-SQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Microsoft SQL Server to PostgreSQL Conversion Issue Reference .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

MySQL to PostgreSQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223DDL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223DML .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Functions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237MySQL to PostgreSQL Conversion Reference .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Oracle to MySQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Statements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Procedures .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Flow Control ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Packages .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Functions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Operators ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Version 1.0vi

Page 7: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Data Definition Language (DDL) ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274Cursors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Hints ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Exceptions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

Oracle to PostgreSQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282DDL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282DML .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285PLSQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Oracle to PostgreSQL Conversion Reference .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

PostgreSQL to MySQL Supported Schema Conversion .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340DDL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341DML .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342PL/pgSQL .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351PostgreSQL to MySQL Conversion Reference .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Related Topics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392Release Notes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

Release Notes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393Release Notes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395Release Notes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

Document History .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

Version 1.0vii

Page 8: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

What Is the AWS Schema ConversionTool?

You can use the AWS Schema Conversion Tool (AWS SCT) to convert your existing database schema fromone database engine to another. You can convert relational OLTP schema, or data warehouse schema.Your converted schema is suitable for an Amazon Relational Database Service (Amazon RDS) MySQL DBinstance, an Amazon Aurora DB cluster, an Amazon RDS PostgreSQL DB instance, or an Amazon Redshiftcluster. The converted schema can also be used with a database on an Amazon EC2 instance or stored asdata on an Amazon S3 bucket.

AWS SCT supports several industry standards, including Federal Information Processing Standards (FIPS)when connecting to an Amazon S3 bucket or another AWS resource. AWS SCT is also compliant withFederal Risk and Authorization Management Program (FedRAMP).

AWS SCT supports the following OLTP conversions.

Source Database Target Database on Amazon RDS

Microsoft SQL Server (version 2008 and later) Amazon Aurora (MySQL or PostgreSQL), MicrosoftSQL Server, MySQL, PostgreSQL

MySQL (version 5.5 and later) Amazon Aurora (PostgreSQL), MySQL, PostgreSQL

You can migrate schema and data from MySQLto an Amazon Aurora (MySQL) DB cluster withoutusing AWS SCT. For more information, see Migrating Data to an Amazon Aurora DB Cluster.

Oracle (version 10.2 and later) Amazon Aurora (MySQL or PostgreSQL), MySQL,Oracle, PostgreSQL

PostgreSQL (version 9.1 and later) Amazon Aurora (MySQL), MySQL, PostgreSQL

AWS SCT supports the following data warehouse conversions.

Source Database Target Database on Amazon Redshift

Greenplum Database (version 4.3 and later) Amazon Redshift

Microsoft SQL Server (version 2008 and later) Amazon Redshift

Netezza (version 7.0.3 and later) Amazon Redshift

Oracle (version 10 and later) Amazon Redshift

Teradata (version 13 and later) Amazon Redshift

Vertica (version 7.2.2 and later) Amazon Redshift

Version 1.01

Page 9: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSchema Conversion Overview

Schema Conversion OverviewAWS SCT provides a project-based user interface to automatically convert the database schema of yoursource database into a format compatible with your target Amazon RDS instance. If schema from yoursource database can't be converted automatically, AWS SCT provides guidance on how you can createequivalent schema in your target Amazon RDS database.

For information about how to install AWS SCT, see Installing, Verifying, and Updating the AWS SchemaConversion Tool (p. 4).

To get started with AWS SCT, and create your first project, see Getting Started with the AWS SchemaConversion Tool (p. 25).

To start converting your schema, see Converting Database Schemas Using the AWS Schema ConversionTool (p. 72) or Converting Data Warehouse Schemas to Amazon Redshift by Using the AWS SchemaConversion Tool (p. 91).

In addition to converting your existing database schema from one database engine to another, AWS SCThas some additional features that help you move your data and applications to the cloud:

• You can use data extraction agents to extract data from your data warehouse to prepare to migrateit to Amazon Redshift. To manage the data extraction agents, you can use AWS SCT. For moreinformation, see Using Data Extraction Agents (p. 116).

• You can use AWS SCT to create AWS DMS endpoints and tasks. You can run and monitor these tasksfrom AWS SCT. For more information, see Working with the AWS Database Migration Service Usingthe AWS Schema Conversion Tool (p. 113).

• In some cases, database features can't be converted to equivalent Amazon RDS or Amazon Redshiftfeatures. The AWS SCT extension pack wizard can help you install AWS Lambda functions and Pythonlibraries to emulate the features that can't be converted. For more information, see Using the AWSLambda Functions from the AWS SCT Extension Pack (p. 144) and Using the Custom Python Libraryfor the AWS SCT Extension Pack (p. 143).

• You can use AWS SCT to optimize your existing Amazon Redshift database. AWS SCT recommends sortkeys and distribution keys to optimize your database. For more information, see Optimizing AmazonRedshift by Using the AWS Schema Conversion Tool (p. 111).

• You can use AWS SCT to copy your existing on-premises database schema to an Amazon RDS DBinstance running the same engine. You can use this feature to analyze potential cost savings of movingto the cloud and of changing your license type.

• You can use AWS SCT to convert SQL in your C++, C#, Java, or other application code. You can view,analyze, edit, and save the converted SQL code. For more information, see Converting Application SQLby Using the AWS Schema Conversion Tool (p. 135).

Providing Customer FeedbackYou can provide feedback about the AWS Schema Conversion Tool. You can file a bug report, you cansubmit a feature request, or you can provide general information.

Version 1.02

Page 10: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFeedback

To provide feedback about AWS SCT.

1. Start the AWS Schema Conversion Tool.2. Open the Help menu and then choose Leave Feedback. The Leave Feedback dialog box appears.3. For Area, choose Information, Bug report, or Feature request.4. For Source database, choose your source database. Choose Any if your feedback is not specific to a

particular database.5. For Target database, choose your target database. Choose Any if your feedback is not specific to a

particular database.6. For Title, type a title for your feedback.7. For Message, type your feedback.8. Choose Send to submit your feedback.

Version 1.03

Page 11: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideInstalling the AWS Schema Conversion Tool

Installing, Verifying, and Updatingthe AWS Schema Conversion Tool

The AWS Schema Conversion Tool (AWS SCT) is a standalone application that provides a project-baseduser interface. AWS SCT is available for Fedora Linux, macOS, Microsoft Windows, and Ubuntu Linuxversion 15.04. AWS SCT is supported only on 64-bit operating systems. AWS SCT also installs the JavaRuntime Environment (JRE) version 8u45.

To ensure that you get the correct version of the AWS SCT distribution file, we provide verification stepsafter you download the compressed file. You can verify the file using the steps provided.

Topics• Installing the AWS Schema Conversion Tool (p. 4)• Verifying the AWS Schema Conversion Tool File Download (p. 5)• Installing the Required Database Drivers (p. 8)• Updating the AWS Schema Conversion Tool (p. 11)

Installing the AWS Schema Conversion ToolTo install the AWS Schema Conversion Tool

1. Download the compressed file that contains the AWS SCT installer, using the link for your operatingsystem. All compressed files have a .zip extension. When you extract the AWS SCT installer file, it willbe in the appropriate format for your operating system.

• Microsoft Windows• Apple macOS• Ubuntu Linux (.deb)• Fedora Linux (.rpm)

2. Extract the AWS SCT installer file for your operating system, shown following.

Operating System File Name

Fedora Linux aws-schema-conversion-tool-1.0.build-number.x86_64.rpm

macOS AWS Schema Conversion Tool-1.0.build-number.dmg

Microsoft Windows AWS Schema Conversion Tool-1.0.build-number.msi

Ubuntu Linux aws-schema-conversion-tool-1.0.build-number.deb

3. Run the AWS SCT installer file extracted in the previous step. Use the instructions for your operatingsystem, shown following.

Operating System Install Instructions

Fedora Linux Run the following command in the folder that you downloaded the fileto:

Version 1.04

Page 12: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideInstalling Previous Versions

Operating System Install Instructions

sudo yum install aws-schema-conversion-tool-1.0.build-number.x86_64.rpm

macOS In Finder, open AWS Schema Conversion Tool-1.0.build-number.dmg.

Drag AWS Schema Conversion Tool-1.0.build-number.dmg tothe Applications folder.

Microsoft Windows Double-click the file to run the installer.

Ubuntu Linux Run the following command in the folder that you downloaded the fileto:

sudo dpkg -i aws-schema-conversion-tool-1.0.build-number.deb

4. Install the Java Database Connectivity (JDBC) drivers for your source and target database engines.For instructions and download links, see Installing the Required Database Drivers (p. 8).

Installing Previous Versions of the AWS SchemaConversion ToolYou can download and install previous versions of the AWS SCT. Use the following format to download aprevious version.

https://d211wdu1froga6.cloudfront.net/builds/1.0/<version>/<OS>/aws-schema-conversion-tool-1.0.zip

For example, to download AWS SCT version 607, do the following:

• MacOS - https://d211wdu1froga6.cloudfront.net/builds/1.0/607/MacOS/aws-schema-conversion-tool-1.0.zip

• Windows - https://d211wdu1froga6.cloudfront.net/builds/1.0/607/Windows/aws-schema-conversion-tool-1.0.zip

• Ubuntu - https://d211wdu1froga6.cloudfront.net/builds/1.0/607/Ubuntu/aws-schema-conversion-tool-1.0.zip

• Fedora - https://d211wdu1froga6.cloudfront.net/builds/1.0/607/Fedora/aws-schema-conversion-tool-1.0.zip

Verifying the AWS Schema Conversion Tool FileDownload

There are several ways you can verify the distribution file of the AWS Schema Conversion Tool. Thesimplest is to compare the checksum of the file with the published checksum from AWS. As an additionallevel of security, you can use the procedures below to verify the distribution file, based on the operatingsystem where you installed the file.

Version 1.05

Page 13: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideVerifying the Checksum of the

AWS Schema Conversion Tool File

Below is the URL that can be used in order to download previous version

Verifying the Checksum of the AWS SchemaConversion Tool FileIn order to detect any errors that could have been introduced when downloading or storing the AWSSchema Conversion Tool compressed file, you can compare the file checksum with a value provided byAWS. AWS uses the SHA256 algorithm for the checksum.

To verify the AWS Schema Conversion Tool distribution file using a checksum

1. Download the AWS Schema Conversion Tool distribution file using the links in the Installing section.2. Download the latest checksum file, called sha256Check.txt. For example, the file can appear like the

following:

Fedora b4f5f66f91bfcc1b312e2827e960691c269a9002cd1371cf1841593f88cbb5e6Ubuntu 4315eb666449d4fcd95932351f00399adb6c6cf64b9f30adda2eec903c54eca4Windows 6e29679a3c53c5396a06d8d50f308981e4ec34bd0acd608874470700a0ae9a23MacOs ed56d3ab49309e92ac4d2ef439d35449ac1326f470c23dc5866e1bf0a60b0e67

3. Run the SHA256 validation command for your operating system in the directory that contains thedistribution file. For example, the command to run on the Mac operating system is the following:

shasum -a 256 aws-schema-conversion-tool-1.0.latest.zip

4. Compare the results of the command with the value shown in the sha256Check.txt file. The twovalues should match.

Verifying the AWS Schema Conversion Tool RPM Fileson FedoraAWS provides another level of validation in addition to the distribution file checksum. All RPMfiles in the distribution file are signed by an AWS private key. The public GPG key can be viewed atamazon.com.public.gpg-key.

To verify the AWS Schema Conversion Tool RPM files on Fedora

1. Download the AWS Schema Conversion Tool distribution file using the links in the Installing section.2. Verifying the checksum of the AWS Schema Conversion Tool distribution file.3. Extract the contents of the distribution file. Locate the RPM file you want to verify.4. Download GPG public key from amazon.com.public.gpg-key5. Import the public key to your RPM DB (make sure you have the appropriate permissions) by using

the following command:

sudo rpm --import [email protected]

6. Check that the import was successful by running the following command:

rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE} \n %{SUMMARY} \n" gpg-pubkey-ea22abf4-5a21d30c

Version 1.06

Page 14: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideVerifying the AWS Schema

Conversion Tool DEB Files on Ubuntu

7. Check the RPM signature by running the following command:

rpm --checksig -v aws-schema-conversion-tool-1.0.build number-1.x86_64.rpm

Verifying the AWS Schema Conversion Tool DEB Fileson UbuntuAWS provides another level of validation in addition to the distribution file checksum. All DEB files in thedistribution file are signed by a GPG detached signature.

To verify the AWS Schema Conversion Tool DEB files on Ubuntu

1. Download the AWS Schema Conversion Tool distribution file using the links in the Installing section.2. Verifying the checksum of the AWS Schema Conversion Tool distribution file.3. Extract the contents of the distribution file. Locate the DEB file you want to verify.4. Download the detached signature from aws-schema-conversion-tool-1.0.latest.deb.asc.5. Download the GPG public key from amazon.com.public.gpg-key.6. Import the GPG public key by running the following command:

gpg --import [email protected]

7. Verify the signature by running the following command:

gpg --verify aws-schema-conversion-tool-1.0.latest.deb.asc aws-schema-conversion-tool-1.0.build number.deb

Verifying the AWS Schema Conversion Tool MSI Fileon Microsoft WindowsAWS provides another level of validation in addition to the distribution file checksum. The MSI file has adigital signature you can check to ensure it was signed by AWS.

To verify the AWS Schema Conversion Tool MSI file on Windows

1. Download the AWS Schema Conversion Tool distribution file using the links in the Installing section.2. Verifying the checksum of the AWS Schema Conversion Tool distribution file.3. Extract the contents of the distribution file. Locate the MSI file you want to verify.4. In Windows Explorer, right-click the MSI file and select Properties.5. Choose the Digital Signatures tab.6. Verify that the digital signature is from Amazon Services LLC.

Verifying the AWS Schema Conversion ToolApplication on Mac OSAWS provides another level of validation in addition to the distribution file checksum. Once you haveinstalled the AWS Schema Conversion Tool on the Mac OS, you can verify the application using thefollowing procedure.

Version 1.07

Page 15: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideInstalling the Required Database Drivers

To verify the AWS Schema Conversion Tool Application on Mac OS

1. Download the AWS Schema Conversion Tool distribution file using the links in the Installing section.

2. Verifying the checksum of the AWS Schema Conversion Tool distribution file.

3. Extract the contents of the distribution file.

4. Double-click the DMG file.

5. Install the AWS Schema Conversion Tool.

6. Verify the application by running the following command:

codesign -dvvv /Applications/AWS\ Schema\ Conversion\ Tool.app/

Installing the Required Database DriversFor the AWS Schema Conversion Tool to work correctly, you must install the JDBC drivers for your sourceand target database engines.

After you download the drivers, you give the location of the driver files. For more information, see Storing Driver Paths in the Global Settings (p. 10).

You can download the database drivers from the following locations.

ImportantInstall the latest version of the driver available. The versions in the table following are exampleversion numbers.

DatabaseEngine

Drivers Download Location

AmazonAurora (MySQLcompatible)

mysql-connector-java-5.1.6.jar https://www.mysql.com/products/connector/

AmazonAurora(PostgreSQLcompatible)

postgresql-9.4-1204-jdbc42.jar https://jdbc.postgresql.org/download.html

AmazonRedshift

RedshiftJDBC41-1.1.10.1010.jar http://docs.aws.amazon.com/redshift/latest/mgmt/configure-jdbc-connection.html

GreenplumDatabase

postgresql-9.4-1204-jdbc42.jar https://jdbc.postgresql.org/

Microsoft SQLServer

sqljdbc4.jar https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774

MySQL mysql-connector-java-5.1.6.jar https://www.mysql.com/products/connector/

Netezza nzjdbc.jar

Use the client tools software.Install driver version 7.2.1, whichis backwards compatible withdata warehouse version 7.2.0.

http://www.ibm.com/support/knowledgecenter/SSULQD_7.2.1/com.ibm.nz.datacon.doc/c_datacon_plg_overview.html

Version 1.08

Page 16: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideInstalling JDBC Drivers on Linux

DatabaseEngine

Drivers Download Location

Oracle ojdbc7.jar

Driver versions 7 and later aresupported.

http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html

PostgreSQL postgresql-9.4-1204-jdbc42.jar https://jdbc.postgresql.org/download.html

Teradata terajdbc4.jar

tdgssconfig.jar

https://downloads.teradata.com/download/connectivity/jdbc-driver

Vertica vertica-jdbc-7.2.3-0_all

Driver versions 7.2.0 and laterare supported.

https://my.vertica.com/download/vertica/client-drivers/

Installing JDBC Drivers on LinuxYou can use the following steps to install the JDBC drivers on your Linux system for use with AWS SCT.

To install JDBC drivers on your Linux system

1. Create a directory to store the JDBC drivers in.

PROMPT>sudo mkdir –p /usr/local/jdbc-drivers

2. Install the JDBC driver for your database engine using the commands shown following.

Database Engine Installation Commands

Amazon Aurora(MySQL compatible)

PROMPT> cd /usr/local/jdbc-driversPROMPT> sudo tar xzvf /tmp/mysql-connector-java-X.X.X.tar.gz

Amazon Aurora(PostgreSQLcompatible)

PROMPT> cd /usr/local/jdbc-driversPROMPT> sudo cp -a /tmp/postgresql-X.X.X.jre7.tar .

Microsoft SQL ServerPROMPT> cd /usr/local/jdbc-driversPROMPT> sudo tar xzvf /tmp/sqljdbc_X.X.X_enu.tar.gz

MySQLPROMPT> cd /usr/local/jdbc-driversPROMPT> sudo tar xzvf /tmp/mysql-connector-java-X.X.X.tar.gz

OraclePROMPT> cd /usr/local/jdbc-driversPROMPT> sudo mkdir oracle-jdbcPROMPT> cd oracle-jdbcPROMPT> sudo cp -a /tmp/ojdbc7.jar .

PostgreSQLPROMPT> cd /usr/local/jdbc-drivers

Version 1.09

Page 17: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStoring Driver Paths in the Global Settings

Database Engine Installation CommandsPROMPT> sudo cp -a /tmp/postgresql-X.X.X.jre7.tar .

Storing Driver Paths in the Global SettingsAfter you have downloaded and installed the required JDBC drivers, you can set the location of thedrivers globally in the AWS SCT settings. If you don't set the location of the drivers globally, theapplication asks you for the location of the drivers when you connect to a database.

To update the driver file locations

1. In the AWS Schema Conversion Tool, choose Settings, and then choose Global Settings.

2. For Global settings, choose Drivers. Add the file path to the JDBC driver for your source databaseengine and your target Amazon RDS DB instance database engine.

NoteFor Teradata, you specify two drivers separated by a semicolon.

3. When you are finished adding the driver paths, choose OK.

Version 1.010

Page 18: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUpdating the AWS Schema Conversion Tool

Updating the AWS Schema Conversion ToolAWS periodically updates the AWS SCT with new features and functionality. If you are updating from aprevious version, create a new AWS SCT project and reconvert any database objects you are using.

You can check to see if updates exist for the AWS SCT.

To check for updates to AWS SCT

1. When in the AWS SCT, choose Help and then choose Check for Updates.2. In the Check for Updates dialog box, choose What's New. If the link does not appear, you have the

latest version.

Version 1.011

Page 19: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Project Window

About the AWS Schema ConversionTool User Interface

The following sections help you work with the AWS Schema Conversion Tool (AWS SCT) user interface.

Topics

• The Project Window (p. 12)

• Using Tree Filters (p. 13)

• Hiding Schemas in the AWS SCT Tree View (p. 16)

• Keyboard Shortcuts for the AWS Schema Conversion Tool (p. 16)

• Creating and Reviewing the Database Migration Assessment Report (p. 17)

• Using AWS Service Profiles in the AWS Schema Conversion Tool (p. 21)

• Storing Database Passwords (p. 24)

The Project WindowThe illustration following is what you see in the AWS Schema Conversion Tool when you create a schemamigration project, and then convert a schema.

1. In the left panel, the schema from your source database is presented in a tree view. Your databaseschema is "lazy loaded." In other words, when you select an item from the tree view, AWS SCT getsand displays the current schema from your source database.

2. In the top middle panel, action items appear for schema elements from the source database enginethat couldn't be converted automatically to the target database engine.

3. In the right panel, the schema from your target DB instance is presented in a tree view. Your databaseschema is "lazy loaded." That is, at the point when you select an item from the tree view, AWS SCTgets and displays the current schema from your target database.

Version 1.012

Page 20: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTree Filters

4. In the lower left panel, when you choose a schema element, properties describing the source schemaelement and the SQL command to create that element in the source database are displayed.

5. In the lower right panel, when you choose a schema element, properties describing the target schemaelement and the SQL command to create that element in the target database are displayed. You canedit this SQL command and save the updated command with your project.

Using Tree FiltersTo migrate data from a source to a target, AWS Schema Conversion Tool (AWS SCT) loads all metadatafrom source and target databases into a tree structure. This structure appears in AWS SCT as the treeview in the main project window.

Some databases can have a large number of objects in the tree structure. You can use tree filters in AWSSCT to search for objects in the source and target tree structures. When you use a tree filter, you don'tchange the objects that are converted when you convert your database. The filter only changes what yousee in the tree.

Version 1.013

Page 21: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTree Filters

Tree filters work with objects that AWS SCT has preloaded. In other words, AWS SCT doesn't load objectsfrom the database during searches. This approach means that the tree structure generally contains fewerobjects than are present in the database.

For tree filters, keep the following in mind:

• The filter default is ANY, which means that the filter uses a name search to find objects.• When you select one or more object types, you see only those types of objects in the tree.• You can use the filter mask to show different types of symbols, including Unicode, spaces, and special

characters. The “%” character is the wildcard for any symbol.• After you apply a filter, the count shows only the number of filtered objects.

To create a tree filter

1. Open an existing AWS SCT project.2. Connect to the database you want to apply the tree filter to.3. Choose the filter icon.

NoteThe undo filter icon is grayed out because no filter is currently applied.

4. Enter the following information in the Tree Filter dialog box. Options in the dialog box are differentfor each database engine.

Version 1.014

Page 22: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideImporting a File List for the Tree Filter

AWS SCT Option Action

Schema/DatabaseName

Choose the schema and database name you want to filter on. For schemaname, you can enter “%” to choose all schemas.

Object Name Choose the object name if you want to search by object name.

Tree States Choose the table state. The options include the following:

• Any – Show all tables.• Converted – Show only converted tables.• Not Converted – Show only tables that have not been converted.• Has Actions – Show tables with pending actions.

Object types list Choose objects from the list of object types that you can filter on.Expand the tree nodes to load more objects to the object types list.

5. Choose Apply. After you choose Apply, the undo filter icon (next to the filter icon) is enabled. Usethis icon if you want to remove the filters you applied.

6. Choose Close to close the dialog box.

When you filter the schema that appears in the tree, you don't change the objects that are convertedwhen you convert your schema. The filter only changes what you see in the tree.

Importing a File List for the Tree FilterYou can import a file that contains names or values that you want the tree filter to use. In this file, thefollowing convention is used:

• Object is the type of object that you want to find.

• Database is the name of database where this object exists.

• Schema is the name of schema where this object exists.

• Name is the object name.

The file to import should have the following format:

• Object;Database;Schema;Name – This format is mandatory for the Microsoft SQL Server, SQL DataWarehouse, and Netezza dialects of SQL.

• Object;Schema;Name – Use this format for other SQL dialects.

To import a file list for the tree filter

1. Open an existing AWS SCT project, connect to the database you want to apply the tree filter to, andthen choose the filter icon.

2. Choose the Import File List tab.

3. Choose Import File.

4. Choose a file to import, and then choose Open.

5. Choose Apply, and then choose Close.

Version 1.015

Page 23: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHiding Schemas

Hiding Schemas in the AWS SCT Tree ViewBy using tree view settings, you specify what schemas and databases you want to see in the AWS SCTtree view. You can hide empty schemas, empty databases, system databases, and user-defined databasesand schemas.

To hide databases and schemas in tree view

1. Open an AWS SCT project.2. Connect to the data store that you want to show in tree view.3. Choose Settings, Global Settings, Tree View.

4. In the Tree View Settings section, do the following:

• For Hide System Databases/Schemas, choose system databases and schemas by name to hidethem.

• For Hide User Defined Databases/Schemas, type the names of user-defined schemas anddatabases that you want to hide, and then choose Add. The names are case insensitive.

• Choose Reset to Default to reset the tree view to default settings.5. Choose OK.

Keyboard Shortcuts for the AWS SchemaConversion Tool

The following are the keyboard shortcuts that you can use with the AWS Schema Conversion Tool (AWSSCT).

Version 1.016

Page 24: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Database Migration Assessment Report

Keyboard Shortcut Description

Ctrl+N Create a new project.

Ctrl+O Open an existing project.

Ctrl+S Save an open project.

Ctrl+W Create a new project by using the wizard.

Ctrl+L Connect to the source database.

Ctrl+R Connect to the target database.

Creating and Reviewing the Database MigrationAssessment Report

The database migration assessment report summarizes all of the action items for schema that can'tbe converted automatically to the engine of your target Amazon RDS DB instance. The report alsoincludes estimates of the amount of effort that it will take to write the equivalent code for your targetDB instance.

You can create (or update) a database migration assessment report in your project at any time by usingthe following procedure.

To create and view the database migration assessment report

1. In the left panel that displays the schema from your source database, choose a schema object tocreate an assessment report for. Open the context (right-click) menu for the object, and then chooseCreate Report.

Version 1.017

Page 25: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Database Migration Assessment Report

The assessment report view opens.

2. Choose the Action Items tab.

The Action Items tab displays a list of items that describe the schema that can't be convertedautomatically. Select one of the action items from the list. AWS SCT highlights the item from yourschema that the action item applies to, as shown following.

Version 1.018

Page 26: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Database Migration Assessment Report

3. Choose the Summary tab.

The Summary tab displays the summary information from the database migration assessmentreport. It shows the number of items that were converted automatically, and the number of itemsthat were not converted automatically. The summary also includes an estimate of the time that itwill take to create schema in your target DB instance that are equivalent to those in your sourcedatabase.

The section License Evaluation and Cloud Support contains information about moving yourexisting on-premises database schema to an Amazon RDS DB instance running the same engine. Forexample, if you want to change license types, this section of the report tells you which features fromyour current database should be removed.

An example of an assessment report summary is shown following.

Version 1.019

Page 27: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Database Migration Assessment Report

4. Choose the Summary tab, and then choose Save to PDF. The database migration assessment reportis saved as a PDF file. The PDF file contains both the summary and action item information.

You can also choose Save to CSV to save the report as a comma-separated values (CSV) file. The CSVfile contains only action item information.

Version 1.020

Page 28: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStoring AWS Profiles

For more information, see Creating and Using the Assessment Report in the AWS Schema ConversionTool (p. 79).

Using AWS Service Profiles in the AWS SchemaConversion Tool

You can store your AWS credentials in the AWS Schema Conversion Tool (AWS SCT). AWS SCT uses yourcredentials when you use features that integrate with AWS services. For example, AWS SCT integrateswith Amazon S3, AWS Lambda, Amazon Relational Database Service, and AWS Database MigrationService.

Version 1.021

Page 29: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStoring AWS Credentials

AWS SCT asks you for your AWS credentials when you access a feature that requires them. You can storeyour credentials in the global application settings. When AWS SCT asks for your credentials, you canselect the stored credentials.

You can store different sets of AWS credentials in the global application settings. For example, you canstore one set of credentials that you use in test scenarios, and a different set of credentials that you usein production scenarios. You can also store different credentials for different AWS Regions.

Storing AWS CredentialsUse the following procedure to store AWS credentials globally.

To store AWS credentials

1. Start the AWS Schema Conversion Tool.

2. Open the Settings Menu, and then choose Global Settings. The Global Settings dialog box appears.

Choose AWS Service Profiles, as shown following.

3. Choose Add new AWS Service Profile.

4. Enter your AWS information as follows.

AWS SCT Option Action

Schema/DatabaseName

Choose the schema and database name that you want to filter on. Forschema name, you can enter “%” to select all schemas.

a. For Profile name, type a name for your profile.

Version 1.022

Page 30: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStoring AWS Credentials

b. For AWS Access Key, type your AWS access key.

c. For AWS Secret Key, type your AWS secret key.

d. For Region, choose the region for your profile.

e. For S3 Bucket, choose the Amazon S3 bucket for your profile. You need to specify a bucket onlyif you are using a feature that connects to S3.

f. Choose Use FIPS endpoint for S3 if you need to comply with the security requirements for theFederal Information Processing Standard (FIPS). FIPS endpoints are available in the followingAWS Regions:

• US East (N. Virginia) Region

• US East (Ohio) Region

• US West (N. California) Region

• US West (Oregon) Region

5. Choose Test Connection to verify that your credentials are correct and active.

The Test Connection dialog box appears. You can see the status for each of the services connectedto your profile. Pass indicates that the profile can successfully access the service.

6. After you have configured your profile, choose Save to save your profile or Cancel to cancel yourchanges.

Version 1.023

Page 31: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSetting the Default Profile for a Project

7. Choose OK to close the Global Settings dialog box.

Setting the Default Profile for a ProjectYou can set the default profile for an AWS SCT project. Doing this associates the AWS credentials storedin the profile with the project. With your project open, use the following procedure to set the defaultprofile.

To set the default profile for a project

1. Start the AWS Schema Conversion Tool.2. Open the Settings Menu, and then choose Project Settings. The Current project settings dialog

box appears.3. Choose the Project Environment tab.4. For AWS Service Profile, choose the profile that you want to associate with the project.5. Choose OK to close the Current project settings dialog box. You can also choose Cancel to cancel

your changes.

Storing Database PasswordsYou can store a database password or SSL certificate in the AWS SCT cache. To store a password, chooseStore Password when you create a connection.

The password is encrypted using the randomly generated token in the seed.dat file. The password isthen stored with the user name in the cache file. If you lose the seed.dat file or it becomes corrupted,the database password might be unencrypted incorrectly. In this case, the connection fails.

Version 1.024

Page 32: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideBefore You Begin

Getting Started with the AWSSchema Conversion Tool

Following, you can find procedures that help you get started using the AWS Schema Conversion Tool(AWS SCT).

Topics

• Before You Begin (p. 25)

• Starting the AWS Schema Conversion Tool (p. 26)

• Creating an AWS Schema Conversion Tool Project (p. 26)

• Connecting to Your Source Database (p. 27)

• Connecting to Your Target Database (p. 28)

• Converting Your Schema (p. 28)

• Required Database Privileges for Using the AWS Schema Conversion Tool (p. 29)

• Getting Started Converting Database Schema with the AWS Schema Conversion Tool (p. 38)

• Getting Started Converting Data Warehouse Schema with the AWS Schema ConversionTool (p. 42)

AWS SCT provides a project-based user interface. Almost all work you do with AWS SCT starts with thefollowing three steps:

1. Create an AWS SCT project.

2. Connect to your source database.

3. Connect to your target database.

Before You BeginBefore you complete the procedures in this topic, you must first do the following:

• Install the AWS Schema Conversion Tool. For more information, see Installing, Verifying, and Updatingthe AWS Schema Conversion Tool (p. 4).

 

• Create your target Amazon Relational Database Service (Amazon RDS) DB instance or Amazon Redshiftdatabase, if it doesn't already exist. For more information, see the following documentation.

 

Database Engine Relevant Documentation

Amazon Aurora Creating an Amazon Aurora DB Cluster

Version 1.025

Page 33: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStarting SCT

Database Engine Relevant Documentation

Connecting to an Amazon Aurora DB Cluster

Amazon Redshift Getting Started with Amazon Redshift

Microsoft SQL Server Creating a DB Instance Running the Microsoft SQL Server Database Engine

Connecting to a DB Instance Running the Microsoft SQL Server DatabaseEngine

MySQL Creating a DB Instance Running the MySQL Database Engine

Connecting to a DB Instance Running the MySQL Database Engine

Oracle Creating a DB Instance Running the Oracle Database Engine

Connecting to a DB Instance Running the Oracle Database Engine

PostgreSQL Creating a DB Instance Running the PostgreSQL Database Engine

Connecting to a DB Instance Running the PostgreSQL Database Engine

• Verify that you have sufficient privileges for the source and target databases so that you can run AWSSCT. For more information, see Required Database Privileges for Using the AWS Schema ConversionTool (p. 29).

Starting the AWS Schema Conversion ToolTo start the AWS Schema Conversion Tool, use the instructions for your operating system shownfollowing.

Operating System Instructions

Fedora Linux Run the following command:

/opt/AWSSchemaConversionTool/AWSSchemaConversionTool

Microsoft Windows Double-click the icon for the application.

Ubuntu Linux Run the following command:

/opt/AWSSchemaConversionTool/AWSSchemaConversionTool

Creating an AWS Schema Conversion Tool ProjectThe following procedure shows you how to create an AWS Schema Conversion Tool project.

To create your project

1. Start the AWS Schema Conversion Tool.

2. Choose New Project from the File menu. The New Project dialog box appears.

Version 1.026

Page 34: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to Your Source Database

3. Add the following preliminary project information.

For This Parameter Do This

Project Name Type a name for your project, which is stored locally on yourcomputer.

Location Type the location for your local project file.

Choose Transactional Database (OLTP) or Data Warehouse(OLAP).

Source DB Engine (OLTP) Choose Microsoft SQL Server, MySQL, Oracle, orPostgreSQL.

(OLAP) Choose Amazon Redshift, Greenplum, Microsoft SQLServer DW, Netezza, Oracle DW, Teradata, or Vertica.

Target DB Engine (OLTP) Choose Amazon Aurora (MySQL compatible), AmazonAurora (PostgreSQL compatible), Amazon RDS for MicrosoftSQL Server, Amazon RDS for MySQL, Amazon RDS for Oracle,or Amazon RDS for PostgreSQL.

(OLAP) Choose Amazon Redshift.

4. Choose OK to create your AWS SCT project.

Connecting to Your Source DatabaseThe following topics show you how to connect to your source database. Choose the topic appropriate foryour source database.

• Connecting to an Amazon Redshift Source Database (p. 49)• Connecting to a Greenplum Source Database (p. 51)• Connecting to a Microsoft SQL Server Source Database (p. 53)• Connecting to a Microsoft SQL Server Data Warehouse Source Database (p. 55)• Connecting to a MySQL Source Database (p. 57)• Connecting to a Netezza Source Database (p. 59)

Version 1.027

Page 35: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to Your Target Database

• Connecting to an Oracle Source Database (p. 60)• Connecting to an Oracle Data Warehouse Source Database (p. 62)• Connecting to a PostgreSQL Source Database (p. 64)• Connecting to a Teradata Source Database (p. 66)• Connecting to a Vertica Source Database (p. 69)

Connecting to Your Target DatabaseThe following procedure shows you how to connect to your target database.

To connect to your target database

1. Start the AWS Schema Conversion Tool.2. Choose Connect to target, where target indicates the database engine for your target DB

instance.3. Add the following information to connect to your target Amazon RDS DB instance.

For This Parameter Do This

Server name Type the DNS name of your target DB instance.

Server port Type the port used to connect to your target DB instance.

User name andPassword

Type the user name and password to connect to your target DB instance.

NoteAWS SCT uses the password to connect to your target databaseonly when you create your project or choose the Connectto target option in a project, where target is your targetdatabase. To guard against exposing the password for yourtarget database, AWS SCT doesn't store the password. If youclose your AWS SCT project and reopen it, you are prompted forthe password to connect to your target database as needed.

Use SSL Select this option if you want to use SSL to connect to your database.Provide additional information, as appropriate, on the SSL tab.

4. Choose Test Connection to verify that you can successfully connect to your target database.5. Choose OK to connect to your target DB instance.

Converting Your SchemaAfter you get started by using the procedures in this topic, you can continue working with AWS SCT withtransactional databases and data warehouses in the following topics:

• Getting Started Converting Database Schema with the AWS Schema Conversion Tool (p. 38)• Getting Started Converting Data Warehouse Schema with the AWS Schema Conversion Tool (p. 42)

Version 1.028

Page 36: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRequired Database Privileges

Required Database Privileges for Using the AWSSchema Conversion Tool

When you use the AWS Schema Conversion Tool (AWS SCT) to convert your database schema, you needcertain privileges for the source and target databases. Following, you can find lists of these privileges.

• Source: Amazon Redshift (p. 29)

• Source: Greenplum (p. 29)

• Source: Microsoft SQL Server (p. 30)

• Source: Microsoft SQL Server Data Warehouse (p. 30)

• Source: MySQL (p. 30)

• Source: Netezza (p. 30)

• Source: Oracle (p. 31)

• Source: Oracle Data Warehouse (p. 31)

• Source: PostgreSQL (p. 31)

• Source: Teradata (p. 31)

• Source: Vertica (p. 31)

• Target: Amazon Aurora (MySQL) (p. 32)

• Target: Amazon Aurora (PostgreSQL) (p. 32)

• Target: Amazon Redshift (p. 32)

• Target: Microsoft SQL Server (p. 33)

• Target: MySQL (p. 33)

• Target: Oracle (p. 33)

• Target: PostgreSQL (p. 37)

Privileges for Amazon Redshift as a Source DatabaseThe privileges required for Amazon Redshift as a source are listed following:

• USAGE ON SCHEMA <schema_name>

• SELECT ON ALL TABLES IN SCHEMA <schema_name>

• SELECT ON PG_CATALOG.PG_STATISTIC

• SELECT ON SVV_TABLE_INFO

• SELECT ON TABLE STV_BLOCKLIST

• SELECT ON TABLE STV_TBL_PERM

Privileges for Greenplum as a Source DatabaseThe privileges required for Greenplum as a source are listed following:

• CONNECT ON DATABASE <database_name>

• USAGE ON SCHEMA <schema_name>

Version 1.029

Page 37: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSource: Microsoft SQL Server

Privileges for Microsoft SQL Server as a SourceDatabaseThe privileges required for Microsoft SQL Server as a source are listed following:

• VIEW DEFINITION

• VIEW DATABASE STATE

Repeat the grant for each database whose schema you are converting.

Privileges for Microsoft SQL Server Data Warehouseas a Source DatabaseThe privileges required for Microsoft SQL Server data warehouse as a source are listed following:

• VIEW DEFINITION

• VIEW DATABASE STATE

• SELECT ON SCHEMA :: <schema_name>

Repeat the grant for each database whose schema you are converting.

In addition, grant the following, and run the grant on the master database:

• VIEW SERVER STATE

Privileges for MySQL as a Source DatabaseThe privileges required for MySQL as a source are listed following:

• SELECT ON *.*

• SELECT ON mysql.proc

• SHOW VIEW ON *.*

Privileges for Netezza as a Source DatabaseThe privileges required for Netezza as a source are listed following:

• SELECT ON SYSTEM.DEFINITION_SCHEMA.SYSTEM VIEW

• SELECT ON SYSTEM.DEFINITION_SCHEMA.SYSTEM TABLE

• SELECT ON SYSTEM.DEFINITION_SCHEMA.MANAGEMENT TABLE

• LIST ON <database_name>

• LIST ON <database_name>.ALL.TABLE

• LIST ON <database_name>.ALL.EXTERNAL TABLE

• LIST ON <database_name>.ALL.VIEW

• LIST ON <database_name>.ALL.MATERIALIZED VIEW

• LIST ON <database_name>.ALL.PROCEDURE

Version 1.030

Page 38: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSource: Oracle

• LIST ON <database_name>.ALL.SEQUENCE

• LIST ON <database_name>.ALL.FUNCTION

• LIST ON <database_name>.ALL.AGGREGATE

Privileges for Oracle as a Source DatabaseThe privileges required for Oracle as a source are listed following:

• connect

• select_catalog_role

• select any dictionary

Privileges for Oracle Data Warehouse as a SourceDatabaseThe privileges required for Oracle Data Warehouse as a source are listed following:

• connect

• select_catalog_role

• select any dictionary

Privileges for PostgreSQL as a Source DatabaseThe privileges required for PostgreSQL as a source are listed following:

• CONNECT ON DATABASE <database_name>

• USAGE ON SCHEMA <database_name>

• SELECT ON ALL TABLES IN SCHEMA <database_name>

• SELECT ON ALL SEQUENCES IN SCHEMA <database_name>

Privileges for Teradata as a Source DatabaseThe privileges required for Teradata as a source are listed following:

• SELECT ON DBC

Privileges for Vertica as a Source DatabaseThe privileges required for Vertica as a source are listed following:

• USAGE ON SCHEMA <schema_name>

• USAGE ON SCHEMA PUBLIC

• GRANT SELECT ON ALL TABLES IN SCHEMA <schema_name>

• SELECT ON ALL SEQUENCES IN SCHEMA <schema_name>

• EXECUTE ON ALL FUNCTIONS IN SCHEMA <schema_name>

Version 1.031

Page 39: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: Amazon Aurora (MySQL)

• EXECUTE ON PROCEDURE <schema_name.procedure_name(procedure_signature)>

Privileges for Amazon Aurora (MySQL) as a TargetDatabaseThe privileges required for Amazon Aurora (MySQL) as a target are listed following:

• CREATE ON *.*• ALTER ON *.*• DROP ON *.*• INDEX ON *.*• REFERENCES ON *.*• SELECT ON *.*• CREATE VIEW ON *.*• SHOW VIEW ON *.*• TRIGGER ON *.*• CREATE ROUTINE ON *.*• ALTER ROUTINE ON *.*• EXECUTE ON *.*• SELECT ON mysql.proc

If your source database is Microsoft SQL Server, grant the additional privilege INSERT,UPDATE ONAWS_SQLSERVER_EXT.*

If your source database is Oracle, grant the additional privilege INSERT,UPDATE ON AWS_ORACLE_EXT.*

If your source database is PostgreSQL, grant the additional privilege INSERT,UPDATE ONAWS_POSTGRESQL_EXT.*

Privileges for Amazon Aurora (PostgreSQL) as aTarget DatabaseThe privileges required for Amazon Aurora (PostgreSQL) as a target are explained following.

If the new schema doesn't exist yet, grant the privilege CREATE ON DATABASE <database_name>

If the new schema already exists, grant the privilege INSERT ON ALL TABLES IN SCHEMA<schema_name>

In PostgreSQL, only the owner of a schema or a superuser can drop a schema. The owner can drop theschema, and all contained objects, even if the owner doesn't own all of the contained objects.

Privileges for Amazon Redshift as a Target DatabaseThe privileges required for Amazon Redshift as a target are listed following:

• CREATE ON DATABASE <database_name>• USAGE ON LANGUAGE plpythonu• SELECT ON ALL TABLES IN SCHEMA pg_catalog

Version 1.032

Page 40: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: Microsoft SQL Server

In Amazon Redshift, only the owner of a schema or a superuser can drop a schema. The owner can dropthe schema, and all contained objects, even if the owner doesn't own all of the contained objects.

Privileges for Microsoft SQL Server as a TargetDatabaseThe privileges required for Microsoft SQL Server as a target are listed following:

• CREATE SCHEMA• CREATE TABLE• CREATE VIEW• CREATE TYPE• CREATE DEFAULT• CREATE FUNCTION• CREATE PROCEDURE• CREATE ASSEMBLY• CREATE AGGREGATE• CREATE FULLTEXT CATALOG

Privileges for MySQL as a Target DatabaseThe privileges required for MySQL as a target are listed following:

• CREATE ON *.*• ALTER ON *.*• DROP ON *.*• INDEX ON *.*• REFERENCES ON *.*• SELECT ON *.*• CREATE VIEW ON *.*• SHOW VIEW ON *.*• TRIGGER ON *.*• CREATE ROUTINE ON *.*• ALTER ROUTINE ON *.*• EXECUTE ON *.*• SELECT ON mysql.proc

If your source database is Microsoft SQL Server, grant the additional privilege INSERT,UPDATE ONAWS_SQLSERVER_EXT.*

If your source database is Oracle, grant the additional privilege INSERT,UPDATE ON AWS_ORACLE_EXT.*

If your source database is PostgreSQL, grant the additional privilege INSERT,UPDATE ONAWS_POSTGRESQL_EXT.*

Privileges for Oracle as a Target DatabaseThe privileges required for Oracle as a target are listed following:

Version 1.033

Page 41: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: Oracle

Privilege StandardEdition 1

StandardEdition

EnterpriseEdition

SELECT_CATALOG_ROLE Required Required Required

RESOURCE Required Required Required

CONNECT Required Required Required

alter user <username> quota unlimited onUSERS;

Required Required Required

alter user <username> quota unlimited on IDX; Required Required Required

alter user <username> quota unlimited on ARCH; Required Required Required

alter user <username> quota unlimited onARCH_IDX;

Required Required Required

DROP ANY CUBE BUILD PROCESS Not required Not required Required

ALTER ANY CUBE Not required Not required Required

CREATE ANY CUBE DIMENSION Not required Not required Required

CREATE ANY ASSEMBLY Required Required Required

ALTER ANY RULE Required Required Required

SELECT ANY DICTIONARY Required Required Required

ALTER ANY DIMENSION Required Required Required

CREATE ANY DIMENSION Required Required Required

ALTER ANY TYPE Required Required Required

DROP ANY TRIGGER Required Required Required

CREATE ANY VIEW Required Required Required

ALTER ANY CUBE BUILD PROCESS Not required Not required Required

CREATE ANY CREDENTIAL Not required Not required Required

DROP ANY CUBE DIMENSION Not required Not required Required

DROP ANY ASSEMBLY Required Required Required

DROP ANY PROCEDURE Required Required Required

ALTER ANY PROCEDURE Required Required Required

ALTER ANY SQL TRANSLATION PROFILE Required Required Required

DROP ANY MEASURE FOLDER Not required Not required Required

CREATE ANY MEASURE FOLDER Not required Not required Required

DROP ANY CUBE Not required Not required Required

DROP ANY MINING MODEL Not required Not required Required

Version 1.034

Page 42: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: Oracle

Privilege StandardEdition 1

StandardEdition

EnterpriseEdition

CREATE ANY MINING MODEL Not required Not required Required

DROP ANY EDITION Required Required Required

CREATE ANY EVALUATION CONTEXT Required Required Required

DROP ANY DIMENSION Required Required Required

ALTER ANY INDEXTYPE Required Required Required

DROP ANY TYPE Required Required Required

CREATE ANY PROCEDURE Required Required Required

CREATE ANY SQL TRANSLATION PROFILE Required Required Required

CREATE ANY CUBE Not required Not required Required

COMMENT ANY MINING MODEL Not required Not required Required

ALTER ANY MINING MODEL Not required Not required Required

DROP ANY SQL PROFILE Required Required Required

CREATE ANY JOB Required Required Required

DROP ANY EVALUATION CONTEXT Required Required Required

ALTER ANY EVALUATION CONTEXT Required Required Required

CREATE ANY INDEXTYPE Required Required Required

CREATE ANY OPERATOR Required Required Required

CREATE ANY TRIGGER Required Required Required

DROP ANY ROLE Required Required Required

DROP ANY SEQUENCE Required Required Required

DROP ANY CLUSTER Required Required Required

DROP ANY SQL TRANSLATION PROFILE Required Required Required

ALTER ANY ASSEMBLY Required Required Required

CREATE ANY RULE SET Required Required Required

ALTER ANY OUTLINE Required Required Required

UNDER ANY TYPE Required Required Required

CREATE ANY TYPE Required Required Required

DROP ANY MATERIALIZED VIEW Required Required Required

ALTER ANY ROLE Required Required Required

DROP ANY VIEW Required Required Required

Version 1.035

Page 43: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: Oracle

Privilege StandardEdition 1

StandardEdition

EnterpriseEdition

ALTER ANY INDEX Required Required Required

COMMENT ANY TABLE Required Required Required

CREATE ANY TABLE Required Required Required

CREATE USER Required Required Required

DROP ANY RULE SET Required Required Required

CREATE ANY CONTEXT Required Required Required

DROP ANY INDEXTYPE Required Required Required

ALTER ANY OPERATOR Required Required Required

CREATE ANY MATERIALIZED VIEW Required Required Required

ALTER ANY SEQUENCE Required Required Required

DROP ANY SYNONYM Required Required Required

CREATE ANY SYNONYM Required Required Required

DROP USER Required Required Required

ALTER ANY MEASURE FOLDER Required Required Required

ALTER ANY EDITION Required Required Required

DROP ANY RULE Required Required Required

CREATE ANY RULE Required Required Required

ALTER ANY RULE SET Required Required Required

CREATE ANY OUTLINE Required Required Required

UNDER ANY TABLE Required Required Required

UNDER ANY VIEW Required Required Required

DROP ANY DIRECTORY Required Required Required

ALTER ANY CLUSTER Required Required Required

CREATE ANY CLUSTER Required Required Required

ALTER ANY TABLE Required Required Required

CREATE ANY CUBE BUILD PROCESS Not required Not required Required

ALTER ANY CUBE DIMENSION Not required Not required Required

CREATE ANY EDITION Required Required Required

CREATE ANY SQL PROFILE Required Required Required

ALTER ANY SQL PROFILE Required Required Required

Version 1.036

Page 44: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTarget: PostgreSQL

Privilege StandardEdition 1

StandardEdition

EnterpriseEdition

DROP ANY OUTLINE Required Required Required

DROP ANY CONTEXT Required Required Required

DROP ANY OPERATOR Required Required Required

DROP ANY LIBRARY Required Required Required

ALTER ANY LIBRARY Required Required Required

CREATE ANY LIBRARY Required Required Required

ALTER ANY MATERIALIZED VIEW Required Required Required

ALTER ANY TRIGGER Required Required Required

CREATE ANY SEQUENCE Required Required Required

DROP ANY INDEX Required Required Required

CREATE ANY INDEX Required Required Required

DROP ANY TABLE Required Required Required

Privileges for PostgreSQL as a Target DatabaseThe privileges required for PostgreSQL as a target are explained following.

If the new schema doesn't exist yet, grant the privilege CREATE ON DATABASE <database_name>

If the new schema already exists, grant the privilege INSERT ON ALL TABLES IN SCHEMA<schema_name>

In PostgreSQL, only the owner of a schema or a superuser can drop a schema. The owner can drop theschema, and all contained objects, even if the owner doesn't own all of the contained objects.

Related Topics• Getting Started with the AWS Schema Conversion Tool (p. 25)

Version 1.037

Page 45: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideGetting Started Converting Database Schema

Getting Started Converting Database Schema withthe AWS Schema Conversion Tool

Following, you can find information to help you convert your online transaction processing (OLTP)database schema from one database engine to another by using the AWS Schema Conversion Tool (AWSSCT). You can use the converted schema with an Amazon Relational Database Service (Amazon RDS) DBinstance.

AWS SCT supports the following OLTP database conversions.

Source Database Target Database on Amazon RDS

Microsoft SQL Server (version 2008 and later) Amazon Aurora (MySQL or PostgreSQL), MicrosoftSQL Server, MySQL, PostgreSQL

MySQL (version 5.5 and later) Amazon Aurora (PostgreSQL), MySQL, PostgreSQL

You can migrate schema and data from MySQLto an Amazon Aurora (MySQL) DB cluster withoutusing AWS SCT. For more information, see Migrating Data to an Amazon Aurora DB Cluster.

Oracle (version 10.2 and later) Amazon Aurora (MySQL or PostgreSQL), MySQL,Oracle, PostgreSQL

PostgreSQL (version 9.1 and later) Amazon Aurora (MySQL), MySQL, PostgreSQL

If you want to convert a data warehouse schema, see Getting Started Converting Data WarehouseSchema with the AWS Schema Conversion Tool (p. 42).

Before You BeginBefore you complete the procedures in this topic, you must first do the following:

1. Create an AWS SCT project.

2. Connect to your source database.

3. Connect to your target database.

For more information, see Getting Started with the AWS Schema Conversion Tool (p. 25).

Converting Your SchemaUse the following procedure to convert schema.

To convert schema

1. Choose View, and then choose Main View.

Version 1.038

Page 46: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConverting Your Schema

2. In the left panel that displays the schema from your source database, choose a schema object toconvert. Open the context (right-click) menu for the object, and then choose Convert schema.

3. When AWS SCT finishes converting the schema, you can view the proposed schema in the panel onthe right of your project.

At this point, no schema is applied to your target Amazon RDS DB instance. The planned schemais part of your project. If you select a converted schema item, you can see the planned schemacommand in the panel at lower center for your target Amazon RDS DB instance.

You can edit the schema in this window. The edited schema is stored as part of your project and iswritten to the target DB instance when you choose to apply your converted schema.

Version 1.039

Page 47: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying the Converted Schema to Your Target DB Instance

For more information, see Converting Your Schema by Using the AWS Schema Conversion Tool (p. 75).

Applying the Converted Schema to Your Target DBInstanceYou can apply the converted database schema to your target Amazon RDS DB instance. After the schemahas been applied to your target DB instance, you can update the schema based on the action items in thedatabase migration assessment report.

WarningThis procedure overwrites the existing target schema. Be careful not to overwrite schemaunintentionally. Be careful not to overwrite schema in your target DB instance that you havealready modified, or you will overwrite those changes.

To apply the converted database schema to your target Amazon RDS DB instance

1. Choose the schema element in the right panel of your project that displays the planned schema foryour target DB instance.

2. Open the context (right-click) menu for the schema element, and then choose Apply to database.

Version 1.040

Page 48: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

The converted schema is applied to the target DB instance.

For more information, see Saving and Applying Your Converted Schema in the AWS Schema ConversionTool (p. 85).

Related Topics• Converting Database Schemas Using the AWS Schema Conversion Tool (p. 72)

Version 1.041

Page 49: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideGetting Started Converting Data Warehouse Schema

Getting Started Converting Data WarehouseSchema with the AWS Schema Conversion Tool

Following, you can find information to help you convert your data warehouse schema from one databaseengine to another by using the AWS Schema Conversion Tool (AWS SCT). You can use the convertedschema with an Amazon Redshift cluster.

AWS SCT supports the following data warehouse conversions.

Source Database Target Database on Amazon Redshift

Greenplum Database (version 4.3 and later) Amazon Redshift

Microsoft SQL Server (version 2008 and later) Amazon Redshift

Netezza (version 7.0.3 and later) Amazon Redshift

Oracle (version 10 and later) Amazon Redshift

Teradata (version 13 and later) Amazon Redshift

Vertica (version 7.2.2 and later) Amazon Redshift

If you want to convert an online transaction processing (OLTP) database schema, see Getting StartedConverting Database Schema with the AWS Schema Conversion Tool (p. 38).

Before You BeginBefore you complete the procedures in this topic, you must first do the following:

1. Create an AWS SCT project.

2. Connect to your source database.

3. Connect to your target database.

For more information, see Getting Started with the AWS Schema Conversion Tool (p. 25).

Choosing Optimization Strategies and RulesTo optimize how AWS SCT converts your data warehouse schema, you can choose the strategies andrules you want the tool to use. After converting your schema, and reviewing the suggested keys, you canadjust your rules or change your strategy to get the results you want.

To choose your optimization strategies and rules

1. Choose Settings, and then choose Project Settings. The Current project settings dialog boxappears.

2. In the left pane, choose Optimization Strategies. The optimization strategies appear in the rightpane with the defaults selected.

3. For Strategy Sector, choose the optimization strategy you want to use. You can choose from thefollowing:

Version 1.042

Page 50: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCollecting or Uploading Statistics

• Use metadata, ignore statistical information – In this strategy, only information from themetadata is used for optimization decisions. For example, if there is more than one index on asource table, the source database sort order is used, and the first index becomes a distribution key.

 

• Ignore metadata, use statistical information – In this strategy, optimization decisions aboutderived from statistical information only. This strategy applies only to tables and columns forwhich statistics are provided. For more information, see Collecting or Uploading Statistics for theAWS Schema Conversion Tool (p. 93).

 

• Use metadata and use statistical information – In this strategy, both metadata and statistics areused for optimization decisions.

 

4. After you choose your optimization strategy, you can choose the rules you want to use. You canchoose from the following:

• Choose Distribution Key and Sort Keys using metadata

• Choose fact table and appropriate dimension for collation

• Analyze cardinality of indexes' columns

• Find the most used tables and columns from QueryLog table

For each rule, you can enter a weight for the sort key and a weight for the distribution key. AWS SCTuses the weights you choose when it converts your schema.

For more information, see Choosing Optimization Strategies and Rules for Use with the AWS SchemaConversion Tool (p. 92).

Collecting or Uploading StatisticsTo optimize how AWS SCT converts your data warehouse schema, you can provide statistics from yoursource database that the tool can use. You can either collect statistics directly from the database, orupload an existing statistics file.

To provide and review statistics

1. Connect to your source database. For more information, see Connecting to Your SourceDatabase (p. 27).

2. Choose a schema object from the left panel of your project, and open the context (right-click) menufor the object. Choose Collect Statistics or Upload Statistics as shown following.

Version 1.043

Page 51: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCollecting or Uploading Statistics

3. Choose a schema object from the left panel of your project, and then choose the Statistics tab. Youcan review the statistics for the object.

For more information, see Collecting or Uploading Statistics for the AWS Schema ConversionTool (p. 93).

Version 1.044

Page 52: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConverting Your Schema

Converting Your SchemaUse the following procedure to converted schema.

To convert schema

1. Choose View, and then choose Main View.

2. In the left panel that displays the schema from your source database, choose a schema object toconvert. Open the context (right-click) menu for the object, and then choose Convert schema.

3. When AWS SCT finishes converting the schema, you can view the proposed schema in the panel onthe right of your project.

At this point, no schema is applied to your target database. The planned schema is part of yourproject. If you select a converted schema item, you can see the planned schema command in thepanel at lower center for your target database.

Version 1.045

Page 53: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideManaging and Customizing Keys

You can edit the schema in this window. The edited schema is stored as part of your project and iswritten to the target database when you choose to apply your converted schema.

For more information, see Converting Your Schema by Using the AWS Schema Conversion Tool (p. 97).

Managing and Customizing KeysAfter you convert your schema, you can manage and edit your keys. Key management is the heart of adata warehouse conversion.

To manage keys, select a table in your target database, and then choose the Key Management tab asshown following.

Version 1.046

Page 54: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying the Converted Schema to Your Target Database

The left pane contains key suggestions, and includes the confidence rating for each suggestion. You canchoose one of the suggestions, or you can customize the key by editing it in the right pane.

If the choices for the key don't look like what you expected, you can edit your edit your optimizationstrategies, and then retry the conversion. For more information, see Choosing Optimization Strategiesand Rules (p. 42).

For more information, see Managing and Customizing Keys in the AWS Schema ConversionTool (p. 101).

Applying the Converted Schema to Your TargetDatabaseYou can apply the converted database schema to your target database. After the schema has beenapplied to your target database, you can update the schema based on the action items in the databasemigration assessment report.

WarningThis procedure overwrites the existing target schema. Be careful not to overwrite schemaunintentionally. Be careful not to overwrite schema in your target database that you havealready modified, or you will overwrite those changes.

To apply the converted database schema to your target database

1. Choose the schema element in the right panel of your project that displays the planned schema foryour target database.

2. Open the context (right-click) menu for the schema element, and then choose Apply to database.

Version 1.047

Page 55: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying the Converted Schema to Your Target Database

The converted schema is applied to the target database.

For more information, see Saving and Applying Your Converted Schema in the AWS Schema ConversionTool (p. 108).

Version 1.048

Page 56: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Amazon Redshift Source Database

Connecting to Your Source Database

Following, you can find information about how to connect to your source database. Choose the topicappropriate for your source database.

Topics

• Connecting to an Amazon Redshift Source Database (p. 49)

• Connecting to a Greenplum Source Database (p. 51)

• Connecting to a Microsoft SQL Server Source Database (p. 53)

• Connecting to a Microsoft SQL Server Data Warehouse Source Database (p. 55)

• Connecting to a MySQL Source Database (p. 57)

• Connecting to a Netezza Source Database (p. 59)

• Connecting to an Oracle Source Database (p. 60)

• Connecting to an Oracle Data Warehouse Source Database (p. 62)

• Connecting to a PostgreSQL Source Database (p. 64)

• Connecting to a Teradata Source Database (p. 66)

• Connecting to a Vertica Source Database (p. 69)

Connecting to an Amazon Redshift SourceDatabase

Use the following procedure to connect to your Amazon Redshift source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to an Amazon Redshift source database

1. In the AWS Schema Conversion Tool, choose Connect to Source Amazon Redshift.

The Connect to Amazon Redshift dialog box appears.

Version 1.049

Page 57: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Amazon Redshift Source Database

2. Provide the Amazon Redshift source database connection information. Use the instructions in thefollowing table.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

Database Type the name of the Amazon Redshift database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• Verify Server Certificate: Select this option to verify theserver certificate by using a trust store.

• Trust Store: The location of a trust store containingcertificates. You must add this location in Global Settingsbefore it will appear here.

• Trust Store Password: The password for the trust store.

Version 1.050

Page 58: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Greenplum Source Database

For This Parameter Do This

For more information about SSL support for Amazon Redshift,see Configure Security Options for Connections.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Redshift Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a Greenplum Source DatabaseUse the following procedure to connect to your Greenplum source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to a Greenplum source database

1. In the AWS Schema Conversion Tool, choose Connect to Greenplum.

The Connect to Greenplum dialog box appears.

Version 1.051

Page 59: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Greenplum Source Database

2. Provide the Greenplum source database connection information. Use the instructions in thefollowing table.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

Database Type the name of the Greenplum database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• Verify Server Certificate: Select this option to verify theserver certificate by using a trust store.

• Trust Store: The location of a trust store containingcertificates.

• Trust Store Password: The password for the trust store.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store the

Version 1.052

Page 60: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Microsoft SQL Server Source Database

For This Parameter Do This

database password and to connect quickly to the databasewithout having to enter the password.

Greenplum Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a Microsoft SQL Server SourceDatabase

Use the following procedure to connect to your Microsoft SQL Server source database with the AWSSchema Conversion Tool (AWS SCT).

To connect to a Microsoft SQL Server source database

1. In the AWS Schema Conversion Tool, choose Connect to Microsoft SQL Server.

The Connect to Microsoft SQL Server dialog box appears.

Version 1.053

Page 61: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Microsoft SQL Server Source Database

2. Provide the Microsoft SQL Server source database connection information. Use the instructions inthe following table.

For This Parameter Do This

Server name Type the Domain Name Service (DNS) name or IP address of yoursource database server.

Server port Type the port used to connect to your source database server.

Instance name Type the instance name for the SQL Server database. To find theinstance name, run the query SELECT @@servername; on yourSQL Server database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use Secure Sockets Layer (SSL)to connect to your database. Provide the following additionalinformation, as appropriate, on the SSL tab:

• Trust Server Certificate: Select this option to trust the servercertificate.

• Trust Store: The location of a trust store containingcertificates.

Version 1.054

Page 62: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Microsoft SQL Server

Data Warehouse Source Database

For This Parameter Do This

• Trust Store Password: The password for the trust store.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Sql Server Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a Microsoft SQL Server DataWarehouse Source Database

Use the following procedure to connect to your Microsoft SQL Server data warehouse source databasewith the AWS Schema Conversion Tool (AWS SCT).

To connect to a Microsoft SQL Server data warehouse source database

1. In the AWS Schema Conversion Tool, choose Connect to Microsoft SQL Server DW.

The Connect to Microsoft SQL Server DW dialog box appears.

Version 1.055

Page 63: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Microsoft SQL Server

Data Warehouse Source Database

2. Provide the Microsoft SQL Server data warehouse source database connection information. Use theinstructions in the following table.

For This Parameter Do This

Server name Type the Domain Name Service (DNS) name or IP address of yoursource database server.

Server port Type the port used to connect to your source database server.

Instance name Type the instance name for the SQL Server database. To find theinstance name, run the query SELECT @@servername; on yourSQL Server database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use Secure Sockets Layer (SSL)to connect to your database. Provide the following additionalinformation, as appropriate, on the SSL tab:

• Trust Server Certificate: Select this option to trust the servercertificate.

• Trust Store: A trust store that you set up in the GlobalSettings.

Version 1.056

Page 64: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a MySQL Source Database

For This Parameter Do This

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Sql Server Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a MySQL Source DatabaseUse the following procedure to connect to your MySQL source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to a MySQL source database

1. In the AWS Schema Conversion Tool, choose Connect to MySQL.

The Connect to MySQL dialog box appears.

2. Provide the MySQL source database connection information. Use the instructions in the followingtable.

Version 1.057

Page 65: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a MySQL Source Database

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• Require SSL: Select this option if you want to connect to theserver only through SSL.

NoteIf you choose Require SSL, it means that if the serverdoesn't support SSL, you can't connect to the server.If you don't choose Require SSL and the serverdoesn't support SSL, you can still connect to theserver without using SSL. For more information, see Using Secure Connections.

• Verify Server Certificate: Select this option to verify theserver certificate by using a trust store.

• Trust Store: The location of a trust store containingcertificates.

• Trust Store Password: The password for the trust store.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

MySql Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Version 1.058

Page 66: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Netezza Source Database

Connecting to a Netezza Source DatabaseUse the following procedure to connect to your Netezza source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to a Netezza source database

1. In the AWS Schema Conversion Tool, choose Connect to Netezza.

The Connect to Netezza dialog box appears.

2. Provide the Netezza source database connection information. Use the instructions in the followingtable.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store the

Version 1.059

Page 67: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Oracle Source Database

For This Parameter Do This

database password and to connect quickly to the databasewithout having to enter the password.

Netezza Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.4. Choose OK to connect to your source database.

Connecting to an Oracle Source DatabaseUse the following procedure to connect to your Oracle source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to an Oracle source database

1. In the AWS Schema Conversion Tool, choose Connect to Oracle.

The Connect to Oracle dialog box appears.

2. Provide the Oracle source database connection information. Use the instructions in the followingtable.

Version 1.060

Page 68: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Oracle Source Database

For This Parameter Do This

Type Choose the connection type to your database. Depending onyour type, provide the following additional information:

• SID• Server name: The DNS name or IP address of your source

database server.• Server port: The port used to connect to your source

database server.• Oracle SID: The Oracle System ID (SID). To find the Oracle

SID, submit the following query to your Oracle database:

SELECT sys_context('userenv','instance_name')AS SID FROM dual;

• Service Name• Server name: The DNS name or IP address of your source

database server.• Server port: The port used to connect to your source

database server.• Service Name: The name of the Oracle service to connect

to.• TNS Alias

• TNS file path: The path to the file that contains theTransparent Network Substrate (TNS) name connectioninformation.

• TNS file path: The TNS alias from this file to use to connectto the source database.

• TNS Connect Identifier• TNS identifier: The identifier for the registered TNS

connection information.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Version 1.061

Page 69: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Oracle Data Warehouse Source Database

For This Parameter Do This

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• SSL Authentication: Select this option to use SSLauthentication for the connection.

• Trust Store: The location of a trust store containingcertificates.

• Trust Store Password: The password for the trust store.• Key Store: The location of a key store containing a private key

and certificates. This value is required if SSL Authentication isselected and is otherwise optional.

• Trust Store Password: The password for the key store. Thisvalue is required if SSL Authentication is selected and isotherwise optional.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Oracle Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to an Oracle Data Warehouse SourceDatabase

Use the following procedure to connect to your Oracle data warehouse source database with the AWSSchema Conversion Tool (AWS SCT).

To connect to an Oracle data warehouse source database

1. In the AWS Schema Conversion Tool, choose Connect to Oracle DW.

The Connect to Oracle dialog box appears.

Version 1.062

Page 70: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to an Oracle Data Warehouse Source Database

2. Provide the Oracle Data Warehouse source database connection information. Use the instructions inthe following table.

For This Parameter Do This

Type Choose the connection type to your database. Depending onyour type, provide the following additional information:

• SID• Server name: The DNS name or IP address of your source

database server.• Server port: The port used to connect to your source

database server.• Oracle SID: The Oracle System ID (SID). To find the Oracle

SID, submit the following query to your Oracle database:

SELECT sys_context('userenv','instance_name')AS SID FROM dual;

• Service Name• Server name: The DNS name or IP address of your source

database server.• Server port: The port used to connect to your source

database server.• Service Name: The name of the Oracle service to connect

to.• TNS Alias

• TNS file path: The path to the file that contains theTransparent Network Substrate (TNS) name connectioninformation.

• TNS file path: The TNS alias from this file to use to connectto the source database.

• TNS Connect Identifier

Version 1.063

Page 71: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a PostgreSQL Source Database

For This Parameter Do This

• TNS identifier: The identifier for the registered TNSconnection information.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• SSL Authentication: Select this option to use SSLauthentication for the connection.

• Trust Store: The location of a trust store containingcertificates.

• Trust Store Password: The password for the trust store.• Key Store: The location of a key store containing a private key

and certificates. This value is required if SSL Authentication isselected and is otherwise optional.

• Trust Store Password: The password for the key store. Thisvalue is required if SSL Authentication is selected and isotherwise optional.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Oracle Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a PostgreSQL Source DatabaseUse the following procedure to connect to your PostgreSQL source database with the AWS SchemaConversion Tool (AWS SCT).

Version 1.064

Page 72: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a PostgreSQL Source Database

To connect to a PostgreSQL source database

1. In the AWS Schema Conversion Tool, choose Connect to PostgreSQL.

The Connect to PostgreSQL dialog box appears.

2. Provide the PostgreSQL source database connection information. Use the instructions in thefollowing table.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

Database Type the name of the PostgreSQL database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

Version 1.065

Page 73: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Teradata Source Database

For This Parameter Do This

• Verify Server Certificate: Select this option to verify theserver certificate by using a trust store.

• Trust Store: The location of a trust store containingcertificates.

• Trust Store Password: The password for the trust store.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

PostgreSQL Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.

4. Choose OK to connect to your source database.

Connecting to a Teradata Source DatabaseUse the following procedure to connect to your Teradata source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to a Teradata source database

1. In the AWS Schema Conversion Tool, choose Connect to Teradata.

The Connect to Teradata dialog box appears.

Version 1.066

Page 74: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Teradata Source Database

2. Provide the Teradata source database connection information. Use the instructions in the followingtable.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

Database Type the name of the Teradata database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Encrypt Data Select this option if you want to encrypt data that you exchangewith the database.

Teradata Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

Version 1.067

Page 75: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUsing LDAP Authentication with a Teradata Source

For This Parameter Do This

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.4. Choose OK to connect to your source database.

Using LDAP Authentication with a Teradata SourceTo set up Lightweight Directory Access Protocol (LDAP) authentication for Teradata users who runMicrosoft Active Directory in Windows, use the following procedure.

In the procedure examples, the Active Directory domain is test.local.com. The Windows server is DC,and it is configured with default settings. The user account created in Active Directory is test_ldap, andthe account uses the password test_ldap.

1. In the /opt/teradata/tdat/tdgss/site directory, edit the file TdgssUserConfigFile.xml .Change the LDAP section to the following.

AuthorizationSupported="no"

LdapServerName="DC.test.local.com"LdapServerPort="389"LdapServerRealm="test.local.com"LdapSystemFQDN="dc= test, dc= local, dc=com"LdapBaseFQDN="dc=test, dc=local, dc=com"

Apply the changes by running the configuration as follows.

#cd /opt/teradata/tdgss/bin#./run_tdgssconfig

2. Test the configuration by running the following command.

# /opt/teradata/tdat/tdgss/14.10.03.01/bin/tdsbind -u test_ldap -w test_ldap

The output should be similar to the following.

LdapGroupBaseFQDN: dc=Test, dc=local, dc=comLdapUserBaseFQDN: dc=Test, dc=local, dc=comLdapSystemFQDN: dc= test, dc= local, dc=comLdapServerName: DC.test.local.comLdapServerPort: 389LdapServerRealm: test.local.comLdapClientUseTls: noLdapClientTlsReqCert: neverLdapClientMechanism: SASL/DIGEST-MD5

Version 1.068

Page 76: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Vertica Source Database

LdapServiceBindRequired: noLdapClientTlsCRLCheck: noneLdapAllowUnsafeServerConnect: yesUseLdapConfig: noAuthorizationSupported: noFQDN: CN=test, CN=Users, DC=Anthem, DC=local, DC=comAuthUser: ldap://DC.test.local.com:389/CN=test1,CN=Users,DC=test,DC=local,DC=comDatabaseName: testService: tdsbind

3. Restart TPA using the following command.

#tpareset -f "use updated TDGSSCONFIG GDO"

4. Create the same user in the Teradata database as in Active Directory, as shown following.

CREATE USER test_ldap AS PERM=1000, PASSWORD=test_ldap;GRANT LOGON ON ALL TO test WITH NULL PASSWORD;

If you change the user password in Active Directory for your LDAP user, you should specify this newpassword during connection to Teradata in LDAP mode. In DEFAULT mode, you still have to connectTeradata with the LDAP user name and any password.

Connecting to a Vertica Source DatabaseUse the following procedure to connect to your Vertica source database with the AWS SchemaConversion Tool (AWS SCT).

To connect to a Vertica source database

1. In the AWS Schema Conversion Tool, choose Connect to Vertica.

The Connect to Vertica dialog box appears.

Version 1.069

Page 77: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Vertica Source Database

2. Provide the Vertica source database connection information. Use the instructions in the followingtable.

For This Parameter Do This

Server name Type the DNS name or IP address of your source database server.

Server port Type the port used to connect to your source database server.

Database Type the name of the Vertica database.

User name and Password Type the user name and password to connect to your sourcedatabase server.

NoteAWS SCT uses the password to connect to your sourcedatabase only when you create your project or choosethe Connect to source option in a project, wheresource is your source database. To guard againstexposing the password for your source database, AWSSCT doesn't store the password. If you close your AWSSCT project and reopen it, you are prompted for thepassword to connect to your source database as needed.

Use SSL Select this option if you want to use SSL to connect to yourdatabase. Provide the following additional information, asappropriate, on the SSL tab:

• Trust Store: A trust store that you set up in the GlobalSettings.

• Key Store: A key store that you set up in the Global Settings.

Store Password AWS SCT creates a secure vault to store SSL certificates anddatabase passwords. Enabling this option lets you store thedatabase password and to connect quickly to the databasewithout having to enter the password.

Version 1.070

Page 78: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConnecting to a Vertica Source Database

For This Parameter Do This

Vertica Driver Path Type the path to the driver to use to connect to the sourcedatabase. For more information, see Installing the RequiredDatabase Drivers (p. 8).

If you store the driver path in the global project settings, thedriver path doesn't appear on the connection dialog box. Formore information, see Storing Driver Paths in the GlobalSettings (p. 10).

3. Choose Test Connection to verify that you can successfully connect to your source database.4. Choose OK to connect to your source database.

Version 1.071

Page 79: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Converting Database Schemas Usingthe AWS Schema Conversion Tool

You can use the AWS Schema Conversion Tool (AWS SCT) to convert your existing database schemasfrom one database engine to another. You can use the AWS SCT to do the following:

• You can also use AWS SCT to copy an existing on-premises database schema to an Amazon RDS DBinstance running the same engine. You can use this feature to analyze potential cost savings of movingto the cloud and of changing your license type.

• In some cases, database features can't be converted to equivalent Amazon RDS features. If you hostand self-manage a database on the Amazon Elastic Compute Cloud (Amazon EC2) platform, you canemulate these features by substituting AWS services for them.

• You can also use AWS SCT to copy your existing on-premises database schema to an Amazon RDS DBinstance running the same engine. You can use this feature to analyze potential cost savings of movingto the cloud.

• AWS SCT automates much of the process of converting your online transaction processing (OLTP)database schema to an Amazon Relational Database Service (Amazon RDS) MySQL DB instance, anAmazon Aurora DB cluster, or a PostgreSQL DB instance. The source and target database enginescontain many different features and capabilities, and AWS SCT attempts to create an equivalentschema in your Amazon RDS DB instance wherever possible. If no direct conversion is possible, AWSSCT provides a list of possible actions for you to take.

This section includes the following topics:

Topics• Creating Mapping Rules in the AWS Schema Conversion Tool (p. 73)• Converting Your Schema by Using the AWS Schema Conversion Tool (p. 75)• Creating and Using the Assessment Report in the AWS Schema Conversion Tool (p. 79)• Handling Manual Conversions in the AWS Schema Conversion Tool (p. 83)• Updating and Refreshing Your Converted Schema in the AWS Schema Conversion Tool (p. 84)• Saving and Applying Your Converted Schema in the AWS Schema Conversion Tool (p. 85)• Comparing Database Schemas (p. 88)• Finding Related Transformed Objects (p. 89)• Converting Dynamic SQL for Oracle to PostgreSQL Migrations (p. 89)

AWS SCT supports the following OLTP conversions.

Source Database Target Database on Amazon RDS

Microsoft SQL Server (version 2008 and later) Amazon Aurora (MySQL or PostgreSQL), MicrosoftSQL Server, MySQL, PostgreSQL

MySQL (version 5.5 and later) Amazon Aurora (PostgreSQL), MySQL, PostgreSQL

You can migrate schema and data from MySQLto an Amazon Aurora (MySQL) DB cluster without

Version 1.072

Page 80: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Mapping Rules

Source Database Target Database on Amazon RDS

using AWS SCT. For more information, see Migrating Data to an Amazon Aurora DB Cluster.

Oracle (version 10.2 and later) Amazon Aurora (MySQL or PostgreSQL), MySQL,Oracle, PostgreSQL

PostgreSQL (version 9.1 and later) Amazon Aurora (MySQL), MySQL, PostgreSQL

DB2 LUW (versions 9.5, 9.7, 10.5, and 11.1) Amazon Aurora (MySQL or PostgreSQL), MySQL,PostgreSQL

If you want to convert a data warehouse schema, see Converting Data Warehouse Schemas to AmazonRedshift by Using the AWS Schema Conversion Tool (p. 91).

Almost all work you do with AWS SCT starts with the following three steps:

1. Create an AWS SCT project.2. Connect to your source database.3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

To convert your database schema to Amazon RDS, you take the following high-level steps. Each step is alink to a section that provides more information.

• Creating Mapping Rules in the AWS Schema Conversion Tool (p. 73) – Before you convert yourschema with AWS SCT, you can set up rules that change the data type of columns, move objects fromone schema to another, and change the names of objects.

• Converting Your Schema by Using the AWS Schema Conversion Tool (p. 75) – AWS SCT createsa local version of the converted schema for you to review, but it doesn't apply it to your target DBinstance until you are ready.

• Creating and Using the Assessment Report in the AWS Schema Conversion Tool (p. 79) – AWSSCT creates a database migration assessment report that details the schema elements that can't beconverted automatically. You can use this report to identify where you need to create a schema in yourAmazon RDS DB instance that is compatible with your source database.

• Handling Manual Conversions in the AWS Schema Conversion Tool (p. 83) – If you have schemaelements that can't be converted automatically, you have two choices: update the source schema andthen convert again, or create equivalent schema elements in your target Amazon RDS DB instance.

• Updating and Refreshing Your Converted Schema in the AWS Schema Conversion Tool (p. 84) –You can update your AWS SCT project with the most recent schema from your source database.

• Saving and Applying Your Converted Schema in the AWS Schema Conversion Tool (p. 85) –When you are ready, have AWS SCT apply the converted schema in your local project to your targetAmazon RDS DB instance.

Creating Mapping Rules in the AWS SchemaConversion Tool

Before you convert your schema with the AWS Schema Conversion Tool (AWS SCT), you can set up rulesthat change the data type of columns, move objects from one schema to another, and change the names

Version 1.073

Page 81: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Mapping Rules

of objects. For example, if you have a set of tables in your source schema named test_TABLE_NAME,you can set up a rule that changes the prefix test_ to the prefix demo_ in the target schema.

NoteYou can only create mapping rules if your source database engine and target database engineare different.

You can create mapping rules that perform the following tasks:

• Change data type

• Move objects

• Rename objects

• Prefix - add prefix, remove prefix, replace prefix

• Suffix - add suffix, remove suffix, replace suffix

You can create mapping rules for the following objects:

• Database

• Schema

• Table

• Column

Creating Mapping RulesYou can create mapping rules and save the rules as part of your project. With your project open, use thefollowing procedure to create mapping rules.

To create mapping rules

1. Choose Mapping Rules from the Settings menu. The Mapping Rules dialog box appears.

2. Choose Add new rule. A new row is added to the list of rules.

3. Choose the edit icon to configure your rule.

Version 1.074

Page 82: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Mapping Rules for Objects

a. For Name, type a name for your rule.

b. For For, choose the type of object that the rule applies to.

c. For where, type a filter to apply to objects before applying the mapping rule. The where clauseis evaluated by using a like clause. You can enter an exact name to select one object, or you canenter a pattern to select multiple objects.

The fields available for the where clause are different depending on the type of the object. Forexample, if the object type is schema there is only one field available, for the schema name.

d. For Actions, choose the type of mapping rule you want to create.

e. Depending on the rule type, type one or two additional values. For example, to rename anobject, type the new name of the object. To replace a prefix, type the old prefix and the newprefix.

4. After you have configured your mapping rule, choose Save to save your rule. You can also chooseCancel to cancel your changes.

5. After you are done adding, editing, and deleting rules, choose Save All to save all your changes.

6. Choose Close to close the Mapping Rules dialog box.

You can use the toggle icon to turn off a mapping rule without deleting it. You can use the copy icon toduplicate an existing mapping rule. You can use the delete icon to delete an existing mapping rule. Tosave any changes you make to your mapping rules, choose Save All.

Viewing Mapping Rules for ObjectsAfter you set up your mapping rules, you can view the effect of the rules on specific objects in yourschema before you convert your schema. In the source schema tree, choose the object you are interestedin. In the main view, choose the Mapping tab. The Mapping tab opens and displays a list of all mappingrules that are applied to the object. You can see the name of the object in the source schema and thenew name of the object in the target schema. If you have data type rules, you also see the data type ofthe column in the source schema and the new data type of the column in the target schema.

Exporting Mapping RulesIf you use AWS Database Migration Service (AWS DMS) to migrate your data from your source databaseto your target database, you can provide information about your mapping rules to AWS DMS. For moreinformation about tasks, see Working with AWS Database Migration Service Replication Tasks.

To export mapping rules

1. In the AWS Schema Conversion Tool, in the source schema tree, open the context (right-click) menuand choose Export script for DMS. The save dialog box opens.

2. Browse to the location where you want to save your script, and then choose Save. Your mappingrules are saved as a JSON script that can be consumed by AWS DMS.

Converting Your Schema by Using the AWSSchema Conversion Tool

After you have connected your project to both your source database and your target Amazon RDS DBinstance, your AWS Schema Conversion Tool (AWS SCT) project displays the schema from your source

Version 1.075

Page 83: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConverting Schema

database in the left panel. The schema is presented in a tree-view format, and each node of the tree islazy loaded. When you choose a node in the tree view, AWS SCT requests the schema information fromyour source database at that time.

You can choose schema items from your source database and then convert the schema to equivalentschema for the DB engine of your target DB instance. You can choose any schema item from your sourcedatabase to convert. If the schema item that you choose depends on a parent item, then AWS SCT alsogenerates the schema for the parent item. For example, if you choose a column from a table to convert,then AWS SCT generates the schema for the column, the table that the column is in, and the databasethat the table is in.

Converting SchemaTo convert schema from your source database, choose a schema object to convert from the left panel ofyour project. Open the context (right-click) menu for the object, and then choose Convert schema, asshown following.

After you have converted the schema from your source database, you can choose schema items from theleft panel of your project and view the converted schema in the center panels of your project. The lower-center panel displays the properties of and the SQL command to create the converted schema, as shownfollowing.

Version 1.076

Page 84: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideEditing Converted Schema

After you have converted your schema, you can save your project. The schema information from yoursource database is saved with your project. This functionality means that you can work offline withoutbeing connected to your source database. AWS SCT connects to your source database to update theschema in your project if you choose Refresh from Database for your source database. For moreinformation, see Updating and Refreshing Your Converted Schema in the AWS Schema ConversionTool (p. 84).

You can create a database migration assessment report of the items that can't be convertedautomatically. The assessment report is useful for identifying and resolving schema items that can't beconverted automatically. For more information, see Creating and Using the Assessment Report in theAWS Schema Conversion Tool (p. 79).

When AWS SCT generates a converted schema, it doesn't immediately apply it to the target DB instance.Instead, the converted schema is stored locally until you are ready to apply it to the target DB instance.For more information, see Applying Your Converted Schema (p. 86).

Editing Converted SchemaYou can edit converted schema and save the changes as part of your project.

To edit converted schema

1. In the left panel that displays the schema from your source database, choose the schema item thatyou want to edit the converted schema for.

Version 1.077

Page 85: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideClearing a Converted Schema

2. In the lower-center panel that displays the converted schema for the selected item, choose the SQLtab.

3. In the text displayed for the SQL tab, change the schema as needed. The schema is automaticallysaved with your project as you update it.

The changes that you make to converted schema are stored with your project as you make updates. Ifyou newly convert a schema item from your source database, and you have made updates to previouslyconverted schema for that item, those existing updates are replaced by the newly converted schemaitem based on your source database.

Clearing a Converted SchemaUntil you apply the schema to your target DB instance, AWS SCT only stores the converted schemalocally in your project. You can clear the planned schema from your project by choosing the tree-viewnode for your target DB instance, and then choosing Refresh from Database. Because no schema hasbeen written to your target DB instance, refreshing from the database removes the planned schemaelements in your AWS SCT project to match what exists in your target DB instance.

Version 1.078

Page 86: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating and Using the Assessment Report

Creating and Using the Assessment Report in theAWS Schema Conversion Tool

The AWS Schema Conversion Tool (AWS SCT) creates a database migration assessment report to help youconvert your schema. The database migration assessment report provides important information aboutthe conversion of the schema from your source database to your target Amazon RDS DB instance. Thereport summarizes all of the schema conversion tasks and details the action items for schema that can'tbe converted to the DB engine of your target DB instance. The report includes estimates of the amountof effort that it will take to write the equivalent code in your target DB instance that can't be convertedautomatically. This Estimated Complexity field is exported in the PDF version of the assessment report,but it is not included in the CSV version.

If you are using AWS SCT to copy your existing on-premises database schema to an Amazon RDS DBinstance running the same engine, the report can help you analyze requirements for moving to the AWSCloud and for changing your license type.

Version 1.079

Page 87: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating a Database Migration Assessment Report

Creating a Database Migration Assessment ReportUse the following procedure to create a database migration assessment report.

To create a database migration assessment report

1. In the left panel that displays the schema from your source database, choose a schema object tocreate an assessment report for.

2. Open the context (right-click) menu for the object, and then choose Create Report.

Assessment Report SummaryAfter you create an assessment report, the assessment report view opens, showing the Summary tab.The Summary tab displays the summary information from the database migration assessment report. Itshows items that were converted automatically, and items that were not converted automatically.

Version 1.080

Page 88: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideAction Items

For schema items that can't be converted automatically to the target database engine, the summaryincludes an estimate of the effort required to create schema items in your target DB instance that areequivalent to those in your source.

The report categorizes the estimated time to convert these schema items as follows:

• Simple – Actions that can be completed in less than one hour.

• Medium – Actions that are more complex and can be completed in one to four hours.

• Significant – Actions that are very complex and take more than four hours to complete.

The section License Evaluation and Cloud Support contains information about moving your existingon-premises database schema to an Amazon RDS DB instance running the same engine. For example, ifyou want to change license types, this section of the report tells you which features from your currentdatabase should be removed.

Assessment Report Action ItemsThe assessment report view also includes an Action Items tab. This tab contains a list of items that can'tbe converted automatically to the database engine of your target Amazon RDS DB instance. If you selectan action item from the list, AWS SCT highlights the item from your schema that the action item appliesto.

The report also contains recommendations for how to manually convert the schema item. For moreinformation about deciding how to handle manual conversions, see Handling Manual Conversions in theAWS Schema Conversion Tool (p. 83).

Version 1.081

Page 89: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSaving the Assessment Report

Saving the Assessment ReportYou can save a local copy of the database migration assessment report as either a PDF file or a comma-separated values (CSV) file. The CSV file contains only action item information. The PDF file containsboth the summary and action item information, as shown in the following example.

Version 1.082

Page 90: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHandling Manual Conversions

Handling Manual Conversions in the AWS SchemaConversion Tool

The assessment report includes a list of items that can't be converted automatically to the databaseengine of your target Amazon RDS DB instance. For each item that can't be converted, there is an actionitem on the Action Items tab.

You can respond to the action items in the assessment report in the following ways:

• Modify your source database schema.

• Modify your target database schema.

Version 1.083

Page 91: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideModifying Your Source Schema

Modifying Your Source SchemaFor some items, it might be easier to modify the database schema in your source database to schemathat can be converted automatically. First, verify that the new changes are compatible with yourapplication architecture, then update the schema in your source database. Finally, refresh your projectwith the updated schema information. You can then convert your updated schema, and generate a newdatabase migration assessment report. The action items no longer appear for the items that changed inthe source schema.

The advantage of this process is that your updated schema is always available when you refresh fromyour source database.

Modifying Your Target SchemaFor some items, it might be easier to apply the converted schema to your target database, and thenadd equivalent schema items manually to your target database for the items that couldn't be convertedautomatically. You can write all of the schema that can be converted automatically to your targetDB instance by applying the schema. For more information, see Saving and Applying Your ConvertedSchema in the AWS Schema Conversion Tool (p. 85).

The schema that are written to your target DB instance don't contain the items that can't be convertedautomatically. After applying the schema to your target DB instance, you can then manually createschema in your target DB instance that are equivalent to those in the source database. The action itemsin the database migration assessment report contain suggestions for how to create the equivalentschema.

WarningIf you manually create schema in your target DB instance, save a copy of any manual work thatyou do. If you apply the converted schema from your project to your target DB instance again, itoverwrites the manual work you have done.

In some cases, you can't create equivalent schema in your target DB instance. You might need torearchitect a portion of your application and database to use the functionality that is available from theDB engine for your target DB instance. In other cases, you can simply ignore the schema that can't beconverted automatically.

Updating and Refreshing Your Converted Schemain the AWS Schema Conversion Tool

You can update both the source schema and the target schema in your AWS Schema Conversion Tool(AWS SCT) project.

• Source – If you update the schema for your source database, AWS SCT replaces the schema in yourproject with the latest schema from your source database. Using this functionality, you can updateyour project if changes have been made to the schema of your source database.

• Target – If you update the schema for your target Amazon RDS DB instance, AWS SCT replaces theschema in your project with the latest schema from your target DB instance. If you haven't applied anyschema to your target DB instance, AWS SCT clears the converted schema from your project. You canthen convert the schema from your source database for a clean target DB instance.

You update the schema in your AWS SCT project by choosing Refresh from Database, as shownfollowing.

Version 1.084

Page 92: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSaving and Applying Your Schema

Saving and Applying Your Converted Schema inthe AWS Schema Conversion Tool

When the AWS Schema Conversion Tool (AWS SCT) generates converted schema (as shown in ConvertingYour Schema by Using the AWS Schema Conversion Tool (p. 75)), it doesn't immediately apply theconverted schema to the target DB instance. Instead, converted schema are stored locally in your projectuntil you are ready to apply them to the target DB instance. Using this functionality, you can work withschema items that can't be converted automatically to your target DB engine. For more information onitems that can't be converted automatically, see Creating and Using the Assessment Report in the AWSSchema Conversion Tool (p. 79).

You can optionally have the tool save your converted schema to a file as a SQL script prior to applyingthe schema to your target DB instance. You can also have the tool apply the converted schema directly toyour target DB instance.

Saving Your Converted Schema to a FileYou can save your converted schema as SQL scripts in a text file. By using this approach, you can modifythe generated SQL scripts from AWS SCT to address items that the tool can't convert automatically. Youcan then run your updated scripts on your target DB instance to apply your converted schema to yourtarget database.

To save your converted schema as SQL scripts, open the context (right-click) menu for the schemaelement, and choose Save as SQL, as shown following.

Version 1.085

Page 93: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying Your Converted Schema

Applying Your Converted SchemaWhen you are ready to apply your converted schema to your target Amazon RDS DB instance, choose theschema element from the right panel of your project. Open the context (right-click) menu for the schemaelement, and then choose Apply to database, as shown following.

Version 1.086

Page 94: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Extension Pack Schema

The Extension Pack SchemaThe first time that you apply your converted schema to your target DB instance, AWS SCT adds anadditional schema to your target DB instance. This schema implements system functions of the sourcedatabase that are required when writing your converted schema to your target DB instance. The schemais called the extension pack schema.

Don't modify the extension pack schema, or you might encounter unexpected results in the convertedschema that is written to your target DB instance. When your schema is fully migrated to your target DBinstance, and you no longer need AWS SCT, you can delete the extension pack schema.

The extension pack schema is named according to your source database as follows:

• Microsoft SQL Server: AWS_SQLSERVER_EXT

• MySQL: AWS_MYSQL_EXT

• Oracle: AWS_ORACLE_EXT

• PostgreSQL: AWS_POSTGRESQL_EXT

For more information, see Using the AWS Lambda Functions from the AWS SCT ExtensionPack (p. 144).

Version 1.087

Page 95: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideComparing Schemas

Comparing Database SchemasIf you made changes to your source or target schema after you migrated, you can compare the twodatabase schemas using AWS SCT. You can compare schemas for versions the same as or earlier than thesource schema.

The following schema comparisons are supported:

• Oracle to Oracle, versions 12.1.0.2.0, 11.1.0.7.0, 11.2.0.1.0, 10• SQL Server to SQL Server, versions 2016, 2014, 2012, 2008 RD2, 2008• PostgreSQL to PostgreSQL and Aurora with PostgreSQL compatibility, versions 9.6, 9.5.9, 9.5.4• MySQL to MySQL, versions 5.6.36, 5.7.17, 5.5

You specify settings for the schema comparison on the Compare Schema tab of the Project Settingspage.

To compare schemas, you select the schemas, and AWS SCT indicates the objects that differ between thetwo schemas and the objects that don't.

To compare two schemas

1. Open an existing AWS SCT project, or create a project and connect to the source and targetendpoints.

2. Choose the schema you want to compare.3. Open the context (right-click) menu and choose Compare Schema.

AWS SCT indicates objects that are different between the two schemas by adding a black circle to theobject's icon.

Version 1.088

Page 96: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Transformed Objects

You can apply the results of the schema comparison to a single object, to a single category of objects, orto the entire schema. Choose the box next to the category, object, or schema that you want to apply theresults to.

Finding Related Transformed ObjectsAfter a schema conversion, in some cases AWS SCT might have created several objects for one schemaobject on the source database. For example, when performing an Oracle to PostgreSQL conversion,AWS SCT takes each Oracle trigger and transforms it into a trigger and trigger function on PostgreSQLtarget. Also, when AWS SCT converts an Oracle package function or procedure to PostgreSQL, it createsan equivalent function and an INIT function that should be run as init block before the procedure orfunction can be run.

The following procedure lets you see all related objects that were created after a schema conversion.

To view related objects that were created during a schema conversion

1. After the schema conversion, choose the converted object in the target tree view.2. Choose the Related Converted Objects tab.3. View the list of related target objects.

Converting Dynamic SQL for Oracle to PostgreSQLMigrations

Dynamic SQL is a programming technique that you can use to run data definition language (DDL)statements inside PL/SQL code. You can also use dynamic SQL to generate and run SQL statements atrun time when you don't know the exact text or object identifiers during development. AWS SCT canconvert dynamic SQL statements used with Oracle databases to their analog statements in PostgreSQL.

To convert Oracle dynamic SQL to PostgreSQL SQL

1. Create an Oracle-to-PostgreSQL migration project.2. Connect to the source and target databases.3. Choose a stored procedure in the Oracle source tree view. The procedure should contain references

to the DBMS_SQL Oracle package or have an EXECUTE IMMEDIATE statement.4. For Actions, choose Convert Schema, and agree to replace the objects if they exist. The following

screenshot shows the converted procedure below the Oracle procedure.

Version 1.089

Page 97: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConverting Dynamic SQL

Version 1.090

Page 98: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Converting Data WarehouseSchemas to Amazon Redshift byUsing the AWS Schema ConversionTool

The AWS Schema Conversion Tool (AWS SCT) automates much of the process of converting your datawarehouse schema to an Amazon Redshift database schema. The source and target database enginescontain many different features and capabilities, and AWS SCT attempts to create an equivalent schemain your target database wherever possible. If no direct conversion is possible, AWS SCT provides a list ofpossible actions for you to take.

This section covers the following topics.

Topics• Choosing Optimization Strategies and Rules for Use with the AWS Schema Conversion Tool (p. 92)• Collecting or Uploading Statistics for the AWS Schema Conversion Tool (p. 93)• Creating Mapping Rules in the AWS Schema Conversion Tool (p. 95)• Converting Your Schema by Using the AWS Schema Conversion Tool (p. 97)• Managing and Customizing Keys in the AWS Schema Conversion Tool (p. 101)• Creating and Using the Assessment Report in the AWS Schema Conversion Tool (p. 102)• Handling Manual Conversions in the AWS Schema Conversion Tool (p. 106)• Updating and Refreshing Your Converted Schema in the AWS Schema Conversion Tool (p. 107)• Saving and Applying Your Converted Schema in the AWS Schema Conversion Tool (p. 108)• Optimizing Amazon Redshift by Using the AWS Schema Conversion Tool (p. 111)

AWS SCT supports the following data warehouse conversions.

Source Database Target Database on Amazon Redshift

Greenplum Database (version 4.3 and later) Amazon Redshift

Microsoft SQL Server (version 2008 and later) Amazon Redshift

Netezza (version 7.0.3 and later) Amazon Redshift

Oracle (version 10 and later) Amazon Redshift

Teradata (version 13 and later) Amazon Redshift

Vertica (version 7.2.2 and later) Amazon Redshift

If you want to convert an online transaction processing (OLTP) database schema, see ConvertingDatabase Schemas Using the AWS Schema Conversion Tool (p. 72).

Almost all work you do with AWS SCT starts with the following three steps:

Version 1.091

Page 99: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideChoosing Optimization Strategies and Rules

1. Create an AWS SCT project.2. Connect to your source database.3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

To convert your data warehouse schema to Amazon RDS, you take the following high-level steps. Eachstep is a link to a section that provides more information.

• Choosing Optimization Strategies and Rules for Use with the AWS Schema ConversionTool (p. 92) – To optimize how AWS SCT converts your data warehouse schema, you can choose thestrategies and rules you want the tool to use.

• Collect statistics Collecting or Uploading Statistics for the AWS Schema Conversion Tool (p. 93)– To optimize how AWS SCT converts your data warehouse schema, you can provide statistics fromyour source database that the tool can use. You can either collect statistics directly from the database,or upload an existing statistics file.

• Creating Mapping Rules in the AWS Schema Conversion Tool (p. 95) – Before you convert yourschema with AWS SCT, you can set up rules that change the data type of columns, move objects fromone schema to another, and change the names of objects.

• Converting Your Schema by Using the AWS Schema Conversion Tool (p. 97) – AWS SCT creates alocal version of the converted schema for you to review, but it doesn't apply it to your target databaseuntil you are ready.

• Managing and Customizing Keys in the AWS Schema Conversion Tool (p. 101) – After you convertyour schema, you can manage and edit your keys. Key management is the heart of a data warehouseconversion.

• Creating and Using the Assessment Report in the AWS Schema Conversion Tool (p. 102) – AWSSCT creates a database migration assessment report that details the schema elements that can't beconverted automatically. You can use this report to identify where you need to manually create aschema in your target database that is compatible with your source database.

• Handling Manual Conversions in the AWS Schema Conversion Tool (p. 106) – If you have schemaelements that can't be converted automatically, you have two choices: update the source schema andthen convert again, or create equivalent schema elements in your target database.

• Updating and Refreshing Your Converted Schema in the AWS Schema Conversion Tool (p. 107) –You can update your AWS SCT project with the most recent schema from your source database.

• Saving and Applying Your Converted Schema in the AWS Schema Conversion Tool (p. 108) –When you are ready, have AWS SCT apply the converted schema in your local project to your targetdatabase.

Choosing Optimization Strategies and Rules forUse with the AWS Schema Conversion Tool

To optimize how the AWS Schema Conversion Tool (AWS SCT) converts your data warehouse schema,you can choose the strategies and rules you want the tool to use. After converting your schema, andreviewing the suggested keys, you can adjust your rules or change your strategy to get the results youwant.

To choose your optimization strategies and rules

1. Choose Settings, and then choose Project Settings. The Current project settings dialog boxappears.

Version 1.092

Page 100: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

2. In the left pane, choose Optimization Strategies. The optimization strategies appear in the rightpane with the defaults selected.

3. For Strategy Sector, choose the optimization strategy you want to use. You can choose from thefollowing:

• Use metadata, ignore statistical information – In this strategy, only information from themetadata is used for optimization decisions. For example, if there is more than one index on asource table, the source database sort order is used, and the first index becomes a distribution key.

 • Ignore metadata, use statistical information – In this strategy, optimization decisions are derived

from statistical information only. This strategy applies only to tables and columns for whichstatistics are provided. For more information, see Collecting or Uploading Statistics for the AWSSchema Conversion Tool (p. 93).

 • Use metadata and use statistical information – In this strategy, both metadata and statistics are

used for optimization decisions.

 4. After you choose your optimization strategy, you can choose the rules you want to use. You can

choose from the following:

• Choose Distribution Key and Sort Keys using metadata• Choose fact table and appropriate dimension for collation• Analyze cardinality of indexes' columns• Find the most used tables and columns from QueryLog table

For each rule, you can enter a weight for the sort key and a weight for the distribution key. AWS SCTuses the weights you choose when it converts your schema. Later, when you review the suggestedkeys, if you are not satisfied with the results, you can return here and change your settings. For moreinformation, see Managing and Customizing Keys in the AWS Schema Conversion Tool (p. 101).

Related Topics• Choose the Best Sort Key• Choose the Best Distribution Style

Collecting or Uploading Statistics for the AWSSchema Conversion Tool

To optimize how the AWS Schema Conversion Tool (AWS SCT) converts your data warehouse schema,you can provide statistics from your source database that the tool can use. You can either collectstatistics directly from the database, or upload an existing statistics file.

To provide and review statistics

1. Connect to your source database. For more information, see Connecting to Your SourceDatabase (p. 27).

2. Choose a schema object from the left panel of your project, and open the context (right-click) menufor the object. Choose Collect Statistics or Upload Statistics as shown following.

Version 1.093

Page 101: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCollecting or Uploading Statistics

3. Choose a schema object from the left panel of your project, and then choose the Statistics tab. Youcan review the statistics for the object.

Later, when you review the suggested keys, if you are not satisfied with the results, you cancollect additional statistics and repeat this procedure. For more information, see Managing andCustomizing Keys in the AWS Schema Conversion Tool (p. 101).

Version 1.094

Page 102: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

Related Topics• Choosing Optimization Strategies and Rules for Use with the AWS Schema Conversion Tool (p. 92)

• Choose the Best Sort Key

• Choose the Best Distribution Style

Creating Mapping Rules in the AWS SchemaConversion Tool

Before you convert your schema with the AWS Schema Conversion Tool (AWS SCT), you can set up rulesthat change the data type of columns, move objects from one schema to another, and change the namesof objects. For example, if you have a set of tables in your source schema named test_TABLE_NAME,you can set up a rule that changes the prefix test_ to the prefix demo_ in the target schema.

NoteYou can only create mapping rules if your source database engine and target database engineare different.

You can create mapping rules that perform the following tasks:

• Change data type

• Move objects

• Rename objects

• Prefix - add prefix, remove prefix, replace prefix

• Suffix - add suffix, remove suffix, replace suffix

You can create mapping rules for the following objects:

• Database

• Schema

• Table

• Column

Creating Mapping RulesYou can create mapping rules and save the rules as part of your project. With your project open, use thefollowing procedure to create mapping rules.

To create mapping rules

1. Choose Mapping Rules from the Settings menu. The Mapping Rules dialog box appears. The toppane contains mapping (transformation) rules.

Version 1.095

Page 103: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideViewing Mapping Rules for Objects

2. In the Tranformation Rules pane, choose Add new rule.

3. Configure your transformation rule.

a. For Name, type a name for your rule.

b. For For, choose the type of object that the rule applies to.

c. For where, type a filter to apply to objects before applying the mapping rule. The where clauseis evaluated by using a like clause. You can enter an exact name to select one object, or you canenter a pattern to select multiple objects.

The fields available for the where clause are different depending on the type of the object. Forexample, if the object type is schema there is only one field available, for the schema name.

d. For Actions, choose the type of mapping rule you want to create.

e. Depending on the rule type, type one or two additional values. For example, to rename anobject, type the new name of the object. To replace a prefix, type the old prefix and the newprefix.

4. After you have configured your mapping rule, choose Save to save your rule. You can also chooseCancel to cancel your changes.

5. After you are done adding, editing, and deleting rules, choose Save All to save all your changes.

6. Choose Close to close the Mapping Rules dialog box.

You can use the toggle icon to turn off a mapping rule without deleting it. You can use the copy icon toduplicate an existing mapping rule. You can use the delete icon to delete an existing mapping rule. Tosave any changes you make to your mapping rules, choose Save All.

Viewing Mapping Rules for ObjectsAfter you set up your mapping rules, you can view the effect of the rules on specific objects in yourschema before you convert your schema. In the source schema tree, choose the object you are interestedin. In the main view, choose the Mapping tab. The Mapping tab opens and displays a list of all mappingrules that are applied to the object. You can see the name of the object in the source schema and thenew name of the object in the target schema. If you have data type rules, you also see the data type ofthe column in the source schema and the new data type of the column in the target schema.

Version 1.096

Page 104: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideExporting Mapping Rules

Exporting Mapping RulesIf you use AWS Database Migration Service (AWS DMS) to migrate your data from your source databaseto your target database, you can provide information about your mapping rules to AWS DMS. For moreinformation about tasks, see Working with AWS Database Migration Service Replication Tasks.

To export mapping rules

1. In the AWS Schema Conversion Tool, in the source schema tree, open the context (right-click) menuand choose Export script for DMS. The save dialog box opens.

2. Browse to the location where you want to save your script, and then choose Save. Your mappingrules are saved as a JSON script that can be consumed by AWS DMS.

Converting Your Schema by Using the AWSSchema Conversion Tool

After you have connected your project to both your source database and your target database, your AWSSchema Conversion Tool (AWS SCT) project displays the schema from your source database in the leftpanel. The schema is presented in a tree-view format, and each node of the tree is lazy loaded. When youchoose a node in the tree view, AWS SCT requests the schema information from your source database atthat time.

You can choose schema items from your source database and then convert the schema to equivalentschema for the database engine of your target database. You can choose any schema item from yoursource database to convert. If the schema item that you choose depends on a parent item, then AWSSCT also generates the schema for the parent item. For example, if you choose a column from a tableto convert, then AWS SCT generates the schema for the column, the table that the column is in, and thedatabase that the table is in.

Converting SchemaTo convert schema from your source database, choose a schema object to convert from the left panel ofyour project. Open the context (right-click) menu for the object, and then choose Convert schema, asshown following.

Version 1.097

Page 105: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConverting Schema

After you have converted the schema from your source database, you can choose schema items from theleft panel of your project and view the converted schema in the center panels of your project. The lower-center panel displays the properties of and the SQL command to create the converted schema, as shownfollowing.

Version 1.098

Page 106: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideEditing Converted Schema

After you have converted your schema, you can save your project. The schema information from yoursource database is saved with your project. This functionality means that you can work offline withoutbeing connected to your source database. AWS SCT connects to your source database to update theschema in your project if you choose Refresh from Database for your source database. For moreinformation, see Updating and Refreshing Your Converted Schema in the AWS Schema ConversionTool (p. 107).

You can create a database migration assessment report of the items that can't be convertedautomatically. The assessment report is useful for identifying and resolving schema items that can't beconverted automatically. For more information, see Creating and Using the Assessment Report in theAWS Schema Conversion Tool (p. 102).

When AWS SCT generates a converted schema, it doesn't immediately apply it to the target database.Instead, the converted schema is stored locally until you are ready to apply it to the target database. Formore information, see Applying Your Converted Schema (p. 109).

Editing Converted SchemaYou can edit converted schema and save the changes as part of your project.

To edit converted schema

1. In the left panel that displays the schema from your source database, choose the schema item thatyou want to edit the converted schema for.

Version 1.099

Page 107: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideClearing a Converted Schema

2. In the lower-center panel that displays the converted schema for the selected item, choose the SQLtab.

3. In the text displayed for the SQL tab, change the schema as needed. The schema is automaticallysaved with your project as you update it.

The changes that you make to converted schema are stored with your project as you make updates. Ifyou newly convert a schema item from your source database, and you have made updates to previouslyconverted schema for that item, those existing updates are replaced by the newly converted schemaitem based on your source database.

Clearing a Converted SchemaUntil you apply the schema to your target database, AWS SCT only stores the converted schema locallyin your project. You can clear the planned schema from your project by choosing the tree-view node foryour target database, and then choosing Refresh from Database. Because no schema has been writtento your target database, refreshing from the database removes the planned schema elements in yourAWS SCT project to match what exists in your target database.

Version 1.0100

Page 108: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideManaging and Customizing Keys

Managing and Customizing Keys in the AWSSchema Conversion Tool

After you convert your schema with the AWS Schema Conversion Tool (AWS SCT), you can manage andedit your keys. Key management is the heart of a data warehouse conversion.

To manage keys, select a table in your target database, and then choose the Key Management tab asshown following.

Version 1.0101

Page 109: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating and Using the Assessment Report

The left pane contains key suggestions, and includes the confidence rating for each suggestion. You canchoose one of the suggestions, or you can customize the key by editing it in the right pane.

If the choices for the key don't look like what you expected, you can edit your edit your optimizationstrategies, and then retry the conversion. For more information, see Choosing Optimization Strategiesand Rules for Use with the AWS Schema Conversion Tool (p. 92).

Creating and Using the Assessment Report in theAWS Schema Conversion Tool

The AWS Schema Conversion Tool (AWS SCT) creates a database migration assessment report to help youconvert your schema. The database migration assessment report provides important information aboutthe conversion of the schema from your source database to your target database. The report summarizesall of the schema conversion tasks and details the action items for schema that can't be converted to theDB engine of your target database. The report also includes estimates of the amount of effort that it willtake to write the equivalent code in your target database that can't be converted automatically.

Creating a Database Migration Assessment ReportUse the following procedure to create a database migration assessment report.

To create a database migration assessment report

1. In the left panel that displays the schema from your source database, choose a schema object tocreate an assessment report for.

Version 1.0102

Page 110: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSummary

2. Open the context (right-click) menu for the object, and then choose Create Report.

Assessment Report SummaryAfter you create an assessment report, the assessment report view opens, showing the Summary tab.The Summary tab displays the summary information from the database migration assessment report. Itshows items that were converted automatically, and items that were not converted automatically.

Version 1.0103

Page 111: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideAction Items

For schema items that can't be converted automatically to the target database engine, the summaryincludes an estimate of the effort required to create schema items in your target DB instance that areequivalent to those in your source.

The report categorizes the estimated time to convert these schema items as follows:

• Simple – Actions that can be completed in less than one hour.

• Medium – Actions that are more complex and can be completed in one to four hours.

• Significant – Actions that are very complex and take more than four hours to complete.

Assessment Report Action ItemsThe assessment report view also includes an Action Items tab. This tab contains a list of items that can'tbe converted automatically to the database engine of your target database. If you select an action itemfrom the list, AWS SCT highlights the item from your schema that the action item applies to.

The report also contains recommendations for how to manually convert the schema item. For moreinformation about deciding how to handle manual conversions, see Handling Manual Conversions in theAWS Schema Conversion Tool (p. 106).

Version 1.0104

Page 112: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSaving the Assessment Report

Saving the Assessment ReportYou can save a local copy of the database migration assessment report as either a PDF file or a comma-separated values (CSV) file. The CSV file contains only action item information. The PDF file containsboth the summary and action item information, as shown in the following example.

Version 1.0105

Page 113: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHandling Manual Conversions

Handling Manual Conversions in the AWS SchemaConversion Tool

The assessment report includes a list of items that can't be converted automatically to the databaseengine of your target database. For each item that can't be converted, there is an action item on theAction Items tab.

You can respond to the action items in the assessment report in the following ways:

• Modify your source database schema.

• Modify your target database schema.

Version 1.0106

Page 114: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideModifying Your Source Schema

Modifying Your Source SchemaFor some items, it might be easier to modify the database schema in your source database to schemathat can be converted automatically. First, verify that the new changes are compatible with yourapplication architecture, then update the schema in your source database. Finally, refresh your projectwith the updated schema information. You can then convert your updated schema, and generate a newdatabase migration assessment report. The action items no longer appear for the items that changed inthe source schema.

The advantage of this process is that your updated schema is always available when you refresh fromyour source database.

Modifying Your Target SchemaFor some items, it might be easier to apply the converted schema to your target database, and thenadd equivalent schema items manually to your target database for the items that couldn't be convertedautomatically. You can write all of the schema that can be converted automatically to your targetdatabase by applying the schema. For more information, see Saving and Applying Your ConvertedSchema in the AWS Schema Conversion Tool (p. 108).

The schema that are written to your target database don't contain the items that can't be convertedautomatically. After applying the schema to your target database, you can then manually create schemain your target database that are equivalent to those in the source database. The action items in thedatabase migration assessment report contain suggestions for how to create the equivalent schema.

WarningIf you manually create schema in your target database, save a copy of any manual work thatyou do. If you apply the converted schema from your project to your target database again, itoverwrites the manual work you have done.

In some cases, you can't create equivalent schema in your target database. You might need to rearchitecta portion of your application and database to use the functionality that is available from the enginefor your target database. In other cases, you can simply ignore the schema that can't be convertedautomatically.

Updating and Refreshing Your Converted Schemain the AWS Schema Conversion Tool

You can update both the source schema and the target schema in your AWS Schema Conversion Tool(AWS SCT) project.

• Source – If you update the schema for your source database, AWS SCT replaces the schema in yourproject with the latest schema from your source database. Using this functionality, you can updateyour project if changes have been made to the schema of your source database.

 

• Target – If you update the schema for your target database, AWS SCT replaces the schema in yourproject with the latest schema from your target database. If you haven't applied any schema to yourtarget database, AWS SCT clears the converted schema from your project. You can then convert theschema from your source database for a clean target database.

 

Version 1.0107

Page 115: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSaving and Applying Your Schema

You update the schema in your AWS SCT project by choosing Refresh from Database, as shownfollowing.

Saving and Applying Your Converted Schema inthe AWS Schema Conversion Tool

When the AWS Schema Conversion Tool (AWS SCT) generates converted schema (as shown in ConvertingYour Schema by Using the AWS Schema Conversion Tool (p. 97)), it doesn't immediately applythe converted schema to the target database. Instead, converted schema are stored locally in yourproject until you are ready to apply them to the target database. Using this functionality, you can workwith schema items that can't be converted automatically to your target database engine. For moreinformation on items that can't be converted automatically, see Creating and Using the AssessmentReport in the AWS Schema Conversion Tool (p. 102).

You can optionally have the tool save your converted schema to a file as a SQL script prior to applyingthe schema to your target database. You can also have the tool apply the converted schema directly toyour target database.

Saving Your Converted Schema to a FileYou can save your converted schema as SQL scripts in a text file. By using this approach, you can modifythe generated SQL scripts from AWS SCT to address items that the tool can't convert automatically.You can then run your updated scripts on your target database to apply your converted schema to yourtarget database.

Version 1.0108

Page 116: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying Your Converted Schema

To save your converted schema as SQL scripts, open the context (right-click) menu for the schemaelement, and choose Save as SQL, as shown following.

Applying Your Converted SchemaWhen you are ready to apply your converted schema to your target database, choose the schemaelement from the right panel of your project. Open the context (right-click) menu for the schemaelement, and then choose Apply to database, as shown following.

Version 1.0109

Page 117: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Extension Pack Schema

The Extension Pack SchemaThe first time that you apply your converted schema to your target DB instance, AWS SCT adds anadditional schema to your target DB instance. This schema implements system functions of the sourcedatabase that are required when writing your converted schema to your target DB instance. The schemais called the extension pack schema.

Don't modify the extension pack schema, or you might encounter unexpected results in the convertedschema that is written to your target DB instance. When your schema is fully migrated to your target DBinstance, and you no longer need AWS SCT, you can delete the extension pack schema.

The extension pack schema is named according to your source database as follows:

• Greenplum: AWS_GREENPLUM_EXT

• Microsoft SQL Server: AWS_SQLSERVER_EXT

• Netezza: AWS_NETEZZA_EXT

• Oracle: AWS_ORACLE_EXT

• Teradata: AWS_TERADATA_EXT

• Vertica: AWS_VERTICA_EXT

For more information, see Using the Custom Python Library for the AWS SCT Extension Pack (p. 143).

Version 1.0110

Page 118: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePython Libraries

Python LibrariesTo create custom functions in Amazon Redshift, you use the Python language. Use the AWS SCTextension pack to install python libraries for your Amazon Redshift database. For more information, see Using the Custom Python Library for the AWS SCT Extension Pack (p. 143).

Optimizing Amazon Redshift by Using the AWSSchema Conversion Tool

You can use the AWS Schema Conversion Tool (AWS SCT) to optimize your Amazon Redshift database.Using your Amazon Redshift database as a source, and a test Amazon Redshift database as the target,AWS SCT recommends sort keys and distribution keys to optimize your database.

Before You BeginAlmost all work you do with AWS SCT starts with the same three steps. Complete the following stepsbefore you optimize your Amazon Redshift database:

1. Create an AWS SCT project. For more information, see Creating an AWS Schema Conversion ToolProject (p. 26).

2. Connect to your source database. For more information, see Connecting to an Amazon RedshiftSource Database (p. 49).

3. Connect to your target database. For more information, see Connecting to Your TargetDatabase (p. 28).

ImportantDon't use the same cluster for both the source and target of your optimization.

Before you optimize your Amazon Redshift database, you should also choose your optimizationstrategies. For more information, see Choosing Optimization Strategies and Rules for Use with the AWSSchema Conversion Tool (p. 92).

Optimizing Your Amazon Redshift DatabaseUse the following procedure to optimize your Amazon Redshift database.

To optimize your Amazon Redshift database

1. Take a manual snapshot of your Amazon Redshift cluster as a backup. You can delete the snapshotafter you are done optimizing your Amazon Redshift cluster and testing any changes that you make.For more information, see Amazon Redshift Snapshots.

2. Choose a schema object to convert from the left panel of your project. Open the context (right-click)menu for the object, and then choose Collect Statistics.

AWS SCT uses the statistics to make suggestions for sort keys and distribution keys.3. Choose a schema object to optimize from the left panel of your project. Open the context (right-

click) menu for the object, and then choose Run Optimization.

AWS SCT makes suggestions for sort keys and distribution keys.4. To review the suggestions, expand the tables node under your schema in the left panel of your

project, and then choose a table. Choose the Key Management tab as shown following.

Version 1.0111

Page 119: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOptimizing Your Amazon Redshift Database

The left pane contains key suggestions, and includes the confidence rating for each suggestion. Youcan choose one of the suggestions, or you can customize the key by editing it in the right pane.

5. You can create a report that contains the optimization suggestions. To create the report, do thefollowing:

a. Choose a schema object that you optimized from the left panel of your project. Open thecontext (right-click) menu for the object, and then choose Create Report.

The report opens in the main window, and the Summary tab appears. The number of objectswith optimization suggestions appears in the report.

b. Choose the Action Items tab to see the key suggestions in a report format.c. You can save a local copy of the optimization report as either a PDF file or a comma-separated

values (CSV) file. The CSV file contains only action item information. The PDF file contains boththe summary and action item information.

6. To apply suggested optimizations to your database, choose an object in the right panel of yourproject. Open the context (right-click) menu for the object, and then choose Apply to database.

Version 1.0112

Page 120: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideBefore You Begin

Working with the AWS DatabaseMigration Service Using the AWSSchema Conversion Tool

AWS Database Migration Service (AWS DMS) is a web service that you can use to migrate data to andfrom most widely used commercial and open-source databases. You can use the AWS Schema ConversionTool (AWS SCT) to create AWS DMS endpoints and tasks. You can run and monitor the tasks from AWSSCT. For more information about AWS DMS, see What Is AWS Database Migration Service? in the AWSDMS User Guide..

This section covers the following topics:

Topics

• Before You Begin (p. 113)

• Credentials for Working with AWS DMS (p. 113)

• Creating an AWS DMS Task (p. 114)

• Running and Monitoring an AWS DMS Task (p. 114)

• Using an AWS SCT Replication Agent with AWS DMS (p. 115)

Before You BeginAlmost all work you do with AWS SCT starts with the following three steps:

1. Create an AWS SCT project.

2. Connect to your source database.

3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

Because AWS DMS interacts with the target schema, you need to convert your database schema beforeyou can integrate with AWS DMS. To convert your database schema, see Converting Database SchemasUsing the AWS Schema Conversion Tool (p. 72).

Credentials for Working with AWS DMSTo create AWS DMS tasks, AWS SCT must connect to AWS DMS with your credentials. You can usecredentials that you previously stored in a profile in the global application settings and associatedwith the project. For more information, see Using AWS Service Profiles in the AWS Schema ConversionTool (p. 21).

Version 1.0113

Page 121: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating a Task

Creating an AWS DMS TaskAfter you use AWS SCT to convert your database schema, you can create AWS DMS tasks. Use thefollowing procedure to create an AWS DMS task.

To create an AWS DMS task

1. In the AWS Schema Conversion Tool, choose a database or a schema object from the left panel ofyour project. Open the context (right-click) menu for the object, and then choose Create DMS Task.

The Create DMS task dialog box appears.

2. For Task name, type a name for your task.

3. For Replication instance, choose the replication instance that you want to use. For moreinformation, see Replication Instances for AWS Database Migration Service.

4. For Source endpoint, choose an existing endpoint. You can also choose Create new to create a newendpoint. When you choose Create new, a new endpoint is created for you by using the currentconnection information. You can verify the connection information and give the endpoint a namebefore it is created.

5. For Target endpoint, choose an existing endpoint. You can also choose Create new to create a newendpoint. When you choose Create new, a new endpoint is created for you by using the currentconnection information. You can verify the connection information and give the endpoint a namebefore it is created.

6. For Include LOB columns in replication, choose Don’t include LOB columns, Full LOB mode, orLimited LOB mode. For more information, see LOB Support for Source Databases.

7. For LOB chunk size (kb), type the LOB chunk size in kilobytes.

8. Select Enable logging to turn on logging for the task.

9. Choose Preview JSON to see the JSON that is created for the task.

10. Choose Save JSON to save a copy of the JSON that is created for the task.

11. After you have configured your task, choose Create to save your task. You can also choose Close tocancel your changes.

Running and Monitoring an AWS DMS TaskAfter you create AWS DMS tasks, you can run and monitor them in the data migration view. Use thefollowing procedure to run and monitor your AWS DMS tasks.

To run and monitor your AWS DMS tasks

1. Open the View menu, and then choose Data Migration View.

2. In the list of tasks, choose the task you want to run. Choose Start to run the task. The Status columnshows the status of the task.

3. When you have a running task, you can choose the following actions:

• Choose Stop to stop a task.

• Choose Resume to resume a task.

4. Choose Delete to delete a task.

5. Choose Refresh to refresh the task list. The Status column shows the current status of all tasks.

6. Choose Show Log to see the task log. If you selected Enable logging when you created the task, thetask log shows log information.

Version 1.0114

Page 122: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUsing an AWS SCT Replication Agent with AWS DMS

Using an AWS SCT Replication Agent with AWSDMS

For very large database migrations, you can use a AWS SCT replication agent to copy data from youron-premises database to Amazon S3 or an Amazon Snowball device. The replication agent works inconjunction with AWS DMS, and the replication agent can work in the background while AWS SCT isclosed.

When working with Amazon Snowball, the AWS SCT agent extracts data to the Amazon Snowball device.The device is then sent to AWS and the data is loaded to an Amazon S3 bucket. During this time, theAWS SCT agent continues to run. The agent then takes the data on Amazon S3 and copies the data tothe target endpoint.

For more information, see the AWS DMS documentation.

Version 1.0115

Page 123: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Using Data Extraction AgentsYou can use the AWS SCT data extraction agents to extract data from your on-premises data warehouseand migrate it to Amazon Redshift. The extraction agent extracts your data and uploads the data toeither Amazon S3 or an AWS Snowball device. You can then use AWS SCT to copy the data to AmazonRedshift.

Amazon S3 is a storage and retrieval service. To store an object in Amazon S3, you upload the file youwant to store to a bucket. When you upload a file, you can set permissions on the object and also on anymetadata.

Large-scale data migrations can include many terabytes of information, and can be slowed by networkperformance and by the sheer amount of data that has to be moved. AWS Snowball is an AWS serviceyou can use to transfer data to the cloud at faster-than-network speeds using an AWS-owned appliance.An AWS Snowball device can hold up to 80 TB of data and an AWS Snowball Edge device can hold up to100 TB of data. It uses 256-bit encryption and an industry-standard Trusted Platform Module (TPM) toensure both security and full chain-of-custody for your data. AWS SCT works with both AWS Snowballdevices and AWS Snowball Edge devices, referred to as AWS Snowball devices in the rest of this guide.

When you use AWS SCT and an AWS Snowball device, you migrate your data in two stages. First, youuse the AWS SCT to process the data locally and then move that data to the AWS Snowball device. Youthen send the device to AWS using the AWS Snowball process, and then AWS automatically loads thedata into an Amazon S3 bucket. Next, when the data is available on Amazon S3, you use AWS SCT tomigrate the data to Amazon Redshift. Data extraction agents can work in the background while AWS SCTis closed.

The following diagram shows the supported scenario.

Version 1.0116

Page 124: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePrerequisite Settings

Data extraction agents are currently supported for the following source data warehouses:

• Greenplum Database (version 4.3 and later)

• Microsoft SQL Server (version 2008 and later)

• Netezza (version 7.0.3 and later)

• Oracle (version 10 and later)

• Teradata (version 13 and later)

• Vertica (version 7.2.2 and later)

You can connect to FIPS endpoints for Amazon Redshift if you need to comply with the FederalInformation Processing Standard security requirements. FIPS endpoints are available in the followingAWS Regions:

• US East (N. Virginia) Region (redshift-fips.us-east-1.amazonaws.com)

• US East (Ohio) Region (redshift-fips.us-east-2.amazonaws.com)

• US West (N. California) Region (redshift-fips.us-west-1.amazonaws.com)

• US West (Oregon) Region (redshift-fips.us-west-2.amazonaws.com)

Use the information in the following topics to learn how to work with data extraction agents.

Topics

• Prerequisite Settings for Amazon S3 and Security for Data Extraction Agents (p. 117)

• Installing Extraction Agents (p. 119)

• Registering Extraction Agents with the AWS Schema Conversion Tool (p. 121)

• Hiding and Recovering Information for an AWS SCT Agent (p. 123)

• Creating Data Extraction Filters in the AWS Schema Conversion Tool (p. 124)

• Sorting Data Before Migrating Using AWS SCT (p. 124)

• Creating, Running, and Monitoring an AWS SCT Data Extraction Task (p. 125)

• Data Extraction Using a AWS Snowball Device (p. 127)

• Data Extraction Task Output (p. 128)

• Using Virtual Partitioning with AWS Schema Conversion Tool (p. 129)

• Migrating LOBs to Amazon Redshift (p. 132)

• Best Practices and Troubleshooting for Data Extraction Agents (p. 133)

Prerequisite Settings for Amazon S3 and Securityfor Data Extraction Agents

Before you work with data extraction agents, store your Amazon S3 bucket information and set up yourSecure Sockets Layer (SSL) trust and key store.

Amazon S3 SettingsAfter your agents extract your data, they upload it to your Amazon S3 bucket. Before you continue, youmust provide the credentials to connect to your AWS account and your Amazon S3 bucket. You store

Version 1.0117

Page 125: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSecurity Settings

your credentials and bucket information in a profile in the global application settings, and then associatethe profile with your AWS SCT project. If necessary, choose Global Settings to create a new profile. Formore information, see Using AWS Service Profiles in the AWS Schema Conversion Tool (p. 21).

Security SettingsThe AWS Schema Conversion Tool and the extraction agents can communicate through Secure SocketsLayer (SSL). To enable SSL, set up a trust store and key store.

To set up secure communication with your extraction agent

1. Start the AWS Schema Conversion Tool.2. Open the Settings menu, and then choose Global Settings. The Global settings dialog box appears.

Choose the Security tab as shown following.

3. Choose Generate Trust and Key Store, or choose Select existing Trust and Key Store.

If you choose Generate Trust and Key Store, you then specify the name and password for the trustand key stores, and the path to the location for the generated files. You use these files in later steps.

If you choose Select existing Trust and Key Store, you then specify the password and file name forthe trust and key stores. You use these files in later steps.

4. After you have specified the trust store and key store, choose OK to close the Global Settings dialogbox.

Version 1.0118

Page 126: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideInstalling Agents

Installing Extraction AgentsWe recommend that you install multiple extraction agents on individual computers, separate from thecomputer that is running the AWS Schema Conversion Tool.

Extraction agents are currently supported on the following operating systems:

• macOS• Microsoft Windows• Red Hat Enterprise Linux (RHEL) 6.0• Ubuntu Linux (version 14.04 and later)

Use the following procedure to install extraction agents. Repeat this procedure for each computer thatyou want to install an extraction agent on.

To install an extraction agent

1. If you have not already downloaded the AWS SCT installer file, follow the instructions at Installing,Verifying, and Updating the AWS Schema Conversion Tool (p. 4) to download it. The .zip file thatcontains the AWS SCT installer file also contains the extraction agent installer file.

2. Locate the installer file for your extraction agent in a subfolder named agents. For each computeroperating system, the correct file to install the extraction agent is shown following.

Operating System File Name

macOS aws-schema-conversion-tool-extractor-1.0.build-number.dmg

Microsoft Windows aws-schema-conversion-tool-extractor-1.0.build-number.msi

RHEL aws-schema-conversion-tool-extractor-1.0.build-number.x86_64.rpm

Ubuntu Linux aws-schema-conversion-tool-extractor-1.0.build-number.deb

3. To install the extraction agent on a separate computer, copy the installer file to the new computer.4. Run the installer file. Use the instructions for your operating system, shown following.

Operating System Installation Instructions

macOS In Finder, open aws-schema-conversion-tool-extractor-1.0.build-number.dmg.

Drag aws-schema-conversion-tool-extractor-1.0.build-number.dmg to the Applications folder.

Microsoft Windows Double-click the file to run the installer.

RHEL Run the following command in the folder that you downloaded or movedthe file to:

sudo rpm -ivh aws-schema-conversion-tool-extractor-1.0.build-number.x86_64.rpm

Version 1.0119

Page 127: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideConfiguring Agents

Operating System Installation Instructions

Ubuntu Linux Run the following command in the folder that you downloaded or movedthe file to:

sudo dpkg -i aws-schema-conversion-tool-extractor-1.0.build-number.deb

5. Install the Java Database Connectivity (JDBC) drivers for your source database engine. Forinstructions and download links, see Installing the Required Database Drivers (p. 8). Follow theinstructions for your source database engine only, not your target database engine.

6. Copy the SSL trust and key stores (.zip or individual files) that you generated in an earlier procedure.If you copy the .zip file to a new computer, extract the individual files from the .zip file on the newcomputer.

You can put the files anywhere you want. However, note the locations because in a later procedureyou tell the agent where to find the files.

Continue installing your extraction agent by completing the procedure in the following section.

Configuring Extraction AgentsUse the following procedure to configure extraction agents. Repeat this procedure on each computerthat has an extraction agent installed.

To configure your extraction agent

• From the location where you installed the agent, run the setup program. For RHEL and Ubuntu, thefile is named sct-extractor-setup.sh. For macOS and Microsoft Windows, the file is namedAWS SCT Data Extractor Agent, and you can double-click the file to run it.

The setup program prompts you for information. For each prompt, a default value appears. You canaccept the default value, or type a new value. You specify the following information:

• The data warehouse engine.• The port number the agent listens on.• The location where you installed the JDBC drivers.• The working folder. Your extracted data goes into a subfolder of this location. The working folder

can be on a different computer from the agent, and a single working folder can be shared bymultiple agents on different computers.

• The location of the key store file.• The password for the key store.• The location of the trust store file.• The password for the trust store.

The setup program updates the settings file for the extraction agent. The settings file is namedSettings.properties, and is located where you installed the extraction agent. The following is asample settings file.

port=8888vendor=ORACLEdriver.jars=<driver path>/Install/Drivers/ojdbc7.jarlocation=<output path>/dmt/8888/outextractor.log.folder=<log path>/dmt/8888/logextractor.storage.folder=<storage path>/dmt/8888/storage

Version 1.0120

Page 128: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStarting Agents

extractor.start.fetch.size=20000extractor.out.file.size=10485760ssl.option=OFF#ssl.option=ON#ssl.keystore.path=<key store path>/dmt/8888/vault/keystore#ssl.truststore.path=<trust store path>/dmt/8888/vault/truststore

Starting Extraction AgentsUse the following procedure to start extraction agents. Repeat this procedure on each computer that hasan extraction agent installed.

Extraction agents act as listeners. When you start an agent with this procedure, the agent starts listeningfor instructions. You send the agents instructions to extract data from your data warehouse in a latersection.

To start your extraction agent

• On the computer that has the extraction agent installed, run the command listed following for youroperating system.

Operating System Start Command

macOS Run the StartAgent.command file.

Microsoft Windows Double-click the StartAgent.bat batch file.

RHEL Run the following command in the path to the folder that you installedthe agent:

sudo initctl start sct-extractor

Ubuntu Linux Run the following command in the path to the folder that you installedthe agent. Use the command appropriate for your version of Ubuntu.

Ubuntu 14.04: sudo initctl start sct-extractor

Ubuntu 15.04 and later: sudo systemctl start sct-extractor

To check the status of the agent, run the same command but replace start with status.

To stop an agent, run the same command but replace start with stop.

Registering Extraction Agents with the AWSSchema Conversion Tool

You manage your extraction agents by using AWS SCT. The extraction agents act as listeners. When theyreceive instructions from AWS SCT, they extract data from your data warehouse.

Use the following procedure to register extraction agents with your AWS SCT project.

To register an extraction agent

1. Start the AWS Schema Conversion Tool, and open a project.

Version 1.0121

Page 129: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRegistering Agents

a. Open an existing or create a new project. For more information, see Creating an AWS SchemaConversion Tool Project (p. 26).

b. Connect to your source database. For more information, see Connecting to Your SourceDatabase (p. 27).

c. Connect to your target database. For more information, see Connecting to Your TargetDatabase (p. 28).

d. Convert your schema. For more information, see Converting Data Warehouse Schemas toAmazon Redshift by Using the AWS Schema Conversion Tool (p. 91).

e. Apply your schema. For more information, see Saving and Applying Your Converted Schema inthe AWS Schema Conversion Tool (p. 108).

2. Open the View menu, and then choose Data Migration View. The Agents tab appears. If you havepreviously registered agents, they appear in a grid at the top of the tab as shown following.

3. Choose Register. The New Agent Registration dialog box appears.

NoteAfter you register an agent with an AWS SCT project, you can't register the same agentwith a different project. If you're no longer using an agent in an AWS SCT project, you canunregister it. You can then register it with a different project.

4. Enter your information in the New Agent Registration dialog box:

a. For Description, type a description of the agent.

b. For Host Name, type the host name or IP address of the computer of the agent.

c. For Port, type the port number that the agent is listening on.

d. Choose Register to register the agent with your AWS SCT project.

5. Repeat the previous steps to register multiple agents with your AWS SCT project.

Version 1.0122

Page 130: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHiding and Recovering Information for an AWS SCT Agent

Hiding and Recovering Information for an AWSSCT Agent

An AWS SCT agent encrypts a significant amount of information, for example passwords to user key-trust stores, database accounts, AWS account information, and similar items. It does so using a specialfile called seed.dat. By default, the agent creates this file in the working folder of the user who firstconfigures the agent.

Because different users can configure and run the agent, the path to seed.dat is stored in the{extractor.private.folder} parameter of the settings.properties file. When the agentstarts, it can use this path to find the seed.dat file to access the key-trust store information for thedatabase it acts on.

You might need to recover passwords that an agent has stored in these cases:

• If the user loses the seed.dat file and the AWS SCT agent's location and port didn't change.• If the user loses the seed.dat file and the AWS SCT agent's location and port has changed. In this

case, the change usually occurs because the agent was migrated to another host or port and theinformation in the seed.dat file is no longer valid.

In these cases, if an agent is started without SSL, it starts and then accesses the previously created agentstorage. It then goes to the Waiting for recovery state.

However, in these cases, if an agent is started with SSL you can't restart it. This is because the agent can'tdecrypt the passwords to certificates stored in the settings.properties file. In this type of startup,the agent fails to start. An error similar to the following is written in the log: "The agent could not startwith SSL mode enabled. Please reconfigure the agent. Reason: The password for keystore is incorrect."

To fix this, create a new agent and configure the agent to use the existing passwords for accessing theSSL certificates. To do so, use the following procedure.

After you perform this procedure, the agent should run and go to the Waiting for recovery state. AWSSCT automatically sends the needed passwords to an agent in the Waiting for recovery state. When theagent has the passwords, it restarts any tasks. No further user action is required on the SCT side.

To reconfigure the agent and restore passwords for accessing SSL certificates

1. Install a new AWS SCT agent and run configuration.2. Change the agent.name property in the instance.properties file to the name of the agent the

storage was created for, to have the new agent work with existing agent storage.

The instance.properties file is stored in the agent's private folder, which is named using thefollowing convention: {output.folder}\dmt\{hostName}_{portNumber}\.

3. Change the name of {output.folder} to that of the previous agent's output folder.

At this point, AWS SCT is still trying to access the old extractor at the old host and port. As a result,the inaccessible extractor gets the status FAILED. You can then change the host and port.

4. Modify the host, port, or both for the old agent by using the Modify command to redirect therequest flow to the new agent.

When AWS SCT can ping the new agent, AWS SCT receives the status Waiting for recovery from theagent. AWS SCT then automatically recovers the passwords for the agent.

Each agent that works with the agent storage updates a special file called storage.lck located at{output.folder}\{agentName}\storage\. This file contains the agent's network ID and the

Version 1.0123

Page 131: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Data Extraction Filters

time until which the storage is locked. When the agent works with the agent storage, it updates thestorage.lck file and extends the lease of the storage by 10 minutes every 5 minutes. No otherinstance can work with this agent storage before the lease expires.

Creating Data Extraction Filters in the AWSSchema Conversion Tool

Before you extract your data with the AWS Schema Conversion Tool (AWS SCT), you can set up filtersthat reduce the amount of data that you extract. You can create data extraction filters by using WHEREclauses to reduce the data that you extract. For example, you can write a WHERE clause that selects datafrom a single table.

You can create data extraction filters and save the filters as part of your project. With your project open,use the following procedure to create data extraction filters.

To create data extraction filters

1. On the Settings menu, choose Mapping Rules. The Mapping Rules dialog box appears. The toppane contains transformation rules, and the bottom pane contains filtering rules.

2. In the Filtering Rules pane, choose Add new rule.

3. Configure your filter:

a. For Name, type a name for your filter.

b. For Where schema name like, type a filter to apply to schemas. In this filter, a WHERE clause isevaluated by using a LIKE clause. You can enter an exact name to choose one schema, or youcan enter a pattern to choose multiple schemas.

c. For table name like, type a filter to apply to tables. In this filter, a WHERE clause is evaluatedby using a LIKE clause. You can enter an exact name to choose one table, or you can enter apattern to choose multiple tables.

d. For Where clause, type a WHERE clause to filter data.

4. After you have configured your filter, choose Save to save your filter, or Cancel to cancel yourchanges.

5. After you are done adding, editing, and deleting filters, choose Save All to save all your changes,and then choose Close.

To turn off a filter without deleting it, use the toggle icon. To duplicate an existing filter, use the copyicon. To delete an existing filter, use the delete icon. To save any changes you make to your filters, chooseSave All.

Sorting Data Before Migrating Using AWS SCTSorting your data before migration with AWS SCT provides some benefits. If you sort data first, AWS SCTcan restart the extraction agent at the last saved point after a failure. Also, if you are migrating data toAmazon Redshift and you sort data first, AWS SCT can insert data into to Amazon Redshift faster.

These benefits have to do with how AWS SCT creates data extraction queries. In some cases, AWS SCTuses the DENSE_RANK analytic function in these queries. However, DENSE_RANK can use lots of timeand server resources to sort the dataset that results from extraction, so if AWS SCT can work without it, itdoes.

Version 1.0124

Page 132: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating, Running, and Monitoring an AWS SCT Task

To sort data before migrating using AWS SCT

1. Open an AWS SCT project.2. Open the context (right-click) menu for the object, and then choose Create Local Task.3. Choose the Advanced tab, and for Sorting Strategy, choose an option:

• Never use sorting – The extraction agent doesn't use the DENSE_RANK analytic function andrestarts from the beginning if a failure occurs.

• Use sorting if possible – The extraction agent uses DENSE_RANK if the table has a primary key ora unique constraint.

• Use sorting after first fail (recommended) – The extraction agent first tries to get the datawithout using DENSE_RANK. If the first attempt fails, the extraction agent rebuilds the queryusing DENSE_RANK and preserves its location in case of failure.

4. Set additional parameters as described following, and then choose Create to create your dataextraction task.

Creating, Running, and Monitoring an AWS SCTData Extraction Task

Use the following procedures to create, run, and monitor data extraction tasks.

Version 1.0125

Page 133: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating, Running, and Monitoring an AWS SCT Task

To assign tasks to agents and migrate data

1. In the AWS Schema Conversion Tool, after you have converted your schema, choose one or moretables from the left panel of your project.

You can choose all tables, but we recommend against that for performance reasons. We recommendthat you create multiple tasks for multiple tables based on the size of the tables in your datawarehouse.

2. Open the context (right-click) menu for each table, and then choose Create Task. The Create LocalTask dialog box opens, as shown following.

3. For Task Name, type a name for the task.

4. For Migration Mode, choose one of the following:

• Extract Only – Extract your data, and save the data to your local working folders.

• Extract and Upload – Extract your data, and upload your data to Amazon S3.

• Extract, Upload and Copy – Extract your data, upload your data to Amazon S3, and copy it intoyour Amazon Redshift data warehouse.

5. Choose Extract LOBs to extract large objects. If you don't need to extract large objects, you can clearthe check box. Doing this reduces the amount of data that you extract.

6. If you want to see detailed information about a task, choose Enable Task Logging. You can use thetask log to debug problems.

If you enable task logging, choose the level of detail that you want to see. The levels are thefollowing, with each level including all messages from the previous level:

• ERROR – The smallest amount of detail.

• WARNING

• INFO

• DEBUG

• TRACE – The largest amount of detail.

7. Choose Test Task to verify that you can connect to your working folder, Amazon S3 bucket, andAmazon Redshift data warehouse. The verification depends on the migration mode you chose.

Version 1.0126

Page 134: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Extraction Using a AWS Snowball Device

8. Choose Create to create the task.9. Repeat the previous steps to create tasks for all the data that you want to migrate.

To run and monitor tasks

1. For View, choose Data Migration View. The Agents tab appears.2. Choose the Tasks tab. Your tasks appear in the grid at the top as shown following. You can see the

status of a task in the top grid, and the status of its subtasks in the bottom grid.

3. Choose a task in the top grid and expand it. Depending on the migration mode you chose, you seethe task divided into Extract, Upload, and Copy.

4. Choose Start for a task to start that task. You can monitor the status of your tasks while they work.The subtasks run in parallel. The extract, upload, and copy also run in parallel.

5. If you enabled logging when you set up the task, you can view the log:

a. Choose Download Log. A message appears with the name of the folder that contains the logfile. Dismiss the message.

b. A link appears in the Task details tab. Choose the link to open the folder that contains the logfile.

You can close AWS SCT, and your agents and tasks continue to run. You can reopen AWS SCT later tocheck the status of your tasks and view the task logs.

Data Extraction Using a AWS Snowball DeviceThe process of using AWS SCT and AWS Snowball involves several steps. The migration involves a localtask, where AWS SCT moves the data to the AWS Snowball device, an intermediate action where the datais copied from the AWS Snowball device to an S3 bucket. The process then involves a remote task whereAWS SCT loads the data from the Amazon S3 bucket to Amazon Redshift.

Version 1.0127

Page 135: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Extraction Task Output

The sections following this overview provide a step-by-step guide to each of these tasks. The procedureassumes that you have AWS SCT installed and that you have installed a data extraction agent on adifferent machine.

The following steps need to occur to migrate data from a local data store to an AWS data store usingAWS Snowball.

1. Create an AWS Snowball job using the AWS Snowball console. For more information, see Create anImport Job in the AWS Snowball documentation.

2. Unlock the AWS Snowball Edge device using the local, dedicated Linux machine where you installedthe DMS Agent.

3. Create a new project in AWS SCT.

4. Configure the AWS SCT to use the data extractor.

5. Register the data extractor with AWS SCT.

6. Install the database driver for your source database on the dedicated machine where you installed thedata extractor.

7. Create and set permissions for the Amazon S3 bucket to use.

8. Edit the AWS Service Profile in AWS SCT.

9. Create Local & DMS Task in SCT.

10.Run and monitor the Local & DMS Task in SCT.

11.Run the AWS SCT task and monitor progress in SCT.

Data Extraction Task OutputAfter your migration tasks complete, your data is ready. Use the following information to determine howto proceed based on the migration mode you chose and the location of your data.

MigrationMode

Data Location

Extract,Upload andCopy

The data is already in your Amazon Redshift data warehouse. You can verify that thedata is there, and start using it. For more information, see Connecting to ClustersFrom Client Tools and Code.

Extract andUpload

The extraction agents saved your data as files in your Amazon S3 bucket. You canuse the Amazon Redshift COPY command to load your data to Amazon Redshift.For more information, see Loading Data from Amazon S3 in the Amazon Redshiftdocumentation.

There are multiple folders in your Amazon S3 bucket, corresponding to the extractiontasks that you set up. When you load your data to Amazon Redshift, specify the nameof the manifest file created by each task. The manifest file appears in the task folderin your S3 bucket as shown following.

Version 1.0128

Page 136: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUsing Virtual Partitioning

MigrationMode

Data Location

Extract Only The extraction agents saved your data as files in your working folder. Manually copyyour data to your Amazon S3 bucket, and then proceed with the instructions forExtract and Upload.

Using Virtual Partitioning with AWS SchemaConversion Tool

You can often best manage large nonpartitioned tables by creating subtasks that create virtual partitionsof the table data using filtering rules. In AWS SCT, you can create virtual partitions for your migrateddata. There are three partition types, which work with specific data types:

• The RANGE partition type works with numeric and date and time data types.

• The LIST partition type works with numeric, character, and date and time data types.

• The DATE AUTO SPLIT partition type works with date and time data types.

Version 1.0129

Page 137: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideLimits When Creating Virtual Partitioning

AWS SCT validates the values you provide for creating a partition. For example, if you attempt topartition a column with data type NUMERIC but you provide values of a different data type, AWS SCTthrows an error.

Limits When Creating Virtual PartitioningThese are limitations to creating a virtual partition:

• You can only use virtual partitioning only for nonpartitioned tables.• You can use virtual partitioning only in the data migration view.• You can't use the option UNION ALL VIEW with virtual partitioning.

RANGE Partition TypeThe RANGE partition type partitions data based on a range of column values for numeric and date andtime data types. This partition type creates a WHERE clause, and you provide the range of values for eachpartition. You specify a list of values for the partitioned column in the box Values. You can load valueinformation by using a .csv file.

For example, you can create multiple partitions based on a value range you provide. In the followingexample, the partitioning values for LO_TAX are specified to create multiple partitions.

Partition1: WHERE LO_TAX <= 10000.9Partition2: WHERE LO_TAX > 10000.9 AND LO_TAX <= 15005.5Partition3: WHERE LO_TAX > 15005.5 AND LO_TAX <= 25005.95

To create a RANGE virtual partition

1. Open the AWS SCT application.2. Choose Data Migration View mode.3. Choose the table where you want to set up virtual partitioning. Open the context (right-click) menu

for the table, and choose Add Virtual Partitioning.4. In the Add Virtual Partitioning dialog box, enter the information as follows.

Option Action

Partition Type Choose RANGE. The dialog box UI changes depending on the type youchoose.

Column Name Choose the column that you want to partition.

Column Type Choose the data type for the values in the column.

Values Add new values by typing each value in the New Value box, thenchoosing the plus sign to add the value.

Load From File (Optional) Type the name of a .csv file that contains the partition values.

5. Choose OK.

LIST Partition TypeThe LIST partition type partitions data based on column values for numeric, character, and date and timedata types. This partition type creates a WHERE clause, and you provide the values for each partition. You

Version 1.0130

Page 138: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDATE AUTO SPLIT Partition Type

specify a list of values for the partitioned column in the field Values. You can load value information byusing a .csv file.

For example, you can create multiple partitions based on a value you provide. In the following example,the partitioning values for LO_ORDERKEY are specified to create multiple partitions.

Partition1: WHERE LO_ORDERKEY = 1Partition2: WHERE LO_ORDERKEY = 2Partition3: WHERE LO_ORDERKEY = 3…PartitionN: WHERE LO_ORDERKEY = USER_VALUE_N

You can also create a default partition for values not included in the ones specified.

To create a LIST virtual partition

1. Open the AWS SCT application.2. Choose Data Migration View mode.3. Choose the table where you want to set up virtual partitioning. Open the context (right-click) menu

for the table, and choose Add Virtual Partitioning.4. In the Add Virtual Partitioning dialog box, enter the information as follows.

Option Action

Partition Type Choose LIST. The dialog box UI changes depending on the type youchoose.

Column Name Choose the column that you want to partition.

New Value Type a value here to add it to the set of partitioning values.

Include Other Values Choose this option to create a default partition where all values thatdon’t meet the partitioning criteria are stored.

Load From File (Optional) Type the name of a .csv file that contains the partition values.

5. Choose OK.

DATE AUTO SPLIT Partition TypeThe DATE AUTO SPLIT partition type partitions data of date and time data types based on a specifiedinterval between a given start date and end date. You specify the data range and interval (day, week,month, or year). If you don't specify a start date or end date, these values default to the current date.

For example, you can create multiple partitions based on a date range you provide. In the followingexample, the partitioning value range for LO_ORDERDATE is specified to create multiple partitions.

Partition1: WHERE LO_ORDERDATE >= ‘1954-10-10’ AND LO_ORDERDATE < ‘1954-10-24’Partition2: WHERE LO_ORDERDATE >= ‘1954-10-24’ AND LO_ORDERDATE < ‘1954-11-06’Partition3: WHERE LO_ORDERDATE >= ‘1954-11-06’ AND LO_ORDERDATE < ‘1954-11-20’…PartitionN: WHERE LO_ORDERDATE >= USER_VALUE_N AND LO_ORDERDATE <= ‘2017-08-13’

To create a DATE AUTO SPLIT virtual partition

1. Open the AWS SCT application.

Version 1.0131

Page 139: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideWorking with LOBs

2. Choose Data Migration View mode.

3. Choose the table where you want to set up virtual partitioning. Open the context (right-click) menufor the table, and choose Add Virtual Partitioning.

4. In the Add Virtual Partitioning dialog box, enter information as follows.

Option Action

Partition Type Choose DATE AUTO SPLIT. The dialog box UI changes depending on thetype you choose.

Column Name Choose the column that you want to partition.

Start Date Type a start date.

End Date Type an end date.

Interval Type the interval unit, and choose the value for that unit.

5. Choose OK.

Migrating LOBs to Amazon RedshiftAmazon Redshift doesn't support storing large binary objects (LOBs). However, if you need to migrateone or more LOBs to Amazon Redshift, AWS SCT can perform the migration. To do so, AWS SCT uses anAmazon S3 bucket to store the LOBs and writes the URL for the S3 bucket into the migrated data storedin Amazon Redshift.

To migrate LOBs to Amazon Redshift

1. Open an AWS SCT project.

2. For Actions, choose Create Local Task.

3. Choose the Advanced tab.

4. For S3 bucket LOBs folder, type the name of the folder in an S3 bucket where you want the LOBsstored.

Version 1.0132

Page 140: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideBest Practices and Troubleshooting

5. Choose Create to create the task.

Best Practices and Troubleshooting for DataExtraction Agents

The following are some best practices and troubleshooting suggestions for using extraction agents.

Issue Troubleshooting Suggestions

Performance is slow To improve performance, we recommend the following:

• Install multiple agents.• Install agents on computers close to your data warehouse.• Don't run all tables on a single agent task.

Contention delays Avoid having too many agents accessing your data warehouse atthe same time.

An agent goes down temporarily If an agent is down, the status of each of its tasks appears as failedin AWS SCT. If you wait, in some cases the agent can recover. In thiscase, the status of its tasks updates in AWS SCT.

Version 1.0133

Page 141: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideBest Practices and Troubleshooting

Issue Troubleshooting Suggestions

An agent goes downpermanently

If the computer running an agent goes down permanently, and thatagent is running a task, you can substitute a new agent to continuethe task. You can substitute a new agent only if the working folderof the original agent was not on the same computer as the originalagent. To substitute a new agent, do the following:

• Install an agent on a new computer.• Configure the new agent with the same settings, including port

number and working folder, as the original agent.• Start the agent. After the agent starts, the task discovers the new

available agent and continues running on the new agent.

Version 1.0134

Page 142: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideBefore You Begin

Converting Application SQL by Usingthe AWS Schema Conversion Tool

When you convert your database schema from one engine to another, you also need to update the SQLcode in your applications to interact with the new database engine instead of the old one. You can usethe AWS Schema Conversion Tool (AWS SCT) to convert the SQL code in your C++, C#, Java, or otherapplication code. You can view, analyze, edit, and save the converted SQL code.

Before You BeginAlmost all work you do with AWS SCT starts with the following three steps:

1. Create an AWS SCT project.2. Connect to your source database.3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

Because the SQL code in your application interacts with your database schema, you need to convert yourdatabase schema before you can convert your application SQL. To convert your database schema, usethe procedures in one of the following topics:

• Converting Database Schemas Using the AWS Schema Conversion Tool (p. 72)• Converting Data Warehouse Schemas to Amazon Redshift by Using the AWS Schema Conversion

Tool (p. 91)

Overview of Converting Application SQLTo convert the SQL code in your application, you take the following high-level steps:

• Create an application conversion project – The application conversion project is a child of thedatabase schema conversion project. Each database schema conversion project can have one or morechild application conversion projects.

For more information, see Creating Application Conversion Projects in the AWS Schema ConversionTool (p. 136).

 • Analyze and convert your SQL code – AWS SCT analyzes your application, extracts the SQL code, and

creates a local version of the converted SQL for you to review and edit. The tool doesn't change thecode in your application until you are ready.

For more information, see Analyzing and Converting Your SQL Code by Using the AWS SchemaConversion Tool (p. 139).

 

Version 1.0135

Page 143: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Application Conversion Projects

• Create an application assessment report – The application assessment report provides importantinformation about the conversion of the application SQL code from your source database schema toyour target database schema.

For more information, see Creating and Using the Assessment Report (p. 140).

 

• Edit, apply changes to, and save your converted SQL code – The assessment report includes a listof SQL code items that can't be converted automatically. For these items, you can edit the SQL codemanually to perform the conversion.

For more information, see Editing and Saving Your Converted SQL Code with the AWS SchemaConversion Tool (p. 141).

 

Creating Application Conversion Projects in theAWS Schema Conversion Tool

In the AWS Schema Conversion Tool (AWS SCT), the application conversion project is a child of thedatabase schema conversion project. Each database schema conversion project can have one or morechild application conversion projects. Use the following procedure to create an application conversionproject.

To create an application conversion project

1. In the AWS Schema Conversion Tool, choose New Application from the Applications menu.

The New application conversion project dialog box appears.

Version 1.0136

Page 144: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Application Conversion Projects

2. Add the following project information.

For This Parameter Do This

Application Project Name Type a name for your application conversion project. Eachdatabase schema conversion project can have one or more childapplication conversion projects, so choose a name that makessense if you add more projects later.

Location Type the location of the source code for your application.

Project language Choose one of the following:

• JAVA• C++• C#• Any

SQL parameter style fortarget database

Choose one of the following:

• Same as in source• Positional (?)

Version 1.0137

Page 145: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating Application Conversion Projects

For This Parameter Do This

• Indexed (:1)• Indexed ($1)• Named (@name)• Named (:name)

Select source databaseschema

In the source tree, choose the schema used by your applicationcode.

3. Choose OK to create your application conversion project.

The project window opens.

4. The first time you create an application conversion project, the project window opens automatically.To open an existing application conversion project, select the project node in the source tree, openthe context (right-click) menu, and then choose Manage application.

Version 1.0138

Page 146: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideAnalyzing and Converting Your SQL Code

5. You can add additional application conversion projects by choosing New Application from theApplications menu, or by selecting the Applications node in the source tree, opening the context(right-click) menu, and then choosing Add application.

Analyzing and Converting Your SQL Code by Usingthe AWS Schema Conversion Tool

Use the following procedure to analyze and convert your SQL code by using the AWS Schema ConversionTool (AWS SCT).

To analyze and convert your SQL code

1. In the application conversion project, choose Analyze.

AWS SCT analyzes your application code and extracts the SQL code. A list of all extracted SQL codeappears in the Parsed SQL Scripts pane at the bottom of the window. The selected item in the listalso appears in the Extracted SQL script pane.

2. You can analyze each SQL code item in the list, and when you are ready, choose Convert to convertthe SQL to SQL for your target database.

NoteYou can edit the converted SQL code in a later procedure.

Version 1.0139

Page 147: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCreating and Using the Assessment Report

Creating and Using the Assessment ReportThe application assessment report provides important information about converting the applicationSQL code from your source database schema to your target database schema. The report details all ofthe SQL extracted from the application, all of the SQL converted, and action items for SQL that can'tbe converted. The report also includes estimates of the amount of effort that it will take to manuallyconvert the SQL code that can't be converted automatically.

Creating an Application Assessment ReportUse the following procedure to create an application assessment report.

To create an application assessment report

1. In the application conversion project window, choose Create Report from the Actions menu.

The report is created and opens in the application conversion project window.2. Review the Summary tab.

The Summary tab shown following, displays the summary information from the applicationassessment report. It shows the SQL code items that were converted automatically, and items thatwere not converted automatically.

3. Choose the SQL Conversion Actions tab and review the information.

Version 1.0140

Page 148: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideEditing and Saving Your Converted SQL Code

The SQL Conversion Actions tab contains a list of SQL code items that can't be convertedautomatically. There are also recommendations for how to manually convert the SQL code. Youedit your converted SQL code in a later step. For more information, see Editing and Saving YourConverted SQL Code with the AWS Schema Conversion Tool (p. 141).

4. You can save a local copy of the application assessment report as either a PDF file or a comma-separated values (CSV) file. The PDF file contains both the summary and action item information.The CSV file contains only action item information.

Editing and Saving Your Converted SQL Code withthe AWS Schema Conversion Tool

The assessment report includes a list of SQL code items that can't be converted automatically. For eachitem that can't be converted, there is an action item on the SQL Conversion Actions tab. For these items,you can edit the SQL code manually to perform the conversion.

Use the following procedure to edit your converted SQL code, apply the changes, and then save them.

To edit, apply changes to, and save your converted SQL code

1. Edit your converted SQL code directly in the Target SQL script pane. If there is no converted codeshown, you can click in the pane and start typing.

2. After you are finished editing your converted SQL code, choose Apply. At this point, the changes aresaved in memory, but not yet written to your file.

3. Choose Save to save your changes to your file.

ImportantWhen you choose Save you overwrite your original file. Make a copy of your original filebefore saving so you have a record of your original application code.

Version 1.0141

Page 149: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUsing the Extension Pack DB Schema

Using the AWS Schema ConversionTool Extension Pack

The AWS SCT Extension Pack is an add-on module that emulates functions present in the sourcedatabase that are required when converting objects to the target database. Before you can install theAWS SCT Extension Pack, you need to convert your database schema.

The AWS SCT Extension Pack includes the following components:

• DB schema – Includes SQL functions, procedures, and tables for emulating some OLTP and OLAPobjects (for example, sequence) or unsupported built-in-functions from the source database. Thisschema is named in the format aws_<database engine name>_ext.

• Custom Python library (for select OLAP databases) – Includes a set of Python functions that emulateunsupported built-in database functions. Use this library when you migrate from one of the supporteddatabases to Amazon Redshift.

For more information on this library, see Using the Custom Python Library for the AWS SCT ExtensionPack (p. 143).

• AWS Lambda functions (for select OLTP databases) – Includes AWS Lambda functions that emulatecomplex database functionality, such as job scheduling and sending emails.

The following sections discuss the AWS SCT Extension Pack.

Topics• Using the Extension Pack Schema (p. 142)• Using the Custom Python Library for the AWS SCT Extension Pack (p. 143)• Using the AWS Lambda Functions from the AWS SCT Extension Pack (p. 144)

You can apply the AWS SCT Extension Pack in two ways:

• AWS SCT automatically applies the extension pack when you apply a target database script bychoosing ApplyToTarget from the context menu. AWS SCT applies the extension pack before it appliesall other schema objects.

• To manually apply the extension pack, choose the target database and then choose Apply ExtensionPack from the context menu. For most situations, automatic application is sufficient. However, youmight want to apply the pack if it's accidentally deleted.

Each time the AWS SCT Extension Pack is applied to a target data store, the components are overwritten.Each component has a version number, and AWS SCT warns you if the current component version is olderthan the one being applied. You can control these notifications in the Notification Settings in the GlobalSettings section of Settings.

Using the Extension Pack SchemaWhen you convert your database or data warehouse schema, the AWS Schema Conversion Tool (AWSSCT) adds an additional schema to your target database. This schema implements SQL system functionsof the source database that are required when writing your converted schema to your target database.This additional schema is called the extension pack schema.

Version 1.0142

Page 150: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideThe Custom Python Library for the Extension Pack

The extension pack schema for OLTP databases is named according to the source database as follows:

• Microsoft SQL Server: AWS_SQLSERVER_EXT• MySQL: AWS_MYSQL_EXT• Oracle: AWS_ORACLE_EXT• PostgreSQL: AWS_POSTGRESQL_EXT

The extension pack schema for OLAP data warehouse applications is named according to the source datastore as follows:

• Greenplum: AWS_GREENPLUM_EXT• Microsoft SQL Server: AWS_SQLSERVER_EXT• Netezza: AWS_NETEZZA_EXT• Oracle: AWS_ORACLE_EXT• Teradata: AWS_TERADATA_EXT• Vertica: AWS_VERTICA_EXT

Using the Custom Python Library for the AWS SCTExtension Pack

In some cases, AWS Schema Conversion Tool (AWS SCT) can't convert source database features toequivalent Amazon Redshift features. The AWS SCT Extension Pack contains a custom Python librarythat emulates some source database functionality on Amazon Redshift.

If you are converting a transactional database, instead see Using the AWS Lambda Functions from theAWS SCT Extension Pack (p. 144).

In two cases, you might want to install the extension pack manually:

• You accidentally delete the extension pack schema from your target database.• You want to upload custom Python libraries to emulate database functionality.

Using AWS Services to Upload Custom PythonLibrariesThe AWS SCT extension pack wizard helps you install the custom Python library.

Before You BeginAlmost all work you do with AWS SCT starts with the following three steps:

1. Create an AWS SCT project.2. Connect to your source database.3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

Version 1.0143

Page 151: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying the Extension Pack

Applying the Extension PackUse the following procedure to apply the extension pack.

To apply the extension pack

1. In the AWS Schema Conversion Tool, in the target database tree, open the context (right-click)menu, and choose Apply Extension Pack.

The extension pack wizard appears.2. Read the Welcome page, and then choose Next.3. On the AWS Services Settings page, do the following:

• If you are reinstalling the extension pack schema only, choose Skip this step for now, and thenchoose Next.

• If you are uploading the Python library, provide the credentials to connect to your AWS account.You can use your AWS Command Line Interface (AWS CLI) credentials if you have the AWSCLI installed. You can also use credentials that you previously stored in a profile in the globalapplication settings and associated with the project. If necessary, choose Navigate to ProjectSettings to associate a different profile with the project. If necessary, choose Global Settings tocreate a new profile. For more information, see Using AWS Service Profiles in the AWS SchemaConversion Tool (p. 21).

4. On the Python Library Upload page, do the following:

• If you are reinstalling the extension pack schema only, choose Skip this step for now, and thenchoose Next.

• If you are uploading the Python library, provide the Amazon S3 path, and then choose UploadLibrary to S3.

When you are done, choose Next.5. On the Functions Emulation page, choose Create Extension Pack. Messages appear with the status

of the extension pack operations.

When you are done, choose Finish.

Using the AWS Lambda Functions from the AWSSCT Extension Pack

The AWS Schema Conversion Tool (AWS SCT) extension pack contains Lambda functions that provideemail, job scheduling, and other features to databases hosted on the Amazon EC2 platform.

Version 1.0144

Page 152: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideUsing AWS Services to Emulate Database Functionality

Using AWS Lambda Functions to Emulate DatabaseFunctionalityIn some cases, database features can't be converted to equivalent Amazon RDS features. For example,Oracle sends email calls that use UTL_SMTP, and Microsoft SQL Server can use a job scheduler. If youhost and self-manage a database on Amazon EC2, you can emulate these features by substituting AWSservices for them.

The AWS SCT extension pack wizard helps you install, create, and configure Lambda functions to emulateemail, job scheduling, and other features.

Before You BeginAlmost all work you do with the AWS SCT starts with the following three steps:

1. Create an AWS SCT project.2. Connect to your source database.3. Connect to your target database.

If you have not created an AWS SCT project yet, see Getting Started with the AWS Schema ConversionTool (p. 25).

Before you install the extension pack, you need to convert your database schema. For more information,see Converting Database Schemas Using the AWS Schema Conversion Tool (p. 72).

Applying the Extension PackUse the following procedure to apply the extension pack.

ImportantThe AWS service emulation features are supported only for databases installed and self-managed on Amazon EC2. Don't install the service emulation features if your target database ison an Amazon RDS DB instance.

To apply the extension pack

1. In the AWS Schema Conversion Tool, in the target database tree, open the context (right-click)menu, and choose Apply Extension Pack.

The extension pack wizard appears.2. Read the Welcome page, and then choose Next.3. On the AWS Services Settings page, do the following:

Version 1.0145

Page 153: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideApplying the Extension Pack

• If you are reinstalling the extension pack schema only, choose Skip this step for now, and thenchoose Next.

• If you are installing AWS services, provide the credentials to connect to your AWS account. You canuse your AWS Command Line Interface (AWS CLI) credentials if you have the AWS CLI installed.You can also use credentials that you previously stored in a profile in the global applicationsettings and associated with the project. If necessary, choose Navigate to Project Settings toassociate a different profile with the project. If necessary, choose Global Settings to create a newprofile. For more information, see Using AWS Service Profiles in the AWS Schema ConversionTool (p. 21).

4. On the Email Sending Service page, do the following:

• If you are reinstalling the extension pack schema only, choose Skip this step for now, and thenchoose Next.

• If you are installing AWS services and you have an existing Lambda function, you can provide it.Otherwise, the wizard creates it for you. When you are done, choose Next.

5. On the Job Emulation Service page, do the following:

• If you are reinstalling the extension pack schema only, choose Skip this step for now, and thenchoose Next.

• If you are installing AWS services and you have an existing Lambda function, you can provide it.Otherwise, the wizard creates it for you. When you are done, choose Next.

6. On the Functions Emulation page, choose Create Extension Pack. Messages appear with the statusof the extension pack operations.

When you are done, choose Finish.

Version 1.0146

Page 154: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideGeneral Memory Management and Performance Options

Best Practices for the AWS SchemaConversion Tool

Following, you can find information on best practices and options for using the AWS Schema ConversionTool (AWS SCT).

General Memory Management and PerformanceOptions

You can configure the AWS Schema Conversion Tool with different memory performance settings.Increasing memory speeds up the performance of your conversion but uses more memory resources onyour desktop.

To set your memory management option, choose Global Settings from the Settings menu, and choosethe Performance and Memory tab. Choose one of the following options:

• Fast conversion, but large memory consumption – This option optimizes for speed of the conversion,but might require more memory for the object reference cache.

• Low memory consumption, but slower conversion – This option minimizes the amount of memoryused, but results in a slower conversion. Use this option if your desktop has a limited amount ofmemory.

• Balance speed with memory consumption – This option optimizes provides a balance betweenmemory use and conversion speed.

Configuring Additional MemoryFor converting large database schemas, for example a database with 3,500 stored procedures, you canconfigure the amount of memory available to the AWS Schema Conversion Tool.

To modify the amount of memory AWS SCT consumes

1. Locate the folder where the configuration file is (C:\Program Files\AWS Schema Conversion Tool\App).

2. Open the configuration file AWS Schema Conversion Tool.cfg with Notepad or your favoritetext editor.

3. Edit the JVMUserOptions section to set the minimum and maximum memory available. Thefollowing example sets the minimum to 4 GB and the maximum to 40 GB.

[JVMUserOptions]-Xmx48960m -Xms4096m

Version 1.0147

Page 155: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCannot load objects from an Oracle source database

Troubleshooting Issues with the AWSSchema Conversion Tool

Following, you can find information about troubleshooting issues with the AWS Schema Conversion Tool(AWS SCT).

Cannot load objects from an Oracle sourcedatabase

When you attempt to load schema from an Oracle database, you might encounter one of the followingerrors.

Cannot load objects tree.

ORA-00942: table or view does not exist

These errors occur because the user whose ID you used to connect to the Oracle database doesn't havesufficient permissions to read the schema, as required by AWS SCT.

You can resolve the issue by granting the user select_catalog_role permission and also permissionto any dictionary in the database. These permissions provide the read-only access to the views andsystem tables that is required by AWS SCT. The following example creates a user ID named min_privsand grants the user with this ID the minimum permissions required to convert schema from an Oraclesource database.

create user min_privs identified by min_privs;grant connect to min_privs;grant select_catalog_role to min_privs; grant select any dictionary to min_privs;

Related Topics• What Is the AWS Schema Conversion Tool? (p. 1)• Getting Started with the AWS Schema Conversion Tool (p. 25)• Installing, Verifying, and Updating the AWS Schema Conversion Tool (p. 4)

Version 1.0148

Page 156: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to MySQLSupported Schema Conversion

AWS Schema Conversion ToolReference

Following, you can find reference material for the AWS Schema Conversion Tool (AWS SCT):

• MySQL to PostgreSQL Supported Schema Conversion (p. 223)

• Oracle to MySQL Supported Schema Conversion (p. 253)

• Oracle to PostgreSQL Supported Schema Conversion (p. 282)

• PostgreSQL to MySQL Supported Schema Conversion (p. 223)

• Microsoft SQL Server to MySQL Supported Schema Conversion (p. 149)

• Microsoft SQL Server to PostgreSQL Supported Schema Conversion (p. 169)

Microsoft SQL Server to MySQL SupportedSchema Conversion

The following sections list the schema elements from Microsoft SQL Server and whether they aresupported for automatic conversion to MySQL using the AWS Schema Conversion Tool.

Topics

• Statements (p. 149)

• Procedures (p. 153)

• Flow Control (p. 153)

• Functions (p. 154)

• Operators (p. 161)

• Transactions (p. 164)

• Data Types (p. 165)

• Data Definition Language (DDL) (p. 167)

• Cursors (p. 168)

• Related Topics (p. 169)

StatementsTopics

• SELECT (p. 150)

• INSERT (p. 150)

• UPDATE (p. 151)

• DELETE (p. 152)

Version 1.0149

Page 157: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

SELECT

Clause AutomaticallyConverted

Details

WITH No Try converting the WITH(query) expression to a subqueryand use it in a SELECT query.

UNION Yes  

EXCEPT | INTERSECT No  

ALL | DISTINCT Yes  

TOP Partial MySQL doesn't support TOP with the PERCENT or WITHTIES options. Try using the LIMIT option or perform amanual conversion.

<select_list> Yes  

INTO No  

FROM Partial MySQL doesn't support the CONTAINS and FREETEXTpredicates in the FROM clause search condition.

WHERE Yes  

GROUP BY Partial MySQL doesn't support ORDER BY with the ROLLUP,CUBE, and GROUPING SETS options. Try creating a storedprocedure to replace the query.

HAVING Yes  

ORDER BY Partial MySQL doesn't support ORDER BY with the OFFSET orFETCH options. Try creating a stored procedure to replacethe query.

MySQL doesn't support ORDER BY with the COLLATEoption. You must use the collation settings that wereassigned when the database was created.

FOR No  

OPTION No  

INSERT

Clause AutomaticallyConverted

Details

WITH No Try to convert the WITH query to a subquery, and thenuse the subquery in the INSERT query.

INSERT Yes  

Version 1.0150

Page 158: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

Clause AutomaticallyConverted

Details

TOP No Get a count of all rows, and then use the followingexpression, where count_of_all_rows is your row count:percent_expression * count_of_all_rows / 100

INTO Yes  

table_name Yes  

WITH(<Table_Hint_Limited>)

No Use MySQL methods of performance tuning.

OUTPUT No Create a trigger for INSERT statements for the table,and then save the inserted rows in a temporary table.After the INSERT operation, you can make use of the rowssaved in the temporary table. This logic can be placed in astored procedure.

VALUES Yes  

derived_table Yes  

execute_statement No Create a temporary table, fill it with the data to insert,and use the temporary table in the query.

<dml_table_source> No  

DEFAULT VALUES No  

UPDATE

Clause AutomaticallyConverted

Details

WITH No Try to convert the WITH query to a subquery, and thenuse the subquery in the UPDATE query.

TOP Partial MySQL doesn't support UPDATE with the PERCENToption. Get a count of all rows, and then use thefollowing expression, where count_of_all_rows is yourrow count: percent_expression * count_of_all_rows / 100

WITH(<Table_Hint_Limited>)

No Use MySQL methods of performance tuning.

SET No  

OUTPUT No Create a trigger for UPDATE statements for the table, andthen save the changed rows in a temporary table. Afterthe UPDATE operation, you can make use of the rowssaved in the temporary table. This logic can be placed in astored procedure.

FROM Partial MySQL doesn't support a FROM clause. AWS SchemaConversion Tool moves <table-source> to the UPDATEclause.

Version 1.0151

Page 159: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

Clause AutomaticallyConverted

Details

WHERE Yes  

CURRENT OF No Replace the CURRENT OF clause with an expression thatconsists of conditions that use unique key fields of thetable.

GLOBAL No  

OPTION No  

NoteMySQL doesn't support FILESTREAM DATA. Perform a manual conversion to update the data inthe file system file.

DELETE

Clause AutomaticallyConverted

Details

WITH No Try to convert the WITH query to a subquery, and thenuse the subquery in the DELETE query.

TOP Partial MySQL doesn't support the PERCENT option. A manualconversion is required. Get a count of all rows, and thenuse the following expression, where count_of_all_rows isyour row count: percent_expression * count_of_all_rows /100

FROM Yes  

table_or_view_name Yes  

rowset_function_limited No  

WITH No MySQL doesn't support hints in DELETE statements, sothe AWS Schema Conversion Tool skips options in theformat WITH(Table_Hint_Limited). Use MySQL methodsof performance tuning.

OUTPUT No Create a trigger for DELETE statements for the table, andthen save the deleted rows in a temporary table. Afterthe DELETE operation, you can make use of the rowssaved in the temporary table. This logic can be placed in astored procedure.

WHERE Yes  

CURRENT OF No Replace the CURRENT OF clause with an expression thatconsists of conditions that use unique key fields of thetable.

GLOBAL No  

OPTION No  

Version 1.0152

Page 160: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideProcedures

ProceduresTopics

• CREATE PROCEDURE (p. 153)

CREATE PROCEDURE

Clause AutomaticallyConverted

Details

@parameter Yes MySQL doesn't support procedure arguments of theCURSOR data type. Change the business logic toeliminate the need to send cursors through arguments toa stored procedure.

VARYING Partial  

OUT    

OUTPUT Partial  

READONLY Partial  

WITH No  

FOR REPLICATION No  

AS BEGIN … END No  

ENCRYPTION Yes  

RECOMPILE No  

EXECUTE AS No  

Flow Control

Clause AutomaticallyConverted

Details

TRY…CATCH

THROW

No Try using the DECLARE HANDLER for the CATCHemulation block and the SIGNAL SQLSTATE operator toemulate the THROW operator.

WAITFOR No Perform a manual conversion.

DECLARE No Perform a manual conversion.

GOTO No Revise your code to eliminate GOTO operators, usingBEGIN...END blocks in combination with LEAVE, REPEAT,UNTIL, and WHILE operators.

BREAK Yes  

CONTINUE Yes  

Version 1.0153

Page 161: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

IF…ELSE Yes  

RETURN No MySQL does not support returning a value from aprocedure using the RETURN statement. To return avalue, use the OUT parameter or a result set.

WHILE Yes  

CASE Yes  

COALESCE Yes  

NULLIF Yes  

FunctionsTopics

• Aggregate Functions (p. 154)

• Date and Time Functions (p. 155)

• Mathematical Functions (p. 156)

• String Functions (p. 156)

• Configuration Functions (p. 157)

• Conversion Functions (p. 158)

• Security Functions (p. 158)

• System Functions (p. 159)

• Logical Functions (p. 160)

• CREATE FUNCTION (p. 161)

• EXECUTE (p. 161)

In this section, you can find a list of the Microsoft SQL Server built-in functions that indicates whetherthe AWS Schema Conversion Tool performs an automatic conversion. Where MySQL doesn't support afunction, consider creating a user-defined function.

Aggregate Functions

Function AutomaticallyConverted

Details

AVG Yes  

COUNT Yes  

COUNT_BIG Partial  

MIN Yes  

MAX Yes  

SUM Yes  

Version 1.0154

Page 162: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

CHECKSUM_AGG No  

STDEV Partial MySQL doesn't support the STDEV function with theDISTINCT clause.

STDEVP Partial MySQL doesn't support the STDEVP function with theDISTINCT clause.

GROUPING No  

GROUPING_ID No  

VAR Partial MySQL doesn't support the VAR function with theDISTINCT clause.

VARP Partial MySQL doesn't support the VARP function with theDISTINCT clause.

Date and Time Functions

Function AutomaticallyConverted

Details

DATEADD Partial MySQL doesn't support the DATEADD function with thenanosecond datepart.

DATEDIFF Partial MySQL doesn't support the DATEDIFF function with theweek, millisecond, or nanosecond datepart.

DATENAME Partial MySQL doesn't support the DATENAME function with themillisecond, nanosecond, or TZoffset datepart.

DATEPART Partial MySQL doesn't support the DATEPART function with themillisecond, nanosecond, or TZoffset datepart.

DAY Partial  

GETDATE Partial  

GETDATE + 1 Partial  

GETUTCDATE Partial  

MONTH Partial  

YEAR Partial  

DATETIMEOFFSETFROMPARTSNo  

ISDATE No  

SWITCHOFFSET No  

SYSDATETIMEOFFSET No  

TODATETIMEOFFSET No  

Version 1.0155

Page 163: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Mathematical Functions

Function AutomaticallyConverted

Details

ABS Yes  

ACOS Yes  

ASIN Yes  

ATN2 Partial  

ATAN Yes  

CEILING Yes  

COS Yes  

COT Yes  

DEGREES Yes  

EXP Yes  

FLOOR Yes  

LOG10 Yes  

LOG Yes  

PI Yes  

POWER Yes  

RADIANS Yes  

RAND Yes  

ROUND Partial MySQL doesn't support the ROUND function with thefunction argument.

SIGN Yes  

SIN Yes  

SQRT Yes  

SQUARE No  

TAN Yes  

String Functions

Function AutomaticallyConverted

Details

ASCII Yes  

Version 1.0156

Page 164: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

CHAR Yes  

CHARINDEX No  

CONCAT Yes  

DIFFERENCE No  

FORMAT No  

LEFT Yes  

LEN Partial  

LOWER Yes  

LTRIM Yes  

NCHAR No  

PATINDEX No  

QUOTENAME Partial  

REPLACE Yes  

REPLICATE Partial  

REVERSE Yes  

RIGHT Yes  

RTRIM Yes  

SOUNDEX No  

SPACE Yes  

STR No  

STUFF No  

SUBSTRING Yes  

UNICODE No  

UPPER Yes  

Configuration Functions

Function AutomaticallyConverted

Details

@@DATEFIRST No  

@@DBTS Yes  

Version 1.0157

Page 165: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

@@LANGID Yes  

@@LANGUAGE No  

@@LOCK_TIMEOUT Yes  

@@MAX_CONNECTIONS No  

@@MAX_PRECISION Yes  

@@NESTLEVEL Yes  

@@OPTIONS Yes  

@@REMSERVER Yes  

@@SERVERNAME No  

@@SERVICENAME Yes  

@@SPID Yes  

@@TEXTSIZE Yes  

@@VERSION No  

Conversion Functions

Function AutomaticallyConverted

Details

CAST and CONVERT No  

PARSE No  

TRY_CAST No  

TRY_CONVERT No  

TRY_PARSE No  

Security Functions

Function AutomaticallyConverted

Details

CERTENCODED Yes  

CERTPRIVATEKEY Yes  

CURRENT_USER No  

DATABASE_PRINCIPAL_ID No  

Version 1.0158

Page 166: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

HAS_PERMS_BY_NAME Yes  

IS_MEMBER Yes  

IS_ROLEMEMBER Yes  

IS_SRVROLEMEMBER Yes  

ORIGINAL_LOGIN No  

PERMISSIONS Yes  

PWDCOMPARE Yes  

PWDENCRYPT Yes  

SCHEMA_ID Yes  

SCHEMA_NAME No  

SESSION_USER No  

SUSER_ID Yes  

SUSER_NAME Yes  

SUSER_SID Yes  

SUSER_SNAME Yes  

sys.fn_builtin_permissions Yes  

sys.fn_get_audit_file Yes  

sys.fn_my_permissions Yes  

SYSTEM_USER Yes  

USER_ID Yes  

USER_NAME Yes  

System Functions

Function AutomaticallyConverted

Details

$PARTITION Yes  

@@ERROR Yes  

@@IDENTITY Yes  

@@PACK_RECEIVED Yes  

@@ROWCOUNT Yes  

Version 1.0159

Page 167: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

@@TRANCOUNT Yes  

BINARY_CHECKSUM Yes  

CHECKSUM No  

CONNECTIONPROPERTY Yes  

CONTEXT_INFO Yes  

CURRENT_REQUEST_ID Yes  

ERROR_LINE No  

ERROR_MESSAGE No  

ERROR_NUMBER No  

ERROR_PROCEDURE No  

ERROR_SEVERITY No  

ERROR_STATE No  

FORMATMESSAGE No  

GET_FILESTREAM_TRANSACTION_CONTEXTYes  

GETANSINULL Yes  

HOST_ID No  

HOST_NAME No  

ISNULL No  

MIN_ACTIVE_ROWVERSION Yes  

NEWID Yes  

NEWSEQUENTIALID Yes  

PARSENAME Yes  

ROWCOUNT_BIG Yes  

XACT_STATE Yes  

Logical Functions

Function AutomaticallyConverted

Details

CHOOSE No  

IIF No  

Version 1.0160

Page 168: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

CREATE FUNCTION

Clause AutomaticallyConverted

Details

@parameter_name Yes  

type_schema_name Yes  

parameter_data_type No  

= default Yes  

READONLY No  

RETURNS return_data_type No  

WITH function_option Yes  

BEGIN … END No  

RETURN scalar_expression Yes MySQL supports only functions that return a scalar value.

EXECUTE

Clause AutomaticallyConverted

Details

@parameter_name Yes  

type_schema_name Yes  

parameter_data_type No  

= default Yes  

READONLY No  

RETURNS return_data_type No  

WITH function_option Yes  

BEGIN … END No  

RETURN scalar_expression Yes MySQL supports only functions that return a scalar value.

OperatorsTopics

• Arithmetic Operators (p. 162)• Assignment Operator (p. 162)• Bitwise Operators (p. 162)• Comparison Operators (p. 163)• Logical Operators (p. 163)

Version 1.0161

Page 169: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

• Set Operators (p. 163)

• String Concatenation Operator (p. 164)

• Unary Operators (p. 164)

Arithmetic Operators

Clause AutomaticallyConverted

Details

+ Yes  

+= Yes  

- Yes  

-= Yes  

* Yes  

*= Yes  

/ Yes  

/= Yes  

% Yes  

Assignment Operator

Clause AutomaticallyConverted

Details

= Yes  

Bitwise Operators

Clause AutomaticallyConverted

Details

& Yes  

| Yes  

^ Yes  

~ Yes  

Version 1.0162

Page 170: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

Comparison Operators

Clause AutomaticallyConverted

Details

= Yes  

> Yes  

< Yes  

>= Yes  

<= Yes  

<> Yes  

!= Yes  

!< Yes  

!> Yes  

Logical Operators

Clause AutomaticallyConverted

Details

ALL Yes  

AND Yes  

ANY Yes  

BETWEEN Yes  

EXISTS Yes  

IN Yes  

LIKE Yes  

NOT Yes  

OR Yes  

SOME Partial The AWS Schema Conversion Tool converts SOME to ANY.

Set Operators

Clause AutomaticallyConverted

Details

UNION Yes  

UNION ALL Yes  

Version 1.0163

Page 171: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideTransactions

Clause AutomaticallyConverted

Details

EXCEPT No Perform a manual conversion.

INTERSECT No Perform a manual conversion.

String Concatenation Operator

Clause AutomaticallyConverted

Details

+ Yes  

Unary Operators

Clause AutomaticallyConverted

Details

+ Yes  

- Yes  

TransactionsTopics

• BEGIN TRANSACTION (p. 164)

BEGIN TRANSACTION

Clause AutomaticallyConverted

Details

DISTRIBUTED No MySQL doesn't support distributed transactions. Reviseyour architecture so that it doesn't use distributedtransactions.

transaction_name No MySQL doesn't support named transactions. Revise yourcode to eliminate marked transactions.

WITH MARK No MySQL doesn't support the WITH MARK option. Reviseyour code to eliminate marked transactions.

SAVE Partial  

ROLLBACK Partial  

transaction_name No MySQL doesn't support named transactions. Revise yourcode to eliminate named transactions.

Version 1.0164

Page 172: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Clause AutomaticallyConverted

Details

savepoint_name Partial  

COMMIT Partial  

DELAYED_DURABILITY No  

Data TypesTopics

• Numerics (p. 165)• Date and Time (p. 165)• Character Strings (p. 166)• Binary Strings (p. 166)• Special Types (p. 167)

Numerics

Data type AutomaticallyConverted

Default Conversion Details

bigint Yes bigint  

int Yes int  

smallint Yes smallint  

tinyint Yes tinyint unsigned  

bit Yes bit(1)  

money Yes numeric(19,4)  

smallmoney Yes numeric(10,4)  

numeric Yes numeric  

decimal Yes decimal  

float Yes double  

real Yes float  

Date and Time

Data type AutomaticallyConverted

Default Conversion Details

date Partial date 0001-01-01 through9999-12-31

Version 1.0165

Page 173: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Data type AutomaticallyConverted

Default Conversion Details

datetime2(7) Partial datetime 0001-01-01 through9999-12-31 00:00:00through 23:59:59.9999999

datetime Partial datetime 1753-01-01, through9999-12-31 00:00:00through 23:59:59.997

datetimeoffset(7) No    

smalldatetime Yes datetime  

time(7) Yes time  

Character Strings

Data type AutomaticallyConverted

Default Conversion Details

char(len) Partial char len= 1 - 255 (2^8 - 1)symbols (loss range)

varchar(len) Yes varchar  

varchar(max) Yes longtext  

text Yes longtext  

nchar(len) len = 1 -4000

char len= 1 - 255 (2^8 - 1)symbols (loss range)

nvarchar(len) Yes varchar  

nvarchar(max) Yes longtext  

ntext Yes longtext  

Binary Strings

Data type AutomaticallyConverted

Default Conversion Details

binary(len) Yes blob  

varbinary(len) Yes blob  

varbinary(max) Yes longblob  

hierarchyid No    

sql_variant No    

table No    

Version 1.0166

Page 174: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Data type AutomaticallyConverted

Default Conversion Details

uniqueidentifier No    

xml No    

geography No    

geometry No    

Special Types

Data type AutomaticallyConverted

Default Conversion Details

UNIQUEIDENTIFIER Partial CHAR(38) OR BINARY(16)  

DOUBLE PRECISION Partial FLOAT(53)  

IDENTITY Partial AUTO_INCREMENT  

SYSNAME Partial NVARCHAR(128) NOT NULL  

Data Definition Language (DDL)Topics

• CREATE TABLE (p. 167)• CREATE INDEX (p. 167)• CREATE TRIGGER (p. 167)• CREATE VIEW (p. 168)

CREATE TABLECREATE TABLE statements are converted automatically except for the following clause.

Clause AutomaticallyConverted

Details

SET DEFAULT No MySQL doesn't support the SET DEFAULT option forFOREIGN KEY.

CREATE INDEXThe AWS Schema Conversion Tool does not support automatic migration of data definition language(DDL) code to create an index.

CREATE TRIGGERCREATE TRIGGER statements are converted automatically except for the following clause.

Version 1.0167

Page 175: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCursors

Clause AutomaticallyConverted

Details

FOR No MySQL doesn't support a FOR clause in a CREATETRIGGER statement.

CREATE VIEW

CREATE VIEW statements are converted automatically except for the following clauses.

Clause AutomaticallyConverted

Details

SCHEMABINDING No AWS Schema Conversion Tool ignores this clause.

ENCRYPTION No AWS Schema Conversion Tool ignores this clause.

VIEW_METADATA No AWS Schema Conversion Tool ignores this clause.

CursorsTopics

• DECLARE CURSOR (p. 168)

DECLARE CURSOR

Clause AutomaticallyConverted

Details

LOCAL Yes Change the global cursor to a local cursor, or revise yourcode so it doesn't require global cursors.

GLOBAL No Setting this option corresponds to the typical behavior ofcursors in MySQL, so the AWS Schema Conversion Toolskips this option during conversion.

FORWARD_ONLY Partial Revise your code to eliminate cursors with the SCROLLoption.

SCROLL No  

STATIC Yes The membership and order of rows never changes forcursors in MySQL, so the AWS Schema Conversion Toolskips this option during conversion. Verify that theconverted schema behavior is acceptable.

KEYSET Partial Revise your code to eliminate dynamic cursors.

DYNAMIC No Setting this option corresponds to the typical behavior ofcursors in MySQL, so the AWS Schema Conversion Toolskips this option during conversion.

Version 1.0168

Page 176: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

Clause AutomaticallyConverted

Details

FAST_FORWARD Yes All MySQL cursors are read-only, so the AWS SchemaConversion Tool skips this option during conversion.

READ_ONLY Yes MySQL doesn't support the option SCROLL_LOCKS, sothe AWS Schema Conversion Tool ignores this optionduring conversion. Verify that the converted schemabehavior is acceptable.

SCROLL_LOCKS Partial MySQL doesn't support the option OPTIMISTIC, so theAWS Schema Conversion Tool ignores this option duringconversion. Verify that the converted schema behavior isacceptable.

OPTIMISTIC Partial MySQL doesn't support the option TYPE_WARNING, sothe AWS Schema Conversion Tool ignores this optionduring conversion. Verify that the converted schemabehavior is acceptable.

TYPE_WARNING Partial Change the global cursor to a local cursor, or revise yourcode so it doesn't require global cursors.

Related Topics• What Is the AWS Schema Conversion Tool? (p. 1)

• Getting Started with the AWS Schema Conversion Tool (p. 25)

• Installing, Verifying, and Updating the AWS Schema Conversion Tool (p. 4)

Microsoft SQL Server to PostgreSQL SupportedSchema Conversion

The following sections list the schema elements from a Microsoft SQL Server database and whether theyare supported for automatic conversion to PostgreSQL using the AWS Schema Conversion Tool.

Data Definition Language (DDL)

Naming Objects

Clause AutomaticallyConverted

Details

Schemas Yes

Tables, Columns Yes

Version 1.0169

Page 177: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Statements

Clause AutomaticallyConverted

Details

ALTER INDEX No

ALTER PROCEDURE No

ALTER TRIGGER No

ALTER VIEW No

CREATE FUNCTION Partial Automatic migration of inline functions is not supported.Default parameters specified for any function areskipped.

CREATE PROCEDURE Yes

CREATE SEQUENCE Yes

IDENTITY (x,y) Yes

TRUNCATE TABLE Yes

UPDATE STATISTICS No

ALTER TABLE

Clause AutomaticallyConverted

Details

ADD Yes

ALTER COLUMN No

DROP COLUMN No

DROP CONSTRAINT No

ENABLE/DISABLE TRIGGER Yes

CREATE INDEX

Clause AutomaticallyConverted

Details

CLUSTER option Partial

COLUMNSTORE index Partial

INCLUDE clause Partial

Other INDEX options Partial

Version 1.0170

Page 178: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Clause AutomaticallyConverted

Details

SPATIAL index Partial

UNIQUE option Yes

XML index Partial

CREATE TABLE

Clause AutomaticallyConverted

Details

Partitioned tables Yes

Regular tables Yes

Temporary tables Partial

Wide tables Yes

CREATE TRIGGER

Clause AutomaticallyConverted

Details

FOR EACH STATEMENTTriggers

Partial

INSTEAD OF Triggers Partial

Trigger event (INSERT/UPDATE/DELETE )

Partial

Trigger time (BEGORE/AFTER)

Partial

CREATE VIEW

Clause AutomaticallyConverted

Details

CREATE VIEW Yes

Updatable Views Yes

VIEW Yes

Version 1.0171

Page 179: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Manipulation Language (DML)

DROP Statements

Clause AutomaticallyConverted

Details

DROP TABLE Yes

DROP VIEW Yes

Other types of objects Yes

Data Manipulation Language (DML)

Clause for Statements

Clause AutomaticallyConverted

Details

Join Hints No

Query Hints No

Table Hint No

WHERE Yes

Joins

Cross Joins

Clause AutomaticallyConverted

Details

Cross join Yes

Cross join with condition Yes

Inner Joins

Clause AutomaticallyConverted

Details

Inner Joins Yes

Version 1.0172

Page 180: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Manipulation Language (DML)

Outer Joins

Clause AutomaticallyConverted

Details

Full join Yes

Full outer join Yes

Left join Yes

Left outer join Yes

Right join Yes

Right outer join Yes

Predicates for Statements

Clause AutomaticallyConverted

Details

Boolean conditions Yes

Exists conditions Yes

In conditions Yes

Null conditions Yes

Pattern matchingconditions

Yes

Range conditions Yes

Comparison Conditions

Clause AutomaticallyConverted

Details

=, <>, <, <=, >, >= Yes

ANY, SOME, ALL Partial

Statements

DELETE

Clause AutomaticallyConverted

Details

CURRENT OF Yes

Version 1.0173

Page 181: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Manipulation Language (DML)

Clause AutomaticallyConverted

Details

FROM Partial

OUTPUT Partial

TOP No

VALUES Yes

WITH Yes

INSERT

Clause AutomaticallyConverted

Details

DEFAULT Yes

DEFAULT VALUES Yes

FROM Yes

INTO Yes

OUTPUT No

TOP No

VALUES Yes

WITH Yes

SELECT

Clause AutomaticallyConverted

Details

GROUP BY clause with anexpression

Yes

GROUP BY clause withmultiple tables

Yes

GROUP BY CUBE No

Group By Grouping Sets No

GROUP BY ROLLUP No

Limiting the number ofrows returned

Yes

Select all columns (usingthe * and aliases)

Yes

Version 1.0174

Page 182: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Manipulation Language (DML)

Clause AutomaticallyConverted

Details

Select all columns (usingthe *)

Yes

Select subset of thecolumns

Yes

Select with calculations Yes

Select with column heading Yes

Select with constants Yes

Specifying a ascendingorder

Yes

Specifying a collation Yes

Specifying a conditionalorder

Yes

Specifying a descendingorder

Yes

Specifying a percentage Yes

Specifying a percentage(argument 100 percent)

Yes

Specifying an alias as thesort column

Yes

Specifying an expression asthe sort column

Yes

Specifying both ascendingand descending order

Yes

TOP with a variable Yes

Using ORDER BY andOFFSET command

Yes

Using ORDER BY in aranking function

Yes

Using ORDER BY withUNION

Yes

Using WITH TIES No

WHERE with BETWEEN Yes

WHERE with combinationof predicates

Yes

WHERE with CONTAINS No

Version 1.0175

Page 183: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Manipulation Language (DML)

Clause AutomaticallyConverted

Details

WHERE with EXISTSsubquery

Yes

WHERE with FREETEXT No

WHERE with IN custom list Yes

WHERE with IN subquery Yes

WHERE with LIKE Partial

WHERE with negates aBoolean input

Yes

WHERE with NULL Yes

DISTINCT

Clause AutomaticallyConverted

Details

DISTINCT Yes

FROM

Clause AutomaticallyConverted

Details

FROM Yes

GROUP BY

Clause AutomaticallyConverted

Details

GROUP BY Yes

HAVING

Clause AutomaticallyConverted

Details

HAVING Yes

Version 1.0176

Page 184: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

ORDER BY

Clause AutomaticallyConverted

Details

ORDER BY Yes

TOP

Clause AutomaticallyConverted

Details

TOP Yes

WHERE

Clause AutomaticallyConverted

Details

WHERE Yes

UPDATE

Clause AutomaticallyConverted

Details

CURRENT OF Yes

DEFAULT Yes

FILESTREAM Data No

FROM Yes

OUTPUT Partial

TOP No

VALUES Yes

WITH Yes

Data Types

Clause AutomaticallyConverted

Details

BIGINT Yes

BINARY Yes

Version 1.0177

Page 185: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Clause AutomaticallyConverted

Details

BIT Yes

CHAR, CHARACTER Yes

DATETIME Yes

DATETIMEOFFSET No

DEC, DECIMAL Yes

DOUBLE PRECISION Yes

FLOAT Yes

GEOGRAPHY No

GEOMETRY No

HIERARCHYID No

IDENTITY No

INT, INTEGER Yes

MONEY Yes

NCHAR Yes

NTEXT Yes

NUMERIC Yes

NVARCHAR Yes

REAL Yes

ROWVERSION No

SMALL MONEY Yes

SMALLDATETIME Yes

SMALLINT Yes

SQL_VARIANT No

SYSNAME Yes

TABLE No

TEXT Yes

TIMESTAMP Yes

TINYINT Yes

UNIQUEIDENTIFIER Yes Converted to a universally unique identifier (UUID) if thePostgreSQL instance has the uuid-ossp module installed.The uuid-ossp module provides functions to generateUUIDs using one of several standard algorithms.

Version 1.0178

Page 186: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDatabase Mail

Clause AutomaticallyConverted

Details

VARBINARY Yes

VARCHAR Yes

XML No

Database Mail

Clause AutomaticallyConverted

Details

Accounts and Profiles Yes

Database MailConfiguration Objects

Yes

Database Mail MessagingObjects

Yes

Database Mail Settings Yes

Security Yes

sp_send_dbmail No

sysmail_add_account_sp No

sysmail_add_principalprofile_spNo

sysmail_add_profile_sp No

sysmail_add_profileaccount_spNo

sysmail_allitems No

sysmail_configure_sp No

sysmail_delete_account_sp No

sysmail_delete_log_sp No

sysmail_delete_mailitems_sp No

sysmail_delete_principalprofile_spNo

sysmail_delete_profile_sp No

sysmail_delete_profileaccount_spNo

sysmail_event_log No

sysmail_faileditems No

sysmail_help_account_sp No

sysmail_help_configure_sp No

Version 1.0179

Page 187: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

sysmail_help_principalprofile_spNo

sysmail_help_profile_sp No

sysmail_help_profileaccount_spNo

sysmail_help_queue_sp No

sysmail_help_status_sp No

sysmail_help_status_sp No

sysmail_mailattachments No

sysmail_sentitems No

sysmail_start_sp No

sysmail_start_sp No

sysmail_stop_sp No

sysmail_stop_sp No

sysmail_unsentitems No

sysmail_update_account_sp No

sysmail_update_principalprofile_spYes

sysmail_update_principalprofile_spNo

sysmail_update_profile_sp No

sysmail_update_profileaccount_spNo

System State Yes

Functions

@@functions

Clause AutomaticallyConverted

Details

@@CONNECTIONS No

@@CPU_BUSY No

@@CURSOR_ROWS No

@@DATEFIRST No

@@DBTS No

@@ERROR No

Version 1.0180

Page 188: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

@@FETCH_STATUS Yes

@@IDENTITY Yes

@@IDLE No

@@IO_BUSY No

@@LANGID No

@@LANGUAGE No

@@LOCK_TIMEOUT No

@@MAX_CONNECTIONS No

@@MAX_PRECISION No

@@NESTLEVEL No

@@OPTIONS No

@@PACK_RECEIVED No

@@PACK_SENT No

@@PACKET_ERRORS No

@@PROCID No

@@REMSERVER No

@@ROWCOUNT No

@@SERVERNAME No

@@SERVICENAME No

@@SPID No

@@TEXTSIZE No

@@TIMETICKS No

@@TOTAL_ERRORS No

@@TOTAL_READ No

@@TOTAL_WRITE No

@@TRANCOUNT No

@@VERSION No

Version 1.0181

Page 189: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Aggregate

Clause AutomaticallyConverted

Details

AVG Partial

CHECKSUM_AGG No

COUNT Yes

COUNT_BIG Yes

GROUPING No

GROUPING_ID No

MAX Yes

MIN Yes

STDEV Yes

STDEVP Yes

SUM Yes

VAR Yes

VARP Yes

Built-in Functions

Clause AutomaticallyConverted

Details

Aggregate Functions Yes

Cursor Functions No

Metadata Functions No

Security Functions No

System Functions No

System StatisticalFunctions

No

Text and Image Functions No

Version 1.0182

Page 190: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Conversion

Clause AutomaticallyConverted

Details

CAST Partial

CONVERT Partial

PARSE No

TRY_CAST No

TRY_CONVERT No

TRY_PARSE No

Date and Time

Clause AutomaticallyConverted

Details

CURRENT_TIMESTAMP Partial

DATEADD Partial

DATEDIFF Partial

DATEFROMPARTS Yes

DATENAME Partial

DATEPART Partial

DATETIME2FROMPARTS Partial

DATETIMEFROMPARTS Partial

DATETIMEOFFSETFROMPARTSPartial

DAY Yes

EOMONTH Yes

GETDATE Yes

GETUTCDATE Yes

ISDATE No

MONTH Yes

SMALLDATETIMEFROMPARTS Yes

SWITCHOFFSET No

SYSDATETIME Yes

SYSDATETIMEOFFSET No

Version 1.0183

Page 191: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

SYSUTCDATETIME Yes

TIMEFROMPARTS Yes

TODATETIMEOFFSET No

YEAR Yes

Mathematical Functions

Clause AutomaticallyConverted

Details

ABS() Yes

ACOS() Yes

ASIN() Yes

ATAN() Yes

ATN2 () Yes

CEILING() Yes

COS() Yes

COT() Yes

DEGREES() Yes

EXP() Yes

FLOOR() Yes

LOG() Yes

LOG10() Yes

PI() Yes

POWER() Yes

RADIANS() Yes

RAND() Yes

RAND(seed) Partial

ROUND() Partial

ROUND() Partial

SIGN() Yes

SIN() Yes

Version 1.0184

Page 192: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

SQRT() Yes

SQUARE() Yes

TAN() Yes

Ranking Functions

Clause AutomaticallyConverted

Details

DENSE_RANK Yes

NTILE Yes

RANK Yes

ROW_NUMBER Yes

Rowset Functions

Clause AutomaticallyConverted

Details

CONTAINSTABLE No

FREETEXTTABLE No

OPENDATASOURCE No

OPENQUERY No

OPENROWSET No

OPENXML No

Scalar Functions

Clause AutomaticallyConverted

Details

ABS() Yes

ACOS() Yes

ASCII Yes

ASIN() Yes

ATAN() Yes

Version 1.0185

Page 193: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

ATN2 () Yes

AVG Yes

CEILING() Yes

CHAR Yes

CHARINDEX Yes

CHECKSUM No

CHECKSUM_AGG No

CHOOSE No

CONCAT Yes

COS() Yes

COT() Yes

COUNT Yes

COUNT_BIG Yes

CURRENT_TIMESTAMP Yes

CURRENT_USER No

DATABASE_PRINCIPAL_ID No

DATEADD Partial

DATEDIFF Partial

DATEFROMPARTS Yes

DATENAME Partial

DATEPART Partial

DATETIME2FROMPARTS Yes

DATETIMEFROMPARTS Yes

DATETIMEOFFSETFROMPARTSNo

DAY Yes

DEGREES() Yes

DIFFERENCE No

EOMONTH Yes

ERROR_LINE No

ERROR_MESSAGE No

Version 1.0186

Page 194: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

ERROR_NUMBER No

ERROR_PROCEDURE No

ERROR_SEVERITY No

ERROR_STATE No

EXP() Yes

FLOOR() Yes

FORMAT No

FORMATMESSAGE No

GETDATE Yes

GETUTCDATE Yes

GROUPING No

GROUPING_ID No

HOST_ID No

HOST_NAME No

IIF No

ISDATE No

ISNULL Yes

ISNUMERIC Implementedin ExtensionLibrary

LEFT Yes

LEN Yes

LOG() Yes

LOG10() Yes

LOWER Yes

LTRIM Yes

MAX Yes

MIN Yes

MONTH Yes

NCHAR No

ORIGINAL_LOGIN No

Version 1.0187

Page 195: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

PARSENAME No

PATINDEX No

PI() Yes

POWER() Yes

PRINT Yes

QUOTENAME Partial

RADIANS() Yes

RAND() Yes

REPLACE Yes

REPLICATE Yes

REVERSE Yes

RIGHT Yes

ROUND() Yes

RTRIM Yes

SCHEMA_NAME No

SESSION_USER No

SIGN() Yes

SIN() Yes

SMALLDATETIMEFROMPARTS Yes

SOUNDEX Yes

SPACE Yes

SQRT() Yes

SQUARE() Yes

STDEV Yes

STDEVP Yes

STR No

STUFF Yes

SUBSTRING Yes

SUM Yes

SWITCHOFFSET No

Version 1.0188

Page 196: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

SYSDATETIME Yes

SYSDATETIMEOFFSET No

SYSUTCDATETIME Yes

TAN() Yes

TIMEFROMPARTS Yes

TODATETIMEOFFSET No

UNICODE No

UPPER Yes

VAR Yes

VARP Yes

YEAR Yes

String

Clause AutomaticallyConverted

Details

ASCII Yes

CHAR Yes

CHARINDEX Yes

CONCAT Yes

DIFFERENCE No

FORMAT No

LEFT Yes

LEN Yes

LOWER Yes

LTRIM Yes

NCHAR No

PATINDEX No

QUOTENAME Partial

REPLACE Yes

REPLICATE Yes

Version 1.0189

Page 197: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

Clause AutomaticallyConverted

Details

REVERSE Yes

RIGHT Yes

RTRIM Yes

SOUNDEX No

SPACE Yes

STR No

STUFF Yes

SUBSTRING Yes

UNICODE No

UPPER Yes

OperatorsArithmetic Operators

Clause AutomaticallyConverted

Details

- (Subtract) Partial

% (Modulo) Partial

* (Multiply) Partial

/ (Divide) Partial

+ (Add) Partial

Assignment Operator

Clause AutomaticallyConverted

Details

= Yes

Bitwise Operators

Clause AutomaticallyConverted

Details

& (Bitwise AND) Yes

Version 1.0190

Page 198: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

Clause AutomaticallyConverted

Details

^ (Bitwise Exclusive OR) No

| (Bitwise OR) Yes

Comparison Operators

Clause AutomaticallyConverted

Details

Comparison Operators Partial

Logical Operators

Clause AutomaticallyConverted

Details

Logical Operators Yes

Set Operators

Clause AutomaticallyConverted

Details

EXCEPT Yes

INTERSECT Yes

UNION Yes

UNION ALL Yes

String Concatenation Operator

Clause AutomaticallyConverted

Details

String ConcatenationOperator

Yes

Unary Operators

Clause AutomaticallyConverted

Details

Unary Operators Yes

Version 1.0191

Page 199: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOther

Other

Clause AutomaticallyConverted

Details

CHECKSUM No

CHOOSE No

CURRENT_USER No

DATABASE_PRINCIPAL_ID No

ERROR_LINE No

ERROR_MESSAGE No

ERROR_NUMBER No

ERROR_PROCEDURE No

ERROR_SEVERITY No

ERROR_STATE No

FORMATMESSAGE No

HOST_ID No

HOST_NAME No

IIF No

ISNULL Yes

ISNUMERIC No

Logical Functions Yes

NEWID Yes

ORIGINAL_LOGIN No

Other Yes

PRINT Yes

SCHEMA_NAME No

Security Functions Yes

SESSION_USER No

System Functions Yes

Version 1.0192

Page 200: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideService Broker

Service Broker

Clause AutomaticallyConverted

Details

ALTER QUEUE No

ALTER SERVICE No

BEGIN CONVERSATIONTIMER

No

BEGIN DIALOGCONVERSATION

No

CREATE QUEUE No

CREATE SERVICE No

DROP QUEUE No

DROP SERVICE No

END CONVERSATION No

GET CONVERSATIONGROUP

No

GETTRANSMISSION_STATUS

No

MOVE CONVERSATION No

Queue management Yes

RECEIVE No

SEND No

Service Broker CatalogViews

Yes

Service Broker RelatedDynamic ManagementViews

Yes

Service Broker Statements Yes

Service management Yes

sys.conversation_endpoints No

sys.conversation_groups No

sys.conversation_priorities No

sys.dm_broker_activated_tasksNo

sys.dm_broker_connections No

sys.dm_broker_forwarded_messagesNo

Version 1.0193

Page 201: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSQL Server Agent

Clause AutomaticallyConverted

Details

sys.dm_broker_queue_monitorsNo

sys.message_type_xml_schema_collection_usagesNo

sys.remote_service_bindings No

sys.routes No

sys.service_contract_message_usagesNo

sys.service_contract_usages No

sys.service_contracts No

sys.service_message_types No

sys.service_queue_usages No

sys.service_queues No

sys.services No

sys.transmission_queue No

SQL Server Agent

Clause AutomaticallyConverted

Details

sp_add_alert No

sp_add_category No

sp_add_job No

sp_add_jobschedule No

sp_add_jobserver No

sp_add_jobstep No

sp_add_notification No

sp_add_operator No

sp_add_proxy No

sp_add_schedule No

sp_add_targetservergroup No

sp_add_targetsvrgrp_memberNo

sp_apply_job_to_targets No

sp_attach_schedule No

Version 1.0194

Page 202: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSQL Server Agent

Clause AutomaticallyConverted

Details

sp_cycle_agent_errorlog No

sp_cycle_errorlog No

sp_delete_alert No

sp_delete_category No

sp_delete_job No

sp_delete_jobschedule No

sp_delete_jobserver No

sp_delete_jobstep No

sp_delete_jobsteplog No

sp_delete_notification No

sp_delete_operator No

sp_delete_proxy No

sp_delete_schedule No

sp_delete_targetserver No

sp_delete_targetservergroup No

sp_delete_targetsvrgrp_memberNo

sp_detach_schedule No

sp_enum_login_for_proxy No

sp_enum_proxy_for_subsystemNo

sp_enum_sqlagent_subsystemsNo

sp_grant_login_to_proxy No

sp_grant_proxy_to_subsystemNo

sp_help_alert No

sp_help_category No

sp_help_downloadlist No

sp_help_job No

sp_help_jobactivity No

sp_help_jobcount No

sp_help_jobhistory No

sp_help_jobs_in_schedule No

Version 1.0195

Page 203: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSQL Server Agent

Clause AutomaticallyConverted

Details

sp_help_jobschedule No

sp_help_jobserver No

sp_help_jobstep No

sp_help_jobsteplog No

sp_help_notification No

sp_help_operator No

sp_help_proxy No

sp_help_schedule No

sp_help_targetserver No

sp_help_targetservergroup No

sp_manage_jobs_by_login No

sp_msx_defect No

sp_msx_enlist No

sp_msx_get_account No

sp_msx_set_account No

sp_notify_operator No

sp_post_msx_operation No

sp_purge_jobhistory No

sp_remove_job_from_targetssNo

sp_resync_targetserver No

sp_revoke_login_from_proxy No

sp_revoke_proxy_from_subsystemNo

sp_start_job No

sp_stop_job No

sp_update_alert No

sp_update_category No

sp_update_job No

sp_update_jobschedule No

sp_update_jobstep No

sp_update_notification No

Version 1.0196

Page 204: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideSQL Server Backup

Clause AutomaticallyConverted

Details

sp_update_operator No

sp_update_proxy No

sp_update_schedule No

sp_update_targetservergroup No

SQL Server Backup

Clause AutomaticallyConverted

Details

BACKUP No

BACKUP CERTIFICATE No

BACKUP MASTER KEY No

BACKUP SERVICE MASTERKEY

No

RESTORE No

RESTORE FILELISTONLY No

RESTORE HEADERONLY No

RESTORE LABELONLY No

RESTORE MASTER KEY No

RESTORE REWINDONLY No

RESTORE SERVICE MASTERKEY

No

RESTORE VERIFYONLY No

T-SQL

BACKUP and RESTORE

Clause AutomaticallyConverted

Details

BACKUP and RESTOREStatements

No

Version 1.0197

Page 205: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideT-SQL

Collation

Clause AutomaticallyConverted

Details

Collation No

Control-of-Flow Language

Clause AutomaticallyConverted

Details

BEGIN...END Yes

BREAK Yes

CONTINUE Yes

GOTO No

IF...ELSE Yes

RETURN Yes

THROW Yes

TRY...CATCH Yes

WAITFOR Partial

WHILE Yes

Cursors

DECLARE CURSOR

Clause AutomaticallyConverted

Details

DECLARE CURSOR Yes

CURSOR with optionGLOBAL

No

CURSOR with optionsFORWARD_ONLY orSCROLL

No

Version 1.0198

Page 206: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

FETCH

Clause AutomaticallyConverted

Details

FETCH Yes

OPEN

Clause AutomaticallyConverted

Details

OPEN Yes

DUMP and LOAD Statements

Clause AutomaticallyConverted

Details

DUMP and LOADStatements

No

Microsoft SQL Server to PostgreSQL Conversion IssueReferenceUse the following sections to get information on the types of issues you might encounter during aMicrosoft SQL Server to PostgreSQL conversion. Choose the link in the Issue column to get moredetailed resolution information about the issue if it is available.

Arithmetic Operators

Item Issue Resolution

Arithmetic operators Issue 7775: Check the data type conversionfor possible loss of accuracy (p. 208)

Cast values as the intendedtype.

Arithmetic operatorsand date types

Issue 7773: Unable to perform an automatedmigration of arithmetic operations withdates (p. 208)

Cast values as the intendedtype.

Arithmetic operatorsand mixed types

Issue 7774: Unable to perform an automatedmigration of the arithmetic operations withmixed types of operands (p. 208)

Cast values as the intendedtype.

Version 1.0199

Page 207: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Built-In Services

Item Issue Resolution

Database Mail Issue 7900: PostgreSQL does not havefunctionality similar to SQL Server DatabaseMail (p. 209)

Try using the Amazon SimpleNotification Service (AmazonSNS).

Service Broker Issue 7901: PostgreSQL does not havefunctionality similar to SQL Server ServiceBroker (p. 209)

Try using the Amazon SimpleQueue Service (Amazon SQS).

SQL Server Agent Issue 7902: PostgreSQL does not havefunctionality similar to SQL ServerAgent (p. 209)

Try using the AWS Lambdaservice with ScheduledEvents.

SQL Server Backup Issue 7903: PostgreSQL does not havefunctionality similar to SQL ServerBackup (p. 209)

Try using the Amazon Glacierstorage service.

Built-In SQL Functions

Item Issue Resolution

SOUNDEX Issue 7811: PostgreSQL doesn't support theSOUNDEX function (p. 209)

Create a user-definedfunction.

CONTROL FLOW

Item Issue Resolution

Cursors Issue 7801: The table can be locked opencursor (p. 209)

Review your transformedcode and modify it ifnecessary.

DECLARE / DEFAULTVALUE

Issue 7826: Check the default value for aDateTime variable (p. 210)

Check the default value for aDateTime variable.

GOTO Issue 7628: PostgreSQL doesn't support theGOTO option. Automatic conversion can't beperformed. (p. 210)

Revise your code to eliminateGOTO operators, usingBEGIN...END blocks incombination with EXIT,REPEAT, UNTIL, and WHILEoperators.

Procedures Issue 7802: A table that is created within theprocedure, must be deleted before the end ofthe procedure (p. 210)

Review your transformedcode and modify it ifnecessary.

Result sets Issue 7800: PostgreSQL doesn't support resultsets in the style of MSSQL (p. 209)

Review your transformedcode and modify it ifnecessary.

Version 1.0200

Page 208: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Item Issue Resolution

WAITFOR DELAY Issue 7821: Automatic conversionoperator WAITFOR with a variable is notsupported (p. 210)

Perform a manual conversion.

WAITFOR TIME Issue 7691: PostgreSQL doesn't supportWAITFOR TIME feature (p. 210)

Perform a manual conversion.

CREATE

Item Issue Resolution

Issue 7696: Unable convert object due to %snot created (p. 210)

Review the %s object.

Encrypted objects Issue 7813: Encrypted objects (p. 210) Decrypt the object beforeconversion.

CURSORS

Item Issue Resolution

CURSOR with optionGLOBAL

Issue 7637: PostgreSQL doesn't supportGLOBAL CURSORS. Requires manualconversion. (p. 211)

Change the global cursor toa local cursor, or revise yourcode so it doesn't requireglobal cursors.

CURSOR with optionsSTATIC or KEYSETor DYNAMIC orFAST_FORWARD

Issue 7639: PostgreSQL doesn't supportDYNAMIC cursors (p. 211)

Revise your code to eliminatedynamic cursors.

FAST_FORWARDoption

Issue 7701: Setting this option corresponds tothe typical behavior of cursors in PostgreSQL,so this option is skipped (p. 211)

Use cursors without thisoption.

FOR UPDATE Issue 7803: PostgreSQL doesn't supportthe option FOR UPDATE, so this option isskipped (p. 211)

Review your transformedcode and modify it ifnecessary.

KEYSET option Issue 7700: The membership and order ofrows never changes for cursors in PostgreSQL,so this option is skipped (p. 211)

Use cursors without thisoption.

OPTIMISTIC option Issue 7704: PostgreSQL doesn't supportthe option OPTIMISTIC, so this option isskipped (p. 211)

Use cursors without thisoption.

READ_ONLY option Issue 7702: All PostgreSQL cursors are read-only, so this option is skipped (p. 211)

Use cursors without thisoption.

TYPE_WARNINGoption

Issue 7705: PostgreSQL doesn't support theoption TYPE_WARNING, so this option isskipped (p. 211)

Use cursors without thisoption.

Version 1.0201

Page 209: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

DATA TYPES

Item Issue Resolution

BYTEA Issue 7818: PostgreSQL doesn't supportarithmetic operations with binary datatypes (p. 211)

Perform a manual conversion.

geography Issue 7662: PostgreSQL doesn't supportthis type. A manual conversion isrequired. (p. 212)

To store data of this typein PostgreSQL, use aPostgreSQL-compatible typeor use a composite type.

geometry Issue 7664: PostgreSQL doesn't supportthis type. A manual conversion isrequired. (p. 212)

To store data of this typein PostgreSQL, use aPostgreSQL-compatible typeor use a composite type.

hierarchyid Issue 7657: PostgreSQL doesn't supportthis type. A manual conversion isrequired. (p. 212)

To store data of this typein PostgreSQL, use aPostgreSQL-compatible typeor use a composite type.

rowversion Issue 7706: PostgreSQL doesn't support thistype (p. 212)

Perform a manual conversion.

sql_variant Issue 7658: PostgreSQL doesn't supportthis type. A manual conversion isrequired. (p. 212)

To store data of this typein PostgreSQL, use aPostgreSQL-compatible typeor use a composite type.

table Issue 7659: The scope table-variables andtemporary tables is different. You mustapply manual conversion, if you are usingrecursion. (p. 212)

Perform a manual conversion.

UDT Issue 7690: PostgreSQL doesn't support tabletypes (p. 212)

Perform a manual conversion.

XML Issue 7816: PostgreSQL doesn't support anymethods for data type XML (p. 213)

Perform a manual conversion.

XML Issue 7817: PostgreSQL doesn't supportoption [for xml path] in the SQLqueries (p. 213)

Perform a manual conversion.

DDL

Item Issue Resolution

CREATE INDEX Issue 7675: PostgreSQL doesn't supportsorting options (ASC | DESC) forconstraints (p. 213)

Use indexes without thisoption.

CREATE INDEX Issue 7681: PostgreSQL doesn't supportclustered indexes (p. 213)

Use nonclustered indexes.

Version 1.0202

Page 210: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Item Issue Resolution

CREATE INDEX Issue 7682: PostgreSQL doesn't support theINCLUDE option in indexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7781: PostgreSQL doesn't support thePAD_INDEX option in indexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7782: PostgreSQL doesn't support theSORT_IN_TEMPDB option in indexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7783: PostgreSQL doesn't support theIGNORE_DUP_KEY option in indexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7784: PostgreSQL doesn't supportthe STATISTICS_NORECOMPUTE option inindexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7785: PostgreSQL doesn't supportthe STATISTICS_INCREMENTAL option inindexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7786: PostgreSQL doesn't support theDROP_EXISTING option in indexes (p. 213)

Use index without this option.

CREATE INDEX Issue 7787: PostgreSQL doesn't support theONLINE option in indexes (p. 214)

Use index without this option.

CREATE INDEX Issue 7788: PostgreSQL doesn't supportthe ALLOW_ROW_LOCKS option inindexes (p. 214)

Use index without this option.

CREATE INDEX Issue 7789: PostgreSQL doesn't supportthe ALLOW_PAGE_LOCKS option inindexes (p. 214)

Use index without this option.

CREATE INDEX Issue 7790: PostgreSQL doesn't support theMAXDOP option in indexes (p. 214)

Use index without this option.

CREATE INDEX Issue 7791: PostgreSQL doesn't supportthe DATA_COMPRESSION option inindexes (p. 214)

Use index without this option.

CREATE TABLE Issue 7679: PostgreSQL doesn't supportcomputed columns (p. 214)

Try using a trigger.

CREATE TABLE Issue 7680: PostgreSQL doesn't supportglobal temporary tables (p. 214)

Use local temporary orregular tables.

CREATE TABLE Issue 7812: Temporary table must be removedbefore the end of the function (p. 214)

Review your transformedcode and modify it ifnecessary.

CREATE TABLE Issue 7825: The default value for a DateTimecolumn removed (p. 214)

Review generated code andmodify it if necessary.

Inline Function Issue 7776: Automatic migration of inlinefunctions not supported (p. 214)

Perform a manual conversion.

Version 1.0203

Page 211: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

DELETE

Item Issue Resolution

DELETE with TableHint Limited

Issue 7623: PostgreSQL doesn't supporthints in DELETE statements. Theconversion skips options in the formatWITH(Table_Hint_Limited). (p. 214)

Use PostgreSQL methods forperformance tuning.

TOP Issue 7798: PostgreSQL doesn't support TOPoption in the operator DELETE (p. 215)

Perform a manual conversion.

DML, FROM

Item Issue Resolution

Table Hints Issue 7823: PostgreSQL doesn't support tablehints in DML statements (p. 215)

Use PostgreSQL methods ofperformance tuning.

EXECUTE

Item Issue Resolution

Issue 7695: PostgreSQL doesn't supportthe execution of a procedure as avariable (p. 215)

Perform a manual conversionusing dynamic SQL.

EXECUTE a characterstring

Issue 7672: Automatic conversion of thiscommand is not supported (p. 215)

Perform a manual conversion.

Execute a pass-through commandagainst a linkedserver

Issue 7645: PostgreSQL doesn't supportexecuting a pass-through command on alinked server (p. 216)

Use other methods to executestatements on a remoteserver.

EXECUTE withexecute options[RECOMPILE]

Issue 7640: The EXECUTE with RECOMPILEoption is ignored (p. 216)

Use EXECUTE commandwithout this option.

EXECUTE withexecute options[RESULT SETS(<result_sets_definition>)]

Issue 7643: The EXECUTE with RESULTSETS <result set definition> option isignored (p. 216)

Use EXECUTE commandwithout this option.

EXECUTE withexecute options[RESULT SETS NONE]

Issue 7642: The EXECUTE with RESULT SETSNONE option is ignored (p. 216)

Use EXECUTE commandwithout this option.

EXECUTE withexecute options[RESULT SETSUNDEFINED]

Issue 7641: The EXECUTE with RESULT SETSUNDEFINED option is ignored (p. 216)

Use EXECUTE commandwithout this option.

Version 1.0204

Page 212: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

INSERT

Item Issue Resolution

EXECUTE Issue 7819: PostgreSQL doesn't supportINSERT...EXECUTE statements (p. 216)

Perform a manual conversion.

TOP Issue 7799: PostgreSQL doesn't support TOPoption in the operator INSERT (p. 216)

Perform a manual conversion.

Operators

Item Issue Resolution

Bitwise Operators Issue 7804: PostgreSQL doesn't supportoperator [Bitwise exclusive OR] (p. 217)

Perform a manual conversion.

ComparisonOperators

Issue 7805: PostgreSQL doesn't supportoperator [Not less than] (p. 217)

Perform a manual conversion.

ComparisonOperators

Issue 7806: PostgreSQL doesn't supportoperator [Not greater than] (p. 217)

Perform a manual conversion.

Parser Error

Item Issue Resolution

Parser Error Issue 7663: Unable to resolve theobject (p. 217)

Verify if object <object name>is present in the database.If it isn't, check the objectname or add the object. If theobject is present, transformthe code manually.

SELECT

Item Issue Resolution

GROUP BY CUBE Issue 7653: PostgreSQL doesn't supportthe option GROUP BY ROLLUP. Automaticconversion can't be performed. (p. 217)

Try creating a storedprocedure to replace thequery.

GROUP BY CUBE Issue 7654: PostgreSQL doesn't supportthe option GROUP BY CUBE. Automaticconversion can't be performed. (p. 218)

Try creating a storedprocedure to replace thequery.

Group By GroupingSets

Issue 7655: PostgreSQL doesn't supportthe option GROUP BY GROUPINGSETS. Automatic conversion can't beperformed. (p. 218)

Try creating a storedprocedure to replace thequery.

Version 1.0205

Page 213: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Item Issue Resolution

ORDER BY Specifyinga collation

Issue 7646: PostgreSQL doesn't supportthe COLLATE option in the ORDER BYclause. Automatic conversion can't beperformed. (p. 218)

You must use the COLLATIONsettings that were assignedwhen the database wascreated.

search condition Issue 7687: PostgreSQL doesn't support theCONTAINS predicate (p. 218)

Perform a manual conversion.

search condition Issue 7688: PostgreSQL doesn't support theFREETEXT predicate (p. 218)

Perform a manual conversion.

search condition Issue 7795: PostgreSQL is case sensitive.Check the string comparison. (p. 218)

Check the string comparison.

TOP WITH TIES Issue 7605: PostgreSQL doesn't support theWITH TIES option (p. 218)

Perform a manual conversion.

SEQUENCE

Item Issue Resolution

Specific data type Issue 7793: PostgreSQL doesn't supportchanging data type in sequences (p. 218)

Review your transformedcode and modify it ifnecessary.

SYNONYMS

Item Issue Resolution

CREATE Issue 7792: PostgreSQL doesn't supportsynonyms (p. 219)

Replace a synonym withoriginal database object. Iforiginal object is table or viewyou can try to create a viewin one database that relieson a table or view in anotherdatabase.

SYS objects

Item Issue Resolution

SYS objects Issue 7904: Unable to convert system object<object name> (p. 219)

Perform a manual conversion.

Version 1.0206

Page 214: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

TRANSACTION

Item Issue Resolution

Transaction Issue 7807: Transactions in functionsPostgreSQL doesn't support (p. 219)

Perform a manual conversion.

TRIGGERS

Item Issue Resolution

Triggers Issue 7809: In PostgreSQL there are noanalogues of the tables 'inserted' and'deleted' (p. 219)

Perform a manual conversion.

Unknown

Item Issue Resolution

Issue 7627: This syntactic element conversionis not supported yet (p. 220)

Perform a manual conversion.

Unknown Clause Issue 7674: Automatic conversion of<clause name> clause of <statement name>statement is not supported (p. 221)

Perform a manual conversion.

Unparsed SQL Issue 7808: Unparsed SQL (p. 221) Perform a manual conversion.

UPDATE

Item Issue Resolution

TOP Issue 7796: PostgreSQL doesn't support TOPoption in the operator UPDATE (p. 221)

Perform a manual conversion.

UPDATE Issue 7797: PostgreSQL doesn't haveanalog for option "OUTPUT" with using theimplicit table "deleted" in the operator forUPDATE (p. 221)

This case requires manualconversion.

Variable assignment Issue 7829: Unable to convert variableassignment by UPDATE statement (p. 222)

Perform a manual conversion.

User Types

Item Issue Resolution

User-Defined DataTypes

Issue 7794: PostgreSQL doesn't support user-defined data types (p. 223)

Perform a manual conversion.

Version 1.0207

Page 215: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Conversion Issues with Arithmetic Operators

Issue 7775: Check the data type conversion for possible loss of accuracy

To avoid loss of accuracy for types in arithmetic operations, cast values as the intended type, as in theexample following.

BEGIN SELECT 5.1E+1::REAL INTO lBinaryFloat; SELECT - 5.2E-1::DOUBLE PRECISION INTO lBinaryDouble;

var1 := (var_varchar1||var_varchar2)::INTEGER; var2 := (var_varchar1||var_varchar3)::NUMERIC; var3 := var_varchar1::NUMERIC + var_numeric2; var4 := var_timestamp2 + (var_numeric1::NUMERIC || 'day')::INTERVAL; END;

Issue 7773: Unable to perform an automated migration of arithmetic operationswith dates

The Schema Conversion Tool cannot automatically migrate arithmetic operations that use date types.Cast values as the intended type, as in the example following.

BEGIN var3 := var_varchar1::NUMERIC + var_numeric2; var4 := var_timestamp2 + (var_numeric1::NUMERIC || 'day')::INTERVAL; END;

Issue 7774: Unable to perform an automated migration of the arithmeticoperations with mixed types of operands

The Schema Conversion Tool cannot automatically migrate arithmetic operations that mix types. Forexample, multiplying a variable of type FLOAT with a variable of type INT. Cast values as the intendedtype before performing any arithmetic operations, as in the example following.

BEGIN var1 := (var_varchar1||var_varchar2)::INTEGER; var2 := (var_varchar1||var_varchar3)::NUMERIC;END;

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0208

Page 216: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Conversion Issues with BUILT-IN SERVICES

Issue 7900: PostgreSQL does not have functionality similar to SQL ServerDatabase Mail

Try using the Amazon Simple Queue Service (Amazon SQS). For more information, see What is AmazonSimple Queue Service?

Issue 7901: PostgreSQL does not have functionality similar to SQL ServerService Broker

Try using the Amazon Simple Queue Service (SQS). For more information, see What is Amazon SimpleQueue Service? in the Amazon SQS documentation.

Issue 7902: PostgreSQL does not have functionality similar to SQL Server Agent

Try using the AWS Lambda service with Scheduled Events. For more information, see What Is AWSLambda? in the AWS Lambda Developer Guide.

Issue 7903: PostgreSQL does not have functionality similar to SQL ServerBackup

Try using the Amazon Glacier storage service. For more information, see What Is Amazon Glacier? in theAmazon Glacier Developer Guide.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with BUILT-IN SQL FUNCTIONS

Issue 7811: PostgreSQL doesn't support the SOUNDEX function

Create a user-defined function.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CONTROL FLOW

Issue 7800: PostgreSQL doesn't support result sets in the style of MSSQL

Review your transformed code and modify it if necessary.

Issue 7801: The table can be locked open cursor

In Microsoft SQL Server, a local temporary table created in a stored procedure is dropped automaticallywhen the stored procedure completes. Temporary tables in PostgreSQL are automatically dropped at the

Version 1.0209

Page 217: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

end of a session. The conversion uses the DROP TABLE IF EXISTS statement to emulate this behavior andremove the temporary table before the end of the function that created it. In some cases though, thisstatement might fail because the temporary table is locked due to an open cursor. In this case, the DROPTABLE statement must be commented out. Review your transformed code and modify it if necessary.

Issue 7802: A table that is created within the procedure, must be deleted beforethe end of the procedure

Review your transformed code and modify it if necessary.

Issue 7826: Check the default value for a DateTime variable

Check the default value for a DateTime variable.

Issue 7628: PostgreSQL doesn't support the GOTO option. Automatic conversioncan't be performed.

Revise your code to eliminate GOTO operators, using BEGIN...END blocks in combination with EXIT,REPEAT, UNTIL, and WHILE operators.

Issue 7821: Automatic conversion operator WAITFOR with a variable is notsupported

You must perform a manual conversion in cases where you have a WAITFOR DELAY statement that uses avariable, for example WAITFOR DELAY @time;, instead of a literal value, for example WAITFOR DELAY'00:00:05';.

Issue 7691: PostgreSQL doesn't support WAITFOR TIME feature

Perform a manual conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE

Issue 7696: Unable convert object due to %s not created

Review the <object name> object.

Issue 7813: Encrypted objects

Decrypt the object before conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0210

Page 218: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Conversion Issues with CURSORS

Issue 7637: PostgreSQL doesn't support GLOBAL CURSORS. Requires manualconversion.

Change the global cursor to a local cursor, or revise your code so it doesn't require global cursors.

Issue 7639: PostgreSQL doesn't support DYNAMIC cursors

Revise your code to remove the DYNAMIC option from any cursors.

Issue 7701: Setting this option corresponds to the typical behavior of cursors inPostgreSQL, so this option is skipped

The FAST_FORWARD option is skipped during conversion, because PostgreSQL cursors provide thesame behavior as the FAST_FORWARD option by default. Review your transformed code and modify it ifnecessary.

Issue 7803: PostgreSQL doesn't support the option FOR UPDATE, so this optionis skipped

The FOR_UPDATE option is skipped during conversion because PostgreSQL doesn't support it. Reviewyour transformed code and modify it if necessary.

Issue 7700: The membership and order of rows never changes for cursors inPostgreSQL, so this option is skipped

Use cursors without this option.

Issue 7704: PostgreSQL doesn't support the option OPTIMISTIC, so this option isskipped

Use cursors without this option.

Issue 7702: All PostgreSQL cursors are read-only, so this option is skipped

Use cursors without this option.

Issue 7705: PostgreSQL doesn't support the option TYPE_WARNING, so thisoption is skipped

Use cursors without this option.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DATA TYPES

Issue 7818: PostgreSQL doesn't support arithmetic operations with binary datatypes

Perform a manual conversion.

Version 1.0211

Page 219: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7662: PostgreSQL doesn't support this type. A manual conversion isrequired.

PostgreSQL doesn't support the geography data type. To store data of this type in PostgreSQL, use aPostgreSQL-compatible type or use a composite type.

Issue 7664: PostgreSQL doesn't support this type. A manual conversion isrequired.

PostgreSQL doesn't support the geometry data type. To store data of this type in PostgreSQL, use aPostgreSQL-compatible type or use a composite type.

Issue 7657: PostgreSQL doesn't support this type. A manual conversion isrequired.

PostgreSQL doesn't support the hierarchyid data type. To store data of this type in PostgreSQL, use aPostgreSQL-compatible type or use a composite type.

Issue 7706: PostgreSQL doesn't support this type

PostgreSQL doesn't support the rowversion data type. To store data of this type in PostgreSQL, use aPostgreSQL-compatible type.

Issue 7658: PostgreSQL doesn't support this type. A manual conversion isrequired.

PostgreSQL doesn't support the sql_variant data type. To store data of this type in PostgreSQL, use aPostgreSQL-compatible type or use a composite type.

Issue 7659: The scope table-variables and temporary tables is different. Youmust apply manual conversion, if you are using recursion.

Perform a manual conversion.

Issue 7690: PostgreSQL doesn't support table types

PostgreSQL doesn’t support table parameters in CREATE PROCEDURE statements, as in the examplefollowing.

CREATE TYPE Employee2Client AS TABLE( EmployeeID int, EmployeeName varchar(160), ClientID int, ClientName varchar(160))go

CREATE PROCEDURE [dbo].[PROC_CREATE_PROC_005] @p_E2C Employee2Client READONLYASBEGIN select * from @p_E2C where upper(ClientName) like concat('%', upper('bank'), '%') ;

Convert to temporary tables or row variables (for example, name table_name%ROWTYPE;).

Version 1.0212

Page 220: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7816: PostgreSQL doesn't support any methods for data type XML

Microsoft SQL Server provides methods for the xml data type that you can use to read and manipulateXML data, but PostgreSQL's xml data type does not offer parallel functionality. Perform a manualconversion to use PostgreSQL XML handling functionality instead.

Issue 7817: PostgreSQL doesn't support option [for xml path] in the SQL queries

PostgreSQL doesn't support using the FOR XML clause in PATH mode for DML statements. Perform amanual conversion to use PostgreSQL XML handling functionality instead.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DDLIssue 7675: PostgreSQL doesn't support sorting options (ASC | DESC) forconstraints

Remove these options from indexes and constraints.

Issue 7681: PostgreSQL doesn't support clustered indexes

Use nonclustered indexes.

Issue 7682: PostgreSQL doesn't support the INCLUDE option in indexes

Use the index without this option.

Issue 7781: PostgreSQL doesn't support the PAD_INDEX option in indexes

Use the index without this option.

Issue 7782: PostgreSQL doesn't support the SORT_IN_TEMPDB option in indexes

Use the index without this option.

Issue 7783: PostgreSQL doesn't support the IGNORE_DUP_KEY option inindexes

Use the index without this option.

Issue 7784: PostgreSQL doesn't support the STATISTICS_NORECOMPUTE optionin indexes

Use the index without this option.

Issue 7785: PostgreSQL doesn't support the STATISTICS_INCREMENTAL optionin indexes

Use the index without this option.

Issue 7786: PostgreSQL doesn't support the DROP_EXISTING option in indexes

Use the index without this option.

Version 1.0213

Page 221: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7787: PostgreSQL doesn't support the ONLINE option in indexes

Use the index without this option.

Issue 7788: PostgreSQL doesn't support the ALLOW_ROW_LOCKS option inindexes

Use index without this option.

Issue 7789: PostgreSQL doesn't support the ALLOW_PAGE_LOCKS option inindexes

Use index without this option.

Issue 7790: PostgreSQL doesn't support the MAXDOP option in indexes

Use index without this option.

Issue 7791: PostgreSQL doesn't support the DATA_COMPRESSION option inindexes

Use index without this option.

Issue 7679: PostgreSQL doesn't support computed columns

Try using a trigger instead.

Issue 7680: PostgreSQL doesn't support global temporary tables

Use local temporary or regular tables.

Issue 7812: Temporary table must be removed before the end of the function

Review your transformed code and modify it if necessary.

Issue 7825: The default value for a DateTime column removed

Review generated code and modify it if necessary.

Issue 7776: Automatic migration of inline functions not supported

Perform a manual conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DELETEIssue 7623: PostgreSQL doesn't support hints in DELETE statements. Theconversion skips options in the format WITH(Table_Hint_Limited).

PostgreSQL doesn't support usings hints (for example, WITH FORCESCAN) to override the defaultbehavior of the query optimizer when executing Data Manipulation Language (DML) statements. UsePostgreSQL methods for performance tuning instead.

Version 1.0214

Page 222: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7798: PostgreSQL doesn't support TOP option in the operator DELETE

Perform a manual conversion for any DELETE statements that contain a TOP argument, as in theexample following.

delete top (<expression >)[PERCENT] from <table-name>;

In PostgreSQL, you can use a subquery in the WHERE clause to identify the rows you want to delete.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DML, FROM

Issue 7823: PostgreSQL doesn't support table hints in DML statements

PostgreSQL doesn't support usings hints (for example, WITH FORCESCAN) to override the defaultbehavior of the query optimizer when executing Data Manipulation Language (DML) statements. UsePostgreSQL methods of performance tuning instead.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with EXECUTE

Issue 7695: PostgreSQL doesn't support the execution of a procedure as avariable

Perform a manual conversion (one possibility is to use dynamic SQL). This issue occurs when you pass inthe name of a procedure to an EXECUTE statement by using a variable, as in the example following.

ALTER PROCEDURE [dbo].[PROC_EXECUTE_009]AS SET NOCOUNT ONBEGIN declare @v_ID int; declare @v_ProcName varchar(20) = '[dbo].[PROC_DML_015]'; exec @v_ProcName @v_ID output

Issue 7672: Automatic conversion of this command is not supported

This issue is often caused by an EXECUTE statement that executes a string or variable, for exampleEXEC('select * from Customer'); or EXEC(@variable);. Convert each of these statements to apair of PREPARE and EXECUTE statements in PostgreSQL.

Version 1.0215

Page 223: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7645: PostgreSQL doesn't support executing a pass-through command ona linked server

Use other methods to execute statements on a remote server.

Issue 7640: The EXECUTE with RECOMPILE option is ignored

Use the EXECUTE command without this option.

Issue 7643: The EXECUTE with RESULT SETS <result set definition> option isignored

Use the EXECUTE command without this option.

Issue 7642: The EXECUTE with RESULT SETS NONE option is ignored

Use the EXECUTE command without this option.

Issue 7641: The EXECUTE with RESULT SETS UNDEFINED option is ignored

Use the EXECUTE command without this option.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with INSERTIssue 7819: PostgreSQL doesn't support INSERT...EXECUTE statements

Perform a manual conversion. PostgreSQL doesn't support using EXECUTE within an INSERT statementto insert the results of a stored procedure into a table.

Issue 7799: PostgreSQL doesn't support TOP option in the operator INSERT

Perform a manual conversion for any INSERT statements that contain a TOP argument, as in the examplefollowing.

insert TOP(2) percent into Customer( id ,sname ,name ,typeid ,taxcode ,stateid ,opendate ,closedate)select id+1000 ,name ,name ,4 ,61+id ,1 ,getdate() ,nullfrom

Version 1.0216

Page 224: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

employees ewhere name not in(select name from Customer) and exists(select 1 from Employees where ManagerId = e.id)

In PostgreSQL, you can use the row_number() window function in the FROM clause or a subquery in theWHERE clause of the SELECT statement you use to select the data to be inserted to identify the rows youwant to insert.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with OperatorsIssue 7804: PostgreSQL doesn't support operator [Bitwise exclusive OR]

Perform a manual conversion.

Issue 7805: PostgreSQL doesn't support operator [Not less than]

Perform a manual conversion.

Issue 7806: PostgreSQL doesn't support operator [Not greater than]

Perform a manual conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Parser ErrorIssue 7663: Unable to resolve the object

Verify if object <object name> is present in the database. If it isn't, check the object name or add theobject. If the object is present, transform the code manually.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECTIssue 7653: PostgreSQL doesn't support the option GROUP BY ROLLUP.Automatic conversion can't be performed.

Try creating a stored procedure to replace the query.

Version 1.0217

Page 225: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7654: PostgreSQL doesn't support the option GROUP BY CUBE. Automaticconversion can't be performed.

Try creating a stored procedure to replace the query.

Issue 7655: PostgreSQL doesn't support the option GROUP BY GROUPING SETS.Automatic conversion can't be performed.

Try creating a stored procedure to replace the query.

Issue 7646: PostgreSQL doesn't support the COLLATE option in the ORDER BYclause. Automatic conversion can't be performed.

You must use the collation settings that were assigned when the database was created.

Issue 7687: PostgreSQL doesn't support the CONTAINS predicate

Perform a manual conversion by re-writing the SELECT statement to use PostgreSQL full-text searchfunctionality instead. For more information about full-text search in PostgreSQL, see Tables and Indexesin the PostgreSQL documentation.

Issue 7688: PostgreSQL doesn't support the FREETEXT predicate

Perform a manual conversion by re-writing the SELECT statement to use PostgreSQL full-text searchfunctionality instead. For more information about full-text search in PostgreSQL, see Tables and Indexesin the PostgreSQL documentation.

Issue 7795: PostgreSQL is case sensitive. Check the string comparison.

Check string comparisons in the WHERE clauses of statements, for example WHERE [Name] LIKE'%BLOCKED%';. All strings used in comparisons must be lowercase.

Issue 7605: PostgreSQL doesn't support the WITH TIES option

Perform a manual conversion of any TOP statements that use the WITH TIES clause. You can use therank() window function in PostgreSQL to provide similar results.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SEQUENCE

Issue 7793: PostgreSQL doesn't support changing data type in sequences

PostgreSQL doesn't support setting a sequence's data type by using the AS clause of the CREATESEQUENCE statement. Review your transformed code and modify it if necessary.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0218

Page 226: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Conversion Issues with SYNONYMS

Issue 7792: PostgreSQL doesn't support synonyms

PostgreSQL doesn't support the CREATE SYNONYM statement. To convert, replace the synonym in anystatement with the original database object. If the original object is a table or view, you can try to createa view in one database that relies on a table or view in another database.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SYS objects

Issue 7904: Unable to convert system object <object name>

Perform a manual conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with TRANSACTION

Issue 7807: Transactions in functions PostgreSQL doesn't support

Perform a manual conversion to correct this issue.

PostgreSQL supports local transactions within a given client session. You must manually convertMicrosoft SQL Server transactions to use the PostgreSQL transaction management statements instead.PostgreSQL doesn't support named or distributed transactions, marking transactions, or transactionmanagement within functions. For more information about using transactions in PostgreSQL, seeTRANSACTIONS in the PostgreSQL documentation.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with TRIGGERS

Issue 7809: In PostgreSQL there are no analogues of the tables 'inserted' and'deleted'

PostgreSQL doesn't support the inserted or deleted virtual tables. To manually convert a trigger thatuses these tables from Microsoft SQL Server to PostgreSQL, perform the following steps:

Version 1.0219

Page 227: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

1. Create a trigger function. The trigger function must be declared as a function taking no argumentsand returning type trigger. The returned value must be NEW, OLD or NULL, depending on the typeof a trigger. The function’s body must be PostgreSQL-supported SQL to replace the body of theMicrosoft SQL Server trigger without using the virtual tables. The name of the function should beformed as schema_name.fn_<%trigger_name%>().

2. Create a trigger with CREATE TRIGGER that executes the trigger function.

For example, consider the following Microsoft SQL Server trigger.

CREATE TRIGGER [dbo].[tr_customerStateExt_aiu] ON [dbo].[CustomerStateExt]AFTER INSERT, UPDATEAS BEGIN IF EXISTS (SELECT * FROM inserted WHERE LEN(Name) < 5) BEGIN RAISERROR ('The name must be longer than five characters.', 16, 1); ROLLBACK TRANSACTION; RETURN END;ENDGO

Using the approach described, this trigger is converted into the following PostgreSQL trigger.

CREATE OR REPLACE FUNCTION mydb_dbo.fn_tr_customerStateExt_aiu()RETURNS triggerAS$BODY$BEGIN<SQL to write around use of the inserted and deleted virtual tables>END;$BODY$LANGUAGE plpgsql;

CREATE TRIGGER tr_customerStateExt_aiu AFTER INSERT OR UPDATE ON mydb_dbo.CustomerStateExtFOR EACH STATEMENT EXECUTE PROCEDURE mydb_dbo.fn_tr_customerStateExt_aiu();

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Unknown

Issue 7627: This syntactic element conversion is not supported yet

Perform a manual conversion.

Version 1.0220

Page 228: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

Issue 7674: Automatic conversion of <clause name> clause of <statementname> statement is not supported

Perform a manual conversion to correct this issue.

A common cause of this issue is SET statements in Microsoft SQL Server that affect current sessionhandling (a complete list of these SET statements is available at SET Statements (Transact-SQL)).These statements are not supported in PostgreSQL, so you need to perform a manual conversion to aPostgreSQL SET statement. For more information about using a SET statement in PostgreSQL, see SET inthe PostgreSQL documentation.

Issue 7808: Unparsed SQL

Perform a manual conversion.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with UPDATE

Issue 7796: PostgreSQL doesn't support TOP option in the operator UPDATE

Perform a manual conversion for any UPDATE statements that contain a TOP argument, as in theexample following.

update top(10) Account set AccountBalance = AccountBalance - 1where AccountBalance > 15723;

or:

update top(5) percent Account set AccountBalance = AccountBalance - 1where AccountBalance > 15723;

In PostgreSQL, you can use the row_number() window function in the FROM clause or a subquery in theWHERE clause of the UPDATE statement to identify the rows you want to modify.

Issue 7797: PostgreSQL doesn't have analog for option "OUTPUT" with using theimplicit table "deleted" in the operator for UPDATE

Perform a manual conversion for any UPDATE statements that uses the OUTPUT clause and referencesthe deleted virtual table, as in the example following.

update Customer set

Version 1.0221

Page 229: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMicrosoft SQL Server to PostgreSQL

Conversion Issue Reference

name = 'Mister ' + nameoutput deleted.id, deleted.name, inserted.id, inserted.namewhere TypeID = 4

In PostgreSQL, use a subquery in the RETURNING clause to return the information about the deletedtable. This approach requires the table to have a primary key field.

update mydb_dbo.Customer c set name = 'Mister ' || namewhere TypeID = 4returning (select id from mydb_dbo.Customer where id = c.id) ,(select name from mydb_dbo.Customer where id = c.id) ,id ,name

If the primary key is composed of multiple fields, you must reference all of those fields in the subquery.For example, take the following statement in SQL Server where id1 and id2 are the primary key fields forthe TestMultiPK table.

UPDATE [TestMultiPK] SET [Description] = 'Test'output deleted.id1, deleted.id2, deleted.Description, inserted.id1, inserted.id2, inserted.Description where ID = 0

The PostgreSQL conversion is as follows.

UPDATE [TestMultiPK] t SET [Description] = 'Test'WHERE ID = 0returning select (id1 from TestMultiPK where id1 = t.id1 and id2 = t.id2) , select (id2 from TestMultiPK where id1 = t.id1 and id2 = t.id2) , select (Description from TestMultiPK where id1 = t.id1 and id2 = t.id2) , id1 , id2 , Description

Issue 7829: Unable to convert variable assignment by UPDATE statement

Perform a manual conversion. This issue occurs when you use an UPDATE statement to change the valueof a variable, as in the example following.

CREATE PROCEDURE [dbo].[PROC_DML_UPDATE_FROM_3]ASBEGIN DECLARE @AccountBalance FLOAT = 400;

Version 1.0222

Page 230: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Supported Schema Conversion

UPDATE bank SET @AccountBalance = 500 FROM bank WHERE id = 50005;END

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with User Types

Issue 7794: PostgreSQL doesn't support user-defined data types

To correct this issue, perform a manual conversion of each sp_ addtype or CREATE TYPE statement inMicrosoft SQL Server to a CREATE TYPE statement in PostgreSQL. For more information about creating auser-defined data type in PostgreSQL, see CREATE TYPE in the PostgreSQL documentation.

Related Topics

• Microsoft SQL Server to PostgreSQL Conversion Issue Reference (p. 199)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Related Topics• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

MySQL to PostgreSQL Supported SchemaConversion

The following sections list the schema elements from a MySQL database and whether they aresupported for automatic conversion to PostgreSQL using the AWS Schema Conversion Tool.

DDL

Alter Statements

ALTER TABLE

Clause AutomaticallyConverted

Details

ADD CONSTRAINT Yes

Version 1.0223

Page 231: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDDL

Clause AutomaticallyConverted

Details

ADD INDEX Yes

Create Statements

CREATE INDEX

Clause AutomaticallyConverted

Details

INDEX Yes

UNIQUE index Yes

CREATE PROCEDURE

Clause AutomaticallyConverted

Details

PARAMETERS: IN, OUT,INOUT

Yes

With any outputparameters

Yes

Without output parameters Yes

CREATE TABLE

Clause AutomaticallyConverted

Details

Regular tables Yes

Temporary tables Yes

CREATE TRIGGER

Clause AutomaticallyConverted

Details

FOR EACH ROW Triggers Yes

Trigger event (Insert /Update / Delete )

Yes

Trigger time (Before /After)

Yes

Version 1.0224

Page 232: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

CREATE VIEW

Clause AutomaticallyConverted

Details

With ALGORITHM OPTION Partial Issue 8824: ALGORITHM option is notsupported (p. 253)

With CHECK OPTION Yes

Naming Objects

Clause AutomaticallyConverted

Details

Schemas Yes

Tables, Columns Yes

DML

Clauses

FROM

Clause AutomaticallyConverted

Details

CROSS JOIN Yes

INNER JOIN Yes

join_condition: ...ONconditional_expr

Yes

join_condition: … USING(column_list)

Yes

LEFT JOIN Yes

LEFT OUTER JOIN Yes

NATURAL LEFT JOIN Yes

NATURAL LEFT OUTERJOIN

Yes

NATURAL RIGHT JOIN Yes

NATURAL RIGHT OUTERJOIN

Yes

RIGHT JOIN Yes

Version 1.0225

Page 233: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

RIGHT OUTER JOIN Yes

STRAIGHT_JOIN Yes

Subqueries in the FROMClause

Yes

tables_list Yes

StatementsDELETE

Clause AutomaticallyConverted

Details

IGNORE Partial Issue 8831: PostgreSQL doesn't have an option similar toIGNORE for DML statements (p. 249)

LIMIT Yes

LOW_PRIORITY Partial Issue 8830: PostgreSQL doesn't have an option similar toLOW_PRIORITY for DML statements (p. 249)

Multiple-Table Syntax Partial Issue 8834: PostgreSQL can't delete from several tablesat the same time (p. 250)

Multiple-Table Syntax withUSING

Partial Issue 8834: PostgreSQL can't delete from several tablesat the same time (p. 250)

ORDER BY Yes

QUICK Partial Issue 8832: PostgreSQL doesn't have an option similar toQUICK for DML statements (p. 249)

INSERT

Clause AutomaticallyConverted

Details

IGNORE Partial Issue 8831: PostgreSQL doesn't have an option similar toIGNORE for DML statements (p. 249)

LOW_PRIORITY | DELAYED |HIGH_PRIORITY

Partial Issue 8830: PostgreSQL doesn't have an option similar toLOW_PRIORITY for DML statements (p. 249)

ON DUPLICATE KEYUPDATE

No Issue 8829: PostgreSQL doesn't have an analog of clauseON DUPLICATE KEY UPDATE (p. 249)

SELECT-statement forinsert

Yes

SET col1=expr1,.. Yes

Version 1.0226

Page 234: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

VALUES(,…,)|VALUE(,…,) Yes

SELECT

Clause AutomaticallyConverted

Details

DISTINCT Yes

GROUP BY ASC, DESC Yes

GROUP BY col_name,… Yes

GROUP BY expression Yes

GROUP BY mixed options Yes

GROUP BY position,… Yes

GROUP BY WITH ROLLUP No Issue 8653: PostgreSQL doesn't support the optionGROUP BY ROLLUP (p. 252)

HAVING Yes

HIGH_PRIORITY Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

LIMIT offset, row_count Yes

LIMIT row_count OFFSEToffset

Yes

MAX_STATEMENT_TIME =N

Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

ORDER BY col_name,… Yes

ORDER BY expression Yes

ORDER BY mixed options Yes

ORDER BY position,… Yes

SQL_BIG_RESULT Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

SQL_BUFFER_RESULT Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

SQL_CACHE Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

SQL_CALC_FOUND_ROWS Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

Version 1.0227

Page 235: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

SQL_NO_CACHE Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

SQL_SMALL_RESULT Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

STRAIGHT_JOIN Partial Issue 8836: PostgreSQL doesn't have an option similar to%s for DML statements (p. 250)

Select all columns (using *and aliases)

Yes

Select all columns (using *) Yes

Select subset of thecolumns

Yes

Select with calculations Yes

Select with column heading Yes

Select with constants Yes

Subquery as scalar operand Yes

UPDATE

Clause AutomaticallyConverted

Details

DEFAULT VALUES Yes

IGNORE Partial Issue 8831: PostgreSQL doesn't have an option similar toIGNORE for DML statements (p. 249)

LIMIT Yes

LOW_PRIORITY Partial Issue 8830: PostgreSQL doesn't have an option similar toLOW_PRIORITY for DML statements (p. 249)

Multiple-table syntax Yes

ORDER BY Yes

FunctionsAggregate

Clause AutomaticallyConverted

Details

AVG() Yes

Version 1.0228

Page 236: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

BIT_AND() Yes

BIT_OR() Yes

BIT_XOR() No

COUNT() Yes

COUNT(DISTINCT) No

GROUP_CONCAT() Yes

MAX() Yes

MIN() Yes

STD() Yes

STDDEV() Yes

STDDEV_POP() Yes

STDDEV_SAMP() Yes

SUM() Yes

VAR_POP() Yes

VAR_SAMP() Yes

VARIANCE() Yes

Bit

Clause AutomaticallyConverted

Details

BIT_COUNT() Yes

Control Flow

Clause AutomaticallyConverted

Details

CASE Yes

IF() Yes

IFNULL() Yes

NULLIF() Yes

Version 1.0229

Page 237: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Conversion

Clause AutomaticallyConverted

Details

BINARY Yes

CAST() Yes

CONVERT() Yes

Date and Time

Clause AutomaticallyConverted

Details

ADDDATE() Yes

ADDTIME() Yes

CONVERT_TZ() Yes

CURDATE() Yes

CURRENT_DATE(), CURRENT_DATEYes

CURRENT_TIME(), CURRENT_TIMEYes

CURRENT_TIMESTAMP(), CURRENT_TIMESTAMPYes

CURTIME() Yes

DATE() Yes

DATE_ADD() Yes

DATE_FORMAT() Yes

DATE_SUB() Yes

DATEDIFF() Yes

DAY() Yes

DAYNAME() Yes

DAYOFMONTH() Yes

DAYOFWEEK() Yes

DAYOFYEAR() Yes

EXTRACT() Yes

FROM_DAYS() Yes

FROM_UNIXTIME() Yes

Version 1.0230

Page 238: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

GET_FORMAT() Yes

HOUR() Yes

LAST_DAY Yes

LOCALTIME(), LOCALTIME Yes

LOCALTIMESTAMP, LOCALTIMESTAMP()Yes

MAKEDATE() Yes

MAKETIME() Yes

MICROSECOND() Yes

MINUTE() Yes

MONTH() Yes

MONTHNAME() Yes

NOW() Yes

PERIOD_ADD() Yes

PERIOD_DIFF() Yes

QUARTER() Yes

SEC_TO_TIME() Yes

SECOND() Yes

STR_TO_DATE() Yes

SUBDATE() Yes

SUBTIME() Yes

SYSDATE() No

TIME() Yes

TIME_FORMAT() Yes

TIME_TO_SEC() Yes

TIMEDIFF() Yes

TIMESTAMP() Yes

TIMESTAMPADD() Yes

TIMESTAMPDIFF() Yes

TO_DAYS() Yes

TO_SECONDS() Yes

Version 1.0231

Page 239: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

UNIX_TIMESTAMP() Yes

UTC_DATE() Yes

UTC_TIME() Yes

UTC_TIMESTAMP() Yes

WEEK() No

WEEKDAY() Yes

WEEKOFYEAR() Yes

YEAR() Yes

YEARWEEK() No

Encryption and Compression

Clause AutomaticallyConverted

Details

AES_DECRYPT() No

AES_ENCRYPT() No

COMPRESS() No

DECODE() No

DES_DECRYPT() (deprecated5.7.6)

No

DES_ENCRYPT() (deprecated5.7.6)

No

ENCODE() No

ENCRYPT() (deprecated5.7.6)

No

MD5() No

OLD_PASSWORD() No

PASSWORD() (deprecated5.7.6)

No

RANDOM_BYTES() No

SHA1(), SHA() No

SHA2() No

UNCOMPRESS() No

Version 1.0232

Page 240: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

UNCOMPRESSED_LENGTH() No

VALIDATE_PASSWORD_STRENGTH()No

Information

Clause AutomaticallyConverted

Details

BENCHMARK() No

CHARSET() No

COERCIBILITY() No

COLLATION() No

CONNECTION_ID() No

CURRENT_USER(), CURRENT_USERNo

DATABASE() No

FOUND_ROWS() No

LAST_INSERT_ID() No

ROW_COUNT() No

SCHEMA() No

SESSION_USER() No

SYSTEM_USER() No

USER() No

VERSION() No

Mathematical

Clause AutomaticallyConverted

Details

ABS() Yes

ACOS() Yes

ASIN() Yes

ATAN() Yes

ATAN2() Yes

Version 1.0233

Page 241: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

CEIL() Yes

CEILING() Yes

CONV() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

COS() Yes

COT() Yes

CRC32() Yes

DEGREES() Yes

EXP() Yes

FLOOR() Yes

LN() Yes

LOG() Yes

LOG10() Yes

LOG2() Yes

MOD() Yes

PI() Yes

POW() Yes

POWER() Yes

RADIANS() Yes

RAND() Yes

ROUND(X) Yes

SIGN() Yes

SIN() Yes

SQRT() Yes

TAN() Yes

TRUNCATE() Yes

Version 1.0234

Page 242: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

String

Clause AutomaticallyConverted

Details

ASCII() Yes

BIN() Yes

BIT_LENGTH() Yes

CHAR() Yes

CHAR_LENGTH() Yes

CHARACTER_LENGTH() Yes

CONCAT() No

CONCAT_WS() No

ELT() Yes

EXPORT_SET() Yes

FIELD() Yes

FIND_IN_SET() Yes

FORMAT() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

FROM_BASE64() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

HEX() Yes

INSERT() Yes

INSTR() Yes

LCASE() Yes

LEFT() Yes

LENGTH() Yes

LIKE Yes

LOAD_FILE() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

LOCATE() Yes

LOWER() Yes

LPAD() Yes

LTRIM() Yes

MAKE_SET() Yes

Version 1.0235

Page 243: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Clause AutomaticallyConverted

Details

MATCH No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

MID() Yes

NOT REGEXP Yes

NOT RLIKE Yes

OCT() Yes

OCTET_LENGTH() Yes

ORD() Yes

POSITION() Yes

QUOTE() Yes

REGEXP Yes

REPEAT() Yes

REPLACE() Yes

REVERSE() Yes

RIGHT() Yes

RLIKE Yes

RPAD() Yes

RTRIM() No

SOUNDEX() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

SOUNDS LIKE No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

SPACE() Yes

STRCMP() Yes

SUBSTR() Yes

SUBSTRING() Yes

SUBSTRING_INDEX() Yes

TO_BASE64() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

TRIM() Yes

UCASE() Yes

UNHEX() Yes

Version 1.0236

Page 244: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Clause AutomaticallyConverted

Details

UPPER() Yes

WEIGHT_STRING() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

XML

Clause AutomaticallyConverted

Details

ExtractValue() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

UpdateXML() No Issue 8811: PostgreSQL doesn't support the %sfunction (p. 246)

Data TypesDate and Time

Data type AutomaticallyConverted to

Details

DATE date

DATETIME timestampwithout timezone

TIME time

TIMESTAMP timestampwithout timezone

YEAR smallint

YEAR (M) smallint

JSON

Data type AutomaticallyConvertedto

Details

JSON VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

Version 1.0237

Page 245: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Numeric

Integer Types

Data type AutomaticallyConvertedto

Details

BIGINT [SIGNED] bigint

BIGINT UNSIGNED numeric

BOOL boolean Issue 8848: In MySQL the BOOLEAN type is a synonymfor TINYINT (p. 248)

BOOLEAN boolean Issue 8848: In MySQL the BOOLEAN type is a synonymfor TINYINT (p. 248)

INT [INTEGER] [SIGNED] integer

INT [INTEGER] UNSIGNED bigint

MEDIUMINT [SIGNED] integer

MEDIUMINT UNSIGNED integer

SMALLINT [SIGNED] smallint

SMALLINT UNSIGNED integer

TINYINT [SIGNED] smallint

TINYINT UNSIGNED smallint

Bit

Data type AutomaticallyConvertedto

Details

BIT bit

Fixed-Point

Data type AutomaticallyConvertedto

Details

DEC numeric

DEC (p) numeric

DEC (p,s) numeric

DECIMAL numeric

Version 1.0238

Page 246: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Data type AutomaticallyConvertedto

Details

DECIMAL (p) numeric

DECIMAL (p,s) numeric

NUMERIC numeric

NUMERIC (p) numeric

NUMERIC (p,s) numeric

Floating-Point

Data type AutomaticallyConvertedto

Details

DOUBLE doubleprecision

DOUBLE PRECISION doubleprecision

DOUBLE PRECISION (p) doubleprecision

DOUBLE PRECISION (p,s) doubleprecision

DOUBLE(p) doubleprecision

DOUBLE(p,s) doubleprecision

FLOAT real

FLOAT(p) precisionfrom 1-24:real

precision >24: doubleprecision

FLOAT(p,s) doubleprecision

REAL doubleprecision

REAL(p) doubleprecision

Version 1.0239

Page 247: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Data type AutomaticallyConvertedto

Details

REAL(p,s) doubleprecision

Spatial Data Types

Data type AutomaticallyConvertedto

Details

GEOMETRY VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

GEOMETRYCOLLECTION VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

LINESTRING VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

MULTILINESTRING VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

MULTIPOINT VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

MULTIPOLYGON VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

POINT VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

POLYGON VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

String

Data type AutomaticallyConvertedto

Details

BINARY bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

BLOB bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

CHAR char

CHAR(len) char

Version 1.0240

Page 248: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Data type AutomaticallyConvertedto

Details

ENUM CREATEENUM usertype

LONGBLOB bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

LONGTEXT text

MEDIUMBLOB bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

MEDIUMTEXT text

SET VARCHAR(8000)Issue 8706: PostgreSQL doesn't support %stype (p. 248)

TEXT text

TINYBLOB bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

TINYTEXT text

VARBINARY(len) bytea Issue 8706: PostgreSQL doesn't support %stype (p. 248)

VARCHAR(len) varchar

MySQL to PostgreSQL Conversion Reference

BUILT-IN SQL FUNCTIONS

Item Issue Resolution

Function Issue 8811: PostgreSQL doesn't support the%s function (p. 246)

Create a user-definedfunction.

Function Issue 8849: PostgreSQL doesn't supportthe %s function with parameter values%s (p. 246)

Create a user-definedfunction.

Function Issue 8850: Some parameter values for thefunction %s aren't supported (p. 246)

You need to check the resultof the conversion

Function Issue 8851: PostgreSQL doesn't support usingaggregate functions in the SELECT list withouta GROUP BY clause (p. 246)

Perform a manual conversion.

Function Issue 8854: PostgreSQL doesn't support the%s function with parameters (p. 246)

Perform a manual conversion.

Version 1.0241

Page 249: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

CONTROL FLOW

Item Issue Resolution

CURSORS Issue 8845: Rows count functionality isnot supported behind the "open cursor"statement (p. 246)

Perform a manual conversion.

DECLARE / DEFAULTVALUE

Issue 8826: Check the default value for a Dateor DateTime variable (p. 246)

Review generated code andmodify it if necessary.

DECLARE / DEFAULTVALUE

Issue 8828: User-defined variables are notsupported in PostgreSQL (p. 247)

Perform a manual conversion.

error handling Issue 8844: Error codes are not thesame (p. 247)

You need to check the resultof the conversion

error handling Issue 8846: PostgreSQL doesn't support thestatement option %s (p. 247)

Perform a manual conversion.

error handling Issue 8847: PostgreSQL isn't able to return toa call point after error handling (p. 247)

Perform a manual conversion.

LABEL Issue 8827: Statement Label Syntax forBEGIN...END blocks is not supported inPostgreSQL (p. 247)

Perform a manual conversion.

PROCESS_LIST Issue 8856: The information of theserver processes is different on differentservers (p. 248)

Check your conversion result.

REPLICATION Issue 8857: Automatic conversionfor replication commands is notsupported (p. 248)

Perform a manual conversion.

SLEEP Issue 8853: Perform a manualconversion if using SLEEP() with otherexpressions (p. 248)

Perform a manual conversion.

CREATE

Item Issue Resolution

Issue 8654: Unable to convert object due to%s not created (p. 248)

Review the %s object.

DATATYPES

Item Issue Resolution

BOOLEAN Issue 8848: In MySQL the BOOLEAN type is asynonym for TINYINT (p. 248)

Check it when you insert datafrom a BOOLEAN variablesinto the database.

Version 1.0242

Page 250: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Item Issue Resolution

DATATYPES Issue 8706: PostgreSQL doesn't support %stype (p. 248)

To store data of this typein PostgreSQL, use aPostgreSQL-compatible typeor use a composite type.

DDL

Item Issue Resolution

CREATE TABLE Issue 8825: Check the default value for a Dateor DateTime column (p. 248)

Review generated code andmodify it if necessary.

DROP TABLE Issue 8801: The table can be locked opencursor (p. 249)

Review your transformedcode and modify it ifnecessary.

DML

Item Issue Resolution

DML Issue 8829: PostgreSQL doesn't havean analog of clause ON DUPLICATE KEYUPDATE (p. 249)

Perform a manual conversion.

DML Issue 8830: PostgreSQL doesn't have anoption similar to LOW_PRIORITY for DMLstatements (p. 249)

Use DML statement withoutthis option.

DML Issue 8831: PostgreSQL doesn't havean option similar to IGNORE for DMLstatements (p. 249)

Use DML statement withoutthis option.

DML Issue 8832: PostgreSQL doesn't havean option similar to QUICK for DMLstatements (p. 249)

Use DML statement withoutthis option.

DML Issue 8833: PostgreSQL can't make updates toseveral tables at the same time (p. 250)

Perform a manual conversion.

DML Issue 8834: PostgreSQL can't delete fromseveral tables at the same time (p. 250)

Perform a manual conversion.

SELECT Issue 8835: PostgreSQL doesn't havean option similar to DELAYED for DMLstatements (p. 250)

Use DML statement withoutthis option.

SELECT Issue 8836: PostgreSQL doesn't havean option similar to %s for DMLstatements (p. 250)

Use DML statement withoutthis option.

SELECT Issue 8837: PostgreSQL doesn't supportclause STRAIGHT_JOIN (p. 250)

Use DML statement withoutthis option

Version 1.0243

Page 251: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Item Issue Resolution

SELECT Issue 8838: PostgreSQL doesn't supportclause SQL_SMALL_RESULT (p. 250)

Use DML statement withoutthis option

SELECT Issue 8839: PostgreSQL doesn't supportclause SQL_BIG_RESULT (p. 250)

Use DML statement withoutthis option

SELECT Issue 8840: PostgreSQL doesn't supportclause SQL_BUFFER_RESULT (p. 250)

Use DML statement withoutthis option

SELECT Issue 8841: PostgreSQL doesn't supportclause SQL_CACHE (p. 250)

Use DML statement withoutthis option

SELECT Issue 8842: PostgreSQL doesn't supportclause SQL_NO_CACHE (p. 250)

Use DML statement withoutthis option

SELECT Issue 8843: PostgreSQL doesn't supportclause SQL_CALC_FOUND_ROWS (p. 250)

Use DML statement withoutthis option

WHERE Issue 8795: PostgreSQL is case sensitive.Check the string comparison. (p. 250)

Check the string comparison.

EVENTS

Item Issue Resolution

EVENTS Issue 8855: Automatic conversion of EVENTsyntax is not supported (p. 251)

Perform a manual conversion.

EXECUTE

Item Issue Resolution

EXECUTE a characterstring

Issue 8672: Automatic conversion of thiscommand is not supported (p. 251)

Perform a manual conversion.

Operators

Item Issue Resolution

Arithmetic operators Issue 8773: The tool can not currentlyperform automated migration of arithmeticoperations with dates (p. 251)

Perform a manual conversion.

Arithmetic operators Issue 8774: The tool can not currentlyperform automated migration ofarithmetic operations with mixed types ofoperands (p. 251)

Perform a manual conversion.

Version 1.0244

Page 252: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Parser Error

Item Issue Resolution

Parser Error Issue 8663: Unable to resolve theobject (p. 251)

Verify if object %s is presentin the database. If it isn't,check the object name or addthe object. If the object ispresent, transform the codemanually.

SELECT

Item Issue Resolution

GROUP BY Issue 8653: PostgreSQL doesn't support theoption GROUP BY ROLLUP (p. 252)

Perform a manual conversion.

TRANSACTION

Item Issue Resolution

TRANSACTION Issue 8807: PostgreSQL doesn't supporttransactions in functions (p. 252)

Perform a manual conversion.

Unknown

Item Issue Resolution

Issue 8655: This syntactic element conversionis not supported yet (p. 252)

Perform a manual conversion.

Unknown Clause Issue 8674: Automatic conversionof %s clause of %s statement is notsupported (p. 252)

Perform a manual conversion.

VIEW

Item Issue Resolution

CREATE VIEV Issue 8824: ALGORITHM option is notsupported (p. 253)

Perform a manual conversion.

Version 1.0245

Page 253: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Conversion Issues with BUILT-IN SQL FUNCTIONS

Issue 8811: PostgreSQL doesn't support the %s function

Create a user-defined function.

Issue 8849: PostgreSQL doesn't support the %s function with parameter values%s

Create a user-defined function.

Issue 8850: Some parameter values for the function %s aren't supported

Review the transformed code, and correct it if necessary.

Issue 8851: PostgreSQL doesn't support using aggregate functions in theSELECT list without a GROUP BY clause

In MySQL, it is possible to use an aggregate function on a field in the SELECT list without adding theother fields in the SELECT list to a GROUP BY clause. In PostgreSQL, adding these fields to a GROUP BYclause is required. Perform a manual conversion in this case.

Issue 8854: PostgreSQL doesn't support the %s function with parameters

Perform a manual conversion.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CONTROL FLOW

Issue 8845: Rows count functionality is not supported behind the "open cursor"statement

In PostgreSQL, the FOUND_ROWS() function can't be called within a cursor. Perform a manualconversion instead.

Issue 8826: Check the default value for a Date or DateTime variable

When converting default values for Date, Time, or DateTime variables, they are explicitly cast to the datatype of the target variable. For example, the following MySQL code:

DECLARE ValueDate1 DATE DEFAULT '2000-01-01';

Is converted to the following PostgreSQL code:

ValueDate1 DATE DEFAULT '2000-01-01'::DATE;

If the default value is of the form '0000-00-00' or similar ('0000-00-00', '0000-00-00 00:00:00','0000-00-00 00:00:00.000000'), it is converted to the literal 'epoch'. For example, the following MySQLcode:

Version 1.0246

Page 254: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

DECLARE ValueDate2 DATE DEFAULT '0000-00-00';

Is converted to the following PostgreSQL code:

ValueDate2 DATE DEFAULT 'epoch'::DATE;

In these cases, the default value must be manually updated. Review the generated code and modify it ifnecessary.

Issue 8828: User-defined variables are not supported in PostgreSQL

Perform a manual conversion.

Issue 8844: Error codes are not the same

Some exit handler conditions require manual conversion. MySQL code with any of the following exithandler statements must be converted to use PostgreSQL error handling with OTHERS or SQLSTATEconditions instead:

DECLARE EXIT HANDLER FOR SQLWARNING, SQLEXCEPTION, NOT FOUNDDECLARE EXIT HANDLER FOR SQLWARNINGDECLARE EXIT HANDLER FOR SQLEXCEPTIONDECLARE EXIT HANDLER FOR NOT FOUNDDECLARE EXIT HANDLER FOR SQLWARNING, NOT FOUNDDECLARE EXIT HANDLER FOR <mysql_error_code>DECLARE EXIT HANDLER FOR SQLSTATE <sqlstate_value>

Review the transformed code, and correct it if necessary.

Issue 8846: PostgreSQL doesn't support the statement option %s

Some of the condition information items that are used with the DECLARE CONDITION and GETDIAGNOSTICS CONDITION statements in MySQL are not supported by PostgreSQL. These include:

• CLASS_ORIGIN• SUBCLASS_ORIGIN• MYSQL_ERRNO• CONSTRAINT_CATALOG• CONSTRAINT_SCHEMA• CATALOG_NAME• CURSOR_NAME

Manually convert the code wherever you use these condition information items.

Issue 8847: PostgreSQL isn't able to return to a call point after error handling

If an error occurs in a BEGIN...END block, PostgreSQL exits the block without executing any furtherstatements in that block. Check your error handling logic and perform a manual conversion instead.

Issue 8827: Statement Label Syntax for BEGIN...END blocks is not supported inPostgreSQL

Perform a manual conversion.

Version 1.0247

Page 255: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Issue 8856: The information of the server processes is different on differentservers

Check your conversion result.

Issue 8857: Automatic conversion for replication commands is not supported

Perform a manual conversion for all replication-related code.

Issue 8853: Perform a manual conversion if using SLEEP() with other expressions

If you are using SLEEP() in a SELECT statement along with other expressions, for example SELECTNOW(), SLEEP(2), AccountNo FROM Account, you must manually convert that code.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATEIssue 8654: Unable to convert object due to %s not created

Review the %s object.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DATATYPESIssue 8848: In MySQL the BOOLEAN type is a synonym for TINYINT

Check your code wherever you insert data from a BOOLEAN variable into the database.

Issue 8706: PostgreSQL doesn't support %s type

To store data of this type in PostgreSQL, use a PostgreSQL-compatible type or use a composite type.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DDLIssue 8825: Check the default value for a Date or DateTime column

When converting default values for Date, Time, or DateTime variables, they are explicitly cast to the datatype of the target variable. For example, the following MySQL code:

Version 1.0248

Page 256: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

DECLARE ValueDate1 DATE DEFAULT '2000-01-01';

Is converted to the following PostgreSQL code:

ValueDate1 DATE DEFAULT '2000-01-01'::DATE;

If the default value is of the form '0000-00-00' or similar ('0000-00-00', '0000-00-00 00:00:00','0000-00-00 00:00:00.000000'), it is converted to the literal 'epoch'. For example, the following MySQLcode:

DECLARE ValueDate2 DATE DEFAULT '0000-00-00';

Is converted to the following PostgreSQL code:

ValueDate2 DATE DEFAULT 'epoch'::DATE;

In these cases, the default value must be manually updated. Review the generated code and modify it ifnecessary.

Issue 8801: The table can be locked open cursor

The conversion uses the DROP TABLE IF EXISTS statement to remove a temporary table before theend of the function in which it was created. In some cases though, this statement might fail becausethe temporary table is locked due to an open cursor. In this case, the DROP TABLE statement must becommented out. Review your transformed code and modify it if necessary.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DML

Issue 8829: PostgreSQL doesn't have an analog of clause ON DUPLICATE KEYUPDATE

Perform a manual conversion.

Issue 8830: PostgreSQL doesn't have an option similar to LOW_PRIORITY forDML statements

Use the DML statement without this option.

Issue 8831: PostgreSQL doesn't have an option similar to IGNORE for DMLstatements

Use the DML statement without this option.

Issue 8832: PostgreSQL doesn't have an option similar to QUICK for DMLstatements

Use the DML statement without this option.

Version 1.0249

Page 257: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Issue 8833: PostgreSQL can't make updates to several tables at the same time

PostgreSQL doesn't support using an UPDATE statement to update several tables at once, for exampleupdate Account, Customer set Account.AccountBalance = Account.AccountBalance +100, Customer.SName = 'Sofan Hubert'. Perform a manual conversion in this case.

Issue 8834: PostgreSQL can't delete from several tables at the same time

PostgreSQL doesn't support using a DELETE statement to delete several tables at once, for exampledelete table1, table3. Perform a manual conversion in this case.

Issue 8835: PostgreSQL doesn't have an option similar to DELAYED for DMLstatements

Use the DML statement without this option.

Issue 8836: PostgreSQL doesn't have an option similar to %s for DMLstatements

Use the DML statement without this option.

Issue 8837: PostgreSQL doesn't support clause STRAIGHT_JOIN

Use the DML statement without this option

Issue 8838: PostgreSQL doesn't support clause SQL_SMALL_RESULT

Use the DML statement without this option

Issue 8839: PostgreSQL doesn't support clause SQL_BIG_RESULT

Use the DML statement without this option

Issue 8840: PostgreSQL doesn't support clause SQL_BUFFER_RESULT

Use the DML statement without this option

Issue 8841: PostgreSQL doesn't support clause SQL_CACHE

Use the DML statement without this option

Issue 8842: PostgreSQL doesn't support clause SQL_NO_CACHE

Use the DML statement without this option

Issue 8843: PostgreSQL doesn't support clause SQL_CALC_FOUND_ROWS

Use the DML statement without this option

Issue 8795: PostgreSQL is case sensitive. Check the string comparison.

Check string comparisons in the WHERE clauses of statements, for example WHERE [Name] LIKE'%BLOCKED%';. All strings used in comparisons must be lowercase.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0250

Page 258: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Conversion Issues with EVENTS

Issue 8855: Automatic conversion of EVENT syntax is not supported

Event-related statements like CREATE EVENT or DROP EVENT are not supported in PostgreSQL. Performa manual conversion of this code.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with EXECUTE

Issue 8672: Automatic conversion of this command is not supported

Code that uses the PREPARE...EXECUTE...DEALLOCATE PREPARE statements can't be automaticallyconverted. Perform a manual conversion instead.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Operators

Issue 8773: The tool can not currently perform automated migration ofarithmetic operations with dates

Perform a manual conversion.

Issue 8774: The tool can not currently perform automated migration ofarithmetic operations with mixed types of operands

Code that uses an arithmetic operator and has one operand that has a DATE, TIME or TIMESTAMPdata type can't be automatically converted. For example, set d = now() + 1;. Perform a manualconversion instead.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Parser Error

Issue 8663: Unable to resolve the object

Verify if object %s is present in the database. If it isn't, check the object name or add the object. If theobject is present, transform the code manually.

Version 1.0251

Page 259: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideMySQL to PostgreSQL Conversion Reference

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECT

Issue 8653: PostgreSQL doesn't support the option GROUP BY ROLLUP

PostgreSQL doesn't support the GROUP BY <field_name> WITH ROLLUP clause for the SELECTstatement. Perform a manual conversion of this code.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with TRANSACTION

Issue 8807: PostgreSQL doesn't support transactions in functions

Code that uses transaction management statements such as START TRANSACTION or COMMIT within afunction or stored procedure can't be automatically converted. Perform a manual conversion instead.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Unknown

Issue 8655: This syntactic element conversion is not supported yet

Perform a manual conversion.

Issue 8674: Automatic conversion of %s clause of %s statement is notsupported

This error is typically raised by code that sets transaction options or replication-related variables thataren't supported in PostgreSQL. Such code must be manually converted. Statements that raise this errorinclude the following:

• SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;• SET TRANSACTION READ ONLY;• SET SESSION TRANSACTION READ WRITE;• SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;• SET TRANSACTION ISOLATION LEVEL READ COMMITTED;• SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;

Version 1.0252

Page 260: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to MySQL Supported Schema Conversion

• SET GLOBAL TRANSACTION READ WRITE;• SET GLOBAL tx_isolation=<isolation_level>;• SET SQL_LOG_BIN=<value>;• SET GLOBAL sql_slave_skip_counter=<value>;

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with VIEW

Issue 8824: ALGORITHM option is not supported

PostgreSQL doesn't support the ALGORITHM clause for the CREATE VIEW or ALTER VIEW statements.Perform a manual conversion in this case.

Related Topics

• MySQL to PostgreSQL Conversion Reference (p. 241)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Related Topics• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Oracle to MySQL Supported Schema ConversionThe following sections list the schema elements from an Oracle database and whether they aresupported for automatic conversion to MySQL using the AWS Schema Conversion Tool.

Topics• Statements (p. 254)• Procedures (p. 258)• Flow Control (p. 259)• Packages (p. 259)• Functions (p. 259)• Operators (p. 269)• Data Types (p. 272)• Data Definition Language (DDL) (p. 274)• Cursors (p. 278)• Hints (p. 278)• Exceptions (p. 281)• Related Topics (p. 282)

Version 1.0253

Page 261: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

StatementsTopics

• SELECT (p. 254)• INSERT (p. 255)• UPDATE (p. 256)• DELETE (p. 257)• MERGE (p. 258)• TRUNCATE (p. 258)• LOCK TABLE (p. 258)

SELECT

Clause AutomaticallyConverted

Details

WITH No Use a stored procedure to prepare data, or rewrite yourquery to avoid the WITH clause.

AS No  

SELECT Yes  

DISTINCT | UNIQUE | ALL Yes  

select_list Yes  

BULK COLLECT INTO No You can try to include all of the fields from your table inan INTO clause.

INTO Yes  

record_name No  

FROM Yes  

@dblink No  

materialized view No  

TABLE(collection_expression)

No  

MODEL No MySQL doesn't support the MODEL statement.

START WITH No MySQL doesn't support hierarchical queries. Use a storedprocedure to prepare data.

CONNECT BY No MySQL doesn't support hierarchical queries. Use a storedprocedure to prepare data.

PIVOT No  

XML No  

UNPIVOT No  

Version 1.0254

Page 262: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

Clause AutomaticallyConverted

Details

WHERE Yes  

GROUP BY Yes  

CUBE No Use a stored procedure to prepare data.

GROUPING SETS No Use a stored procedure to prepare data.

HAVING Yes  

ORDER BY Yes  

SIBLINGS No  

NULLS FIRST | NULLS LAST No MySQL doesn't support NULLS FIRST and NULLS LAST.In MySQL NULL sorting, NULL values go first for anascending order and last for a descending order. Tryrewriting the ORDER BY clause with CASE.

FOR UPDATE Yes  

OF No Try using FOR UPDATE instead of FOR UPDATE OF.

NOWAIT | WAIT No MySQL doesn't support WAIT and NOWAIT clauses. Tryusing FOR UPDATE without NOWAIT.

SKIP LOCKED No Try using FOR UPDATE without SKIP LOCKED.

UNION Yes  

INTERSECT | MINUS] Yes  

INSERT

Clause AutomaticallyConverted

Details

INTO table Yes  

PARTITION Yes  

PARTITION FOR No  

SUBPARTITION No Either insert data into the overlying partition, or performa manual conversion using the INSERT statement.

VIEW No Target a table with the INSERT statement instead of aVIEW. If the target view has an INSTEAD OF trigger, parseand execute the INSTEAD OF trigger code.

MATERIALIZED VIEW No Perform a manual conversion.

subquery No Perform this operation on the underlying tables instead.

WITHtable_collection_expression

No  

Version 1.0255

Page 263: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

Clause AutomaticallyConverted

Details

column … Yes  

VALUES Yes  

subquery Yes  

RETURNING … INTO No To perform this operation, divide the INSERT statementwith the RETURNING clause into an INSERT statementwith following SELECT statements and use the same keyconditions in each SELECT. You can also use the last valuethat was generated by AUTO_INCREMENT column in thekey condition.

LOG ERRORS No You can add error records by inserting them into the login the exception block. Iterate through the errors in theexception block, add them to the log, and use the EXITcommand when finished.

UPDATE

Clause AutomaticallyConverted

Details

UPDATE [hint] Yes  

table Yes  

PARTITION Yes  

PARTITION FOR No  

SUBPARTITION No Either insert data into the overlying partition, or performa manual transformation using the UPDATE statement.

VIEW No Perform an update on the underlying tables instead.

MATERIALIZED VIEW No  

subquery No Perform this operation on the underlying tables instead.

WITH No  

table_collection_expression Yes  

SET Yes  

VALUE    

WHERE condition Yes  

RETURNING ... INTO No To perform this operation, divide the UPDATE statementwith the RETURNING clause into an UPDATE statementwith following INSERT statements that have the specifiedkey conditions in the SELECT part.

Version 1.0256

Page 264: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideStatements

Clause AutomaticallyConverted

Details

LOG ERRORS No You can add error records by inserting them into the login the exception block. Iterate through the errors in theexception block, add them to the log, and use the EXITcommand when finished.

NoteMySQL doesn't support FILESTREAM DATA. Perform a manual conversion to update the data inthe file system file.

DELETE

Clause AutomaticallyConverted

Details

DELETE Yes  

FROM Yes  

PARTITION Yes  

PARTITION FOR No Either insert data into the overlying partition, or performa manual transformation using the DELETE statement.

SUBPARTITION No  

VIEW No Perform a manual conversion.

MATERIALIZED VIEW No Perform a manual conversion.

subquery No Perform this operation on the underlying tables instead.

WITH No  

table_collection_expression Yes  

WHERE condition Yes  

RETURNING … INTO No To perform this operation, divide the DELETE statementwith the RETURNING clause into a DELETE statementwith following INSERT statements and use the same keyconditions in each SELECT.

LOG ERRORS No You can add error records by inserting them into the login the exception block. Iterate through the errors in theexception block, add them to the log, and use the EXITcommand when finished.

Version 1.0257

Page 265: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideProcedures

MERGE

Statement AutomaticallyConverted

Details

MERGE No To achieve the effect of a MERGE statement, use separateINSERT, DELETE, and UPDATE statements.

TRUNCATE

Clause AutomaticallyConverted

Details

TRUNCATE TABLE Yes  

PRESERVE MATERIALIZEDVIEW LOG

No  

PURGE MATERIALIZEDVIEW LOG

No  

DROP STORAGE No  

REUSE STORAGE No  

LOCK TABLE

Clause AutomaticallyConverted

Details

PARTITION No  

SUBPARTITION No  

NOWAIT No  

Procedures

Item AutomaticallyConverted

Details

LOCK TABLE No MySQL doesn't support the LOCK TABLE statement insidea stored procedure.

dbms_output.put_line No Try using INSERT in the log table. To do this, you mustadd code into AWS_ORACLE_EXT.PUT_LINE.

dbms_output.put No Try using INSERT in the log table. To do this, you mustadd code into AWS_ORACLE_EXT.PUT.

Version 1.0258

Page 266: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFlow Control

Flow Control

Clause AutomaticallyConverted

Details

GOTO No  

FORALL No Try using a WHILE DO statement.

EXECUTE IMMEDIATE No  

BULK COLLECT No  

RETURNING BULK COLLECTINTO

No  

LABEL No Try rewriting variables without using labels.

Packages

Item AutomaticallyConverted

Details

Initialization block, BEGIN… END

Partial MySQL doesn't support EXCEPTION BLOCK ininitialization blocks in packages. Try using CONTINUEHANDLER.

User type No  

Global cursor No  

Global user exception No  

FunctionsTopics

• Aggregate Functions (p. 260)• Date and Time Functions (p. 261)• Mathematical Functions (p. 262)• Character (String) Functions (p. 264)• Conversion Functions (p. 265)• General Comparison Functions (p. 266)• Encoding and Decoding Functions (p. 267)• Email (p. 267)• HTTP (p. 267)• SMS (p. 267)• NULL Functions (p. 267)• User-Defined Functions (p. 267)• Large Object Functions (p. 269)• Hierarchical Functions (p. 269)

Version 1.0259

Page 267: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

• Analytic Functions (p. 269)

In this section, you can find a list of the Microsoft SQL Server built-in functions that indicates whetherthe AWS Schema Conversion Tool performs an automatic conversion. Where MySQL doesn't support afunction, consider creating a user-defined function.

Aggregate Functions

Function AutomaticallyConverted

Details

AVG Yes  

COLLECT No  

CORR No  

CORR_* No  

COUNT Yes  

COVAR_POP No  

COVAR_SAMP No  

CUME_DIST No  

DENSE_RANK No  

FIRST No  

GROUP_ID No  

GROUPING No  

GROUPING_ID No  

LAST No  

MAX Yes  

MEDIAN No  

MIN Yes  

PERCENTILE_CONT No  

PERCENTILE_DISC No  

PERCENT_RANK No  

RANK No  

REGR_ (Linear Regression)Functions

No  

STATS_BINOMIAL_TEST No  

STATS_CROSSTAB No  

STATS_F_TEST No  

Version 1.0260

Page 268: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

STATS_KS_TEST No  

STATS_MODE No  

STATS_MW_TEST No  

STATS_ONE_WAY_ANOVA No  

STATS_T_TEST_* No  

STATS_WSR_TEST No  

STDDEV Yes  

STDDEV_POP Yes  

STDDEV_SAMP Yes  

SUM Yes  

TRUNC Yes Converts to: TRUNCATE()

VAR_POP Yes  

VAR_SAMP Yes  

VARIANCE Yes  

Date and Time Functions

Function AutomaticallyConverted

Details

ADD_MONTHS(date, num) Partial Converts to: TIMESTAMPADD(MONTH, num, date)

CURRENT_DATE Partial Converts to: NOW()

CURRENT_TIMESTAMP Partial Converts to: NOW()

DBTIMEZONE No  

EXTRACT(YEAR FROM date) Partial Converts to: YEAR(date)

EXTRACT(MONTH FROMdate)

Partial Converts to: MONTH(date)

EXTRACT(DAY FROM date) Partial Converts to: DAY(date)

EXTRACT(HOUR FROMtime)

Partial Converts to: HOUR(time)

EXTRACT(MINUTE FROMtime)

Partial Converts to: MINUTE(time)

EXTRACT(SECOND FROMtime)

Partial Converts to: SECOND(time)

Version 1.0261

Page 269: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

FROM_TZ No  

LAST_DAY(date) Yes  

LOCALTIMESTAMP Yes  

LOCALTIMESTAMP(prec) Partial The maximum precision for the MySQLLOCALTIMESTAMP function is 6. If you need greaterprecision, create a user-defined function.

MONTHS_BETWEEN(date1,date2)

No  

NEW_TIME No  

NEXT_DAY No  

NUMTODSINTERVAL No  

NUMTOYMINTERVAL No  

ROUND (date) No  

SESSIONTIMEZONE No  

SYS_EXTRACT_UTC No  

SYSDATE Partial Converts to: SYSDATE()

SYSTIMESTAMP Partial Converts to: CURRENT_TIMESTAMP

TO_CHAR (datetime,format)

Partial Converts to: DATE_FORMAT()

Note that the TO_CHAR and DATE_FORMAT formatstrings are different.

TO_TIMESTAMP(exp) No  

TO_TIMESTAMP_TZ No  

TO_DSINTERVAL No  

TO_YMINTERVAL No  

TRUNC (datetime) Partial Converts to: DATE(datetime)

TZ_OFFSET No  

Mathematical Functions

Function AutomaticallyConverted

Details

ABS(num) Yes  

ACOS(num) Yes  

Version 1.0262

Page 270: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

ASIN(num) Yes  

ATAN(num) Yes  

ATAN2(x,y) Yes  

BITAND(exp1, exp2) Partial Converts to: (exp1 & exp2)

CEIL(num) Yes  

COS(num) Yes  

COSH(num) Partial Converts to: (EXP(num) + EXP(-num)) / 2

EXP(n) Yes  

FLOOR(num) Yes  

LN(num) Yes  

LOG(num1, num2) Yes  

MOD(dividend, divisor) Yes  

NANVL(n2, n1) No  

POWER(value, n) Yes  

REMAINDER(n1, n2) Partial Converts to: (n1 - n2*ROUND(n1/n2))

ROUND (num, integer) Yes  

SIGN(exp) Yes  

SIN(num) Yes  

SINH(num) Yes  

SQRT(num) Yes  

TAN(num) Yes  

TANH(num) Yes  

TRUNC (number) Partial Converts to: TRUNCATE(num, 0)

TRUNC(num, num2) Yes  

VALUE(variable) No  

WIDTH_BUCKET No  

Version 1.0263

Page 271: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Character (String) Functions

Function AutomaticallyConverted

Details

ASCII(str) Yes  

CHR(num) Partial Converts to: CHAR(num USING ASCII)

CONCAT(char1, char2) Yes  

INITCAP(string) No  

INSTR(str, substr) Yes  

INSTR(str, substr, pos) Partial Converts to: LOCATE (substr, str, pos)

This function is the same as the two-argument formof INSTR(), except that the order of the arguments isreversed.

INSTR(str, substr, pos, num) No  

LENGTH(string) Partial Converts to: LENGTH (string)

LOWER(string) Yes  

LPAD(string, len) Partial Converts to: LPAD(string, len, ' ')

LPAD(string, len, pad) Yes  

LTRIM(string) Yes  

LTRIM(string, set) Partial Converts to: TRIM(LEADING set FROM string)

NLS_INITCAP No  

NLS_LOWER No  

NLS_UPPER No  

NLSSORT No  

REGEXP_INSTR No  

REGEXP_REPLACE No  

REGEXP_SUBSTR No  

REPLACE(str, search) Partial Converts to: REPLACE(str, search, '')

REPLACE(str, search,replace)

Yes  

RPAD(string, len) Partial Converts to: RPAD(string, len, ' ')

RPAD(string, len, pad) Yes  

RTRIM(string) Yes  

RTRIM(string, set) Partial Converts to: TRIM(TRAILING set FROM string)

Version 1.0264

Page 272: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

SOUNDEX(string) Yes  

SUBSTR(string, pos, len) Yes  

TRANSLATE(string, from,to)

No  

TREAT    

TRIM([type trim FROM]string)

Yes  

UPPER(string) Yes  

Conversion Functions

Function AutomaticallyConverted

Details

ASCIISTR(string) No  

BIN_TO_NUM(bit1, bit2, …) No  

CAST Yes  

CHARTOROWID No  

COMPOSE No  

CONVERT(string, charset) Partial Converts to: CONVERT(string USING charset)

DECOMPOSE No  

HEXTORAW No  

NUMTODSINTERVAL No  

NUMTOYMINTERVAL No  

RAWTOHEX No  

RAWTONHEX No  

ROWIDTOCHAR No  

ROWIDTONCHAR No  

SCN_TO_TIMESTAMP No  

TIMESTAMP_TO_SCN No  

TO_BINARY_DOUBLE No  

TO_BINARY_FLOAT No  

TO_CHAR (character) No  

Version 1.0265

Page 273: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Function AutomaticallyConverted

Details

TO_CHAR (datetime,format)

Partial Converts to: DATE_FORMAT(datetime, format)

Note that the TO_CHAR and DATE_FORMAT formatstrings are different.

TO_CHAR (number, format) Partial Converts to: FORMAT(number, decimal_digits)

In MySQL, you can use FORMAT function as well as otherstring functions and expressions.

TO_CLOB Partial  

TO_DATE Partial Converts to: STR_TO_DATE(string, format)

Note that the TO_DATE and STR_TO_DATE format stringsare different.

TO_DSINTERVAL No  

TO_LOB No  

TO_MULTI_BYTE No  

TO_NCHAR (character) No  

TO_NCHAR (datetime) No  

TO_NCHAR (number) No  

TO_NCLOB No  

TO_NUMBER No  

TO_DSINTERVAL No  

TO_SINGLE_BYTE No  

TO_TIMESTAMP No  

TO_TIMESTAMP_TZ No  

TO_YMINTERVAL No  

TRANSLATE ... USING No  

UNISTR Partial Converts to: CHAR(string USING UCS2)

General Comparison Functions

Function AutomaticallyConverted

Details

GREATEST(exp, exp2, …) Yes  

LEAST(exp, exp2, …) Yes  

Version 1.0266

Page 274: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Encoding and Decoding Functions

Function AutomaticallyConverted

Details

DECODE(exp, when,then, ...)

Partial Converts to: CASE expression

DUMP No  

ORA_HASH No  

VSIZE No  

Email

MySQL doesn’t support sending e-mail. To send email, use Amazon Simple Email Service (Amazon SES).

HTTP

MySQL doesn't support sending messages to HTTP endpoints. To send messages to HTTP and HTTPSendpoints, you can use the Amazon Simple Notification Service (Amazon SNS).

SMS

MySQL doesn't support sending notifications by using SMS. To send and receive SMS notifications, youcan use the Amazon Simple Notification Service (Amazon SNS).

NULL Functions

Function AutomaticallyConverted

Details

COALESCE(exp1, exp2, …) Yes  

LNNVL No  

NULLIF(exp1, exp2) Partial Converts to: NULLIF(exp1, exp2)

NVL(exp, replacement) Partial Converts to: IFNULL(exp, replacement)

NVL2(exp1, exp2, exp3) Partial Converts to: CASE expression

User-Defined Functions

Return

In MySQL, you can use statements that return a result set within a stored procedure but not within astored function.

Version 1.0267

Page 275: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideFunctions

Statement AutomaticallyConverted

Details

RETURN resultset No Try changing the function to a stored procedure and use atable to store the results.

RETURN record-type No Try changing the function to a stored procedure andchange record-type items to separate parameters.

TYPE .. IS TABLE OF ..INDEX BY

No Try changing the function to a stored procedure and use atable to store the results.

TYPE .. IS TABLE OF No Try changing the function to a stored procedure and use atable to store the results.

TYPE .. IS VARRAY(..) OF No Try changing the function to a stored procedure and use atable to store the results.

RETURN .. PIPELINED No Try changing the function to a stored procedure and use atable to store the results.

TYPE ... IS REF CURSOR No Try changing the function to a stored procedure and use atable to store the results.

object-type No  

Collections

Item AutomaticallyConverted

Details

TYPE .. IS TABLE OF… No MySQL doesn't support table type variables. Try using atable.

collection_name.First,collection_name.Last,collection_name.Count,collection_name.Next

No MySQL doesn't support table type collection methods.Try using a table.

:= collection_type(...) No MySQL doesn't support the constructor for the collectiontype. Try using a table.

Arguments

Item AutomaticallyConverted

Details

UDT record-type No  

UDT collection-type No  

UDT object-type No  

Version 1.0268

Page 276: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

Large Object Functions

Function AutomaticallyConverted

Details

BFILENAME No  

EMPTY_BLOB Partial Converts to an empty string.

EMPTY_CLOB Partial Converts to an empty string.

Hierarchical Functions

Function AutomaticallyConverted

Details

SYS_CONNECT_BY_PATH No Try creating a user-defined function.

Analytic Functions

MySQL doesn't support analytic functions. Try creating a user-defined function.

OperatorsTopics

• Arithmetic Operators (p. 269)

• Assignment Operator (p. 270)

• Comparison Operators (p. 270)

• Logical Operators (p. 270)

• String Concatenation Operator (p. 271)

• Date and time format specifiers (p. 271)

Arithmetic Operators

Clause AutomaticallyConverted

Details

+ Yes  

- Yes  

+ - Partial MySQL handles date and time arithmetic differently.Verify that the converted schema is accurate.

* / Yes  

Version 1.0269

Page 277: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

Assignment Operator

Clause AutomaticallyConverted

Details

= Yes  

Comparison Operators

Clause AutomaticallyConverted

Details

> Yes  

< Yes  

>= Yes  

<= Yes  

<> Yes  

!= Yes  

!< Yes  

!> Yes  

Logical Operators

Clause AutomaticallyConverted

Details

IN Yes  

NOT IN Yes  

ANY Yes  

SOME Yes  

ALL Yes  

BETWEEN x Yes  

EXISTS Yes  

LIKE Yes  

IS NULL Yes  

NOT Yes  

AND Yes  

OR Yes  

Version 1.0270

Page 278: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOperators

String Concatenation Operator

Clause AutomaticallyConverted

Details

|| Yes  

Date and time format specifiers

Clause AutomaticallyConverted

Default Conversion

YEAR No  

YYYY Partial %Y

YYY No  

YY Partial %y

Y No  

IYY No  

IY Partial %y

I No  

IYYY Partial %Y

RRRR No  

Q No  

MM Partial %m

MON Partial %b

MONTH Partial %M

RM No  

WW Partial %V

W No  

IW Partial %V

D Partial %w

Day of the week (1=Sunday,7=Saturday)

Partial Day of the week (0=Sunday, 6=Saturday)

DAY Partial %W

DD Partial %e

DDD Partial %j

Version 1.0271

Page 279: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Clause AutomaticallyConverted

Default Conversion

DY Partial %a

J No  

HH Partial %h

HH12 Partial %h

HH24 Partial %H

MI Partial %i

SS Partial %S

SSSSS No  

FF No  

AM, PM Partial %p

A.M., P.M. No  

AD or A.D No  

BC or B.C. No  

TZD No  

TZH No  

TZM No  

TZR No  

Data Types

Data type AutomaticallyConverted

Default Conversion Details

BFILE Partial VARCHAR(255) Contains the file path tothe BFILE. MySQL does notsupport the BFILE. BecauseBFILE data is made up ofthe path to a file, you caneither store a filenameand create a routine thatgets the file from the filesystem, or store the filecontents as a LONGBLOB.

BINARY_FLOAT Yes FLOAT  

BINARY_DOUBLE Yes DOUBLE  

BLOB Yes LONGBLOB  

Version 1.0272

Page 280: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Data type AutomaticallyConverted

Default Conversion Details

CHAR Yes TEXT  

CHAR(n), CHARACTER(n) Yes CHAR(n), CHARACTER(n)  

CHAR(n), CHARACTER(n) Yes VARCHAR(n)  

CLOB Yes LONGTEXT  

DATE Yes DATETIME  

DECIMAL, DEC Yes DOUBLE  

DECIMAL(p,s), DEC(p,s) Yes DECIMAL(p,s), DEC(p,s)  

DOUBLE PRECISION Yes DOUBLE PRECISION  

FLOAT Yes DOUBLE  

FLOAT(p) Yes DOUBLE  

INTEGER, INT Yes DECIMAL(38)  

INTERVAL YEAR TO MONTH Yes DOUBLE  

INTERVAL YEAR(p) TOMONTH

Yes VARCHAR(30)  

INTERVAL DAY TO SECOND Yes VARCHAR(30)  

INTERVAL DAY(p) TOSECOND(s)

Yes VARCHAR(30)  

LONG Yes LONGTEXT  

LONG RAW Yes LONGBLOB  

NCHAR Yes TEXT  

NCHAR(n) Yes NCHAR(n)  

NCHAR(n) Yes NVARCHAR(n)  

NCHAR VARYING Yes TEXT  

NCHAR VARYING(n) Yes NCHAR VARYING(n)  

NCLOB Yes LONGTEXT  

NUMBER(p,0), NUMBER(p) Yes DECIMAL(p,0), DECIMAL(p)  

NUMBER(p,s) Yes DECIMAL(p,s)  

NUMBER,NUMBER(*),NUMERIC

Yes DOUBLE  

NUMERIC(p,s) Yes NUMERIC(p,s)  

NVARCHAR2 Yes TEXT  

NVARCHAR2(n) Yes NVARCHAR(n)  

Version 1.0273

Page 281: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Data type AutomaticallyConverted

Default Conversion Details

RAW Yes VARBINARY(2000)  

RAW(n) Yes BINARY(n)  

RAW(n) Yes VARBINARY(n)  

REAL Yes DOUBLE  

ROWID Yes CHAR(10)  

SMALLINT Yes DECIMAL(38)  

TIMESTAMP Yes DATETIME  

TIMESTAMP(p) Yes DATETIME(p)  

TIMESTAMP(p) Partial   MySQL expands fractionalseconds support forTIME, DATETIME, andTIMESTAMP values, with upto microseconds (6 digits)precision.

TIMESTAMP(p) WITH TIMEZONE

Partial DATETIME There is not a data typein MySQL that can storetime zone information.DATETIME data type storestimestamps in the MySQLserver time zone.

UROWID Yes TEXT  

UROWID(n) Yes VARCHAR(n)  

VARCHAR Yes TEXT  

VARCHAR(n) Yes VARCHAR(n)  

VARCHAR2 Yes TEXT  

VARCHAR2(n) Yes VARCHAR(n)  

XMLTYPE Yes LONGTEXT  

Data Definition Language (DDL)Topics

• CREATE TABLE (p. 275)

• CREATE INDEX (p. 275)

• CREATE TRIGGER (p. 275)

• CREATE VIEW (p. 277)

• CREATE CONSTRAINT (p. 277)

• CREATE SEQUENCE (p. 278)

Version 1.0274

Page 282: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

CREATE TABLECREATE TABLE statements are converted automatically except for the following.

Clause Automaticallyconverted

Details

OBJECT TABLE No MySQL doesn't support OBJECT TABLE. Revise your codeto avoid OBJECT TABLE.

CLUSTERED TABLE No MySQL doesn't support CLUSTERED TABLE. Try using atable with triggers.

EXTERNAL TABLE No MySQL doesn't support EXTERNAL TABLE. Try using atable.

GLOBAL TEMPORARYTABLE

No MySQL doesn't support GLOBAL TEMPORARY TABLE. Tryusing a temporary table.

Partitioned tables No MySQL doesn't support all partition types. Perform amanual conversion for the partition types that aren'tsupported.

Virtual columns No MySQL doesn't support virtual columns. Represent virtualcolumns using a view.

Functions as default values No MySQL doesn't support functions as default values. Tryusing a trigger.

NESTED TABLE columns No MySQL doesn't support tables with NESTED TABLEcolumns. Revise any tables with NESTED TABLE columnsto avoid these columns.

COLUMN(TABLE) No MySQL doesn't support the objects column. Create auser-defined function.

CREATE INDEXCREATE INDEX statements are converted automatically except that MySQL does not support bitmap,function-based, or domain indexes.

CREATE TRIGGERCREATE TRIGGER statements are converted automatically except for the following.

Clause Automaticallyconverted

Details

COMPOUND No MySQL doesn't support compound triggers. Create asingle trigger for each part of the compound trigger.

INSTEAD OF No MySQL doesn't support INSTEAD OF. Try using a BEFOREtrigger.

INSERTING | UPDATING |DELETING

No MySQL doesn’t support conditional predicates.

Version 1.0275

Page 283: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Clause Automaticallyconverted

Details

without FOR EACH ROW No MySQL doesn't support statement triggers. Try includingFOR EACH ROW.

FOLLOWS | PRECEDES No MySQL doesn't support the FOLLOWS | PRECEDES clause.Try using a FOR EACH ROW trigger.

UPDATE OF No MySQL doesn't support the UPDATE OF clause. Try usinga FOR EACH ROW trigger.

REFERENCING NEW AS |OLD AS

No MySQL doesn't support the REFERENCING clauses. Modifyreferences to pseudorows to use OLD and NEW instead.

WHEN(condition) No MySQL doesn't support WHEN(condition) triggers. Applythe condition for WHEN in the trigger body.

ON NESTED TABLE No  

trigger-status=DISABLED No MySQL doesn't support the DISABLED clause. Drop thetrigger instead.

create-date No MySQL doesn't support create-date for triggers. Try usinga FOR EACH ROW trigger.

modify-date No MySQL doesn't support modify-date for triggers. Tryusing a FOR EACH ROW trigger.

status No MySQL doesn't support trigger status values. Try using aFOR EACH ROW trigger.

description No MySQL doesn't support descriptions for triggers.

In MySQL, you can get a trigger description usingINFORMATION_SCHEMA.TRIGGERS. MySQL doesn'tsupport the REFERENCING clause. The following are thecorresponding values between Oracle(USER_TRIGGERS)and MySQL(INFORMATION_SCHEMA.TRIGGERS):

• TABLE_OWNER corresponds to TRIGGER_SCHEMA• TRIGGER_NAME corresponds to TRIGGER_NAME• TRIGGER_TYPE corresponds to ACTION_TIMING• TRIGGERING_EVENT corresponds to

EVENT_MANIPULATION• TABLE_NAME corresponds to EVENT_OBJECT_TABLE• REFERENCING_NAMES corresponds to

ACTION_REFERENCE_NEW_ROW(always is NEW),ACTION_REFERENCE_OLD_ROW(always is OLD)

triggering-event=ddl_events

No  

triggering-event=database_events

No  

base-object-type=VIEW No  

base-object-type=SCHEMA No  

Version 1.0276

Page 284: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Definition Language (DDL)

Clause Automaticallyconverted

Details

base-object-type=DATABASE

No  

action-type=CALL or PL/SQL

No  

crossedition=FORWARD/REVERSE

No  

fire-once=YES No  

apply-server-only=YES No  

referencing-names=PARENT

No  

CREATE VIEW

CREATE VIEW statements are converted automatically except for the following.

Clause Automaticallyconverted

Details

FORCE No  

NOFORCE No NOFORCE is the default behavior for MySQL. You don'tneed to specify this option.

WITH READ ONLY No  

create-date No  

modify-date No  

status No  

oid-text No  

view-type-owner No  

view-type No  

superview-name No  

editioning-view No  

encrypted-view No  

CAST No MySQL doesn’t support views with nested table columns.

CREATE CONSTRAINT

CREATE CONSTRAINT statements are converted automatically except for the following.

Version 1.0277

Page 285: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideCursors

Clause Automaticallyconverted

Details

DISABLE, status=DISABLED No My SQL doesn't support constraints with the statusDISABLE. Drop the constraint.

Foreign keys of differenttypes

No MySQL doesn't support foreign keys with different typesof columns and referenced columns. Modify the columntypes using an equivalent of the column data types in theoriginal database.

constraint-type No MySQL doesn't support the constraint check option on aview. Try using a trigger.

CREATE SEQUENCEMySQL doesn't support sequences. Try developing a system for sequences in your application.

CursorsCursors are converted automatically except for the following.

Clause Automaticallyconverted

Details

SQLAttribute Partial MySQL doesn't support the cursor attribute SQL%ISOPEN

MySQL doesn't support the cursor attribute SQL%BULK_ROWCOUNT. To calculate processed rows, use avariable.

REF CURSOR No MySQL doesn't support the REF CURSOR object. Performa manual conversion.

SYS_REFCURSOR No MySQL doesn't support a variable of SYS_REFCURSORtype. Perform a manual conversion.

CURSOR Partial The AWS Schema Conversion Tool cannot automaticallytransform the SELECT statement for an implicit cursor.Try rewriting the SELECT statement.

REF_CURSOR variable Partial The SELECT statement for the REF_CURSOR variablecannot be transformed. Try rewriting the SELECTstatement.

HintsMySQL doesn't support hints. Try using MySQL performance tuning methods or perform a manualconversion.

Clause Automaticallyconverted

Details

/*+ ALL_ROWS */ No  

Version 1.0278

Page 286: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHints

Clause Automaticallyconverted

Details

/*+ AND_EQUAL(tableindex...) */

No  

/*+ APPEND */ No  

/*+ CACHE(table) */ No  

/*+ CHOOSE */ No  

/*+ CLUSTER(table) */ No  

/*+CURSOR_SHARING_EXACT*/

No  

/*+ DRIVING_SITE(table) */ No  

/*+ DYNAMIC_SAMPLING */ No  

/*+EXPAND_GSET_TO_UNION*/

No  

/*+ FACT(table) */ No  

/*+ FIRST_ROWS(n) */ No  

/*+ FULL(table) */ No  

/*+ HASH */ No  

/*+ HASH_SJ */ No  

/*+ INDEX(table index) */ No  

/*+ INDEX_ASC(table index)*/

No  

/*+ INDEX_COMBINE(tableindex) */

No  

/*+ INDEX_DESC(tableindex) */

No  

/*+ INDEX_FFS(table index)*/

No  

/*+ LEADING(table) */ No  

/*+ MERGE(table) */ No  

/*+ MERGE_SJ */ No  

/*+ NL_SJ */ No  

/*+ NO_EXPAND */ No  

/*+ NO_INDEX(table index)*/

No  

Version 1.0279

Page 287: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideHints

Clause Automaticallyconverted

Details

/*+ NO_MERGE(table) */ No  

/*+ NO_PARALLEL(table) */ No  

/*+NO_PARALLEL_INDEX(tableindex) */

No  

/*+NO_PUSH_PRED(subquery)*/

No  

/*+NO_PUSH_SUBQ(subquery)*/

No  

/*+ NO_REWRITE */ No  

/*+ NO_UNNEST */ No  

/*+ NOAPPEND */ No  

/*+ NOCACHE(table) */ No  

/*+ NOFACT(table) */ No  

/*+ ORDERED */ No  

/*+ ORDERED_PREDICATES*/

No  

/*+ PARALLEL(tableserver_num) */

No  

/*+ PARALLEL_INDEX(tableindex server_num) */

No  

/*+ PQ_DISTRIBUTE(tableout_distr in_distr) */

No  

/*+ PUSH_PRED(subquery)*/

No  

/*+ PUSH_SUBQ(subquery)*/

No  

/*+ REWRITE */ No  

/*+ ROWID(table) */ No  

/*+ RULE */ No  

/*+ STAR */ No  

/*+STAR_TRANSFORMATION*/

No  

Version 1.0280

Page 288: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideExceptions

Clause Automaticallyconverted

Details

/*+ UNNEST */ No  

/*+ USE_CONCAT */ No  

/*+ USE_HASH(table1table2) */

No  

/*+ USE_MERGE(table1table2) */

No  

Exceptions

Item Automaticallyconverted

Details

RAISE No MySQL doesn't support the RAISE command. Review theexception, and if possible convert it to an exception usingthe SIGNAL or RESIGNAL statement.

%s No MySQL doesn't support the %s exception. Review theexception, and if possible convert it to an exception usingthe SIGNAL or RESIGNAL statement.

EXCEPTION No MySQL doesn't support the EXCEPTION declaration. Usethe DECLARE ... CONDITION statement.

PRAGMA EXCEPTION_INIT No MySQL doesn't support the PRAGMA EXCEPTION_INITdeclaration. Use the DECLARE ... CONDITION statement.

PROC_RAISE_APPLICATION_ERRORNo MySQL doesn't support thePROC_RAISE_APPLICATION_ERROR statement. Use theDECLARE ... CONDITION statement. Try using the SIGNALor RESIGNAL statement.

Built-In Exceptions

Exception Automaticallyconverted

Details

INVALID_NUMBER No Try creating a user exception.

TIMEOUT_ON_RESOURCE No Try creating a user exception.

TRANSACTION_BACKED_OUT No Try creating a user exception.

INVALID_CURSOR No You can use one of several handlers for invalid cursors.Choose the correct handler based on the issue.

NOT_LOGGED_ON No Try creating a user exception.

LOGIN_DENIED No Try creating a user exception.

Version 1.0281

Page 289: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

Exception Automaticallyconverted

Details

STORAGE_ERROR No You can use one of several handlers for invalid cursors.Choose the correct handler based on the issue.

PROGRAM_ERROR No Try using the handler "1815 - Internal Error."

Related Topics• What Is the AWS Schema Conversion Tool? (p. 1)

• Getting Started with the AWS Schema Conversion Tool (p. 25)

• Installing, Verifying, and Updating the AWS Schema Conversion Tool (p. 4)

Oracle to PostgreSQL Supported SchemaConversion

The following sections list the schema elements from an Oracle database and whether they aresupported for automatic conversion to PostgreSQL using the AWS Schema Conversion Tool.

DDL

Statements

Clause AutomaticallyConverted

Details

ALTER CLUSTER No

ALTER DATABASE No

ALTER DIMENSION No

ALTER DISKGROUP No

ALTER FLASHBACKARCHIVE

No

ALTER FUNCTION No

ALTER TABLESPACE No

CREATE [OR REPLACE]FUNCTION

Yes

CREATE [TEMPORARY]TABLESPACE

No

CREATE CLUSTER No

CREATE CONTEXT No

Version 1.0282

Page 290: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDDL

Clause AutomaticallyConverted

Details

CREATE CONTROLFILE No

CREATE DATABASE Yes

CREATE DATABASE LINK No

CREATE DIMENSION No

CREATE DIRECTORY No

CREATE DISKGROUP No

CREATE FLASHBACKARCHIVE

No

DROP CLUSTER No

DROP DATABASE No

DROP DATABASE LINK No

DROP DIMENSION No

DROP DIRECTORY No

DROP DISKGROUP No

DROP FLASHBACKARCHIVE

No

DROP FUNCTION No

DROP TABLE No

DROP TABLESPACE No

DROP VIEW Yes

ALTER TABLE

Clause AutomaticallyConverted

Details

ADD CONSTRAINT Yes

ADD column No

DEALLOCATE UNUSED No

DISCARD/IMPORTTABLESPACE

No

DROP CONSTRAINT No

ENABLE/DISABLEconstraint

No

Version 1.0283

Page 291: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDDL

Clause AutomaticallyConverted

Details

ENABLE/DISABLE triggers No

MODIFY No

MODIFY COLUMN No

PARTITION operations No

REMOVE PARTITIONING No

RENAME No

RENAME COLUMN No

CREATE [OR REPLACE] VIEW Statement

Clause AutomaticallyConverted

Details

FORCE Yes

NOFORCE Yes

READ ONLY Yes

Updatable Views Yes

WITH OBJECT IDENTIFIER Yes

CREATE INDEX Statement

Clause AutomaticallyConverted

Details

BITMAP No Issue 5206: PostgreSQL doesn't support bitmapindexes (p. 326)

DOMAIN No Issue 5208: PostgreSQL doesn't support domainindexes (p. 326)

FUNCTION-BASED BITMAP No Issue 5206: PostgreSQL doesn't support bitmapindexes (p. 326)

FUNCTION-BASEDNORMAL

Yes Issue 5555: PostgreSQL doesn't support functionalindexes that aren't single-column (p. 326)

NONUNIQUE Yes

NORMAL Yes

UNIQUE Yes

Version 1.0284

Page 292: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

CREATE TABLE

Clause AutomaticallyConverted

Details

Clustered tables No Issue 5199: PostgreSQL doesn't support CLUSTEREDTABLE (p. 326)

External table No Issue 5200: PostgreSQL doesn't support EXTERNALTABLES (p. 327)

Function as default valuefor column

Yes

Object table No Issue 5196: PostgreSQL doesn't support OBJECTTABLE (p. 327)

Partitioned table No Issue 5201: PostgreSQL doesn't support all partitiontypes (p. 326)

Regular tables Yes

Temporary tables Partial Issue 5198: PostgreSQL doesn't support GLOBALTEMPORARY TABLE (p. 327)

Sequences

Clause AutomaticallyConverted

Details

CREATE Yes

Using Yes

DML

Built-in SQL Functions

Aggregate Functions

Clause AutomaticallyConverted

Details

AVG Yes

COLLECT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CORR No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CORR_* No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0285

Page 293: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

COUNT Yes

COVAR_POP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

COVAR_SAMP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CUME_DIST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

DENSE_RANK No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

FIRST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

GROUP_ID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

GROUPING No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

GROUPING_ID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

LAST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

MAX Yes

MEDIAN No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

MIN No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PERCENT_RANK No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PERCENTILE_CONT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PERCENTILE_DISC No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

RANK No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REGR_ (Linear Regression)Functions

No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_BINOMIAL_TEST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_CROSSTAB No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0286

Page 294: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

STATS_F_TEST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_KS_TEST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_MODE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_MW_TEST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_ONE_WAY_ANOVA No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_T_TEST_* No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STATS_WSR_TEST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STDDEV No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STDDEV_POP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

STDDEV_SAMP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SUM Yes

VAR_POP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VAR_SAMP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VARIANCE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Analytic Functions

Clause AutomaticallyConverted

Details

AVG * Yes

CORR * No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

COUNT * Yes

COVAR_POP * Yes

COVAR_SAMP * Yes

Version 1.0287

Page 295: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

CUME_DIST Yes

DENSE_RANK Yes

FIRST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

FIRST_VALUE * Yes

LAG Yes

LAST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

LAST_VALUE * Yes

LEAD Yes

MAX * Yes

MIN * Yes

NTILE Yes

PERCENT_RANK Yes

PERCENTILE_CONT Yes

PERCENTILE_DISC Yes

RANK Yes

RATIO_TO_REPORT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REGR_ (Linear Regression)Functions *

No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

ROW_NUMBER Yes

STDDEV * Yes

STDDEV_POP * Yes

STDDEV_SAMP * Yes

SUM * Yes

VAR_POP * No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VAR_SAMP * No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VARIANCE * Yes

Version 1.0288

Page 296: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Character Functions Returning Character Values

Clause AutomaticallyConverted

Details

CHR(num) Yes

CONCAT(char1, char2) Yes

INITCAP(string) Yes

LOWER(string) Yes

LPAD(string, len) Yes

LPAD(string, len, pad) Yes

LTRIM(string) Yes

NLS_INITCAP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLS_LOWER No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLS_UPPER No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLSSORT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REGEXP_REPLACE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REGEXP_SUBSTR No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REPLACE(str, search) Yes

REPLACE(str, search,replace)

Yes

RPAD(string, len) Yes

RTRIM(string) Yes

RTRIM(string, set) Yes

SOUNDEX(string) Yes

SUBSTR(string, pos, len) Yes

TRANSLATE(string, from,to)

Yes

TREAT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TRIM([type trim FROM]string)

Yes

Version 1.0289

Page 297: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

UPPER(string) Yes

Character Functions Returning Number Values

Clause AutomaticallyConverted

Details

ASCII(str) Yes

INSTR(str, substr) Yes

INSTR(str, substr, pos) Implementedin ExtensionLibrary

INSTR(str, substr, pos, num) Implementedin ExtensionLibrary

LENGTH(string) Yes

REGEXP_INSTR No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Collection Functions

Clause AutomaticallyConverted

Details

CARDINALITY No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

COLLECT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SET No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Conversion Functions

Clause AutomaticallyConverted

Details

ASCIISTR(string) Implementedin ExtensionLibrary

BIN_TO_NUM(bit1, bit2, …) Yes

CAST Yes

Version 1.0290

Page 298: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

CHARTOROWID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

COMPOSE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CONVERT(string, charset) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

DECOMPOSE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

HEXTORAW Yes

NUMTODSINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NUMTOYMINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

RAWTOHEX Yes

RAWTONHEX Yes

ROWIDTOCHAR No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

ROWIDTONCHAR No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SCN_TO_TIMESTAMP Yes

TIMESTAMP_TO_SCN Yes

TO_BINARY_DOUBLE Yes

TO_BINARY_FLOAT Yes

TO_CHAR (character) Yes

TO_CHAR (datetime,format)

Yes

TO_CHAR (number, format) Implementedin ExtensionLibrary

TO_CLOB Yes

TO_DATE Implementedin ExtensionLibrary

TO_DSINTERVAL Yes

TO_LOB Yes

TO_MULTI_BYTE Yes

Version 1.0291

Page 299: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

TO_NCHAR (character) Yes

TO_NCHAR (datetime) Implementedin ExtensionLibrary

TO_NCHAR (number) Implementedin ExtensionLibrary

TO_NCLOB Implementedin ExtensionLibrary

TO_NUMBER Implementedin ExtensionLibrary

TO_SINGLE_BYTE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TRANSLATE ... USING No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

UNISTR Implementedin ExtensionLibrary

Data Mining Functions

Clause AutomaticallyConverted

Details

CLUSTER_ID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CLUSTER_PROBABILITY No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

CLUSTER_SET No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

FEATURE_ID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

FEATURE_SET No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

FEATURE_VALUE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PREDICTION No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0292

Page 300: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

PREDICTION_COST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PREDICTION_DETAILS No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PREDICTION_PROBABILITY No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PREDICTION_SET No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Datetime Functions

Clause AutomaticallyConverted

Details

ADD_MONTHS(date, num) Implementedin ExtensionLibrary

CURRENT_DATE Yes

CURRENT_TIMESTAMP Yes

DBTIMEZONE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

EXTRACT(DAY FROM date) Yes

EXTRACT(HOUR FROMtime)

Yes

EXTRACT(MINUTE FROMtime)

Yes

EXTRACT(MONTH FROMdate)

Yes

EXTRACT(SECOND FROMtime)

Yes

EXTRACT(YEAR FROM date) Yes

FROM_TZ Implementedin ExtensionLibrary

LAST_DAY(date) Implementedin ExtensionLibrary

LOCALTIMESTAMP Yes

LOCALTIMESTAMP([prec]) Yes

Version 1.0293

Page 301: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

MONTHS_BETWEEN(date1,date2)

Yes

NEW_TIME No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NEXT_DAY Implementedin ExtensionLibrary

NUMTODSINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NUMTOYMINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

ROUND (date) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SESSIONTIMEZONE Yes

SYS_EXTRACT_UTC No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYSDATE Yes

SYSTIMESTAMP Yes

TO_CHAR (datetime,format)

Yes

TO_DSINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TO_TIMESTAMP(exp) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TO_TIMESTAMP_TZ No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TO_YMINTERVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TRUNC (datetime) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

TZ_OFFSET No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

dbms_output

Clause AutomaticallyConverted

Details

dbms_output.put() Yes

Version 1.0294

Page 302: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

dbms_output.put_line() Yes

Encoding and Decoding Functions

Clause AutomaticallyConverted

Details

DECODE(exp, when, then,…)

Yes

DUMP No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

ORA_HASH No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VSIZE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Environment and Identifier Functions

Clause AutomaticallyConverted

Details

SYS_CONTEXT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYS_GUID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYS_TYPEID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

UID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

USER Yes

USERENV('parameter') Yes

General Comparison Functions

Clause AutomaticallyConverted

Details

GREATEST(exp, exp2, …) Yes

LEAST(exp, exp2, …) Yes

Version 1.0295

Page 303: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Hierarchical Functions

Clause AutomaticallyConverted

Details

SYS_CONNECT_BY_PATH No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Large Object Functions

Clause AutomaticallyConverted

Details

BFILENAME No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

EMPTY_BLOB,EMPTY_CLOB

No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Model Functions

Clause AutomaticallyConverted

Details

CV No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

ITERATION_NUMBER No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PRESENTNNV No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PRESENTV No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PREVIOUS No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLS Character Functions

Clause AutomaticallyConverted

Details

NLS_CHARSET_DECL_LEN No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLS_CHARSET_ID No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NLS_CHARSET_NAME No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0296

Page 304: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

NULL-Related Functions

Clause AutomaticallyConverted

Details

COALESCE(exp1, exp2, …) Yes

LNNVL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

NULLIF(exp1, exp2) Yes

NVL(exp, replacement) Yes

NVL2(exp1, exp2, exp3) Yes

Numeric Functions

Clause AutomaticallyConverted

Details

ABS(num) Yes

ACOS(num) Yes

ASIN(num) Yes

ATAN(num) Yes

ATAN2(x,y) Yes

BITAND(exp1, exp2) Yes

CEIL(num) Yes

COS(num) Yes

COSH(num) Yes

EXP(n) Yes

FLOOR(num) Yes

LN(num) Yes

LOG(num1, num2) Yes

MOD(dividend, divisor) Yes

NANVL(n2, n1) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

POWER(value, n) Yes

REMAINDER(n1, n2) Yes

ROUND (num, integer) Yes

SIGN(exp) Yes

Version 1.0297

Page 305: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

SIN(num) Yes

SINH(num) Yes

SQRT(num) Yes

TAN(num) Yes

TANH(num) Yes

TRUNC (number) Yes

WIDTH_BUCKET Yes

Object Reference Functions

Clause AutomaticallyConverted

Details

DEREF No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

MAKE_REF No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REF No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

REFTOHEX No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

VALUE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XML Functions

Clause AutomaticallyConverted

Details

APPENDCHILDXML No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

DELETEXML No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

DEPTH No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

EXISTSNODE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

EXTRACT (XML) No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0298

Page 306: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

EXTRACTVALUE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

INSERTCHILDXML No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

INSERTXMLBEFORE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

PATH No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYS_DBURIGEN No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYS_XMLAGG No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

SYS_XMLGEN No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

UPDATEXML No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLAGG No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLCDATA No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLCOLATTVAL No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLCOMMENT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLCONCAT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLFOREST No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLPARSE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLPI No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLQUERY No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLROOT No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLSEQUENCE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Version 1.0299

Page 307: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

XMLSERIALIZE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLTABLE No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

XMLTRANSFORM No Issue 5340: PostgreSQL doesn't support the %sfunction (p. 325)

Hints

Clause AutomaticallyConverted

Details

Index and Cluster No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Join Order No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Joins No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Optimizer Mode No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Parallel Execution No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Query Transformation No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Other No Issue 5103: PostgreSQL doesn't support the %shint (p. 333)

Joins

Clause AutomaticallyConverted

Details

Cross Joins Yes

Inner Joins Yes

Outer Joins Yes

Version 1.0300

Page 308: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Operators and Date Functions

Clause AutomaticallyConverted

Details

Arithmetic operators Yes

Concatenation operators Yes

Predicates

Clause AutomaticallyConverted

Details

Boolean conditions Yes

Comparison conditions: '=,<>, <, <=, >, >=, ANY, SOME,ALL

Yes

Exists conditions Yes

In conditions Yes

Null conditions Yes

Pattern matchingconditions

Yes

Range conditions Yes

Set operators

Concatenation operators

Clause AutomaticallyConverted

Details

INTERSECT, EXCEPT Yes

MINUS Yes

UNION, UNION ALL Yes

Version 1.0301

Page 309: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Statements

DELETE

Clause AutomaticallyConverted

Details

DELETE FROMMATERIALIZED VIEW

No Issue 5095: PostgreSQL doesn't support using amaterialized VIEW (p. 332)

DELETE FROM SUBQUERY No Issue 5068: PostgreSQL doesn't support the DELETEstatement for a subquery (p. 330)

DELETE FROM TABLE Yes

DELETE FROM VIEW Yes

DELETE with Error Loggingclause

No Issue 5067: PostgreSQL doesn't support the DELETEstatement with the ERROR LOG option (p. 329)

DELETE with RETURNINGclause

Yes

HIERARCHICAL QUERY AND HIERARCHICAL QUERY PSEUDOCOLUMNS

Clause AutomaticallyConverted

Details

CONNECT BY CLAUSE Yes

CONNECT BY NOCYCLE No Issue 5586: Automatic conversion for queries withNOCYCLE clause not supported (p. 334)

CONNECT_BY_ISLEAFpseudocolumn

Yes

LEVEL PSEUDOCOLUMN Yes

ORDER SIBLINGS BY Yes

START WITH CLAUSE Yes

SYS_CONNECT_BY_PATH Yes

Hierarchical query operators

Clause AutomaticallyConverted

Details

CONNECT_BY_ROOT Yes

PRIOR Yes

Version 1.0302

Page 310: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

INSERT

Clause AutomaticallyConverted

Details

ALL Yes

DEFAULT Yes

ELSE  Yes

FIRST Yes

INSERT from clause"SUBQUERY"

Yes

INSERT from clause"VALUES(...)"

Yes

INSERT INTO SUBQUERY No Issue 5071: PostgreSQL doesn't support the INSERTstatement for a subquery (p. 332)

INSERT INTO TABLE Yes

INSERT INTO VIEW Yes

INSERT withpartition_extension_clause

No Issue 5024: PostgreSQL doesn't support the INSERTstatement with partition_extension_clause (p. 332)

Inserting Into a Table withError Logging clause

No Issue 5070: PostgreSQL doesn't support the INSERTstatement with the ERROR LOG option (p. 332)

RETURNING INTO Yes

WHEN Yes

LOCK TABLE

Clause AutomaticallyConverted

Details

Locking table in exclusivemode

Yes

Locking table in sharemode

Yes

Locking without waiting Yes

SELECT

Clause AutomaticallyConverted

Details

Add or subtract operators Yes

Version 1.0303

Page 311: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

BULK COLLECT INTO No Issue 5140: PostgreSQL doesn't support BULK COLLECTINTO (p. 334)

CUBE No Issue 5557: PostgreSQL doesn't support GROUPING SETS,CUBE, and ROLLUP functions (p. 334)

FOR UPDATE No Issue 5139: PostgreSQL doesn't support FOR UPDATESKIP LOCKED (p. 334)

GROUP BY Yes

GROUPING SETS No Issue 5557: PostgreSQL doesn't support GROUPING SETS,CUBE, and ROLLUP functions (p. 334)

HAVING Yes

INTERSECT Yes

INTO Yes

MINUS Yes

MODEL No Issue 5126: PostgreSQL doesn't support the MODELstatement (p. 334)

ORDER BY Yes

PIVOT clause No Issue 5077: PostgreSQL doesn't support the PIVOT clausefor the SELECT statement (p. 340)

ROLLUP No Issue 5557: PostgreSQL doesn't support GROUPING SETS,CUBE, and ROLLUP functions (p. 334)

ROWNUM pseudocolumn Yes

SELECT ALL Yes

SELECT DISTINCT Yes

SELECT LIST Yes

SELECT UNIQUE Yes

UNION Yes

UNION ALL Yes

UNPIVOT clause Yes

WHERE( field_name1,…,fieldnameN) IN(subquery_with_multiple_fields)

Yes

WHEREcomparison_condition(=;<>;!=;<;>;>=;<=;ANY;SOME;ALL)

Yes

Version 1.0304

Page 312: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

WHEREcompound_condition_with_or_and_not

Yes

WHERE field_nameBETWEEN arg1 AND arg2

Yes

WHERE field_name IN(const1,...,constN)

Yes

WHERE field_name IN(subquery)

Yes

WHERE like_condition(operator LIKE)

Yes

WITH Yes

UPDATE

Clause AutomaticallyConverted

Details

UPDATE (subquery) No Issue 5065: PostgreSQL doesn't support the UPDATEstatement for a subquery (p. 339)

UPDATE MATERIALIZEDVIEW

No Issue 5095: PostgreSQL doesn't support using amaterialized VIEW (p. 332)

UPDATE TABLE Yes

UPDATE VIEW Yes

UPDATE with Error Loggingclause

No Issue 5064: PostgreSQL doesn't support the UPDATEstatement with the ERROR LOG option (p. 339)

UPDATE with partitionextension clause

No Issue 5558: PostgreSQL doesn't support the UPDATEstatement for a PARTITION (p. 339)

UPDATE with RETURNING…INTO clause

Yes

UPDATE with subqueriesinto SET-clause

Yes

UPDATE-operator whichbased on data from otherstables

Yes

Version 1.0305

Page 313: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePLSQL

MERGE

Clause AutomaticallyConverted

Details

MERGE No Issue 5102: PostgreSQL doesn't support the MERGEstatement (p. 333)

TRUNCATE TABLE Yes

PLSQLArguments of functions and procedures

Clause AutomaticallyConverted

Details

Built-in datatype scalararguments

Yes

Cursor-type arguments Yes

Default clause indeclaration of arguments

Yes

IN, OUT, IN OUT type ofarguments

Yes

Ref cursor-type arguments Yes

UDT collection-typearguments

Yes

UDT object-type arguments Yes

UDT record-type Yes

Functions

Clause AutomaticallyConverted

Details

Functions with DML Yes

Functions without DML Yes

Return pipelined table Yes

Return ref cursor Yes

Return scalar Yes

Return table Yes

Version 1.0306

Page 314: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePLSQL

Clause AutomaticallyConverted

Details

Return UDT collection-type Yes

Return UDT object-type Yes

Return UDT record-type Yes

Packages

Clause AutomaticallyConverted

Details

Global cursor declaration No Issue 5569: PostgreSQL only supports session variablesusing SQL standard date and time types (p. 333)

Global user exceptiondeclaration

No Issue 5569: PostgreSQL only supports session variablesusing SQL standard date and time types (p. 333)

Initialization block BEGIN… END in packages

Yes

Package functions Yes

Package procedures Yes

Package variables Yes

User type declaration Yes

PL SQL constructions

Clause AutomaticallyConverted

Details

block EXCEPTION whenexception_name then…

Yes

CASE_NOT_FOUND Yes

case when conditionsthen…else… end case;

Yes

close cursor_variable Yes

COMMIT Yes

CURSOR_ALREADY_OPEN Yes

DUP_VAL_ON_INDEX Yes

execute immediateSQL_string_variable

No Issue 5334: PostgreSQL doesn't support the dynamic SQLstatement (p. 330)

Version 1.0307

Page 315: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePLSQL

Clause AutomaticallyConverted

Details

into variables_list usevariables_list

fetch cursor_variable intovariables_list

Yes

FORALL -cycle No Issue 5121: PostgreSQL doesn't support the FORALLstatement (p. 338)

for I in(begN..endN) loop…end loop

Yes

for I in(cursor_name)loop… end loop

Yes

for I in(select_statement)loop… end loop

Yes

FOR i IN REVERSEbegN..endN LOOP… ENDLOOP;

Yes

goto label; No Issue 5335: PostgreSQL doesn't support the GOTOoperator (p. 335)

if conditions then…else ifconditions then… end if;

Yes

if conditions then… end if; Yes

INVALID_CURSOR Yes

INVALID_NUMBER Yes

LOGIN_DENIED Yes

LOOP…exit whenconditions; END LOOP;

Yes

NO_DATA_FOUND Yes

NOT_LOGGED_ON Yes

NULL Statement Yes

open cursor_variable Yes

open cursor_variable forselect_statemet_string_variable

Yes

others Yes

PRAGMAAUTONOMOUS_TRANSACTION

No Issue 5350: The function can't use statements thatexplicitly or implicitly begin or end a transaction, such asSTART TRANSACTION, COMMIT, or ROLLBACK (p. 331)

PROGRAM_ERROR Yes

Version 1.0308

Page 316: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePLSQL

Clause AutomaticallyConverted

Details

raise_application_error(exept_code,message)

Yes

raise exeption_name Yes

ROLLBACK Yes

select…bulk collect intotable_variable fromtable_name

No Issue 5140: PostgreSQL doesn't support BULK COLLECTINTO (p. 334)

SQL%BULK_ROWCOUNT No

SQL%FOUND Yes

SQL%ISOPEN No Issue 5084: PostgreSQL doesn't support the cursorattribute %ISOPEN (p. 329)

SQL%NOTFOUND Yes

SQL%ROWCOUNT Yes

STORAGE_ERROR Yes

TIMEOUT_ON_RESOURCE Yes

TOO_MANY_ROWS Yes

TRANSACTION_BACKED_OUT Yes

VALUE_ERROR Yes

while conditions loop… endloop;

Yes

ZERO_DIVIDE Yes

PL SQL declaration block

Clause AutomaticallyConverted

Details

Declare built-in scalarvariable

Yes

Declare ref-cursor variable Yes

Declare static cursor Yes

Declare UDT collectionvariable

Yes

Declare UDT object variable Yes

Declare UDT record variable Yes

Version 1.0309

Page 317: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePLSQL

Clause AutomaticallyConverted

Details

Declare UDT array types Yes

Declare user-exception Yes

Declare with %rowtypeoption

Yes

Declare with %type option Yes

Procedures

Clause AutomaticallyConverted

Details

CREATE PROCEDUREstatement

Yes

Triggers

Clause AutomaticallyConverted

Details

BEFORE, AFTER - options Yes

FOR EACH ROW -option Yes

INSTEAD OF - options Yes

NESTED TABLE - clause No Issue 5240: PostgreSQL doesn't support triggers onnested table columns in views (p. 337)

REFERENCING - clause No Issue 5238: PostgreSQL doesn't support theREFERENCING clauses (p. 337)

Statement-trigger No

trigger on TABLE Yes

Trigger on VIEW Yes

WHEN(condition)- option No

Version 1.0310

Page 318: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideData Types

Data Types

Data type AutomaticallyConverted to

Details

BFILE charactervarying

Issue 5212: PostgreSQL doesn't have a data typeBFILE (p. 326)

BINARY_FLOAT real  

BINARY_DOUBLE doubleprecision

 

BLOB bytea  

CHAR(n) character  

CHARACTER(n) character  

CLOB text  

DATE timestamp(0)without timezone

 

DECIMAL(p,s) numeric  

DEC(p,s) numeric  

FLOAT doubleprecision

 

INTEGER numeric  

INT numeric  

INTERVAL YEAR(p) TOMONTH

interval yearto month

 

INTERVAL DAY(p) TOSECOND(s)

interval day tosecond(s)

 

LONG text  

LONG RAW bytea  

NCHAR(n) character  

NCHAR VARYING(n) charactervarying

 

NCLOB text  

NUMBER(p) numeric  

NUMBER(p,0) numeric  

NUMBER(*,0) numeric  

NUMBER(p,s) numeric  

Version 1.0311

Page 319: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Data type AutomaticallyConverted to

Details

NUMBER(*) doubleprecision

 

NUMBER doubleprecision

 

NVARCHAR2(n) charactervarying

 

RAW(n) bytea  

ROWID character Issue 5550: PostgreSQL doesn't have a data typeROWID (p. 327)

TIMESTAMP(p) timestamp(p)without timezone

 

TIMESTAMP(p) timestamp(6)without timezone

Issue 5213: PostgreSQL expands fractional secondssupport for TIME, DATETIME, and TIMESTAMP values,with up to microseconds (6 digits) of precision (p. 328)

TIMESTAMP(p) WITH TIMEZONE

timestamp(p)with timezone

 

TIMESTAMP(p) WITH TIMEZONE

timestamp(6)with timezone

Issue 5552: PostgreSQL expands fractional secondssupport for TIME, DATETIME, and TIMESTAMP values,with up to microseconds (6 digits) of precision (p. 328)

TIMESTAMP(p) WITHLOCAL TIME ZONE

timestamp(p)without timezone

 

TIMESTAMP(p) WITHLOCAL TIME ZONE

timestamp(6)without timezone

Issue 5553: PostgreSQL expands fractional secondssupport for TIME, DATETIME, and TIMESTAMP values,with up to microseconds (6 digits) of precision (p. 328)

UROWID charactervarying

Issue 5551: PostgreSQL doesn't have a data typeUROWID (p. 328)

VARCHAR charactervarying

 

VARCHAR2 charactervarying

 

XMLTYPE xml  

Oracle to PostgreSQL Conversion ReferenceUse the following sections to get information on the types of issues you might encounter during anOracle to PostgreSQL conversion. Choose the link in the Issue column to get more detailed resolutioninformation about the issue if it is available.

Version 1.0312

Page 320: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Build_in_services

Item Issue Resolution

UTL_SMTPDBMS_JOB

Issue 5590: The function was converted asprocedure (p. 324)

Can't return a replybecause this functionality isasynchronous.

Built-In SQL Functions

Item Issue Resolution

DateTime function Issue 5584: The function %s depends on thetime zone setting (p. 325)

Review the transformed code,and set time zone manually ifnecessary.

FUNCTION Issue 5340: PostgreSQL doesn't support the%s function (p. 325)

Use suitable function orcreate user defined function.

GREATEST(exp,exp2, ...)

Issue 5271: The Oracle GREATEST functionand PostgreSQL GREATEST function mightgive different results (p. 325)

Review your transformedcode and modify it ifnecessary. Change anargument's type if necessary.

LEAST(exp, exp2, ...) Issue 5272: The Oracle LEAST function andPostgreSQL LEAST function might givedifferent results (p. 325)

Review your transformedcode and modify it ifnecessary. Change anargument's type if necessary.

TO_CHAR, TO_DATE,TO_NUMBER

Issue 5579: The second parameterof %s function can be processedincorrectly (p. 325)

Check converted code andmake manual corrections ifit's necessary.

CREATE

Item Issue Resolution

Issue 5099: Unable convert object due to %snot created (p. 325)

Review the %s object.

Issue 5332: The object has references on theobject in %s schema (p. 325)

Convert the object in %sschema also.

Encrypted Objects Issue 5582: Encrypted Objects (p. 325) Decrypt the object beforeconversion.

Version 1.0313

Page 321: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

CREATE CONSTRAINT

Item Issue Resolution

status=DISABLED Issue 5326: PostgreSQL doesn'tsupport constraints with the statusDISABLED (p. 326)

Drop the constraint.

CREATE INDEX

Item Issue Resolution

Creating a DomainIndex

Issue 5208: PostgreSQL doesn't supportdomain indexes (p. 326)

Revise your code and try touse simple index.

Creating a Function-Based Index

Issue 5555: PostgreSQL doesn't supportfunctional indexes that aren't single-column (p. 326)

Revise your code and try touse simple index.

Creating an BITMAPIndex

Issue 5206: PostgreSQL doesn't supportbitmap indexes (p. 326)

Revise your code and try touse simple index.

CREATE TABLE

Item Issue Resolution

BFILE Data Type Issue 5212: PostgreSQL doesn't have a datatype BFILE (p. 326)

Either store a named file withthe data and create a routinethat gets that file from thefile system, or store the datablob inside your database.

CREATING APARTITIONED TABLE

Issue 5201: PostgreSQL doesn't support allpartition types (p. 326)

Perform a manual conversionfor the partition types thataren't supported.

CREATINGCLUSTERED TABLE

Issue 5199: PostgreSQL doesn't supportCLUSTERED TABLE (p. 326)

Try using a table withtriggers.

CREATING EXTERNALTABLES

Issue 5200: PostgreSQL doesn't supportEXTERNAL TABLES (p. 327)

Try using a table.

CREATING GLOBALTEMPORARY TABLE

Issue 5198: PostgreSQL doesn't supportGLOBAL TEMPORARY TABLE (p. 327)

Try using a local temporarytable.

CREATING OBJECTTABLES

Issue 5196: PostgreSQL doesn't supportOBJECT TABLE (p. 327)

Revise your code to avoidOBJECT TABLE.

Index-organized table Issue 5581: PostgreSQL doesn't supportindex-organized table (p. 327)

Revise your architecture witha custom solution for thetable type.

NESTED TABLE Issue 5348: PostgreSQL doesn't supportNESTED TABLES (p. 327)

Revise your code to avoidNESTED TABLE.

Version 1.0314

Page 322: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Item Issue Resolution

ROWID data type Issue 5550: PostgreSQL doesn't have a datatype ROWID (p. 327)

Review your transformedcode and modify it ifnecessary.

TABLE WITH VIRTUALCOLUMNS

Issue 5554: PostgreSQL doesn't supportvirtual columns (p. 327)

They were emulated by atrigger.

TIMESTAMP(n>6)Data Type

Issue 5213: PostgreSQL expands fractionalseconds support for TIME, DATETIME, andTIMESTAMP values, with up to microseconds(6 digits) of precision (p. 328)

Review your transformedcode and modify it ifnecessary to avoid a loss ofaccuracy.

TIMESTAMP(n>6)WITH TIME ZONEdata type

Issue 5552: PostgreSQL expands fractionalseconds support for TIME, DATETIME, andTIMESTAMP values, with up to microseconds(6 digits) of precision (p. 328)

Review your transformedcode and modify it ifnecessary to avoid a loss ofaccuracy.

TIMESTAMP(n>6)WITH LOCAL TIMEZONE data type

Issue 5553: PostgreSQL expands fractionalseconds support for TIME, DATETIME, andTIMESTAMP values, with up to microseconds(6 digits) of precision (p. 328)

Review your transformedcode and modify it ifnecessary to avoid a loss ofaccuracy.

UROWID data type Issue 5551: PostgreSQL doesn't have a datatype UROWID (p. 328)

Review your transformedcode and modify it ifnecessary.

CREATE TYPE

Item Issue Resolution

OBJECT TYPE Issue 5572: PostgreSQL doesn't supportobject type methods (p. 328)

Revise your architecture witha custom solution for the usertype.

CURSOR

Item Issue Resolution

Cursor attributes Issue 5084: PostgreSQL doesn't support thecursor attribute %ISOPEN (p. 329)

Revise how you are using thisattribute in your code.

TYPE .. IS REFCURSOR

Issue 5226: PostgreSQL doesn't supportTYPE ... IS REF CURSOR (p. 329)

Change the function to astored procedure, and tryusing a table to store results.

Version 1.0315

Page 323: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Datetime Expressions

Item Issue Resolution

at local at time zone Issue 5594: PostgreSQL doesn't support %sdatetime expression. The loss of precisionand/or accuracy of data is possible (p. 329)

Check, if the data violatesthese restrictions. If so,perform a manual migration.

DELETE

Item Issue Resolution

ERROR LOG Issue 5067: PostgreSQL doesn't supportthe DELETE statement with the ERROR LOGoption (p. 329)

You can add error recordsby inserting them into thelog in the exception block.Iterate through the errors inthe exception block, add themto the log, and use the EXITcommand when finished.

PARTITION Issue 5098: PostgreSQL doesn't support theDELETE statement for a PARTITION (p. 329)

Either insert data intothe overlying partition, orperform a manual conversionusing the DELETE statement.

QUERY Issue 5068: PostgreSQL doesn't support theDELETE statement for a subquery (p. 330)

Perform this operation on theunderlying tables instead.

DYNAMIC SQL

Item Issue Resolution

BULK COLLECT Issue 5088: PostgreSQL doesn't support theEXECUTE IMMEDIATE statement with BULKCOLLECT (p. 330)

Perform a manual conversion.

EXECUTE IMMEDIATE Issue 5334: PostgreSQL doesn't support thedynamic SQL statement (p. 330)

Review and modify theexecution string.

RETURNING BULKCOLLECT INTO

Issue 5087: PostgreSQL doesn't supportthe RETURNING BULK COLLECT INTOclause (p. 330)

Perform a manual conversion.

EXCEPTION

Item Issue Resolution

ACCESS_INTO_NULL Issue 5561: PostgreSQL doesn't support theACCESS_INTO_NULL exception (p. 330)

Review the exception used,and if possible convert it toanother condition.

Version 1.0316

Page 324: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Item Issue Resolution

COLLECTION_IS_NULL Issue 5562: PostgreSQL doesn't support theCOLLECTION_IS_NULL exception (p. 330)

Review the exception used,and if possible convert it toanother condition.

EMPTY_BLOCK Issue 5580: The exception block was emptiedafter conversion (p. 330)

Check converted code andmake manual corrections if itis necessary.

EXCEPTION Issue 5570: PostgreSQL doesn't supportexception name declaration (p. 330)

Review the exception used,and if possible convert it toanother condition.

NO_DATA_NEEDED Issue 5563: PostgreSQL doesn't support theNO_DATA_NEEDED exception (p. 330)

Review the exception used,and if possible convert it toanother condition.

PROGRAM_ERROR Issue 5560: PostgreSQL doesn't support thePROGRAM_ERROR exception (p. 331)

Review the exception used,and if possible convert it toanother condition.

ROWTYPE_MISMATCH Issue 5564: PostgreSQL doesn't support theROWTYPE_MISMATCH exception (p. 331)

Review the exception used,and if possible convert it toanother condition.

SELF_IS_NULL Issue 5565: PostgreSQL doesn't support theSELF_IS_NULL exception (p. 331)

Review the exception used,and if possible convert it toanother condition.

SUBSCRIPT_BEYOND_COUNTIssue 5566: PostgreSQL doesn't supportthe SUBSCRIPT_BEYOND_COUNTexception (p. 331)

Review the exception used,and if possible convert it toanother condition.

SUBSCRIPT_OUTSIDE_LIMITIssue 5567: PostgreSQL doesn't supportthe SUBSCRIPT_OUTSIDE_LIMITexception (p. 331)

Review the exception used,and if possible convert it toanother condition.

SYS_INVALID_ROWID Issue 5568: PostgreSQL doesn't support theSYS_INVALID_ROWID exception (p. 331)

Review the exception used,and if possible convert it toanother condition.

EXPLICIT CURSORS

Item Issue Resolution

RETURN Issue 5559: PostgreSQL doesn't support theRETURN TYPE for the cursor (p. 331)

Use cursor declarationwithout this statement.

Version 1.0317

Page 325: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

FUNCTION

Item Issue Resolution

FUNCTIONS WITHDML (STARTTRANSACTION,COMMIT, orROLLBACK.)

Issue 5350: The function can't use statementsthat explicitly or implicitly begin or end atransaction, such as START TRANSACTION,COMMIT, or ROLLBACK (p. 331)

Revise you code to implementa transaction control atapplication side.

INSERT

Item Issue Resolution

ERROR LOG Issue 5070: PostgreSQL doesn't supportthe INSERT statement with the ERROR LOGoption (p. 332)

You can add error recordsby inserting them into thelog in the exception block.Iterate through the errors inthe exception block, add themto the log, and use the EXITcommand when finished.

INSERT withpartition_extension_clause

Issue 5024: PostgreSQL doesn'tsupport the INSERT statement withpartition_extension_clause (p. 332)

Perform a manual conversionfor the partition types thataren't supported.

QUERY Issue 5071: PostgreSQL doesn't support theINSERT statement for a subquery (p. 332)

Perform this operation on theunderlying tables instead.

SUBPARTITION Issue 5090: PostgreSQL doesn'tsupport the INSERT statement for aSUBPARTITION (p. 332)

Either insert data intothe overlying partition, orperform a manual conversionusing the INSERT statement.

MATERIALIZED VIEW

Item Issue Resolution

CREATE Issue 5094: PostgreSQL doesn't support amaterialized VIEW (p. 332)

Revise your code to replacematerialized VIEW withanother solution.

USING MATERIALIZEDVIEW

Issue 5095: PostgreSQL doesn't support usinga materialized VIEW (p. 332)

Revise your code to replacematerialized VIEW withanother solution.

Version 1.0318

Page 326: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

MERGE

Item Issue Resolution

MERGE Issue 5102: PostgreSQL doesn't support theMERGE statement (p. 333)

To achieve the effect ofa MERGE statement, useseparate INSERT, DELETE, andUPDATE statements.

Optimizer Hints

Item Issue Resolution

HINT Issue 5103: PostgreSQL doesn't support the%s hint (p. 333)

Use PostgreSQL methods forperformance tuning.

PACKAGES

Item Issue Resolution

Package global cursor Issue 5330: PostgreSQL doesn't supportglobal cursors (p. 333)

Use another method for thisfunctionality.

Package global userEXCEPTION

Issue 5331: PostgreSQL doesn't support aglobal user exception (p. 333)

Use another method for thisfunctionality.

Package user typedeclaration

Issue 5569: PostgreSQL only supports sessionvariables using SQL standard date and timetypes (p. 333)

Revise your architecture witha custom solution for the usertype.

Parser Error

Item Issue Resolution

Parser Error Issue 5293: Unable to resolve theobject (p. 333)

Verify if object %s is presentin the database. If it isn't,check the object name or addthe object. If the object ispresent, transform the codemanually.

PRAGMA

Item Issue Resolution

PRAGMA Issue 5571: PostgreSQL doesn't supportPRAGMA options (p. 334)

Review the exception used,and if possible convert it toanother condition.

Version 1.0319

Page 327: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

SELECT

Item Issue Resolution

BULK COLLECT INTO Issue 5140: PostgreSQL doesn't support BULKCOLLECT INTO (p. 334)

You can try to include all ofthe fields from your table inan INTO clause.

FOR UPDATE SKIPLOCKED

Issue 5139: PostgreSQL doesn't support FORUPDATE SKIP LOCKED (p. 334)

Try using FOR UPDATEwithout SKIP LOCKED.

FOR UPDATE WAIT Issue 5144: PostgreSQL doesn't support FORUPDATE WAIT clauses (p. 334)

Try using FOR UPDATEwithout WAIT.

Hierarchical queries Issue 5586: Automatic conversion for querieswith NOCYCLE clause not supported (p. 334)

Perform a manual conversion.

MODEL Issue 5126: PostgreSQL doesn't support theMODEL statement (p. 334)

Revise your code and tryusing user procedures andtemporary tables.

OUTER JOIN Issue 5585: Automatic conversion of anouter join into a correlation query is notsupported (p. 334)

Perform a manual conversion.

ROLLUP Issue 5557: PostgreSQL doesn't supportGROUPING SETS, CUBE, and ROLLUPfunctions (p. 334)

It can be emulated usingCTE expressions. GROUPINGSETS, CUBE, and ROLLUPara available in PostgreSQLdatabase v.9.5 or higher.

Unsupportedstatement

Issue 5578: Unable to automatically transformthe SELECT statement (p. 335)

Try rewriting the statement.

SEQUENCE

Item Issue Resolution

STATUS=INVALID Issue 5574: PostgreSQL doesn't support thesequence's status (p. 335)

Check the original sequencefor errors, and perform theconversion again.

Statements

Item Issue Resolution

GOTO Issue 5335: PostgreSQL doesn't support theGOTO operator (p. 335)

Perform a manual conversion.

Version 1.0320

Page 328: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Synonym

Item Issue Resolution

private synonym Issue 5333: This object uses a privatesynonym (p. 335)

Check that a referencedobject created after synonymconversion exists.

public synonym Issue 5592: This object uses a public synonymwhich references a table, a view, or afunction (p. 335)

Check that a referencedobject created after synonymconversion exists.

public synonym Issue 5593: This object uses a publicsynonym which doesn't reference any otherobjects (p. 336)

Check that a referencedobject created after synonymconversion exists.

System Package

Item Issue Resolution

APEX_UTIL package Issue 5503: MySQL does not havefunctionality similar to %s module (p. 336)

Try using the Amazon SimpleWorkflow (Amazon SWF).

DBMS_DATAPUMP Issue 5502: MySQL does not havefunctionality similar to %s module (p. 336)

Try using the AWS Import/Export Snowball.

DBMS_JOB module Issue 5501: MySQL does not havefunctionality similar to %s module (p. 336)

Try using the AWS LambdaService with ScheduledEvents.

UTL_MAIL module Issue 5500: MySQL does not havefunctionality similar to %s module (p. 336)

Try using the Amazon SimpleNotification Service (AmazonSNS).

TRIGGERS

Item Issue Resolution

action-type=CALL orPL/SQL

Issue 5313: PostgreSQL doesn't support theaction-type clause (p. 336)

Use another method for thisfunctionality.

base-object-type=DATABASE

Issue 5415: PostgreSQL doesn't supportsystem triggers (p. 336)

Revise your code to replacesystem triggers with anothersolution.

base-object-type=SCHEMA

Issue 5311: PostgreSQL doesn't supportsystem triggers (p. 336)

Revise your code to replacesystem triggers with anothersolution.

COMPOUND TRIGGER Issue 5242: PostgreSQL doesn't supportCOMPOUND TRIGGER (p. 337)

Create a single trigger foreach part of the compoundtrigger.

Version 1.0321

Page 329: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Item Issue Resolution

FOLLOWS |PRECEDES

Issue 5241: PostgreSQL doesn't support theFOLLOWS | PRECEDES clause (p. 337)

Try using the FOR EACH ROWtrigger.

ON NESTED TABLE Issue 5240: PostgreSQL doesn't supporttriggers on nested table columns inviews (p. 337)

Revise your code to replacenested table with anothersolution.

REFERENCING NEWAS .. OLD AS ..

Issue 5238: PostgreSQL doesn't support theREFERENCING clauses (p. 337)

Modify references to pseudo-rows to use OLD and NEWinstead.

referencing-names=PARENT

Issue 5317: PostgreSQL doesn't support thePARENT referencing clause (p. 337)

Use another method for thisfunctionality.

status=invalid Issue 5306: Transformation from invalidtrigger (p. 337)

Check the original triggerfor errors, and perform theconversion again.

UPDATING(column_name)Issue 5556: PostgreSQL doesn't supportconditional predicates (p. 337)

Revise your code and tryusing simple triggers.

TRUNCATE TABLE

Item Issue Resolution

DROP STORAGE Issue 5298: PostgreSQL doesn't support theDROP STORAGE clause in the TRUNCATEstatement (p. 337)

Use TRUNCATE without thisoption.

PRESERVEMATERIALIZED VIEWLOG

Issue 5300: PostgreSQL doesn't supportthe PRESERVE clause in the TRUNCATEstatement (p. 337)

Use TRUNCATE without thisoption.

PURGEMATERIALIZED VIEWLOG

Issue 5301: PostgreSQL doesn't supportthe PURGE clause in the TRUNCATEstatement (p. 337)

Use TRUNCATE without thisoption.

REUSE STORAGE Issue 5299: PostgreSQL doesn't support theREUSE STORAGE clause in the TRUNCATEstatement (p. 338)

Use TRUNCATE without thisoption.

UDT

Item Issue Resolution

STATUS=INVALID Issue 5577: PostgreSQL doesn't support aUDT with body (p. 338)

Perform a manual conversion.

Version 1.0322

Page 330: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

UDT collection-type arguments

Item Issue Resolution

:= collection_type(...) Issue 5120: PostgreSQL doesn't supportconstructors of the "collection" type (p. 338)

Use the "array" type.

EXTEND(n[,i]) Issue 5587: PostgreSQL doesn't supportEXTEND method with parameters (p. 338)

Perform a manual conversion.

FORALL Issue 5121: PostgreSQL doesn't support theFORALL statement (p. 338)

Use a FOR LOOP statement.

TYPE .. IS TABLE OF... Issue 5118: PostgreSQL doesn't support tabletype variables (p. 338)

Use the "array" type.

Universal

Item Issue Resolution

Universal action item Issue 5339: The %s object is invalid (p. 338) To correct this, update theoriginal source code to makethe specified object valid.

Universal action item Issue 5591: The %s synonym issystem (p. 339)

Perform a manual conversion.

Unknown

Item Issue Resolution

Issue 5025: This syntactic element conversionis not supported yet (p. 339)

Perform a manual conversion.

Unknown object Issue 5351: Automatic conversion of %sobject is not supported (p. 339)

Perform a manual conversion.

Unparsed SQL Issue 5576: Unparsed SQL (p. 339) Perform a manual conversion.

UPDATE

Item Issue Resolution

ERROR LOG Issue 5064: PostgreSQL doesn't support theUPDATE statement with the ERROR LOGoption (p. 339)

You can add error recordsby inserting them into thelog in the exception block.Iterate through the errors inthe exception block, add themto the log, and use the EXITcommand when finished.

Version 1.0323

Page 331: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Item Issue Resolution

PARTITION Issue 5558: PostgreSQL doesn't support theUPDATE statement for a PARTITION (p. 339)

Either insert data intothe overlying partition,or perform a manualtransformation using theUPDATE statement.

QUERY Issue 5065: PostgreSQL doesn't support theUPDATE statement for a subquery (p. 339)

Perform this operation on theunderlying tables instead.

VIEW

Item Issue Resolution

CAST (MULTISET( Issue 5245: PostgreSQL doesn't support viewswith nested table columns (p. 340)

Revise your code to replacenested table with anothersolution.

constraint Issue 5583: PostgreSQL doesn't supportconstraints for view (p. 340)

Perform a manual conversion.

OID_TEXT IS NOTNULL

Issue 5321: PostgreSQL doesn't support theobject view (p. 340)

Perform a manual conversion.

PIVOT clause Issue 5077: PostgreSQL doesn't supportthe PIVOT clause for the SELECTstatement (p. 340)

You can use a storedprocedure to prepare data,and then return the data witha VIEW.

STATUS=INVALID Issue 5320: PostgreSQL doesn't support theview with invalid status (p. 340)

Perform a manual conversion.

VIEW_TYPE_OWNERIS NOT NULL

Issue 5322: PostgreSQL doesn't support thetyped view (p. 340)

Perform a manual conversion.

WITH READ ONLY Issue 5075: PostgreSQL doesn't support VIEWwith the READ ONLY option (p. 340)

Use VIEW without this optioninstead.

Conversion Issues with Build_in_services

Issue 5590: The function was converted as procedure

Can't return a reply because this functionality is asynchronous.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0324

Page 332: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Conversion Issues with BUILT-IN SQL FUNCTIONS

Issue 5584: The function %s depends on the time zone setting

Review the transformed code, and set the time zone manually if necessary.

Issue 5340: PostgreSQL doesn't support the %s function

You have SQL code that uses an Oracle function that PostgreSQL doesn't support. Re-write the code toeither use an alternative function or create a user-defined function instead. Some of the functions thatare not supported are as follows:

• NANVL• NLS_LOWER• NLS_UPPER• SYS_CONTEXT

Issue 5271: The Oracle GREATEST function and PostgreSQL GREATEST functionmight give different results

Review your transformed code and modify it to change the argument's type if necessary.

Issue 5272: The Oracle LEAST function and PostgreSQL LEAST function mightgive different results

Review your transformed code and modify it to change the argument's type if necessary.

Issue 5579: The second parameter of %s function can be processed incorrectly

Review your transformed code and modify it if necessary.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE

Issue 5099: Unable convert object due to %s not created

Review the %s object.

Issue 5332: The object has references on the object in %s schema

Convert the object in %s schema also.

Issue 5582: Encrypted Objects

Decrypt the object before conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

Version 1.0325

Page 333: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE CONSTRAINT

Issue 5326: PostgreSQL doesn't support constraints with the status DISABLED

PostgreSQL doesn't support the DISABLE clause on constraints. Drop the constraint prior to conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE INDEX

Issue 5208: PostgreSQL doesn't support domain indexes

Revise your code to use a simple index instead.

Issue 5555: PostgreSQL doesn't support functional indexes that aren't single-column

Revise your code to use a simple index instead.

Issue 5206: PostgreSQL doesn't support bitmap indexes

Revise your code to use a simple index instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE TABLE

Issue 5212: PostgreSQL doesn't have a data type BFILE

Either store a named file with the data and create a routine that gets that file from the file system, orstore the data blob inside your database.

Issue 5201: PostgreSQL doesn't support all partition types

Perform a manual conversion for the partition types that aren't supported.

Issue 5199: PostgreSQL doesn't support CLUSTERED TABLE

Try using a table with triggers instead.

Version 1.0326

Page 334: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5200: PostgreSQL doesn't support EXTERNAL TABLES

Try moving the data from the external data source to a regular database table.

Issue 5198: PostgreSQL doesn't support GLOBAL TEMPORARY TABLE

Use of the GLOBAL and LOCAL keywords is deprecated in PostgreSQL. Modify your code to create atemporary table without using these keywords.

Issue 5196: PostgreSQL doesn't support OBJECT TABLE

Revise your code to remove references to tables that are based on an OBJECT type, as shown in thefollowing example:

CREATE TYPE department_typ AS OBJECT ( d_name VARCHAR2(100), d_address VARCHAR2(200) );/ CREATE TABLE departments_obj_t OF department_typ;

Issue 5581: PostgreSQL doesn't support index-organized table

Revise your architecture with a custom solution for the table type. A typical approach is using a simpletable instead in PostgreSQL.

Issue 5348: PostgreSQL doesn't support NESTED TABLES

Revise your code to avoid NESTED TABLE.

Issue 5550: PostgreSQL doesn't have a data type ROWID

Review your transformed code and modify it if necessary to use a different data type.

Issue 5554: PostgreSQL doesn't support virtual columns

Emulate the virtual column by using a trigger instead. For example, you could modify the followingOracle table:

CREATE TABLE employees2 ( id NUMBER, first_name VARCHAR2(10), last_name VARCHAR2(10), salary NUMBER(9,2), comm1 NUMBER(3), comm2 NUMBER(3), salary1 AS (ROUND(salary*(1+comm1/100),2)), salary2 NUMBER GENERATED ALWAYS AS (ROUND(salary*(1+comm2/100),2)) VIRTUAL, CONSTRAINT employees_pk PRIMARY KEY (id));

To the following PostgreSQL statements:

CREATE TABLE IF NOT EXISTS TEST_ORA_PG.employees2 ( id DOUBLE PRECISION NOT NULL, first_name character varying(10), last_name character varying(10), salary NUMERIC(9,2), comm1 NUMERIC(3,0),

Version 1.0327

Page 335: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

comm2 NUMERIC(3,0), salary1 DOUBLE PRECISION, salary2 DOUBLE PRECISION);

ALTER TABLE TEST_ORA_PG.EMPLOYEES2ADD CONSTRAINT EMPLOYEES_PK PRIMARY KEY (ID);

CREATE OR REPLACE FUNCTION TEST_ORA_PG.f_trigger_vc$employees2 ()RETURNS triggerAS $BODY$ BEGIN new.salary1 := ROUND(new.salary*(1+new.comm1/100),2); new.salary2 := ROUND(new.salary*(1+new.comm2/100),2);return NEW;END; $BODY$ LANGUAGE plpgsql; CREATE TRIGGER trigger_vc$employees2before insert or update on TEST_ORA_PG.employees2for each rowEXECUTE PROCEDURE TEST_ORA_PG.f_trigger_vc$employees2();

Issue 5213: PostgreSQL expands fractional seconds support for TIME, DATETIME,and TIMESTAMP values, with up to microseconds (6 digits) of precision

Review your transformed code and modify it if necessary to avoid a loss of accuracy.

Issue 5552: PostgreSQL expands fractional seconds support for TIME, DATETIME,and TIMESTAMP values, with up to microseconds (6 digits) of precision

Review your transformed code and modify it if necessary to avoid a loss of accuracy.

Issue 5553: PostgreSQL expands fractional seconds support for TIME, DATETIME,and TIMESTAMP values, with up to microseconds (6 digits) of precision

Review your transformed code and modify it if necessary to avoid a loss of accuracy.

Issue 5551: PostgreSQL doesn't have a data type UROWID

Review your transformed code and modify it if necessary to use a different data type.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CREATE TYPE

Issue 5572: PostgreSQL doesn't support object type methods

Revise your architecture with a custom solution for the user type.

Version 1.0328

Page 336: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CURSOR

Issue 5084: PostgreSQL doesn't support the cursor attribute %ISOPEN

Revise how you are using this attribute in your code.

Issue 5226: PostgreSQL doesn't support TYPE ... IS REF CURSOR

PostgreSQL doesn't support the TYPE <type_name> IS REF CURSOR statement. Change the function to astored procedure and try using a table to store results instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Datetime Expressions

Issue 5594: PostgreSQL doesn't support %s datetime expression. The loss ofprecision and/or accuracy of data is possible

PostgreSQL doesn't support the AT LOCAL or AT TIME ZONE <time_zone> datetime expressions. Reviewyour code and modify it if necessary.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DELETE

Issue 5067: PostgreSQL doesn't support the DELETE statement with the ERRORLOG option

You can add error records by inserting them into the log in the exception block. Iterate through theerrors in the exception block, add them to the log, and use the EXIT command when finished.

Issue 5098: PostgreSQL doesn't support the DELETE statement for a PARTITION

Either insert data into the overlying partition, or perform a manual conversion using the DELETEstatement.

Version 1.0329

Page 337: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5068: PostgreSQL doesn't support the DELETE statement for a subquery

Perform this operation on the underlying tables instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DYNAMIC SQL

Issue 5088: PostgreSQL doesn't support the EXECUTE IMMEDIATE statementwith BULK COLLECT

Perform a manual conversion.

Issue 5334: PostgreSQL doesn't support the dynamic SQL statement

Review and modify the execution string.

Issue 5087: PostgreSQL doesn't support the RETURNING BULK COLLECT INTOclause

Perform a manual conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with EXCEPTION

Issue 5561: PostgreSQL doesn't support the ACCESS_INTO_NULL exception

Review the exception used, and if possible convert it to another condition.

Issue 5562: PostgreSQL doesn't support the COLLECTION_IS_NULL exception

Review the exception used, and if possible convert it to another condition.

Issue 5580: The exception block was emptied after conversion

Check converted code and make manual corrections if necessary.

Issue 5570: PostgreSQL doesn't support exception name declaration

Review the exception used, and if possible convert it to another condition.

Issue 5563: PostgreSQL doesn't support the NO_DATA_NEEDED exception

Review the exception used, and if possible convert it to another condition.

Version 1.0330

Page 338: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5560: PostgreSQL doesn't support the PROGRAM_ERROR exception

Review the exception used, and if possible convert it to another condition.

Issue 5564: PostgreSQL doesn't support the ROWTYPE_MISMATCH exception

Review the exception used, and if possible convert it to another condition.

Issue 5565: PostgreSQL doesn't support the SELF_IS_NULL exception

Review the exception used, and if possible convert it to another condition.

Issue 5566: PostgreSQL doesn't support the SUBSCRIPT_BEYOND_COUNTexception

Review the exception used, and if possible convert it to another condition.

Issue 5567: PostgreSQL doesn't support the SUBSCRIPT_OUTSIDE_LIMITexception

Review the exception used, and if possible convert it to another condition.

Issue 5568: PostgreSQL doesn't support the SYS_INVALID_ROWID exception

Review the exception used, and if possible convert it to another condition.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with EXPLICIT CURSORS

Issue 5559: PostgreSQL doesn't support the RETURN TYPE for the cursor

PostgreSQL doesn't support specifying a return type for a cursor. Declare the cursor without thisstatement.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with FUNCTION

Issue 5350: The function can't use statements that explicitly or implicitly beginor end a transaction, such as START TRANSACTION, COMMIT, or ROLLBACK

Revise your code to implement transaction control on the application side. Some cases that useSAVEPOINT <name>… ROLLBACK TO <name> can be converted to BEGIN … EXCEPTION … END.

Version 1.0331

Page 339: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with INSERT

Issue 5070: PostgreSQL doesn't support the INSERT statement with the ERRORLOG option

You can add error records by inserting them into the log in the exception block. Iterate through theerrors in the exception block, add them to the log, and use the EXIT command when finished.

Issue 5024: PostgreSQL doesn't support the INSERT statement withpartition_extension_clause

Perform a manual conversion for the partition types that aren't supported.

Issue 5071: PostgreSQL doesn't support the INSERT statement for a subquery

Perform this operation on the underlying tables instead.

Issue 5090: PostgreSQL doesn't support the INSERT statement for aSUBPARTITION

Either insert data into the overlying partition, or perform a manual conversion using the INSERTstatement.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with MATERIALIZED VIEW

Issue 5094: PostgreSQL doesn't support a materialized VIEW

Revise your code to replace the CREATE MATERIALIZED VIEW statement with another solution.

Issue 5095: PostgreSQL doesn't support using a materialized VIEW

Revise your code to replace the materialized view with another solution.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0332

Page 340: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Conversion Issues with MERGE

Issue 5102: PostgreSQL doesn't support the MERGE statement

To achieve the effect of a MERGE statement, use separate INSERT, DELETE, and UPDATE statements.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Optimizer Hints

Issue 5103: PostgreSQL doesn't support the %s hint

Use PostgreSQL methods for performance tuning.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with PACKAGES

Issue 5330: PostgreSQL doesn't support global cursors

Use another method for this functionality.

Issue 5331: PostgreSQL doesn't support a global user exception

Use another method for this functionality.

Issue 5569: PostgreSQL only supports session variables using SQL standard dateand time types

If your code uses variables of other types, such as associative arrays, cursors, ref cursors, or subtypes,revise your architecture with a custom solution for replacing that type.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Parser Error

Issue 5293: Unable to resolve the object

Verify if object <object_name> is present in the database. If it isn't, check the object name or add theobject. If the object is present, transform the code manually.

Version 1.0333

Page 341: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with PRAGMA

Issue 5571: PostgreSQL doesn't support PRAGMA options

Review the exception used, and if possible convert it to another condition.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECT

Issue 5140: PostgreSQL doesn't support BULK COLLECT INTO

Include all of the fields from your table in an INTO clause instead.

Issue 5139: PostgreSQL doesn't support FOR UPDATE SKIP LOCKED

Try using FOR UPDATE without SKIP LOCKED.

Issue 5144: PostgreSQL doesn't support FOR UPDATE WAIT clauses

Try using FOR UPDATE without WAIT.

Issue 5586: Automatic conversion for queries with NOCYCLE clause notsupported

Perform a manual conversion.

Issue 5126: PostgreSQL doesn't support the MODEL statement

Revise your code. Try using user procedures and temporary tables instead.

Issue 5585: Automatic conversion of an outer join into a correlation query is notsupported

Perform a manual conversion.

Issue 5557: PostgreSQL doesn't support GROUPING SETS, CUBE, and ROLLUPfunctions

These functions can be emulated using CTE expressions instead. GROUPING SETS, CUBE, and ROLLUPfunctionality is available in PostgreSQL v.9.5 or higher.

Version 1.0334

Page 342: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5578: Unable to automatically transform the SELECT statement

The indicated SELECT statement contains language that can't be converted, for example an unsupportedfunction. Try rewriting the statement.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SEQUENCE

Issue 5574: PostgreSQL doesn't support the sequence's status

Check the original sequence for errors, and perform the conversion again.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Statements

Issue 5335: PostgreSQL doesn't support the GOTO operator

PostgreSQL doesn't support the GOTO operator in stored procedures. Try one of the followingalternatives instead:

• Set a flag and test for it.• Return from the procedure if updates should be made, and add the updates after the return.• Put the updates in another stored procedure, and call it in your IF statements.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Synonym

Issue 5333: This object uses a private synonym

Check that a referenced object created after synonym conversion exists.

Issue 5592: This object uses a public synonym which references a table, a view,or a function

Check that a referenced object created after synonym conversion exists.

Version 1.0335

Page 343: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5593: This object uses a public synonym which doesn't reference any otherobjects

Check that a referenced object created after synonym conversion exists.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with System Package

Issue 5503: MySQL does not have functionality similar to %s module

Try using Amazon Simple Workflow (Amazon SWF). For more information, see What Is Amazon SimpleWorkflow Service? in the Amazon Simple Workflow Service Developer Guide.

Issue 5502: MySQL does not have functionality similar to %s module

Try using AWS Snowball. For more information, see What Is AWS Snowball?

Issue 5501: MySQL does not have functionality similar to %s module

Try using the AWS Lambda service with Scheduled Events. For more information, see What Is AWSLambda?

Issue 5500: MySQL does not have functionality similar to %s module

Try using the Amazon Simple Queue Service (Amazon SQS). For more information, see What is AmazonSimple Queue Service?

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with TRIGGERS

Issue 5313: PostgreSQL doesn't support the action-type clause

Use another method for this functionality.

Issue 5415: PostgreSQL doesn't support system triggers

Revise your code to replace system triggers with another solution.

Issue 5311: PostgreSQL doesn't support system triggers

Revise your code to replace system triggers with another solution.

Version 1.0336

Page 344: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5242: PostgreSQL doesn't support COMPOUND TRIGGER

Create a single trigger for each part of the compound trigger.

Issue 5241: PostgreSQL doesn't support the FOLLOWS | PRECEDES clause

Try using the FOR EACH ROW trigger.

Issue 5240: PostgreSQL doesn't support triggers on nested table columns inviews

Revise your code to replace the nested table with another solution.

Issue 5238: PostgreSQL doesn't support the REFERENCING clauses

Modify references to pseudo-rows to use OLD and NEW instead.

Issue 5317: PostgreSQL doesn't support the PARENT referencing clause

Use another method for this functionality.

Issue 5306: Transformation from invalid trigger

Check the original trigger for errors, and perform the conversion again.

Issue 5556: PostgreSQL doesn't support conditional predicates

Revise your code and try using simple triggers instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with TRUNCATE TABLE

Issue 5298: PostgreSQL doesn't support the DROP STORAGE clause in theTRUNCATE statement

Use the TRUNCATE TABLE statement without this option.

Issue 5300: PostgreSQL doesn't support the PRESERVE clause in the TRUNCATEstatement

Use the TRUNCATE TABLE statement without this option.

Issue 5301: PostgreSQL doesn't support the PURGE clause in the TRUNCATEstatement

Use the TRUNCATE TABLE statement without this option.

Version 1.0337

Page 345: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5299: PostgreSQL doesn't support the REUSE STORAGE clause in theTRUNCATE statement

Use the TRUNCATE TABLE statement without this option.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with UDT

Issue 5577: PostgreSQL doesn't support a UDT with body

Perform a manual conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with UDT collection-type arguments

Issue 5120: PostgreSQL doesn't support constructors of the "collection" type

Use the "array" type instead.

Issue 5587: PostgreSQL doesn't support EXTEND method with parameters

Perform a manual conversion.

Issue 5121: PostgreSQL doesn't support the FORALL statement

Use a FOR LOOP statement instead.

Issue 5118: PostgreSQL doesn't support table type variables

Use the "array" type instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Universal

Issue 5339: The %s object is invalid

Revise the original source code to make the specified object valid.

Version 1.0338

Page 346: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideOracle to PostgreSQL Conversion Reference

Issue 5591: The %s synonym is system

Perform a manual conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Unknown

Issue 5025: This syntactic element conversion is not supported yet

Perform a manual conversion.

Issue 5351: Automatic conversion of %s object is not supported

Perform a manual conversion.

Issue 5576: Unparsed SQL

Perform a manual conversion.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with UPDATE

Issue 5064: PostgreSQL doesn't support the UPDATE statement with the ERRORLOG option

You can add error records by inserting them into the log in the exception block. Iterate through theerrors in the exception block, add them to the log, and use the EXIT command when finished.

Issue 5558: PostgreSQL doesn't support the UPDATE statement for a PARTITION

Either insert data into the overlying partition, or perform a manual transformation using the UPDATEstatement.

Issue 5065: PostgreSQL doesn't support the UPDATE statement for a subquery

Perform this operation on the underlying tables instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

Version 1.0339

Page 347: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Supported Schema Conversion

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with VIEW

Issue 5245: PostgreSQL doesn't support views with nested table columns

Revise your code to replace the nested table with another solution.

Issue 5583: PostgreSQL doesn't support constraints for view

Perform a manual conversion.

Issue 5321: PostgreSQL doesn't support the object view

Perform a manual conversion.

Issue 5077: PostgreSQL doesn't support the PIVOT clause for the SELECTstatement

You can use a stored procedure to prepare data, and then return the data with a view.

Issue 5320: PostgreSQL doesn't support the view with invalid status

Perform a manual conversion.

Issue 5322: PostgreSQL doesn't support the typed view

Perform a manual conversion.

Issue 5075: PostgreSQL doesn't support VIEW with the READ ONLY option

Create the view without this option instead.

Related Topics

• Oracle to PostgreSQL Conversion Reference (p. 312)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Related Topics• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

PostgreSQL to MySQL Supported SchemaConversion

The following sections list the schema elements from a PostgreSQL database and whether they aresupported for automatic conversion to MySQL using the AWS Schema Conversion Tool.

Version 1.0340

Page 348: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDDL

DDLStatements

Tables

Clause AutomaticallyConverted

Details

ALTER TABLE Yes

Auto-incremented columns Yes

Columns with defaultvalues

Partial Issue 6115: MySQL doesn't support expressions inDEFAULT constraints, so they are converted to a BEFOREINSERT trigger (p. 385)

CREATE TABLE Yes

Deferrable constraints Partial Issue 6111: MySQL doesn't support deferrableconstraints (p. 385)

DROP TABLE Yes

Expression as default valuefor column

Partial Issue 6115: MySQL doesn't support expressions inDEFAULT constraints, so they are converted to a BEFOREINSERT trigger (p. 385)

Issue 6117: Unable to keep the NOT NULL constraint for%s column while converting its DEFAULT constraint basedon an expression (p. 386)

Foreign keys Partial Issue 6114: MySQL doesn't support SET DEFAULT as areferential action in foreign keys (p. 385)

Not-null columns Partial Issue 6117: Unable to keep the NOT NULL constraint for%s column while converting its DEFAULT constraint basedon an expression (p. 386)

Primary keys Yes

Regular tables Yes

Table inheritance No Issue 6108: MySQL doesn't support inheritedtables (p. 386)

Tables with checkconstraints

Partial Issue 6113: MySQL doesn't support check constraints;the source constraint is converted to a conditional errorraising in triggers (p. 385)

Tables with exclusionconstraints

Partial Issue 6112: MySQL doesn't support exclusionconstraints (p. 385)

Tables without columns No Issue 6109: MySQL doesn't support typedtables (p. 387)

Trigger disablement No Issue 6087: MySQL doesn't support disablingtriggers (p. 387)

Version 1.0341

Page 349: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

Typed tables No Issue 6110: MySQL doesn't support tables withoutcolumns (p. 386)

Issue 6120: MySQL doesn't support user-defined datatypes (p. 389)

Unique keys Yes

Unlogged tables No Issue 6107: MySQL doesn't support unloggedtables (p. 386)

DMLBuilt-In SQL Functions

Aggregate

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Character

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Conversion

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

DateTime

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Version 1.0342

Page 350: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Numeric

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Other

Clause AutomaticallyConverted

Details

All Partial Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Window

Clause AutomaticallyConverted

Details

All No Issue 6667: MySQL doesn't support the %sfunction (p. 372)

XML

Clause AutomaticallyConverted

Details

All No Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Joins

TRUNCATE TABLE

Clause AutomaticallyConverted

Details

[NATURAL ] [ INNER ] JOIN Yes

[NATURAL ] {LEFT |RIGHT |FULL } [ OUTER ] JOIN

Yes

CROSS JOIN Yes

USING ( join_column [, ...] ) Yes

Version 1.0343

Page 351: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Operators and Date Functions

Bit String Operators

Clause AutomaticallyConverted

Details

||,&,|,#,~,<<,>>, Yes

Date/Time Operators

Clause AutomaticallyConverted

Details

+,-,*,/ Partial Issue 6660: Unable to convert the %s operation with theinterval value as one or more arguments (p. 380)

Issue 6661: The operation will return the number of daysinstead of the interval value (p. 380)

Mathematical Operators

Clause AutomaticallyConverted

Details

+,-,*,/,%,^,|/,||/,!,!!,@,&,|,#,~,<<,>>,

Yes

String Operators

Clause AutomaticallyConverted

Details

|| Yes

Predicates

SIMILAR Predicate

Clause AutomaticallyConverted

Details

SIMILAR No Issue 6607: Could not convert pattern to MySQL version;check pattern manually (p. 382)

Version 1.0344

Page 352: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Boolean Conditions

Clause AutomaticallyConverted

Details

All Yes

Comparison Condition

Clause AutomaticallyConverted

Details

'=, <>, <, <=, >, >= Yes

ANY, SOME, ALL Yes

Exists Conditions

Clause AutomaticallyConverted

Details

EXISTS Yes

In Conditions

Clause AutomaticallyConverted

Details

IN Yes

Null Conditions

Clause AutomaticallyConverted

Details

NULL Yes

Pattern-Matching Conditions

Clause AutomaticallyConverted

Details

All Yes

Version 1.0345

Page 353: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Range Conditions

Clause AutomaticallyConverted

Details

All Yes

Set Operators

Text Search Functions and Operators

Clause AutomaticallyConverted

Details

EXCEPT Yes

INTERSECT Yes

UNION Yes

Statements

INSERT

Clause AutomaticallyConverted

Details

INSERT INTO tableDEFAULT VALUES;

Yes

INSERT INTO table query; Yes

INSERT INTO tableVALUES() RETURNING *;

No Issue 6172: MySQL doesn't support the INSERT statementwith the RETURNING option (p. 378)

INSERT INTO tableVALUES() RETURNING{output_expression [ ASoutput_name ] [, ...]};

No Issue 6172: MySQL doesn't support the INSERT statementwith the RETURNING option (p. 378)

INSERT INTO tableVALUES();

Yes

INSERT INTO tableVALUES({ expression| DEFAULT }[, ...] ),VALUES({ expression |DEFAULT } [, ...] ) [, ...];

Yes

INSERT INTO tableVALUES({ expression |DEFAULT } [, ...] );

Yes

Version 1.0346

Page 354: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

INSERT INTO table(array)VALUES({'{' '}[,..]'});

Yes

INSERT INTOtable[( column [, ...] )]VALUES();

Yes

WITH RECURSIVEwith_query [, ...]UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

No Issue 6127: MySQL doesn't support the WITH RECURSIVEclause (p. 383)

WITH with_query [, ...]UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

Yes

SELECT

Clause AutomaticallyConverted

Details

Add or subtract operators Yes

EXCEPT [ALL] Partial Issue 6612: Query with INTERSECT/EXCEPT ALL operatorwas transformed (p. 378)

FROM [ONLY] tablename[*]

No

FROM { with_query_name |function_name()}

No Issue 6603: Can't use function in from clause (p. 376)

FROM {(subquery) [ AS ]alias |(VALUES({ expression| DEFAULT } [, ...])) [ AS ]alias }

Yes

FROM tablename [ [ AS ]alias ]

Yes

GROUP BY Yes

HAVING Yes

INTERSECT [ALL] Partial Issue 6612: Query with INTERSECT/EXCEPT ALL operatorwas transformed (p. 378)

LIMIT { count | ALL }OFFSET start { ROW |ROWS }

Partial Issue 6611: LIMIT/OFFSET option was omitted (p. 379)

Version 1.0347

Page 355: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

Clause AutomaticallyConverted

Details

OFFSET start { ROW |ROWS } FETCH { FIRST |NEXT } [ count ] { ROW |ROWS } ONLY

Partial Issue 6611: LIMIT/OFFSET option was omitted (p. 379)

ORDER BY [ ASC | DESC |USING operator ] [ NULLS{ FIRST | LAST } ] [, ...]

Yes

SELECT {* | expression[ [ AS ] output_name ] [, ...]}FROM table

Yes

SELECT {expression [ [ AS ]output_name ] [, ...]}

Yes

SELECT ALL Yes

SELECT DISTINCT Yes

SELECT DISTINCT ON No

UNION [ALL] Yes

WHERE (field_name1,…,fieldnameN) IN(subquery_with_multiple_fields)

Yes

WHEREcomparison_condition(=;<>;!=;<;>;>=;<=;ANY;SOME;ALL)

Yes

WHEREcompound_condition_with_or_and_not

Yes

WHERE field_nameBETWEEN arg1 AND arg2

Yes

WHERE field_name IN(const1,...,constN)

Yes

WHERE field_name IN(subquery)

Yes

WHERE like_condition(operator LIKE)

Yes

WITH RECURSIVEwith_query [, ...]

No Issue 6127: MySQL doesn't support the WITH RECURSIVEclause (p. 383)

WITH with_query [, ...] Yes

Version 1.0348

Page 356: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

WINDOW DEFINITION

DELETE

Clause AutomaticallyConverted

Details

DELETE FROM table_nameWHERE CURRENT OFcursor_name

No Issue 6672: MySQL does not support delete bycursor (p. 375)

DELETE FROM table_nameFROM from_list WHEREcondition

Yes

DELETE FROMtable_name RETURNING{output_expression [ ASoutput_name ] [, ...]}

No Issue 6069: MySQL doesn't support the DELETEstatement with the RETURNING option (p. 375)

DELETE FROM table_nameRETURNING *

No Issue 6069: MySQL doesn't support the DELETEstatement with the RETURNING option (p. 375)

DELETE FROM table_nameWHERE condition

Yes

DELETE FROM ONLY table[ [ AS ] alias ]

No

DELETE FROM table [ [ AS ]alias ]

Yes

DELETE FROM table *[ [ AS ] alias ]

No Issue 6603: Can't use function in from clause (p. 376)

SELECT

Clause AutomaticallyConverted

Details

[ existing_window_name ][ PARTITION BY expression[, ...] ] [ ORDER BYexpression [ ASC | DESC |USING operator ] [ NULLS{ FIRST | LAST } ] [, ...] ][ frame_clause ]

No Issue 6678: MySQL doesn't support function %s withOVER/ORDER BY/WITHIN GROUP/FILTER clause (p. 371)

Version 1.0349

Page 357: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideDML

UPDATE

Clause AutomaticallyConverted

Details

UPDATE ONLY table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

No

UPDATE table_name *SET { column_name ={ expression | DEFAULT }}[, ...]

No

UPDATE table_name [ [ AS ]alias ] SET { column_name= { expression | DEFAULT }}[, ...]

Yes

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

Yes

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...] WHERE CURRENT OFcursor_name

No Issue 6672: MySQL does not support delete bycursor (p. 375)

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...] FROM from_listWHERE condition

Partial Issue 6669: FROM clause was rewritten (p. 390)

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...] RETURNING{output_expression [ ASoutput_name ] [, ...]}

No Issue 6066: MySQL doesn't support the UPDATEstatement with the RETURNING option (p. 390)

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...] RETURNING *

No Issue 6066: MySQL doesn't support the UPDATEstatement with the RETURNING option (p. 390)

UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...] WHERE condition

Yes

UPDATE table_name SET{( column_name [, ...] ) =( { expression | DEFAULT }[, ...] ) } [, ...]

Yes

Version 1.0350

Page 358: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Clause AutomaticallyConverted

Details

UPDATE table_name SET{( column_name [, ...] ) =( query ) }

Yes

WITH RECURSIVEwith_query [, ...]UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

No Issue 6127: MySQL doesn't support the WITH RECURSIVEclause (p. 383)

WITH with_query [, ...]UPDATE table_nameSET { column_name ={ expression | DEFAULT }}[, ...]

Yes

PL/pgSQL

Basic Statements

Assignment

Clause AutomaticallyConverted

Details

Variable assignment Partial Issue 6668: MySQL doesn't support ROW/RECORDtype (p. 382)

Executing a Command with No Result

Clause AutomaticallyConverted

Details

PERFORM Yes

Executing a Query with a Single-Row Result

Clause AutomaticallyConverted

Details

INTO No Issue 6668: MySQL doesn't support ROW/RECORDtype (p. 382)

Version 1.0351

Page 359: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Executing Dynamic Commands

Clause AutomaticallyConverted

Details

EXECUTE, INTO, STRICT,USING

No Issue 6334: MySQL doesn't support the dynamic SQLstatement RETURN QUERY EXECUTE (p. 375)

Category

Simple Structure of PL/pgSQL

Clause AutomaticallyConverted

Details

DECLARE, BEGIN, END Yes

Conditionals

IF-THEN

Clause AutomaticallyConverted

Details

IF, THEN, END IF Yes

IF-THEN-ELSE

Clause AutomaticallyConverted

Details

IF, THEN, ELSE, END IF Yes

IF-THEN-ELSIF

Clause AutomaticallyConverted

Details

IF, THEN, ELSE, ELSIF, ENDIF

Yes

Version 1.0352

Page 360: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Searched CASE

Clause AutomaticallyConverted

Details

CASE,WHEN, THEN, ELSE,END CASE

Yes

Simple CASE

Clause AutomaticallyConverted

Details

CASE,WHEN, THEN, ELSE,END CASE

Yes

CursorsCLOSE

Clause AutomaticallyConverted

Details

CLOSE Yes

Declaring Cursor Variables

Clause AutomaticallyConverted

Details

NO, SCROLL, CURSOR, FOR No Issue 6337: MySQL doesn't support a variable ofREFCURSOR type (p. 373)

FETCH

Clause AutomaticallyConverted

Details

FETCH [ direction { FROM |IN } ] cursor INTO target;

Partial Issue 6639: MySQL doesn't support the directionclause (p. 373)

MOVE

Clause AutomaticallyConverted

Details

MOVE [ direction { FROM |IN } ] cursor;

No Issue 6640: MySQL doesn't support the MOVEoption (p. 373)

Version 1.0353

Page 361: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

OPEN FOR EXECUTE

Clause AutomaticallyConverted

Details

OPEN, NO, SCROLL, FOR,EXECUTE, USING

No Issue 6337: MySQL doesn't support a variable ofREFCURSOR type (p. 373)

OPEN FOR Query

Clause AutomaticallyConverted

Details

OPEN, NO, SCROLL, FOR No Issue 6638: MySQL doesn't support the SCROLL option incursors (p. 373)

Opening a Bound Cursor

Clause AutomaticallyConverted

Details

OPEN bound_cursorvar[ ( [ argument_name := ]argument_value [, ...] ) ];

Yes

DeclarationsALIAS

Clause AutomaticallyConverted

Details

ALIAS FOR Yes

Collation of PL/pgSQL Variables

Clause AutomaticallyConverted

Details

COLLATE No Issue 6343: MySQL doesn't support the COLLATE option;automatic conversion cannot be performed (p. 383)

Copying Types

Clause AutomaticallyConverted

Details

%TYPE, %ROWTYPE Yes

Version 1.0354

Page 362: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Declaring Function Parameters

Clause AutomaticallyConverted

Details

Declaring functionparameters

Yes

Record Types

Clause AutomaticallyConverted

Details

Record types Yes Issue 6613: Unable to convert a function without OUTparameters returning a RECORD type (p. 377)

Variable Declaration

Clause AutomaticallyConverted

Details

Variable declaration Yes

Errors and Messages

CLOSE

Clause AutomaticallyConverted

Details

RAISE ; No Issue 6329: MySQL doesn't support the RAISEexception (p. 376)

RAISE [ level ]condition_name [ USINGoption = expression [, ... ] ];

No Issue 6329: MySQL doesn't support the RAISEexception (p. 376)

RAISE [ level ] 'format' [,expression [, ... ]] [ USINGoption = expression [, ... ] ];

Partial Issue 6332: MySQL doesn't support the RAISE statementto report messages (p. 380)

RAISE [ level ] SQLSTATE'sqlstate' [ USING option =expression [, ... ] ];

No Issue 6329: MySQL doesn't support the RAISEexception (p. 376)

RAISE [ level ] USINGoption = expression [, ... ];

Partial Issue 6332: MySQL doesn't support the RAISE statementto report messages (p. 380)

Version 1.0355

Page 363: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Obtaining the Result Status

Clause AutomaticallyConverted

Details

GET [ CURRENT ]DIAGNOSTICS variable =item [ , ... ];

No Issue 6665: MySQL doesn't support the GET [ CURRENT ]DIAGNOSTICS command (p. 375)

Options

Clause AutomaticallyConverted

Details

EXCEPTION WHENcondition [ OR condition ... ]THEN handler_statements[..] END;

Partial Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

MESSAGE, DETAIL, HINT,ERRCODE,

No Issue 6332: MySQL doesn't support the RAISE statementto report messages (p. 380)

Result Status Parameters

Clause AutomaticallyConverted

Details

COLUMN_NAME Yes

CONSTRAINT_NAME Yes

MESSAGE_TEXT No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

PG_DATATYPE_NAME No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

PG_EXCEPTION_CONTEXT No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

PG_EXCEPTION_DETAIL No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

PG_EXCEPTION_HINT No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

RETURNED_SQLSTATE Yes

SCHEMA_NAME No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

TABLE_NAME No Issue 6664: MySQL doesn't support the conditioninformation %s (p. 376)

Version 1.0356

Page 364: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePL/pgSQL

Loops

CONTINUE

Clause AutomaticallyConverted

Details

CONTINUE, WHEN Yes

EXIT

Clause AutomaticallyConverted

Details

EXIT, WHEN Yes

FOR (Integer Variant)

Clause AutomaticallyConverted

Details

FOR, IN, LOOP, END LOOP,REVERSE, BY

Yes

LOOP

Clause AutomaticallyConverted

Details

LOOP, END LOOP Yes

Looping Through Arrays

Clause AutomaticallyConverted

Details

FOREACH, IN, LOOP, ENDLOOP, SLICE, IN ARRAY

No Issue 6608: MySQL doesn't support arrays (p. 372)

Looping Through Query Results

Clause AutomaticallyConverted

Details

FOR, IN, LOOP, END LOOP,EXECUTE, USING

Yes

Version 1.0357

Page 365: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

WHILE

Clause AutomaticallyConverted

Details

WHILE, LOOP, END LOOP Yes

RETURN Statement

NULL; Command

Clause AutomaticallyConverted

Details

RETURN Yes

RETURN NEXT No Issue 6604: MySQL doesn't support RETURN NEXTclause (p. 377)

RETURN QUERY Yes

RETURN QUERY EXECUTE No Issue 6334: MySQL doesn't support the dynamic SQLstatement RETURN QUERY EXECUTE (p. 375)

PostgreSQL to MySQL Conversion Reference

AGGREGATE FUNCTION

Item Issue Resolution

bit_and, bit_or Issue 6680: Check working of function withnull values (p. 371)

Perform a manual conversion.

OVER/ORDER BY/WITHIN GROUP/FILTER

Issue 6678: MySQL doesn't support function%s with OVER/ORDER BY/WITHIN GROUP/FILTER clause (p. 371)

Perform a manual conversion.

ALTER

Item Issue Resolution

ALTER Issue 6676: Automatic conversion of theALTER statement isn't supported (p. 371)

Perform a manual conversion.

Version 1.0358

Page 366: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Arithmetic Operators

Item Issue Resolution

Arithmetic operatorsand string type

Issue 6681: Unable to perform an automatedmigration of arithmetic operations with stringand other types (p. 372)

Make cast operands to theexpected type.

ARRAY

Item Issue Resolution

ARRAY Issue 6608: MySQL doesn't supportarrays (p. 372)

Perform a manual conversion.

Buildin function

Item Issue Resolution

DateTime Issue 6677: MySQL does not support timezone (p. 372)

Perform a manual conversion.

BUILT-IN SQL FUNCTIONS

Item Issue Resolution

BUILT-IN SQLFUNCTIONS

Issue 6667: MySQL doesn't support the %sfunction (p. 372)

Create a user-definedfunction.

CREATE

Item Issue Resolution

CREATE Issue 6094: Unable to convert object due to%s not created (p. 373)

Review the %s object.

CURSOR

Item Issue Resolution

CURSOR with clauseNEXT, PRIOR, FIRST,LAST, ABSOLUTE,

Issue 6639: MySQL doesn't support thedirection clause (p. 373)

Perform a manual conversion.

Version 1.0359

Page 367: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

RELATIVE, FORWARDor BACKWARD

CURSOR with MOVEoption

Issue 6640: MySQL doesn't support the MOVEoption (p. 373)

Perform a manual conversion.

CURSOR with optionsSCROLL or NOSCROLL

Issue 6638: MySQL doesn't support theSCROLL option in cursors (p. 373)

Revise your code to eliminatecursors with the SCROLLoption.

REFCURSOR Issue 6337: MySQL doesn't support a variableof REFCURSOR type (p. 373)

Try using temporary tables.

Databases

Item Issue Resolution

ALTER DATABASE Issue 6101: MySQL doesn't support this clausein an ALTER DATABASE statement (p. 373)

Perform a manual conversion.

CREATE DATABASE,DROP DATABASE

Issue 6100: The database-to-databasemigration is not provided (p. 374)

Use the schema-to-databasemigration plan.

DATA TYPES

Item Issue Resolution

CAST( ... AS BIT | BITVARYING | VARBIT |DECIMAL | NUMERIC| REAL | FLOAT4 |DOUBLE PRECISION |FLOAT8 | CHARACTER| CHAR | CHARACTERVARYING | TEXT |TIME WITH TIMEZONE | TIME(p)WITH TIME ZONE| TIMESTAMPWITH TIME ZONE |TIMESTAMP(p) WITHTIME )

Issue 6673: MySQL doesn't support %s type inthe CAST function, and a loss of precision oraccuracy of data is possible (p. 374)

Check if the data violatesthese restrictions. If so,perform a manual migration.

CAST( ... AS BOX| POINT | LINE| LSEG | PATH |POLYGON | CIRCLE |TXID_SNAPSHOT)

Issue 6674: MySQL doesn't support %s type inthe CAST function (p. 374)

Check if the data violatesthese restrictions. If so,perform a manual migration.

Version 1.0360

Page 368: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

DELETE

Item Issue Resolution

RETURNING Issue 6069: MySQL doesn't support theDELETE statement with the RETURNINGoption (p. 375)

To perform this operation,divide the DELETE statementwith the RETURNING clauseinto a DELETE statementwith following INSERTstatements and use thesame key conditions in eachSELECT.

WHERE CURRENT OF Issue 6672: MySQL does not support deleteby cursor (p. 375)

Perform a manual conversion.

Domains

Item Issue Resolution

CREATE DOMAIN,ALTER DOMAIN,DROP DOMAIN

Issue 6050: MySQL doesn't supportdomains (p. 375)

Perform a manual conversion.

DYNAMIC SQL

Item Issue Resolution

RETURN QUERYEXECUTE

Issue 6334: MySQL doesn't support thedynamic SQL statement RETURN QUERYEXECUTE (p. 375)

Review and modify theexecution string.

Error Handling

Item Issue Resolution

GET [CURRENT]DIAGNOSTICS ... PG_CONTEXT

Issue 6665: MySQL doesn't supportthe GET [ CURRENT ] DIAGNOSTICScommand (p. 375)

Perform a manual conversion.

GET STACKEDDIAGNOSTICSPG_DATATYPE_NAME|TABLE_NAME|SCHEMA_NAME|PG_EXCEPTION_DETAIL|PG_EXCEPTION_HINT|PG_EXCEPTION_CONTEXT

Issue 6664: MySQL doesn't support thecondition information %s (p. 376)

Perform a manual conversion.

Version 1.0361

Page 369: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

RAISE [exception] Issue 6329: MySQL doesn't support the RAISEexception (p. 376)

Review the RAISE exceptionused, and if possible convertit to an exception usingthe SIGNAL or RESIGNALstatement.

EXCEPTIONS

Item Issue Resolution

EXCEPTIONS Issue 6342: MySQL doesn't support the %scondition name (p. 376)

Review the exception used,and if possible convertit to an exception usingthe SIGNAL or RESIGNALstatement.

FROM

Item Issue Resolution

FROM Issue 6603: Can't use function in fromclause (p. 376)

Perform a manual conversion.

QUERY Issue 6682: Can't use the table-value functionin the from clause (p. 376)

MySQL does not support thetable-value function.

FUNCTION

Item Issue Resolution

language Issue 6675: Automatic conversion function on%s language isn't supported (p. 377)

Perform a manual conversion.

RECORD Issue 6613: Unable to convert a functionwithout OUT parameters returning a RECORDtype (p. 377)

Perform a manual conversion.

Functions

Item Issue Resolution

RETURN NEXT Issue 6604: MySQL doesn't support RETURNNEXT clause (p. 377)

Perform a manual conversion.

VARIADIC Issue 6605: MySQL doesn't support VARIADICmode of an argument (p. 377)

Perform a manual conversion.

Version 1.0362

Page 370: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Indexes

Item Issue Resolution

CREATE INDEX: GiST,SPGiST, Gin methods

Issue 6091: MySQL doesn't support %s indexmethod (p. 377)

Perform a manual conversion.

Expression-basedindexes

Issue 6090: MySQL doesn't support indexeson expressions (p. 377)

Perform a manual conversion.

Ordered indexes Issue 6092: MySQL doesn't support explicitsort ordering in the index definition (p. 377)

If default (ascending)sort order in the indexmight cause performancedegradation, perform amanual conversion or rewritestatements supposed to useit.

Partial indexes Issue 6093: MySQL doesn't support partialindexes (p. 378)

If the full index might causeperformance degradation,perform a manual conversion.

INSERT

Item Issue Resolution

RETURNING Issue 6172: MySQL doesn't support theINSERT statement with the RETURNINGoption (p. 378)

To perform this operation,divide the INSERT statementwith the RETURNING clauseinto an INSERT statementwith following SELECTstatements and use thesame key conditions in eachSELECT. You can also use thelast value that was generatedby AUTO_INCREMENT columnin the key condition.

INTERSECT, EXCEPT

Item Issue Resolution

INTERSECT, EXCEPT Issue 6612: Query with INTERSECT/EXCEPTALL operator was transformed (p. 378)

Perform a manual conversion.

LABEL

Item Issue Resolution

LABEL Issue 6344: MySQL doesn't support labeledvariables (p. 379)

Try rewriting variableswithout using labels.

Version 1.0363

Page 371: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

LIMIT

Item Issue Resolution

LIMIT, OFFSET Issue 6611: LIMIT/OFFSET option wasomitted (p. 379)

Perform a manual conversion.

Materialized Views

Item Issue Resolution

CREATEMATERIALIZED VIEW

Issue 6130: MySQL doesn't supportmaterialized views; the source materializedview is converted to a table withtriggers (p. 380)

If this migration approachis unsuitable for any reason,perform a manual conversion.

Message from Stored Routines

Item Issue Resolution

RAISE DEBUG|LOG|INFO|NOTICE|WARNING

Issue 6332: MySQL doesn't support the RAISEstatement to report messages (p. 380)

Try using INSERT in thelog table. To do this,you must add code intoAWS_POSTGRESQL_EXT.RAISE_DEBUG,AWS_POSTGRESQL_EXT.RAISE_LOG,AWS_POSTGRESQL_EXT.RAISE_INFO,AWS_POSTGRESQL_EXT.RAISE_NOTICE,andAWS_POSTGRESQL_EXT.RAISE_WARNING.

Operators and Date Functions

Item Issue Resolution

Date/Time Operators Issue 6660: Unable to convert the %soperation with the interval value as one ormore arguments (p. 380)

Perform a manual conversion.

Date/Time Operators Issue 6661: The operation will return thenumber of days instead of the intervalvalue (p. 380)

Check if the resulting typemeets your requirements. Ifit doesn't, perform a manualconversion.

Date/Time Operators Issue 6662: Unsupported format for theinterval's value (p. 381)

Currently, the only supportedformat is a SQL ANSI formatfor interval literals. Perform amanual conversion.

Version 1.0364

Page 372: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

ORDER BY

Item Issue Resolution

NULLS FIRST|LAST Issue 6610: AI nulls first/last transformationwas performed (p. 381)

Perform a manual conversion.

USING Issue 6609: ORDER option was omittedbecause MySQL doesn't support key wordUSING in order by clause (p. 381)

Perform a manual conversion.

Parser Error

Item Issue Resolution

Parser Error Issue 6663: Unable to resolve theobject (p. 381)

Verify if object %s is presentin the database. If it isn't,check the object name or addthe object. If the object ispresent, transform the codemanually.

Patterns

Item Issue Resolution

SIMILAR TO Issue 6607: Could not convert patternto MySQL version; check patternmanually (p. 382)

Perform a manual conversion.

ROW/RECORD Type

Item Issue Resolution

ROW() Issue 6606: MySQL doesn't supportROW() function with any, some, or allpredicates (p. 382)

Perform a manual conversion.

ROW/RECORD Issue 6668: MySQL doesn't support ROW/RECORD type (p. 382)

Perform a manual conversion.

Select

Item Issue Resolution

DISTINCT ON Perform a manual conversion.

ONLY | * Perform a manual conversion.

Version 1.0365

Page 373: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

DateTime Issue 6679: Value don't fixed on starttransaction (p. 382)

Review your code, and ifneeded use a local variable

SELECT INTO

Item Issue Resolution

SELECT INTO Issue 6666: Transformation of not strict intoclause was performed (p. 383)

Perform a manual conversion.

SELECT, UPDATE, INSERT, DELETE

Item Issue Resolution

WITH Issue 6127: MySQL doesn't support the WITHRECURSIVE clause (p. 383)

Use a stored procedure toprepare data, or rewrite yourquery to avoid the WITHclause.

Sequences

Item Issue Resolution

CREATE SEQUENCE,ALTER SEQUENCE,DROP SEQUENCE

Issue 6060: MySQL doesn't supportsequences (p. 383)

Perform a manual conversion.

SQL Functions

Item Issue Resolution

COLLATION Issue 6343: MySQL doesn't support theCOLLATE option; automatic conversion cannotbe performed (p. 383)

You must use the COLLATIONsettings that were assignedwhen the database wascreated.

Table Columns

Item Issue Resolution

Application datatypes: CIDR, INET,MACADDR, UUID,

Issue 6006: MySQL doesn't support %stype (p. 384)

Check the target data typeand correct it if inappropriate.

Version 1.0366

Page 374: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

XML, JSON, JSONB,TSVECTOR, TSQUERY

ARRAY Issue 6008: MySQL doesn't support arraytypes for table column definition (p. 384)

Perform a manual conversion.

CIRCLE Issue 6011: MySQL doesn't support CIRCLEas a spatial type; the approximated results ofBUFFER function of POLYGON data type isused to perform a conversion (p. 384)

If the approximatedrepresentation is not suitablefor any reason, perform amanual conversion.

DECIMAL types Issue 6002: MySQL doesn't support %s withprecision more than 65 digits and scalemore than 30 digits; the loss of precision oraccuracy of data is possible (p. 384)

Check, if the data violatesthese restrictions. If so,perform a manual migration.

INTERVAL Issue 6005: MySQL doesn't support INTERVALtype (p. 384)

Perform a manual conversion.

LINE Issue 6010: MySQL doesn't support infinitelines; a LINESTRING with two points on theline is used for conversion (p. 384)

If the two-pointedrepresentation is not suitablefor any reason, perform amanual conversion.

Range types Issue 6009: MySQL doesn't support rangetypes (p. 384)

Perform a manual conversion.

Serial types:BIGSERIAL /SERIAL8 /SERIAL / SERIAL4 /SMALLSERIAL /SERIAL2

Issue 6001: Unable to provide full migrationfor auto-increment table columns (p. 384)

MySQL supports only oneauto-increment columnper table and it must bea key. Decide whether thecolumn should be an auto-incremented key or not, and ifit should, alter it manually.

TIME WITH TIMEZONE

Issue 6003: MySQL doesn't support time zoneinformation for %s type (p. 384)

Perform a manual conversion.

Timestamps withtime zone

Issue 6004: MySQL doesn't support time zoneinformation for %s type (p. 384)

Perform a manual conversion.If the time zone informationhas no value, you can chooseDATETIME(6) as a targetdata type. Otherwise, tryto convert the data intoTIMESTAMP(6), takinginto account the value oftime_zone server setting.

Table Columns, Function Arguments, Local Variables

Item Issue Resolution

Bit strings Issue 6012: Converted bit strings areright-padded by zero bits to full-bytelength (p. 385)

If the approximatedrepresentation is not suitable

Version 1.0367

Page 375: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

for any reason, perform amanual conversion.

Tables

Item Issue Resolution

Constraints Issue 6111: MySQL doesn't support deferrableconstraints (p. 385)

Check your schema andensure that non-deferrableconstraints can provide thenecessary level of integrity.Otherwise, perform a manualconversion on the constraints.

Constraints Issue 6112: MySQL doesn't support exclusionconstraints (p. 385)

Perform a manual conversionof the exclusion constraint toprovide the same level of dataintegrity.

Constraints Issue 6113: MySQL doesn't supportcheck constraints; the source constraint isconverted to a conditional error raising intriggers (p. 385)

If the approach with triggersis unsuitable, perform amanual conversion of thecheck constraint to providethe same level of dataintegrity.

Constraints Issue 6114: MySQL doesn't support SETDEFAULT as a referential action in foreignkeys (p. 385)

Check that SET NULL is anappropriate referential action,otherwise perform a manualconversion of the constraint.

Constraints Issue 6115: MySQL doesn't supportexpressions in DEFAULT constraints, sothey are converted to a BEFORE INSERTtrigger (p. 385)

Right now, explicitlyinserted NULL values arenot distinguished fromthose specially omitted touse default values. Also,updating values to DEFAULTis not supported at thepresent time. If you needthat functionality, perform amanual conversion.

Constraints Issue 6117: Unable to keep the NOT NULLconstraint for %s column while convertingits DEFAULT constraint based on anexpression (p. 386)

Due to the transformationof the DEFAULT constraintbased on an expression intothe part of a trigger, the NOTNULL constraint is convertedas another part of the sametrigger.

Tables withoutcolumns

Issue 6110: MySQL doesn't support tableswithout columns (p. 386)

Perform a manual conversion.

Version 1.0368

Page 376: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

Typed tables Issue 6107: MySQL doesn't support unloggedtables (p. 386)

If a regular table is unsuitable,perform a manual conversion.

Typed tables Issue 6108: MySQL doesn't support inheritedtables (p. 386)

Perform a manual conversion.

Typed tables Issue 6109: MySQL doesn't support typedtables (p. 387)

Perform a manual conversion.

Triggers

Item Issue Resolution

Conditional triggers Issue 6083: MySQL doesn't supportconditional triggers that fire on updates ofparticular column(s); a conversion will omitsuch a condition (p. 387)

If a resulting trigger mustfire for updates of only theparticular column(s), performa manual conversion.

Constraint triggers Issue 6082: MySQL doesn't support constrainttriggers (p. 387)

Perform a manual conversion.

Disabled triggers Issue 6087: MySQL doesn't support disablingtriggers (p. 387)

Perform a manual conversion.

DROP TRIGGER Issue 6086: Unable to automatically transformdropping a trigger (p. 387)

Perform a manual conversion.

Instead-of triggers Issue 6084: MySQL doesn't support INSTEADOF triggers (p. 387)

Perform a manual conversion.

Multiple triggers onthe same event

Issue 6085: MySQL doesn't support multipletriggers on the same event; triggers aremerged into one in alphabetical order bytrigger name (p. 387)

If a result of merging isunappropriate, perform amanual conversion.

One trigger onmultiple events

Issue 6081: MySQL doesn't support triggersfiring on multiple events; such a trigger isconverted to multiple single-event triggerswith the same body (p. 388)

If this migration approach isnot suitable for the trigger,perform a manual conversion.

Statement-leveltriggers

Issue 6080: MySQL doesn't supportstatement-level triggers (p. 389)

Perform a manual conversion.

Trigger functions Issue 6650: Unable to convert the statementwith TG_ARGV automatically (p. 389)

Perform a manual conversion.

Trigger functions Issue 6651: Unsupported using of RETURNstatement in the trigger converted to LEAVEstatement (p. 389)

Check flow of execution andperform a manual conversionif necessary.

Trigger functions Issue 6652: MySQL doesn't support OLDrecord in triggers on INSERT or NEW record intriggers on DELETE (p. 389)

Check, if NULL instead ofa field of the unsupportedrecord is appropriate.

Version 1.0369

Page 377: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Item Issue Resolution

Trigger on TRUNCATEevent

Issue 6088: MySQL doesn't supportTRUNCATE event for triggers (p. 389)

Perform a manual conversion.

UDT

Item Issue Resolution

CREATE TYPE, ALTERTYPE, DROP TYPE

Issue 6120: MySQL doesn't support user-defined data types (p. 389)

Perform a manual conversion.

Unknown

Item Issue Resolution

Unknown Issue 6013: This syntactic element conversionis not supported yet (p. 390)

Perform a manual conversion.

UPDATE

Item Issue Resolution

FROM Issue 6669: FROM clause wasrewritten (p. 390)

Perform a manual conversion.

RETURNING Issue 6066: MySQL doesn't support theUPDATE statement with the RETURNINGoption (p. 390)

To perform this operation,divide the UPDATE statementwith the RETURNING clauseinto an UPDATE statementwith following INSERTstatements that have thespecified key conditions in theSELECT part.

WHERE CURRENT OF Issue 6670: MySQL does not support updateby cursor (p. 390)

Perform a manual conversion.

User-Defined Aggregate Functions

Item Issue Resolution

CREATE AGGREGATE,ALTER AGREGGATE,DROP AGREGGATE

Issue 6140: Unable to convert user-definedaggregate statements (p. 391)

Perform a manual conversion.

Version 1.0370

Page 378: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

VIEW

Item Issue Resolution

QUERY Issue 6076: The SELECT statementcannot contain a subquery in the FROMclause (p. 391)

Rewrite the view querywithout a subquery, or createan auxiliary table for thesubquery.

Views

Item Issue Resolution

Default values for theview's columns

Issue 6072: MySQL doesn't support defaultvalues for the view's column (p. 391)

If the same functionality isnecessary, perform a manualconversion.

Row-level securedviews

Issue 6071: MySQL doesn't support row-levelsecurity (p. 391)

If the same functionality isnecessary, perform a manualconversion.

Temporary views Issue 6070: MySQL doesn't support temporaryviews or views on temporary tables (p. 391)

Perform a manual conversion.

Conversion Issues with AGGREGATE FUNCTION

Issue 6680: Check working of function with null values

Perform a manual conversion.

Issue 6678: MySQL doesn't support function %s with OVER/ORDER BY/WITHINGROUP/FILTER clause

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with ALTER

Issue 6676: Automatic conversion of the ALTER statement isn't supported

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)

Version 1.0371

Page 379: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Arithmetic Operators

Issue 6681: Unable to perform an automated migration of arithmetic operationswith string and other types

Arithmetic operations that use a string type as one of the operands can't be automatically converted.Modify the code to cast values as the intended type.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with ARRAY

Issue 6608: MySQL doesn't support arrays

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Buildin Function

Issue 6677: MySQL does not support time zone

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Built-In SQL Functions

Issue 6667: MySQL doesn't support the %s function

Create a user-defined function instead.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0372

Page 380: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Conversion Issues with CREATEIssue 6094: Unable to convert object due to %s not created

Review the %s object.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with CURSORIssue 6639: MySQL doesn't support the direction clause

MySQL doesn't support the following direction clauses when using FETCH with cursors:

• ABSOLUTE 2• BACKWARD• FIRST FROM• FORWARD• LAST FROM• PRIOR FROM• RELATIVE 2• RELATIVE 3

Perform a manual conversion in these cases.

Issue 6640: MySQL doesn't support the MOVE option

Revise your code to eliminate cursors with the MOVE option.

Issue 6638: MySQL doesn't support the SCROLL option in cursors

Revise your code to eliminate cursors with the SCROLL option.

Issue 6337: MySQL doesn't support a variable of REFCURSOR type

Try revising the code to use temporary tables instead.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DatabasesIssue 6101: MySQL doesn't support this clause in an ALTER DATABASEstatement

Perform a manual conversion.

Version 1.0373

Page 381: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Issue 6100: The database-to-database migration is not provided

Use the schema-to-database migration plan instead.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with DATA TYPESIssue 6673: MySQL doesn't support %s type in the CAST function, and a loss ofprecision or accuracy of data is possible

Statements that cast values to any of the following data types are converted to statements that castvalues to CHAR:

• BYTEA• CIDR• JSON• int4range

For example, take the following PostgreSQL statements.

select '1'::BYTEAselect CAST('1' AS BYTEA)

These are both converted to the following MySQL statement.

select CAST('1' AS CHAR)

Review the converted code and revise it if necessary.

Issue 6674: MySQL doesn't support %s type in the CAST function

Statements that cast a value to the TXID_SNAPSHOT data type are converted to statements that cast avalue to CHAR. For example, take the following PostgreSQL statements.

select '2628:2628:'::TXID_SNAPSHOTselect CAST('2628:2628:' AS TXID_SNAPSHOT)

These are both converted to the following MySQL statement:

select CAST('2628:2628:' AS CHAR)

Review the converted code and revise it if necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0374

Page 382: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Conversion Issues with DELETE

Issue 6069: MySQL doesn't support the DELETE statement with the RETURNINGoption

To convert this operation, change the DELETE statement with the RETURNING clause into a DELETEstatement with following INSERT statements, and use the same key conditions in each INSERT.

Issue 6672: MySQL does not support delete by cursor

MySQL doesn't support using a DELETE statement within a cursor. Perform a manual conversion in thiscase.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Domains

Issue 6050: MySQL doesn't support domains

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Dynamic SQL

Issue 6334: MySQL doesn't support the dynamic SQL statement RETURN QUERYEXECUTE

Review and modify the execution string.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Error Handling

Issue 6665: MySQL doesn't support the GET [ CURRENT ] DIAGNOSTICScommand

Perform a manual conversion.

Version 1.0375

Page 383: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Issue 6664: MySQL doesn't support the condition information %s

Some of the condition information items that are used with the GET STACKED DIAGNOSTICS statementin PostgreSQL are not supported by MySQL. These include the following:

• PG_DATATYPE_NAME• TABLE_NAME• SCHEMA_NAME• PG_EXCEPTION_DETAIL• PG_EXCEPTION_HINT• PG_EXCEPTION_CONTEXT

Manually convert the code wherever you use these condition information items.

Issue 6329: MySQL doesn't support the RAISE exception

Review the RAISE exception used, and if possible convert it to an exception using the SIGNAL orRESIGNAL statement.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Exceptions

Issue 6342: MySQL doesn't support the %s condition name

Review the exception used, and if possible convert it to an exception using the SIGNAL or RESIGNALstatement.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with FROM

Issue 6603: Can't use function in from clause

Code that selects from a function, for example SELECT * FROM function_name;, isn't converted.Perform a manual conversion in this case.

Issue 6682: Can't use the table-value function in the from clause

MySQL does not support the table-value function. Perform a manual conversion in this case.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

Version 1.0376

Page 384: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with FUNCTION

Issue 6675: Automatic conversion function on %s language isn't supported

Perform a manual conversion.

Issue 6613: Unable to convert a function without OUT parameters returning aRECORD type

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Functions

Issue 6604: MySQL doesn't support RETURN NEXT clause

Perform a manual conversion.

Issue 6605: MySQL doesn't support VARIADIC mode of an argument

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Indexes

Issue 6091: MySQL doesn't support %s index method

The InnoDB engine in MySQL doesn't support HASH and ON table_name indexes. Perform a manualconversion in these cases.

Issue 6090: MySQL doesn't support indexes on expressions

Perform a manual conversion.

Issue 6092: MySQL doesn't support explicit sort ordering in the index definition

Indexes that use explicit sort ordering are converted to use the default (ascending) sort order instead. Ifthis conversion causes performance degradation, revise the converted code as necessary.

Version 1.0377

Page 385: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Issue 6093: MySQL doesn't support partial indexes

Partial indexes are converted to full indexes instead. For example, take the following PostgreSQLstatement.

CREATE INDEX i_indexed_partial ON test_pg_mysql.indexed_partial USING btree ( n ) WHERE ( n < 100 );

The preceding statement is converted to the following MySQL statement:

CREATE INDEX i_indexed_partial USING BTREE ON test_pg_mysql.indexed_partial ( n );

If this conversion causes performance degradation, revise the converted code as necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with INSERT

Issue 6172: MySQL doesn't support the INSERT statement with the RETURNINGoption

To convert this operation, change the INSERT statement with the RETURNING clause into an INSERTstatement with following SELECT statements, and use the same key conditions in each SELECT. You canalso use the last value that was generated by any AUTO_INCREMENT column in the key condition.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with INTERSECT, EXCEPT

Issue 6612: Query with INTERSECT/EXCEPT ALL operator was transformed

The EXCEPT ALL and INTERSECT ALL options of the SELECT statement can't be directly converted, sothey are converted to other language options that should produce the same results. For example, takethe following PostgreSQL statements.

SELECT * FROM customersexcept allSELECT * FROM customers;

SELECT * FROM customersintersect allSELECT * FROM customers;

Version 1.0378

Page 386: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

The preceding statements are converted to the following MySQL statements.

SELECT customers.id, customers.name, customers.surname, customers.postcode FROM customerswhere (customers.id, customers.name, customers.surname, customers.postcode) not in (SELECT customers.id, customers.name, customers.surname, customers.postcode FROM customers);

SELECT customers.id, customers.name, customers.surname, customers.postcode FROM customers inner join (SELECT customers.id, customers.name, customers.surname, customers.postcode FROM customers) nn on (customers.id=nn.id or (customers.id is null and nn.id is null)) and customers.name=nn.name and (customers.surname=nn.surname or (customers.surname is null and nn.surname is null)) and (customers.postcode=nn.postcode or (customers.postcode is null and nn.postcode is null));

Review the converted code, and revise it if necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with LABEL

Issue 6344: MySQL doesn't support labeled variables

Try rewriting variables without using labels.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with LIMIT

Issue 6611: LIMIT/OFFSET option was omitted

MySQL doesn't support use of the LIMIT or OFFSET options with the SELECT statement. These optionsare dropped during conversion. For example, take the following PostgreSQL statement.

SELECT * FROM customers c offset 3;

This statement is converted to the following MySQL statement:

SELECT * FROM customers c;

Review the converted code, and revise it as necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

Version 1.0379

Page 387: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Materialized Views

Issue 6130: MySQL doesn't support materialized views; the source materializedview is converted to a table with triggers

Review the converted code to make sure it meets your needs, and revise it if necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Messages from Stored Routines

Issue 6332: MySQL doesn't support the RAISE statement to report messages

Try using INSERT to write a message to a log table instead. To do this, you must add code in one ofthe following tables in the AWS_POSTGRESQL_EXT schema (the temporary work schema used forPostgreSQL):

• RAISE_DEBUG• RAISE_LOG• RAISE_INFO• RAISE_NOTICE• RAISE_WARNING

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Operators and Date Functions

Issue 6660: Unable to convert the %s operation with the interval value as one ormore arguments

Some operations with arguments that use an interval data type can't be converted, for example SELECTINTERVAL '1-1' YEAR TO MONTH * 2;. Perform a manual conversion in this case.

Issue 6661: The operation will return the number of days instead of the intervalvalue

After conversion, some calculations that use date or time data types return the number of daysrather than an interval value as they did previously, for example SELECT TIMESTAMP '2012-01-01

Version 1.0380

Page 388: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

09:30:15.01' - DATE '2010-01-01';. Check to see if the new return type meets yourrequirements, and revise the code if necessary.

Issue 6662: Unsupported format for the interval's value

Currently, the only supported format for a literal value assigned to an interval data type is SQL ANSI.Perform a manual conversion in the case of an unsupported format.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with ORDER BY

Issue 6610: AI nulls first/last transformation was performed

MySQL doesn't support the NULLS FIRST or NULLS LAST options with the SELECT statement. Instancesof this language are converted to use the isnull() function instead. For example, take the followingPostgreSQL statements.

SELECT * FROM customers c order by id nulls last; SELECT * FROM customers c order by id desc nulls first;

These statements are converted to the following MySQL statements.

SELECT * FROM customers c order by isnull(id), id; SELECT * FROM customers c order by isnull(id) desc, id desc;

Review the converted code, and revise it if necessary.

Issue 6609: ORDER option was omitted because MySQL doesn't support keyword USING in order by clause

MySQL doesn't support the ORDER BY field_name USING clause, for example SELECT * FROMcustomers c order by id using >;. During conversion, the ORDER BY clause is dropped. Reviewthis code and revise it if necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Parser Error

Issue 6663: Unable to resolve the object

Verify if object %s is present in the database. If it isn't, check the object name or add the object. If theobject is present, transform the code manually.

Version 1.0381

Page 389: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Patterns

Issue 6607: Could not convert pattern to MySQL version; check patternmanually

MySQL doesn't support some pattern matching syntax, for example SELECT * FROM customerswhere name similar to 'name';. Perform a manual conversion in this case.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with ROW, RECORD type

Issue 6606: MySQL doesn't support ROW() function with any, some, or allpredicates

MySQL doesn't support the ROW() function with the any, some, or all predicates, for example SELECT *FROM customers c where ROW(c.id, c.postcode) <= all (select id, order_sum fromorders where id = c.id);. Perform a manual conversion instead.

Issue 6668: MySQL doesn't support ROW/RECORD type

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECT

Issue 6679: Value don't fixed on start transaction

Review your code, and revise it to use a local variable if necessary.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

• AWS Schema Conversion Tool Reference (p. 149)

Version 1.0382

Page 390: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECT INTO

Issue 6666: Transformation of not strict into clause was performed

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SELECT, UPDATE, INSERT, DELETE

Issue 6127: MySQL doesn't support the WITH RECURSIVE clause

Use a stored procedure to prepare data, or rewrite your query to avoid the WITH RECURSIVE clause.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Sequences

Issue 6060: MySQL doesn't support sequences

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with SQL Functions

Issue 6343: MySQL doesn't support the COLLATE option; automatic conversioncannot be performed

You must use the COLLATION settings that were assigned when the database was created.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Version 1.0383

Page 391: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Conversion Issues with Table ColumnsIssue 6006: MySQL doesn't support %s type

Check the target data type and correct it if necessary.

Issue 6008: MySQL doesn't support array types for table column definition

MySQL doesn't support using an array data type for either a table column or a function variable, so thiscode isn't automatically converted from PostgreSQL. Perform a manual conversion instead.

Issue 6011: MySQL doesn't support CIRCLE as a spatial type; the approximatedresults of BUFFER function of POLYGON data type is used to perform aconversion

Check the converted code, and revise it if the approximated representation doesn't meet your needs.

Issue 6002: MySQL doesn't support %s with precision more than 65 digits andscale more than 30 digits; the loss of precision or accuracy of data is possible

Check to see if you are converting columns whose numeric data types violate these restrictions. If so,perform a manual migration instead.

Issue 6005: MySQL doesn't support INTERVAL type

Perform a manual conversion of any code that uses this data type.

Issue 6010: MySQL doesn't support infinite lines; a LINESTRING with two pointson the line is used for conversion

Any instance of the LINE data type is converted to a LINESTRING data type. If the two-pointedrepresentation is not suitable for your purposes, revise this code.

Issue 6009: MySQL doesn't support range types

MySQL doesn't support range data types like LONGTEXT or VARCHAR(length). Manually convert codethat uses these data types instead.

Issue 6001: Unable to provide full migration for auto-increment table columns

The PostgreSQL auto-increment data types SMALLSERIAL, SERIAL and BIGSERIAL are converted to theMySQL SMALLINT, INT, and BIGINT data types, respectively. If you want to enable auto-incrementing,MySQL supports only one auto-increment column per table and it must be a key. Choose an appropriatecolumn and manually update it to meet these requirements.

Issue 6003: MySQL doesn't support time zone information for %s type

Perform a manual conversion.

Issue 6004: MySQL doesn't support time zone information for %s type

Perform a manual conversion instead. If the time zone information isn't important, you can chooseDATETIME(6) as a target data type. Otherwise, try to convert the data into TIMESTAMP(6), taking intoaccount the value of time_zone server setting.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)

Version 1.0384

Page 392: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Table Columns, Function Arguments, andLocal Variables

Issue 6012: Converted bit strings are right-padded by zero bits to full-bytelength

Review the converted code, and revise it if the approximated representation is not suitable for yourneeds.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Tables

Issue 6111: MySQL doesn't support deferrable constraints

Check your schema and ensure that nondeferrable constraints can provide the necessary level ofintegrity. Otherwise, perform a manual conversion on the constraints.

Issue 6112: MySQL doesn't support exclusion constraints

Perform a manual conversion of the exclusion constraint to provide the same level of data integrity.

Issue 6113: MySQL doesn't support check constraints; the source constraint isconverted to a conditional error raising in triggers

In MySQL, check constraints are parsed but ignored. Instead, PostgreSQL check constraints are convertedto triggers that fire before INSERT and UPDATE events. Review this code to see if it meets your needs,and if necessary perform a manual conversion of the check constraint to provide the expected level ofdata integrity.

Issue 6114: MySQL doesn't support SET DEFAULT as a referential action inforeign keys

MySQL doesn't support using SET DEFAULT when creating a foreign key. Any SET DEFAULT statementsare converted to SET NULL statements. Review this code and modify it if necessary.

Issue 6115: MySQL doesn't support expressions in DEFAULT constraints, so theyare converted to a BEFORE INSERT trigger

MySQL doesn’t support using expressions as default values when creating a table, so during conversion aBEFORE INSERT trigger is created to insert the default values instead. CHARACTER VARYING columns areconverted into TEXT or LONGTEXT columns (depending on the length of the source column), which can'thave default values in MySQL. Therefore, any default values in such columns are treated as expressionsand are also included in the BEFORE INSERT trigger.

For example, take the following PostgreSQL code.

Version 1.0385

Page 393: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

CREATE TABLE IF NOT EXISTS test_pg_mysql.constraint_default_expression ( n numeric( 10, 0 ) DEFAULT 12345+98765 , d date DEFAULT now() , d2 date DEFAULT '2016-01-06'::date , s character varying (10) DEFAULT 'A string' );

This code is converted into the following MySQL code.

CREATE TRIGGER constraint_default_expression_bir BEFORE INSERT ON test_pg_mysql.constraint_default_expression FOR EACH ROW BEGIN default_values_expr: BEGIN -- default value for n column IF NEW.n IS NULL THEN SET NEW.n = 123456 + 98765; END IF; -- default value for d column IF NEW.d IS NULL THEN SET NEW.d = now( 6 ); END IF; -- default value for d2 column IF NEW.d2 IS NULL THEN SET NEW.d2 = CAST( '2016-01-06' AS DATE ); END IF; -- default value for s column IF NEW.s IS NULL THEN SET NEW.s = 'A string'; END IF; END default_values_expr; END;

Issue 6117: Unable to keep the NOT NULL constraint for %s column whileconverting its DEFAULT constraint based on an expression

MySQL doesn’t support using expressions as default values when creating a table, so during conversiona BEFORE INSERT trigger is created to insert the default values instead. For more details, see Issue 6115:MySQL doesn't support expressions in DEFAULT constraints, so they are converted to a BEFORE INSERTtrigger (p. 385).

If a column that has a default value and so is converted in this way also has a NOT NULL constraint,the NOT NULL constraint is converted as part of the same trigger rather than remaining as part of theCREATE TABLE statement.

Issue 6110: MySQL doesn't support tables without columns

MySQL doesn't support using the CREATE TABLE statement without specifying at least one column.This usage is something you might do when creating a table based on a user-defined type, for example.Perform a manual conversion instead.

Issue 6107: MySQL doesn't support unlogged tables

Unlogged tables in PostgreSQL are converted to regular tables in MySQL. Review this code to see if itmeets your needs, and revise it if necessary.

Issue 6108: MySQL doesn't support inherited tables

Perform a manual conversion.

Version 1.0386

Page 394: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Issue 6109: MySQL doesn't support typed tables

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Triggers

Issue 6083: MySQL doesn't support conditional triggers that fire on updates ofparticular column(s); a conversion will omit such a condition

MySQL doesn't support conditional triggers that rely on the update of a specific column. For example,take the following statement in PostgreSQL.

CREATE TRIGGER triggering_cond_bur_of BEFORE UPDATE OF n

This statement is converted to the following statement in MySQL:

CREATE TRIGGER triggering_cond_bur BEFORE UPDATE

If you require this functionality, perform a manual conversion instead.

Issue 6082: MySQL doesn't support constraint triggers

MySQL doesn't support constraint triggers, so any CREATE CONSTRAINT TRIGGER statements areconverted to CREATE TRIGGER statements. Review this code and modify it if necessary.

Issue 6087: MySQL doesn't support disabling triggers

PostgreSQL allows users to disable table triggers so that they aren't fired, and then re-enable them at alater time. MySQL doesn’t support this, so you must perform a manual conversion of this code.

Issue 6086: Unable to automatically transform dropping a trigger

DROP TRIGGER statements aren't automatically converted. Perform a manual conversion instead.

Issue 6084: MySQL doesn't support INSTEAD OF triggers

Perform a manual conversion.

Issue 6085: MySQL doesn't support multiple triggers on the same event; triggersare merged into one in alphabetical order by trigger name

Multiple triggers on one event are automatically merged into a single trigger, with their functionalityinserted into the new trigger in alphabetic order by trigger name. Review this trigger code afterconversion and revise it if necessary.

For example, take the following PostgreSQL code.

Version 1.0387

Page 395: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

CREATE TRIGGER triggering_multiple_inc BEFORE INSERT ON test_pg_mysql.triggering_multiple FOR EACH ROW EXECUTE PROCEDURE test_pg_mysql.fu_triggering_simple_inc();

CREATE TRIGGER triggering_multiple_inc_2 BEFORE INSERT ON test_pg_mysql.triggering_multiple FOR EACH ROW EXECUTE PROCEDURE test_pg_mysql.fu_triggering_simple_inc();

This code is converted into the following MySQL code.

CREATE TRIGGER triggering_multiple_bir BEFORE INSERT ON test_pg_mysql.triggering_multiple FOR EACH ROW BEGIN tr1: BEGIN -- triggering_multiple_inc SET NEW.n = NEW.n + 1; END tr1; tr2: BEGIN -- triggering_multiple_inc_2 SET NEW.n = NEW.n + 1; END tr2; END;

Issue 6081: MySQL doesn't support triggers firing on multiple events; such atrigger is converted to multiple single-event triggers with the same body

PostgreSQL supports specifying multiple events with the CREATE TRIGGER statement, for exampleCREATE TRIGGER trigger_name BEFORE INSERT OR UPDATE. However, MySQL only supports specifyingone event, for example CREATE TRIGGER trigger_name BEFORE UPDATE. PostgreSQL triggers thatspecify multiple events are converted to several triggers with the same trigger body, one for each eventspecified. Review this trigger code after conversion and revise it if necessary.

For example, take the following PostgreSQL code.

CREATE TRIGGER triggering_simple_inc BEFORE INSERT OR UPDATE ON test_pg_mysql.triggering_simple FOR EACH ROW EXECUTE PROCEDURE test_pg_mysql.fu_triggering_simple_inc();

This code is converted into the following MySQL code:

CREATE TRIGGER triggering_simple_bir BEFORE INSERT ON test_pg_mysql.triggering_simple FOR EACH ROW BEGIN tr1: BEGIN SET NEW.n = NEW.n + 1; END tr1; END;

Version 1.0388

Page 396: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

CREATE TRIGGER triggering_simple_bur BEFORE UPDATE ON test_pg_mysql.triggering_simple FOR EACH ROW BEGIN tr1: BEGIN SET NEW.n = NEW.n + 1; END tr1; END;

Issue 6080: MySQL doesn't support statement-level triggers

MySQL doesn't support the FOR EACH STATEMENT clause for CREATE TRIGGER statements. Perform amanual conversion of this code.

Issue 6650: Unable to convert the statement with TG_ARGV automatically

CREATE TRIGGER statements that use TG_ARGV to work with trigger arguments can't be converted.Perform a manual conversion instead.

Issue 6651: Unsupported using of RETURN statement in the trigger converted toLEAVE statement

Check flow of execution and perform a manual conversion if necessary.

Issue 6652: MySQL doesn't support OLD record in triggers on INSERT or NEWrecord in triggers on DELETE

MySQL doesn’t support the NEW variable in triggers that use DELETE, and it also doesn't support theOLD variable in triggers that use INSERT. In these cases, the variable reference is replaced with NULL Forexample, NEW.n > 0 is replaced by NULL > 0. Review this code to see if using NULL instead of a field ofthe unsupported record is appropriate, and revise as necessary.

Issue 6088: MySQL doesn't support TRUNCATE event for triggers

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with User-Defined Types

Issue 6120: MySQL doesn't support user-defined data types

Perform a manual conversion of any code involving user-defined types. This conversion should includeany references to user-defined types, and also any instances of the CREATE TYPE, ALTER TYPE, or DROPTYPE statements.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)

Version 1.0389

Page 397: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Unknown

Issue 6013: This syntactic element conversion is not supported yet

Perform a manual conversion.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with UPDATE

Issue 6669: FROM clause was rewritten

The FROM clause in UPDATE statements is rewritten during PostgreSQL to MySQL conversion. Forexample, take the following PostgreSQL statement.

update test_pg_mysql.customers c set id = c.id +1, name = o.name, postcode = o.order_sum from test_pg_mysql.orders o where o.id = c.id;

This statement is converted to the following MySQL statement.

update customers c set id = c.id +1, name = (select name from orders where id = c.id), postcode = (select order_sum from orders where id = c.id) where c.id in (select id from orders);

Review this code to make sure it produces the results that you expect.

Issue 6066: MySQL doesn't support the UPDATE statement with the RETURNINGoption

To perform this operation, convert the UPDATE statement with the RETURNING clause into an UPDATEstatement with following INSERT statements that have the specified key conditions in the SELECT clause.

Issue 6670: MySQL does not support update by cursor

MySQL doesn't support updating a table from within a cursor, as shown in the following example.

DECLARE c1 CURSOR FOR SELECT id FROM test_pg_mysql.customers; val numeric(14,0); BEGIN OPEN c1; fetch c1 into val; update test_pg_mysql.customers set name = 'nfhr' where current of c1; CLOSE c1; END

Perform a manual conversion instead.

Version 1.0390

Page 398: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuidePostgreSQL to MySQL Conversion Reference

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with User-Defined Aggregate Functions

Issue 6140: Unable to convert user-defined aggregate statements

Perform a manual conversion of any user-defined aggregate functions.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with VIEW

Issue 6076: The SELECT statement cannot contain a subquery in the FROMclause

Either rewrite the query that the view is based on so that it doesn't use a subquery, or create an auxiliarytable for the subquery.

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Conversion Issues with Views

Issue 6072: MySQL doesn't support default values for the view's column

MySQL doesn't support specifying a default value when creating or altering a view, as shown in thefollowing example.

ALTER VIEW test_pg_mysql.v_default_values ALTER n SET DEFAULT 10;

If you need this functionality, perform a manual conversion instead.

Issue 6071: MySQL doesn't support row-level security

If the same functionality is necessary, perform a manual conversion instead.

Issue 6070: MySQL doesn't support temporary views or views on temporarytables

Perform a manual conversion instead.

Version 1.0391

Page 399: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelated Topics

Related Topics

• PostgreSQL to MySQL Conversion Reference (p. 358)• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Related Topics• AWS Schema Conversion Tool Reference (p. 149)• What Is the AWS Schema Conversion Tool? (p. 1)

Related Topics• What Is the AWS Schema Conversion Tool? (p. 1)• Getting Started with the AWS Schema Conversion Tool (p. 25)• Installing, Verifying, and Updating the AWS Schema Conversion Tool (p. 4)

Version 1.0392

Page 400: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

Release Notes for the AWS SchemaConversion Tool

Release Notes for the AWS Schema ConversionTool Build 613

The following table shows the features and bug fixes for the AWS Schema Conversion Tool (AWS SCT)version 1.0.613.

New feature orenhancement

Description

DB2 LUW support Added support for migrating a DB2 database as a source. For moreinformation, see Converting Database Schemas Using the AWS SchemaConversion Tool (p. 72).

Oracle to PostgreSQLConversion. Added SQL*Plusfiles conversion

You can now convert SQL*Plus files.

Snowball Tab added forOLTP Data Migration

A new Snowball tab was added for OLTP Data Migration that showsyou the current status of a Snowball device for particular project. Formore information, see Using Data Extraction Agents (p. 116).

Oracle To PostgreSQLConversion. Convert Oraclespatial code to PostGIS

Oracle To PostgreSQL Conversion. Oracle spatial code converts toPostGIS.

Schema Compare AddedOracle 10 Support

You can now run Schema Compare with Oracle 10. For moreinformation, see Comparing Database Schemas (p. 88)

Oracle to PostgreSQLConversion. Implicittypecasting of Oracle dbhandled in PostgresSQL

While converting from Oracle to PostgreSQL, SCT add datatypecasting.

SQL Server, WindowsAuthentication

SQL Server. Windows Authentication connection method supportadded.

SQL Server To PostgreSQLConversion

Added CITEXT type support. Now you can choose it with data typemappint.

Oracle to PostgreSQLConversion

Additional improvements of Dynamic SQL Conversion for EXECUTEIMMEDIATE and DBMS_SQL and Cursors.

Oracle to PostgreSQLConversion

Added support of SELECT INTO BULK COLLECT Conversion for Oracleto PostgreSQL.

Oracle to PostgreSQLConversion

Now it is possible to convert an Associative array from Oracle toPostgreSQL.

Version 1.0393

Page 401: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

New feature orenhancement

Description

Type Mapping - Custom typemapping improvements

Added ability to select source data types based on length andprecision.

AWS Profile Settings Added ability to select default profile in AWS Profile Settings.

Greenplum to RedshiftConversion

BuiltIn SQL Functions to Redshift Scalar SQL UDF conversion added.

Issues Resolved

Date reported Description

post version 612 • Oracle to Redshift Conversion. CAST to CHAR working, CAST toCHARACTER does not work.

• Comments on tables aren'tt created in the DDL of the source OracleDB.

• Type mismatch isn't flagged in assessment report.• Oracle to PostgreSQL Conversion. Wrongly converts fullwidth

uppercase alphabet table name to fullwidth lowercase alphabettable name.

• Global Settings Window cannot be closed by clicking the OK button.• Oracle to Redshift. to_date and subtraction re-write gives different

result.• Some UI bugs were fixed.

Version 1.0394

Page 402: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

Release Notes for the AWS Schema ConversionTool Build 612

The following table shows the features and bug fixes for the AWS Schema Conversion Tool (AWS SCT)version 1.0.612.

New feature orenhancement

Description

Custom Data Type Mapping You can now set up mapping rules to change the data type for storageobjects. You define what data type should be changed in MappingRules tab.

What's New option added A new "What's New" option under the Help menu shows you all majorfeatures that were added for this release.

Schema Compare AddedOracle 10 Support

You can now run Schema Compare with Oracle 10.

Oracle to PostgreSQLConversion.

The migration from Oracle to PostgreSQL now supports

• global variables• associative arrays• formatting strings for TO_NUMBER function• converting Dynamic SQL with DMS_SQL package• converting multiple nested subprograms with global variables

Added support for loadingsome PostgreSQL functionattributes and domainconstraints

Added support for loading PostgreSQL IMMUTABLE, STABLE, andVOLATILE function attributes.

Added support for loading PostgreSQL domain constraints.

Issues Resolved

Date reported Description

post version 611 • APPLY is recognized as a keyword for Oracle.• Fixed error when running Schema Compare for an Oracle-to-Oracle

project.• General improvements based on feedback and bug fixes for

Microsoft SQL Server to Microsoft SQL Server migrations.• DROP FOREIGN KEY CONSTRAINTS missing when using Save as SQL

for Oracle to PostgreSQL migrations.• TO_DATE & TRUNC Function conversion bug fixes for Oracle to

Redshift migrations.• General improvements based on feedback and bug fixes for

PostgreSQL to PostgreSQL migrations.• General improvements based on feedback and bug fixes for MySQL

to MySQL migrations.• General improvements based on feedback and bug fixes for Oracle to

Oracle migrations.• Some UI bugs were fixed.

Version 1.0395

Page 403: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

Date reported Description

• Rewrite NUMTOINTERVL() to Redshift interval literal for Oracle toRedshift migrations.

• Performance optimization.

Version 1.0396

Page 404: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

Release Notes for the AWS Schema ConversionTool Build 611

The following table shows the features and bug fixes for the AWS Schema Conversion Tool (AWS SCT)version 1.0.611.

New feature orenhancement

Description

Schema Compare for MySQLto MySQL

Added the ability to compare MySQL to MySQL databases. For moreinformation, see Comparing Database Schemas.

Oracle to PostgreSQLdynamic statementsconversion

Added first version of DBMS_SQL package conversion support.For more information, see Converting Dynamic SQL for Oracle toPostgreSQL Migrations.

Oracle to PostgreSQL GOTOstatement conversion

PostgreSQL doesn't support the GOTO operator in functionality suchas Oracle, but it can be converted using BEGIN/END or LOOP/END loopstatements.

Open log file from errormessage

When you encounter an error, you can click on it and have it take youto the associated log file rather than having to search around on thesource system for it.

Added Estimated Complexityfield to PDF export ofAssessment Report

The Estimated Complexity field is exported in the .pdf version of theAssessment report, but it is not included in the .csv version. For moreinformation, see Creating and Using the Assessment Report in theAWS Schema Conversion Tool.

OLAP Data Migration. Addedoption to not delete files onS3 after Redshift copy

After a migration to Amazon Redshift, the agent can either keep ordelete the uploaded files. For more information, see OptimizingAmazon Redshift by Using the AWS Schema Conversion Tool .

OLAP Data Migration. AddedLOB migration support forGreenplum, Vertica, Netezza,and Microsoft SQL Server.

Added ability to migrate LOB columns. For more information, see Migrating LOBs to Amazon Redshift.

Added ability to see relatedobjects for conversionssuch as Oracle to MySQLor Aurora for MySQL andMicrosoft SQL to MySQL orAurora for MySQL.

When AWS SCT transforms source object into multiple target objects,you can now see a full list of related objects that were created. Formore information, see Finding Related Transformed Objects .

OLAP Data Extractors. Addedpossibility to recover agentafter reinstall

During installation or configuration, you can recover the agent if portor location changed. For more information, see Hiding and RecoveringInformation for an AWS SCT Agent .

Ability to hide schemas intree view

You can decide what objects and information in your schemas you wantto view in tree view. For more information, see Hiding Schemas in theAWS SCT Tree View .

Supports virtual partitioning You can now manage large non-partitioned tables by creating subtasksthat create virtual partitions of the table data using filtering rules. For

Version 1.0397

Page 405: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User GuideRelease Notes

New feature orenhancement

Description

more information, see Using Virtual Partitioning with AWS SchemaConversion Tool .

Issues Resolved

Date reported Description

post version 608 • OLTP Data Migration. Added the ability to refresh Agent/Task Logs.• Oracle to Oracle schema compare. Fixed the comparison of public

synonyms.• Fixed the ability to hide system schema from Tree View.• Added a Tooltip for the tree filter. Allows user to upload .csv files

with objects that needs to be filtered.• Fixed conversion of Oracle NUMTOINTERVAL to Redshift interval

literal where applicable.• Oracle to Redshift Conversion. Fixed the migration of a Redshift

SUBSTR with a second parameter constant (start of substr) to be asimple expression rather than a CASE statement.

• OLAP Data Migration. Added description for virtual partitioning.

Version 1.0398

Page 406: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Document HistoryThe following table describes the important changes to the documentation since the last release of theAWS Schema Conversion Tool (AWS SCT) User Guide.

Version Change Description Date Changed

1.0.612 Updates andfixes

See the Release Notes for the AWS SchemaConversion Tool (p. 393) section for moreinformation.

February 22,2018

1.0.611 Updates andfixes

See the Release Notes for the AWS SchemaConversion Tool (p. 393) section for moreinformation.

January 23,2018

1.0.608 FIPS endpointsupport forAmazon S3

You can now request AWS SCT to connect toAmazon S3 and Amazon Redshift by using FIPSendpoints to comply with Federal InformationProcessing Standard security requirements.For more information, see Storing AWSCredentials (p. 22) and Using Data ExtractionAgents (p. 116).

November 17,2017

1.0.607 FIPS endpointsupport forAmazon S3

You can now request AWS SCT to connect toAmazon S3 and Amazon Redshift by using FIPSendpoints to comply with Federal InformationProcessing Standard security requirements.For more information, see Storing AWSCredentials (p. 22) and Using Data ExtractionAgents (p. 116).

October 30,2017

1.0.607 Data extractiontasks can ignoreLOBs

When you create data extraction tasks, you cannow choose to ignore large objects (LOBs) toreduce the amount of data that you extract.For more information, see Creating, Running,and Monitoring an AWS SCT Data ExtractionTask (p. 125).

October 30,2017

1.0.605 Data extractionagent task logaccess

You can now access the data extraction agenttask log from a convenient link in the AWSSchema Conversion Tool user interface. Formore information, see Creating, Running,and Monitoring an AWS SCT Data ExtractionTask (p. 125).

August 28, 2017

1.0.604 Converterenhancements

The AWS Schema Conversion Tool engine hasbeen enhanced to offer improved conversionsfor heterogeneous migrations.

June 24, 2017

1.0.603 Data extractionagents supportfilters

You can now filter the data that the extractionagents extract from your data warehouse. Formore information, see Creating Data ExtractionFilters in the AWS Schema ConversionTool (p. 124).

June 16, 2017

Version 1.0399

Page 407: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Version Change Description Date Changed

1.0.603 AWS SCTsupportsadditional datawarehouseversions

You can now use the AWS Schema ConversionTool to convert your Teradata 13 and OracleData Warehouse 10 schemas to equivalentAmazon Redshift schemas. For moreinformation, see Converting Data WarehouseSchemas to Amazon Redshift by Using theAWS Schema Conversion Tool (p. 91).

June 16, 2017

1.0.602 Data extractionagents supportadditional datawarehouses

You can now use data extraction agents toextract data from your Microsoft SQL Serverdata warehouses. For more information, seeUsing Data Extraction Agents (p. 116).

May 11, 2017

1.0.602 Data extractionagents can copydata to AmazonRedshift

Data extraction agents now have three uploadmodes. You can now specify whether to justextract your data, to extract your data and justupload it to Amazon S3, or to extract, upload,and copy your data directly into AmazonRedshift. For more information, see Creating,Running, and Monitoring an AWS SCT DataExtraction Task (p. 125).

May 11, 2017

1.0.601 AWS SCTsupportsadditional datawarehouses

You can now use the AWS Schema ConversionTool to convert your Vertica and MicrosoftSQL Server schemas to equivalent AmazonRedshift schemas. For more information,see Converting Data Warehouse Schemas toAmazon Redshift by Using the AWS SchemaConversion Tool (p. 91).

April 18, 2017

1.0.601 Data extractionagents supportadditional datawarehouses

You can now use data extraction agents toextract data from your Greenplum, Netezza,and Vertica data warehouses. For moreinformation, see Using Data ExtractionAgents (p. 116).

April 18, 2017

1.0.601 Data extractionagents supportadditionaloperatingsystems

You can now install data extraction agentson computers running the macOS andMicrosoft Windows operating systems. Formore information, see Installing ExtractionAgents (p. 119).

April 18, 2017

1.0.601 Data extractionagents uploadto Amazon S3automatically

Data extraction agents now upload yourextracted data to Amazon S3 automatically.For more information, see Data Extraction TaskOutput (p. 128).

April 18, 2017

1.0.600 Data ExtractionAgents

You can now install data extraction agents thatextract data from your data warehouse andprepare it for use with Amazon Redshift. Youcan use the AWS Schema Conversion Tool toregister the agents and create data extractiontasks for them. For more information, seeUsing Data Extraction Agents (p. 116).

February 16,2017

Version 1.0400

Page 408: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Version Change Description Date Changed

1.0.600 CustomerFeedback

You can now provide feedback about theAWS Schema Conversion Tool. You can file abug report, you can submit a feature request,or you can provide general information. Formore information, see Providing CustomerFeedback (p. 2).

February 16,2017

1.0.502 Integration withAWS DMS

You can now use the AWS Schema ConversionTool to create AWS DMS endpoints and tasks.You can run and monitor the tasks from AWSSCT. For more information, see Working withthe AWS Database Migration Service Using theAWS Schema Conversion Tool (p. 113).

December 20,2016

1.0.502 AmazonAurora withPostgreSQLcompatibilityas a targetdatabase

The AWS Schema Conversion Tool nowsupports Amazon Aurora with PostgreSQLcompatibility as a target database. For moreinformation, see Converting Database SchemasUsing the AWS Schema Conversion Tool (p. 72).

December 20,2016

1.0.502 Support forprofiles

You can now store different profiles in theAWS Schema Conversion Tool and easily switchbetween them. For more information, seeUsing AWS Service Profiles in the AWS SchemaConversion Tool (p. 21).

December 20,2016

1.0.501 Support forGreenplumDatabase andNetezza

You can now use the AWS Schema ConversionTool to convert your data warehouse schemasfrom Greenplum Database and Netezza toAmazon Redshift. For more information,see Converting Data Warehouse Schemas toAmazon Redshift by Using the AWS SchemaConversion Tool (p. 91).

November 17,2016

1.0.501 Redshiftoptimization

You can now use the AWS Schema ConversionTool to optimize your Amazon Redshiftdatabases. For more information, see Optimizing Amazon Redshift by Using the AWSSchema Conversion Tool (p. 111).

November 17,2016

1.0.500 Mapping rules Before you convert your schema with the AWSSchema Conversion Tool, you can now set uprules that change the data type of columns,move objects from one schema to another,and change the names of objects. For moreinformation, see Creating Mapping Rules in theAWS Schema Conversion Tool (p. 73).

October 4, 2016

Version 1.0401

Page 409: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Version Change Description Date Changed

1.0.500 Move to cloud You can now use the AWS Schema ConversionTool to copy your existing on-premisesdatabase schema to an Amazon RDS DBinstance running the same engine. You can usethis feature to analyze potential cost savingsof moving to the cloud and of changing yourlicense type. For more information, see WhatIs the AWS Schema Conversion Tool? (p. 1) andCreating and Using the Assessment Report inthe AWS Schema Conversion Tool (p. 79).

October 4, 2016

1.0.400 Data warehouseschemaconversions

You can now use the AWS Schema ConversionTool to convert your data warehouse schemasfrom Oracle and Teradata to Amazon Redshift.For more information, see Converting DataWarehouse Schemas to Amazon Redshift byUsing the AWS Schema Conversion Tool (p. 91).

July 13, 2016

1.0.400 Application SQLconversions

You can now use the AWS Schema ConversionTool to convert SQL in your C++, C#, Java, orother application code. For more information,see Converting Application SQL by Using theAWS Schema Conversion Tool (p. 135).

July 13, 2016

1.0.400 New feature The AWS Schema Conversion Tool nowcontains an extension pack and a wizard tohelp you install, create, and configure AWSLambda functions and Python libraries toprovide email, job scheduling, and otherfeatures. For more information, see Using theAWS Lambda Functions from the AWS SCTExtension Pack (p. 144) and Using the CustomPython Library for the AWS SCT ExtensionPack (p. 143).

July 13, 2016

1.0.301 SSL Support You can now use Secure Sockets Layer (SSL) toconnect to your source database when you usethe AWS Schema Conversion Tool. For moreinformation, see Connecting to Your SourceDatabase (p. 27).

May 19, 2016

1.0.203 New feature Adds support for MySQL and PostgreSQL assource databases for conversions.

April 11, 2016

1.0.202 Maintenancerelease

Adds support for editing the converted SQLthat was generated for the target databaseengine. Adds improved selection capabilitiesin the source database and target DB instancetree views. Adds support for connecting toan Oracle source database using TransparentNetwork Substrate (TNS) names.

March 2, 2016

Version 1.0402

Page 410: AWS Schema Conversion Tool · PDF fileAWS Schema Conversion Tool User Guide Table of Contents ... Source: Netezza ... SQL Server Agent

AWS Schema Conversion Tool User Guide

Version Change Description Date Changed

1.0.200 Maintenancerelease

Adds support for PostgreSQL as a targetdatabase engine. Adds the ability to generateconverted schema as scripts and to save thescripts to files prior to applying the schema tothe target DB instance.

January 14,2016

1.0.103 Maintenancerelease

Adds offline project capability, the abilityto check for new versions, and memory andperformance management.

December 2,2015

1.0.101 Maintenancerelease

Adds the Create New Database MigrationProject wizard. Adds the ability to save thedatabase migration assessment report as a PDFfile.

October 19,2015

1.0.100 Preview release Provides the user guide for the AWS SchemaConversion Tool preview release.

October 7, 2015

Version 1.0403