Configure the Users and Environment
The Migrations Repository is a database schema that stores the metadata collected and transformed in the migration process.
Create the Migration Repository
To convert the Microsoft SQL Server database to Oracle, create a repository
to store the required repository tables and PL/SQL packages and create an SQL Developer
connection to the mwrep
user.
Capture a Snapshot of the Microsoft SQL Server Database
Use the SQL Developer Migration Wizard to capture a “snapshot” that includes the Microsoft SQL Server database metadata and data.
In this example, the source SQL Server is deployed with two sample databases: AdventureWorks (OLTP DB) and AdventureWorksDW (Oracle Autonomous Data Warehouse). You can download both of these sample databases from the Microsoft SQL Server Github repo.
As part of the offline migration, it is recommended to quiesce all
applications connected to MS SQL Server or switch SQL Server Database to
ReadOnly
mode in order to capture a consistent state of
database.
When the migration is completed and the master.sql
file
loaded up in SQL Developer, a pop-up message will appear: Migration actions
have successfully completed
. The objects and data are loaded and
migrated to the autonomous database through SQL Developer.
Create the Oracle Database Objects
sqlplus
command-line to execute the sql
scripts to
create the SQL Server converted objects on Oracle Autonomous Database.
- Review the “Generated Script Directory” for the desired outputs.
- Create the SQL Server converted objects on Oracle Autonomous Database by
executing
master.sql
script either throughsql developer
or straightsqlplus
command-line interface.- To use SQL Developer to create the SQL Server converted
objects on Oracle Autonomous Database, execute the
master.sql
scripts:- Select
admin_adb
from the drop-down on the right icon. Then click Run Script (F5). - (Optional) Run following SQL query to view the new
Oracle Schemas created as a result of conversion process.
SQL> select * from dba_users where created > sysdate - 1;
- Select
- To use the
sqlplus
command-line to create the SQL Server converted objects on Oracle Autonomous Database:- Execute
master.sql
to create the metadata and schema structure.$ sqlplus admin/[password]@atpdb_tp @master.sql
- Create a Schema Validate Status report by running
reportallstatus.sql.
$ sqlplus admin/{password]@atpdb_tp @reportallstatus.sql
This produces an output file for each schema, in this case 7 log files. Review to make sure that there are no errors and that all objects are showing a VALID status.
- Execute
- To use SQL Developer to create the SQL Server converted
objects on Oracle Autonomous Database, execute the
- ADVENTUREWORKS
- SALES_ADVENTUREWORKS
- PERSON_ADVENTUREWORKS
- PURCHASING_ADVENTUREWORKS
- EMULATION
- HUMANRESOURCES_ADVENTUREWORKS
- PRODUCTION_ADVENTUREWORKS