Migrate database from MS SQL Server to Oracle with SQL Developer
Migration of database from MS SQL Server to Oracle is complecated task, but Oracle provide SQL Developer for migrate from SQL Server to Oracle by some configuration. It make you migration process easy or time saving instead of doing manual.
1. Setup SQL developer for connecting both the database Oracle and MSSQL Server.
2. For Migration, we need to create a repository user in Oracle which will track the migration activities.
We will do migration in different phases:
Start from creating the Repository
In Sql Developer, Make a connection with SQL Server. Sql Server database name is used as username in Oracle as migration. If Sql Server database has multiple schema like dba, sales, hr then it all used as different username in Oracle like _.
1. Open the SQL Developer, Connect with the Oracle as super user sys as sysdba.
2. Create a new user migration for Repository.
create user migration identified by migration;
grant dba to migration;
3. Make connection with migration in SQL developer.
4. Right click on Migration connection in SQL Developer
Migration righ click –> Migration repository –> Associate Migration Repository
5. It will start creating repository and finish.
Capture and Convert Process for Migration
1. Connect the third party database such as sql server in this example with SQL Developer.
2. Right click on the database of SQL Developer and select Migrate to Oracle database.
3. Migration window will be open as below:
4. Select the repository database on Next Screen:
5. Make a project as migration and assign it a empty folder name for its files:
6. Select the Source database in Migration window:
7. Choose the migration database from the list:
8. Go to next for choose convert option and click on summary to create project.
Note: you can modified any datatype otherwise system will pick automatically.
9. After click on summary, It will skip rest steps and show the summary:
10. click on finish button, It will start process for capturing anc converting into repository.
11. On right window of SQL Developer, you will find the project migration listed in below window.
12. You can check the log on left window by click on the Migration projects after capture and ocnvert process.
Note: We only worked in repository upto this point, we did not find any schema in Oracle with name of migration. After translate process we have schema in Oracle Database.
1. We are starting translate process by clicking right click on project shown in right window of SQL Developer.
2. Migration window will open from Introduction.
3. Click on next directly move to translate tab:
Note: Choose package, procedure and function which you need to translate.
4. Choose target database and click on proceed to summary for TRANSLATION phase execution only
5. Summary page , you can click finish to start the transalation phase:
Note: After translation, you have schema and user in the oracle database.
Note: Before start we will provide the permission to the users for write into the Oracle tablespace otherwise we will not able to insert data into the Oracle USER.
ORA:01950: no Privileges on tablespace USERS
In my case “REPORTSERVER” is user, So, I am giving permission to REPORTSERVER from sysdba users. I am giving dba control to reportserver. We can revoke permission after migration and give limited permission which user needed.
Grant dba to ReportServer;
1. Grant tablespace permission to user as we already done to avoid error:
Grant dba to user;
2. Right click on Migration project in SQL Developer,Choose move data:
3. First introduction page is open, press next it direcly go to move data tab
Note: You have two option online or offline, I preferred online move in example:
4. Summary page will appear, click on finish for proceed.
5. After finish you can check the data in Oracle by connecting with user.
For Checking Error
1. Right click on the migration project in the SQL Developer in right side windows:
2. On click on project, you will get the detail on left side about capture issue, converting issue, data quality. you can save them in excel and check them.