12.07.2015 Views

Oracle to Sybase ASE Migration Guide

Oracle to Sybase ASE Migration Guide

Oracle to Sybase ASE Migration Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ORACLE TO SYB<strong>ASE</strong> <strong>ASE</strong> MIGRATION GUIDERev.1.3etc, and au<strong>to</strong>matically convert the <strong>Oracle</strong> datatypes in<strong>to</strong> their <strong>ASE</strong> equivalent, this is the fastest and most efficientschema migration method available.Section 4.2 describes how <strong>to</strong> use PowerDesigner for this purpose.Section 4.3 describes a possible approach <strong>to</strong> reverse-engineer the schema without PowerDesigner.4.2 Using <strong>Sybase</strong> PowerDesigner for database schema migration<strong>Sybase</strong> PowerDesigner is arguably the most advanced data modeling <strong>to</strong>ol in the market. It is a stand-alone <strong>to</strong>ol, runningon Windows. PowerDesigner supports over 30 database types, including <strong>Oracle</strong> and <strong>Sybase</strong> <strong>ASE</strong>.For more information on PowerDesigner, see http://www.sybase.com/powerdesigner .With PowerDesigner it is relatively straightforward <strong>to</strong> reverse-engineer most of the <strong>Oracle</strong> schema and convert it <strong>to</strong><strong>Sybase</strong> <strong>ASE</strong>. The central concept used by PowerDesigner is the PowerDesigner Physical Data Model (PDM). This is adatabase-independent model which can be converted <strong>to</strong> the SQL DDL dialect of each supported database.4.2.1 PowerDesigner schema conversion stepsFor detailed, step-by-step instructions on how <strong>to</strong> use PowerDesigner <strong>to</strong> convert the database schema from <strong>Oracle</strong> <strong>to</strong><strong>Sybase</strong> <strong>ASE</strong>, see the document “Migrating an <strong>Oracle</strong> Database <strong>to</strong> SAP <strong>Sybase</strong> <strong>ASE</strong> with PowerDesigner and ECDA (A Step-By-Step Practical <strong>Guide</strong>)” at http://www.sybase.com/support/techdocs/migration.Once the schema is reverse-engineered, run the completed DDL script in <strong>Sybase</strong> <strong>ASE</strong> and check for any errors.Note that some aspects of schema migration cannot be handled by PowerDesigner and will have <strong>to</strong> be handleddifferently. These aspects are described in section 4.4.4.3 Reverse-engineering the <strong>Oracle</strong> schema without <strong>Sybase</strong> PowerDesignerWithout using <strong>Sybase</strong> PowerDesigner, reverse-engineering the schema can be done in a number of ways:Use the <strong>Oracle</strong> SQL*Plus DESC command on all database objects, and process the output so that they arevalid DDL statements. This is likely <strong>to</strong> require significant manual script coding.Use the <strong>Oracle</strong> DBMS_METADATA package <strong>to</strong> extract DDL for the <strong>Oracle</strong> objects. This involves SQLstatements such as the following (for <strong>Oracle</strong> table 'MY_TABLE', in schema/user 'SALESAPP'). Note thatthese are only examples, this is not a complete list of all statement required <strong>to</strong> perform full reverse-engineering:SELECT DBMS_METADATA.GET_DDL('TABLE', 'MY_TABLE', 'SALESAPP') FROM DUAL;SELECT DBMS_METADATA.GET_DEPENDENT_DDL('INDEX', 'MY_TABLE', 'SALESAPP') FROMDUAL;SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT', 'SALESAPP') FROM DUAL;Use <strong>Oracle</strong> SQL Developer (a free Java-based <strong>to</strong>ol, downloadable from oracle.com). This uses theDBMS_METADATA package (see previous bullet).Use TOAD (a low-cost <strong>to</strong>ol, commonly used in many <strong>Oracle</strong> environments) <strong>to</strong> extract the object definitions,and then manually convert the <strong>Oracle</strong> datatypes in<strong>to</strong> their <strong>ASE</strong> equivalent. This could be cumbersome whenlarge numbers of tables are involved.Once the <strong>Oracle</strong> schema has been reverse-engineered, the <strong>Oracle</strong> DDL needs <strong>to</strong> be converted <strong>to</strong> <strong>Sybase</strong> <strong>ASE</strong> syntax,including conversion from the <strong>Oracle</strong> datatypes <strong>to</strong> <strong>Sybase</strong> <strong>ASE</strong> datatypes. Section 4.7 describes the mapping from<strong>Oracle</strong> datatypes <strong>to</strong> <strong>Sybase</strong> <strong>ASE</strong>.In addition, some aspects of the <strong>Oracle</strong> schema require special attention; see section 4.4.4.4 Special cases in schema migrationThe following schema aspects require special attention:Database Schema <strong>Migration</strong> 18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!