• Contact Us
  • About Us
Trending now

Critical Dangers of Using Worn-Out Armor Plates…

Prevent Machine Failures with Quality Cutting Tools

7 Creative Ways to Bring Your Digital…

How to Avoid Underarm Irritation When Using…

From Signup to Loyalty: How Modern Onboarding…

Nicotine Toothpicks: Overuse Risks You Should Know…

How Weather Unpredictability Impacts Local Wedding Venues

Avoid Costly Breakdowns: Timely HVAC Compressor Replacement

Avoiding the Pitfalls: 5 Holistic Medicine Myths…

How to Use a Simulator to Learn…

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, 20230870
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

How to download YouTube videos to iPhone?

Clare LouiseFebruary 21, 2023February 22, 2023

What are the skills and framework you need for growth marketing?

Bob PayneNovember 19, 2022

Why Renewable Energy is the Way of the Future

Bob PayneDecember 20, 2022December 20, 2022

Social Media

Categories

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

Recent Posts

Critical Dangers of Using Worn-Out Armor Plates Today

William RobertsJanuary 12, 2026January 13, 2026
January 12, 2026January 13, 20260

Prevent Machine Failures with Quality Cutting Tools

William RobertsJanuary 11, 2026
January 11, 20260

7 Creative Ways to Bring Your Digital Memories to Life with Photo...

William RobertsJanuary 2, 2026
January 2, 20260

How to Avoid Underarm Irritation When Using Deodorants

John HartmanDecember 16, 2025
December 16, 20250

From Signup to Loyalty: How Modern Onboarding Platforms Are Redefining Customer Journeys

John HartmanDecember 2, 2025December 2, 2025
December 2, 2025December 2, 20250
Copyright © 2024 createwithdriven.com.
  • Contact Us
  • About Us
Create With Driven
FacebookTwitterInstagramYoutubeSnapchat
  • Fashion
  • Auto
  • Finance
  • Tech
  • Home