Oracle to SQL Server Migration - Exploring the process-contd.

Oracle to SQL Server Migration - Exploring the process-contd.

Continuing my previous article to explore next steps….

  • I installed SSMA – SQL Server Migration Assistant tool on my system and also spun up an EC2 with SQL Server 2019 edition with security group settings to allow my laptop to connect to it.

No alt text provided for this image

  • Then created a database called HR which will house all schema objects and data from Oracle database and a user called MigrationAdmin with admin rights.

No alt text provided for this image
No alt text provided for this image

  • To make sure the new user can login, I tried to connect to the SQL locally in an RDP session, it refused to connect.  After some research, I found that SQL in EC2 accepts only Windows Authentication. I had to change it to accept SQL authentication also.

No alt text provided for this image

  • At this point of time, HR database does not have any user objects yet.

No alt text provided for this image

  •  From SQL Server Migration Assistant, connect to Oracle and SQL Server instances. Now it is like a bridge connecting two worlds. Things get more interesting now. 😊

Connect to Oracle

  • After establishing a connection to Oracle EC2 instance, it does a permission check on all objects in Oracle database, so migration of all schema objects can be done without breaks.

No alt text provided for this image

  • So, I had to give the above permissions to the hr user. In the next screen, select HR schema to migrate from the list of schemas in addition to the default selections.

No alt text provided for this image

After successful connection in SSMA to Oracle, I could navigate through different objects and see the procedure definitions.

No alt text provided for this image

  • Now, connect to SQL Server:

No alt text provided for this image

  • Click Convert Schema to see the schema is being migrated!
  • After it is complete, just do a count check of object types in Oracle and SQL Server.

No alt text provided for this image
No alt text provided for this image

Here, HR schema in Oracle has 34 objects in all while the same in SQL Server has 38 objects.

19 Constraints in SQL tally with 19 indexes in Oracle. Default constraint seems to be an exception.

The difference is in number of triggers. Oracle has two triggers whereas SQL has four!

Oracle Triggers:

No alt text provided for this image

SQL Triggers:

No alt text provided for this image

  • Now let’s click Migrate Data!

No alt text provided for this image


Hey, data migration is done! Now, lets check row counts on both sides! As soon as data migration is complete, it pops up with Data migration report with row counts of migrated Oracle tables.

Does it match with row counts from SQL Server?

Row counts from SQL Server

Yes, they do! 😊

I am happy that I was able to do this with two EC2 instances on my laptop.

Happy Learning!

 

To view or add a comment, sign in

More articles by Uday Rathinam

  • Oracle to SQL Server Migration - Exploring the process

    Recently, one of my friends asked me whether I have done migration from Oracle to SQL Server. I replied him I did that…

  • Liveliness in the Office

    Have you ever thought of “liveliness” in the office? Liveliness? Yes! A good office environment is a place of…

  • Types of DBAs

    IT and Engineering departments have introduced different kinds of Database administrators (DBA) and they differ by…

  • Challenges in working remote

    These days, we often hear that technology is heading more and more towards cloud, cloud computing and cloud-based…

    8 Comments

Others also viewed

Explore content categories