Oracle database objects (tables, views, and indexes) can be migrated to Microsoft SQL Server easily because each RDBMS closely follows the SQL-92 standard that regards object definitions. Converting Oracle SQL table, index, and view definitions to SQL Server table, index, and view definitions requires relatively simple syntax changes. The table highlights some differences in database objects between Oracle and Microsoft SQL Server.
Category | Microsoft SQL Server | Oracle |
---|---|---|
Number of columns | 1024 | 254 |
Row size | 8060 bytes, plus 16 bytes to point to each text or image column | Unlimited (only one long or long raw allowed per row) |
Maximum number of rows | Unlimited | Unlimited |
BLOB type storage | 16-byte pointer stored with row. Data stored on other data pages. | One long or long raw per table. Must be at end of row. Data stored on same block(s) with row. |
Clustered table indexes | One per table | One per table (index-organized tables) |
Nonclustered table indexes | 249 per table | Unlimited |
Maximum number of indexed columns in single index | 16 | 16 |
Maximum length of column values within of an index | 900 bytes | ˝ block |
Table naming convention | [[[server.]database.]owner.] table_name |
[schema.]table_name |
View naming convention | [[[server.]database.]owner.] table_name |
[schema.]table_name |
Index naming convention | [[[server.]database.]owner.] table_name |
[schema.]table_name |
It is assumed that you are starting with an Oracle SQL script or program that is used to create your database objects. Simply copy this script or program and make the following modifications. Each change is discussed throughout the rest of this section. The examples have been taken from the sample application scripts Oratable.sql and Sstable.sql: