• Contact Us
  • About Us
Trending now

Avoid Fraud: Spot Fake High-Quality Solar Leads

Amateur Solo Masturbation Porn Videos for Mobile…

Stylish Tokyo Apartments Perfect For Business Travelers…

Corporate Event Photographer: Capturing Professional Moments That…

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…

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, 20230995
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 Prepare For A Movie Marathon

Benjamin BrienJune 23, 2022

Restaurant Bistro Pagers: Ending the Anxious Wait of consumers

William RobertsOctober 18, 2021February 8, 2022

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

John HartmanMay 18, 2024June 18, 2024

Social Media

Categories

  • Architect (1)
  • Art (1)
  • Auto (34)
  • Basement Finish (1)
  • Business (175)
  • Casino (54)
  • Childcare (1)
  • Construction (1)
  • Dating (17)
  • 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 (6)
  • Podiatrist (1)
  • Real Estate (5)
  • Renewable Energy (1)
  • SEO (4)
  • Shopping (19)
  • Skin Care (2)
  • Sports (4)
  • Swimming pool (1)
  • Tech (53)
  • Travel (15)
  • Weight Loss (5)
  • Weight Loss (2)
  • Wellness program (1)

Recent Posts

Avoid Fraud: Spot Fake High-Quality Solar Leads

Ira ScalzoMay 20, 2026
May 20, 20260

Amateur Solo Masturbation Porn Videos for Mobile Viewing

Ira ScalzoMay 14, 2026
May 14, 20260

Stylish Tokyo Apartments Perfect For Business Travelers And Digital Nomads

Ira ScalzoMay 12, 2026May 20, 2026
May 12, 2026May 20, 20260

Corporate Event Photographer: Capturing Professional Moments That Define Your Brand

William RobertsApril 21, 2026May 3, 2026
April 21, 2026May 3, 20260

Things to Keep in Mind About the Dow Jones and Sensex

William RobertsApril 2, 2026
April 2, 20260
Copyright © 2024 createwithdriven.com.
  • Contact Us
  • About Us
Create With Driven
FacebookTwitterInstagramYoutubeSnapchat
  • Fashion
  • Auto
  • Finance
  • Tech
  • Home