Menu
AWS Schema Conversion Tool
User Guide (Version 1.0)

Microsoft SQL Server to PostgreSQL Supported Schema Conversion

The following sections list the schema elements from a Microsoft SQL Server database and whether they are supported for automatic conversion to PostgreSQL using the AWS Schema Conversion Tool.

Data Definition Language (DDL)

Naming Objects

Clause Automatically Converted Details

Schemas

Yes

Tables, Columns

Yes

Statements

Clause Automatically Converted 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 are skipped.

CREATE PROCEDURE

Yes

CREATE SEQUENCE

Yes

IDENTITY (x,y)

Yes

TRUNCATE TABLE

Yes

UPDATE STATISTICS

No

ALTER TABLE

Clause Automatically Converted Details

ADD

Yes

ALTER COLUMN

No

DROP COLUMN

No

DROP CONSTRAINT

No

ENABLE/DISABLE TRIGGER

Yes

CREATE INDEX

Clause Automatically Converted Details

CLUSTER option

Partial

COLUMNSTORE index

Partial

INCLUDE clause

Partial

Other INDEX options

Partial

SPATIAL index

Partial

UNIQUE option

Yes

XML index

Partial

CREATE TABLE

Clause Automatically Converted Details

Partitioned tables

Yes

Regular tables

Yes

Temporary tables

Partial

Wide tables

Yes

CREATE TRIGGER

Clause Automatically Converted Details

FOR EACH STATEMENT Triggers

Partial

INSTEAD OF Triggers

Partial

Trigger event (INSERT/UPDATE/DELETE )

Partial

Trigger time (BEGORE/AFTER)

Partial

CREATE VIEW

Clause Automatically Converted Details

CREATE VIEW

Yes

Updatable Views

Yes

VIEW

Yes

DROP Statements

Clause Automatically Converted Details

DROP TABLE

Yes

DROP VIEW

Yes

Other types of objects

Yes

Data Manipulation Language (DML)

Clause for Statements

Clause Automatically Converted Details

Join Hints

No

Query Hints

No

Table Hint

No

WHERE

Yes

Joins

Cross Joins

Clause Automatically Converted Details

Cross join

Yes

Cross join with condition

Yes

Inner Joins

Clause Automatically Converted Details

Inner Joins

Yes

Outer Joins

Clause Automatically Converted 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 Automatically Converted Details

Boolean conditions

Yes

Exists conditions

Yes

In conditions

Yes

Null conditions

Yes

Pattern matching conditions

Yes

Range conditions

Yes

Comparison Conditions

Clause Automatically Converted Details

=, <>, <, <=, >, >=

Yes

ANY, SOME, ALL

Partial

Statements

DELETE

Clause Automatically Converted Details

CURRENT OF

Yes

FROM

Partial

OUTPUT

Partial

TOP

No

VALUES

Yes

WITH

Yes

INSERT

Clause Automatically Converted Details

DEFAULT

Yes

DEFAULT VALUES

Yes

FROM

Yes

INTO

Yes

OUTPUT

No

TOP

No

VALUES

Yes

WITH

Yes

SELECT

Clause Automatically Converted Details

GROUP BY clause with an expression

Yes

GROUP BY clause with multiple tables

Yes

GROUP BY CUBE

No

Group By Grouping Sets

No

GROUP BY ROLLUP

No

Limiting the number of rows returned

Yes

Select all columns (using the * and aliases)

Yes

Select all columns (using the *)

Yes

Select subset of the columns

Yes

Select with calculations

Yes

Select with column heading

Yes

Select with constants

Yes

Specifying a ascending order

Yes

Specifying a collation

Yes

Specifying a conditional order

Yes

Specifying a descending order

Yes

Specifying a percentage

Yes

Specifying a percentage (argument 100 percent)

Yes

Specifying an alias as the sort column

Yes

Specifying an expression as the sort column

Yes

Specifying both ascending and descending order

Yes

TOP with a variable

Yes

Using ORDER BY and OFFSET command

Yes

Using ORDER BY in a ranking function

Yes

Using ORDER BY with UNION

Yes

Using WITH TIES

No

WHERE with BETWEEN

Yes

WHERE with combination of predicates

Yes

WHERE with CONTAINS

No

WHERE with EXISTS subquery

Yes

WHERE with FREETEXT

No

WHERE with IN custom list

Yes

WHERE with IN subquery

Yes

WHERE with LIKE

Partial

WHERE with negates a Boolean input

Yes

WHERE with NULL

Yes

DISTINCT
Clause Automatically Converted Details

DISTINCT

Yes

FROM
Clause Automatically Converted Details

FROM

Yes

GROUP BY
Clause Automatically Converted Details

GROUP BY

Yes

HAVING
Clause Automatically Converted Details

HAVING

Yes

ORDER BY
Clause Automatically Converted Details

ORDER BY

Yes

TOP
Clause Automatically Converted Details

TOP

Yes

WHERE
Clause Automatically Converted Details

WHERE

Yes

UPDATE

Clause Automatically Converted Details

CURRENT OF

Yes

DEFAULT

Yes

FILESTREAM Data

No

FROM

Yes

OUTPUT

Partial

TOP

No

VALUES

Yes

WITH

Yes

Data Types

Clause Automatically Converted Details

BIGINT

Yes

BINARY

Yes

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 the PostgreSQL instance has the uuid-ossp module installed. The uuid-ossp module provides functions to generate UUIDs using one of several standard algorithms.

VARBINARY

Yes

VARCHAR

Yes

XML

No

Database Mail

Clause Automatically Converted Details

Accounts and Profiles

Yes

Database Mail Configuration Objects

Yes

Database Mail Messaging Objects

Yes

Database Mail Settings

Yes

Security

Yes

sp_send_dbmail

No

sysmail_add_account_sp

No

sysmail_add_principalprofile_sp

No

sysmail_add_profile_sp

No

sysmail_add_profileaccount_sp

No

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_sp

No

sysmail_delete_profile_sp

No

sysmail_delete_profileaccount_sp

No

sysmail_event_log

No

sysmail_faileditems

No

sysmail_help_account_sp

No

sysmail_help_configure_sp

No

sysmail_help_principalprofile_sp

No

sysmail_help_profile_sp

No

sysmail_help_profileaccount_sp

No

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_sp

Yes

sysmail_update_principalprofile_sp

No

sysmail_update_profile_sp

No

sysmail_update_profileaccount_sp

No

System State

Yes

Functions

@@functions

Clause Automatically Converted Details

@@CONNECTIONS

No

@@CPU_BUSY

No

@@CURSOR_ROWS

No

@@DATEFIRST

No

@@DBTS

No

@@ERROR

No

@@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

Aggregate

Clause Automatically Converted 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 Automatically Converted Details

Aggregate Functions

Yes

Cursor Functions

No

Metadata Functions

No

Security Functions

No

System Functions

No

System Statistical Functions

No

Text and Image Functions

No

Conversion

Clause Automatically Converted Details

CAST

Partial

CONVERT

Partial

PARSE

No

TRY_CAST

No

TRY_CONVERT

No

TRY_PARSE

No

Date and Time

Clause Automatically Converted Details

CURRENT_TIMESTAMP

Partial

DATEADD

Partial

DATEDIFF

Partial

DATEFROMPARTS

Yes

DATENAME

Partial

DATEPART

Partial

DATETIME2FROMPARTS

Partial

DATETIMEFROMPARTS

Partial

DATETIMEOFFSETFROMPARTS

Partial

DAY

Yes

EOMONTH

Yes

GETDATE

Yes

GETUTCDATE

Yes

ISDATE

No

MONTH

Yes

SMALLDATETIMEFROMPARTS

Yes

SWITCHOFFSET

No

SYSDATETIME

Yes

SYSDATETIMEOFFSET

No

SYSUTCDATETIME

Yes

TIMEFROMPARTS

Yes

TODATETIMEOFFSET

No

YEAR

Yes

Mathematical Functions

Clause Automatically Converted 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

SQRT()

Yes

SQUARE()

Yes

TAN()

Yes

Ranking Functions

Clause Automatically Converted Details

DENSE_RANK

Yes

NTILE

Yes

RANK

Yes

ROW_NUMBER

Yes

Rowset Functions

Clause Automatically Converted Details

CONTAINSTABLE

No

FREETEXTTABLE

No

OPENDATASOURCE

No

OPENQUERY

No

OPENROWSET

No

OPENXML

No

Scalar Functions

Clause Automatically Converted Details

ABS()

Yes

ACOS()

Yes

ASCII

Yes

ASIN()

Yes

ATAN()

Yes

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

DATETIMEOFFSETFROMPARTS

No

DAY

Yes

DEGREES()

Yes

DIFFERENCE

No

EOMONTH

Yes

ERROR_LINE

No

ERROR_MESSAGE

No

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

Implemented in Extension Library

LEFT

Yes

LEN

Yes

LOG()

Yes

LOG10()

Yes

LOWER

Yes

LTRIM

Yes

MAX

Yes

MIN

Yes

MONTH

Yes

NCHAR

No

ORIGINAL_LOGIN

No

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

SYSDATETIME

Yes

SYSDATETIMEOFFSET

No

SYSUTCDATETIME

Yes

TAN()

Yes

TIMEFROMPARTS

Yes

TODATETIMEOFFSET

No

UNICODE

No

UPPER

Yes

VAR

Yes

VARP

Yes

YEAR

Yes

String

Clause Automatically Converted 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

REVERSE

Yes

RIGHT

Yes

RTRIM

Yes

SOUNDEX

No

SPACE

Yes

STR

No

STUFF

Yes

SUBSTRING

Yes

UNICODE

No

UPPER

Yes

Operators

Arithmetic Operators

Clause Automatically Converted Details

- (Subtract)

Partial

% (Modulo)

Partial

* (Multiply)

Partial

/ (Divide)

Partial

+ (Add)

Partial

Assignment Operator

Clause Automatically Converted Details

=

Yes

Bitwise Operators

Clause Automatically Converted Details

& (Bitwise AND)

Yes

^ (Bitwise Exclusive OR)

No

| (Bitwise OR)

Yes

Comparison Operators

Clause Automatically Converted Details

Comparison Operators

Partial

Logical Operators

Clause Automatically Converted Details

Logical Operators

Yes

Set Operators

Clause Automatically Converted Details

EXCEPT

Yes

INTERSECT

Yes

UNION

Yes

UNION ALL

Yes

String Concatenation Operator

Clause Automatically Converted Details

String Concatenation Operator

Yes

Unary Operators

Clause Automatically Converted Details

Unary Operators

Yes

Other

Clause Automatically Converted 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

Service Broker

Clause Automatically Converted Details

ALTER QUEUE

No

ALTER SERVICE

No

BEGIN CONVERSATION TIMER

No

BEGIN DIALOG CONVERSATION

No

CREATE QUEUE

No

CREATE SERVICE

No

DROP QUEUE

No

DROP SERVICE

No

END CONVERSATION

No

GET CONVERSATION GROUP

No

GET TRANSMISSION_STATUS

No

MOVE CONVERSATION

No

Queue management

Yes

RECEIVE

No

SEND

No

Service Broker Catalog Views

Yes

Service Broker Related Dynamic Management Views

Yes

Service Broker Statements

Yes

Service management

Yes

sys.conversation_endpoints

No

sys.conversation_groups

No

sys.conversation_priorities

No

sys.dm_broker_activated_tasks

No

sys.dm_broker_connections

No

sys.dm_broker_forwarded_messages

No

sys.dm_broker_queue_monitors

No

sys.message_type_xml_schema_collection_usages

No

sys.remote_service_bindings

No

sys.routes

No

sys.service_contract_message_usages

No

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 Automatically Converted 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_member

No

sp_apply_job_to_targets

No

sp_attach_schedule

No

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_member

No

sp_detach_schedule

No

sp_enum_login_for_proxy

No

sp_enum_proxy_for_subsystem

No

sp_enum_sqlagent_subsystems

No

sp_grant_login_to_proxy

No

sp_grant_proxy_to_subsystem

No

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

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_targetss

No

sp_resync_targetserver

No

sp_revoke_login_from_proxy

No

sp_revoke_proxy_from_subsystem

No

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

sp_update_operator

No

sp_update_proxy

No

sp_update_schedule

No

sp_update_targetservergroup

No

SQL Server Backup

Clause Automatically Converted Details

BACKUP

No

BACKUP CERTIFICATE

No

BACKUP MASTER KEY

No

BACKUP SERVICE MASTER KEY

No

RESTORE

No

RESTORE FILELISTONLY

No

RESTORE HEADERONLY

No

RESTORE LABELONLY

No

RESTORE MASTER KEY

No

RESTORE REWINDONLY

No

RESTORE SERVICE MASTER KEY

No

RESTORE VERIFYONLY

No

T-SQL

BACKUP and RESTORE

Clause Automatically Converted Details

BACKUP and RESTORE Statements

No

Collation

Clause Automatically Converted Details

Collation

No

Control-of-Flow Language

Clause Automatically Converted 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 Automatically Converted Details

DECLARE CURSOR

Yes

CURSOR with option GLOBAL

No

CURSOR with options FORWARD_ONLY or SCROLL

No

FETCH

Clause Automatically Converted Details

FETCH

Yes

OPEN

Clause Automatically Converted Details

OPEN

Yes

DUMP and LOAD Statements

Clause Automatically Converted Details

DUMP and LOAD Statements

No