• Contact Us
  • About Us
Trending now

Things to Keep in Mind About the…

Customization Features Elevating Personalized Online Lottery Participation…

Facing Felony Charges in 2026: Legal Defense…

How do online lottery accounts handle dormant…

Why some people enjoy quick rounds while…

How to Achieve a Flawless Base Using…

Luxury Suit Craftsmanship Balancing Comfort Elegance And…

Fire Damage Cleanup in Oak Harbor: Essential…

How Vaughan Automotive Maverick Toyota Organizes Used…

Slot game mechanics when wagers are placed…

Create With Driven

  • Fashion
  • Auto
  • Finance
  • Tech
  • Home
Create With Driven
  • Home
  • Tech
  • Oracle to SQL Server Database Migration
Tech

Oracle to SQL Server Database Migration

by John HartmanMarch 2, 20230955
Share0

This whitepaper explores some tips of database migration from Oracle to MS SQL or its cloud variations such as Azure SQL.

Table Description

Oracle present table definition by using “DESC tablename” statement. In SQL Server feel free to make use of the system stored procedure sp_help for comprehensive information about a table’s columns and other properties.

If the end result is not appropriate for your requirements, then querying the system view with INFORMATION_SCHEMA.COLUMNS, will ensure you get the right information. One can also easily cover up ones code inside the stored system known as DESCRIBE, if you desire.

For the last process, you can query the system tables just like sysobjects and syscolumns, however this is not an advisable technique.

Table DUAL

When it comes to Oracle, it presents a unique one-row and one-column table that are DUAL to run a few queries that doesn’t require any table, for instance:

SELECT SYSDATE FROM DUAL;

Since MS SQL does not have the same table, it must be created during the migration for using in views and queries:

create table dual (varchar(1) not null );

insert into dual(dummy) values(‘x’);

Specific functions

Each and every specific Oracle function need to be transformed into MS SQL equivalent. However, some of them don’t have direct synonym. One of them is decode() function, it must be exchanged by CASE expression below:

SELECT id,

CASE id

WHEN ‘1’ THEN ‘one’

WHEN ‘2’ THEN ‘two’

WHEN ‘3’ THEN ‘three’

ELSE NULL

END AS ‘id_text’

FROM products

Greatest() and least() Oracle functions also do not have straight equivalent in MS SQL. These functions could be emulated in SQL Server as follows:

SELECT Greatest=MAX(col), Least=MIN(col)

FROM table_name

CROSS APPLY (

SELECT col1 UNION ALL SELECT col2 UNION ALL SELECT col3

UNION ALL SELECT col4) a(col)

GROUP BY primary_key

Triggers

The primary obstacle of transforming Oracle triggers into MS SQL format is missing particular features in the target DBMS: BEFORE INSERT/UPDATE/DELETE triggers and FOR EACH ROW pattern.

The process requires the implementation of some missing features by other method of MS SQL. For instance, semantic of BEFORE-triggers is used to modify record that are affected by the last process prior to inserting/updating it into the database. “FOR EACH ROW” structure let you implement the trigger to all rows influenced by the last insert, update or delete operation. SQL Server triggers can manage altered records in the database the moment the insert or update operation concludes. All improved records are gathered in service tables “inserted” (for insert/update operation) or “deleted” (for delete operation).

Sequences

You cannot find any support for sequences in MS SQL, the DBMS offers special attribute for numeric data types such as tinyint, smallint, int, bigint, decimal and numeric called “IDENTITY” instead:

CREATE TABLE mytable

(

id int IDENTITY(1, 1)

some_column varchar(50)

)

Share0
previous post
Most Auto Makers Plans To Switch To EVs By 2030
next post
Hand Washing: Why It’s So Important
John Hartman

Related posts

Why is it important to encrypt your messages before sending them?

John HartmanMay 18, 2024June 18, 2024

Different Types of Cloud Services by Cloud Provider –

William RobertsAugust 15, 2022

How to Find the Best Electronics Packaging Services.

John HartmanNovember 2, 2022

Social Media

Categories

  • Architect (1)
  • Art (1)
  • Auto (34)
  • Basement Finish (1)
  • Business (174)
  • Casino (54)
  • Childcare (1)
  • Construction (1)
  • Dating (16)
  • Education (16)
  • Entertainment (6)
  • Environment (1)
  • Fashion (30)
  • Featured (45)
  • Finance (26)
  • Food (16)
  • Game (4)
  • Gift (1)
  • Health (103)
  • Home (98)
  • Home Improvements (15)
  • HVAC (2)
  • Industrial (3)
  • Insurance (3)
  • Law (10)
  • Lifestyle (7)
  • Marketing (2)
  • Mortgage (2)
  • Music (4)
  • Photography (5)
  • Podiatrist (1)
  • Real Estate (5)
  • Renewable Energy (1)
  • SEO (4)
  • Shopping (19)
  • Skin Care (2)
  • Sports (4)
  • Swimming pool (1)
  • Tech (53)
  • Travel (14)
  • Weight Loss (2)
  • Weight Loss (5)
  • Wellness program (1)

Recent Posts

Things to Keep in Mind About the Dow Jones and Sensex

William RobertsApril 2, 2026
April 2, 20260

Customization Features Elevating Personalized Online Lottery Participation Options

Benjamin BrienApril 1, 2026
April 1, 20260

Facing Felony Charges in 2026: Legal Defense Guidance

William RobertsMarch 25, 2026
March 25, 20260

How do online lottery accounts handle dormant player balances?

Benjamin BrienMarch 16, 2026March 26, 2026
March 16, 2026March 26, 20260

Why some people enjoy quick rounds while others prefer slower play

Ira ScalzoMarch 12, 2026March 13, 2026
March 12, 2026March 13, 20260
Copyright © 2024 createwithdriven.com.
  • Contact Us
  • About Us
Create With Driven
FacebookTwitterInstagramYoutubeSnapchat
  • Fashion
  • Auto
  • Finance
  • Tech
  • Home