33
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Migration from SQL Server 2012 database to Oracle 12c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Prepared By : Monowar Mukul (OCM 11g DBA) Connect to the SQL instance using SQL Management Studio which has the database from which we need to export tables. If Database then click Database Select database > Tasks > Back Up

Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Embed Size (px)

DESCRIPTION

This is relate to migration Database testing from SQLSERVER2012 to Oracle12c with Pluggable Database. Here I have focused on single table as of time stress. Same can be applied for SQL SERVER 2005 and 2008.

Citation preview

Page 1: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Migration from SQL Server 2012 database to Oracle 12c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Prepared By : Monowar Mukul (OCM 11g DBA)

Connect to the SQL instance using SQL Management Studio which has the database from which we need to export tables.

If Database then click Database

Select database > Tasks > Back Up

Page 2: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Page 3: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Page 4: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

We can go step by step to migrate from SQL Server to Oracle. I will do testing by SQL Developer 4 next time.

In this testing I have used a source database capture file sqlserver2005.ocp. Using SQL Developers Offline Capture feature, the Microsoft SQL Server Northwind sample database has been extracted into offline data files. The SQLServer2005.ocp file generated by the Capture tool contains the database schema information for the Microsoft SQL Server Northwind Traders database.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Open SQL Developer from my xwindows++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Start sqldeveloper from Oracle 12c database home.

Oracle@xxxxxxx:/usr/app/oracle/product/12.1.0.1/sqldeveloper$ ./sqldeveloper.exe

Page 5: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Select View > Connections.

In the Connections tab, right-click Connections and select New Connection.

Page 6: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Next screen pass the necessary values:

Expand the system_mondb1 connection.

Page 7: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Create a user for the migration repository +++++++++++++++++++++++++++++++++++++++++++

Create USERS tablespace for both Pluggable databases+++++++++++++++++++++++++++++++++++++++++++++++++++

Page 8: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

SQL> alter session set container=TESTPDB1;

Session altered.

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME------------------------------SYSTEMSYSAUXTEMPTSTPDTEMP_PDB1TEST01

6 rows selected.

SQL> create tablespace users datafile '/BPELAIT2/MONDB1/MONDB1/CDB1/testpdb/users01.dbf' size 100M;

Tablespace created.

SQL> alter session set container=TESTPDB2;

Session altered.

SQL> create tablespace users datafile '/BPELAIT2/MONDB1/MONDB1/CDB2/MONDB1/users02.dbf' size 100M;

Tablespace created.

Page 9: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

++++++++++++++++++++++++++++++++++++Creating the Migration Repository ++++++++++++++++++++++++++++++++++++

To convert the Microsoft SQL Server database to Oracle, we need to create a repository to store the required repository tables and PL/SQL packages. To do this, perform the following steps:

Create a connection to the C##MIGREP user

Right-click the CMIGREP connection and select Migration Repository > Associate Migration Repository.

Page 10: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Click OK.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Capturing the Microsoft SQL Server Exported Files ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

To load the captured Microsoft SQL Server database scripts into Oracle SQL Developer, perform the following steps:

Page 11: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Page 12: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

connection for the migration repository. Select the CMGREP connection, and click Next.

Edit the connection to fix

Page 13: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Provide the Source Database details. Select the mode as Offline. Click Choose to select the Offline Capture Source file.

Page 14: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Click Next.

Page 15: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

The Target Database details. Select mode Offline. click Next.

Page 16: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Provides details about the Data Move. Note down the location of the Data Move Script Directory, and click Next.

Provides you the summary of the entire Project. Note down the details and you can always click Back to make modifications. Finally, click Finish.

Page 17: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

The Data Migration happens successfully.

Click Ok.

Page 18: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Executing the Script to Create the Oracle Database Objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

To generate the SQL script with DDL statements that will be executed to create the objects in an Oracle Database, perform the following steps:

The SQL from the script is shown. Select system_mondb1 from the drop-down on the right.

Click Run Script (F5).

Page 19: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Save script output

Output:Creating User C##Emulation ...user C##EMULATION dropped.user C##EMULATION created.GRANT succeeded.Creating User C##dbo_Northwind ...user C##DBO_NORTHWIND dropped.user C##DBO_NORTHWIND created.GRANT succeeded.ConnectedPACKAGE UTILS compiledPACKAGE BODY UTILS compiledpublic synonym UTILS created.grant succeeded.ConnectedCreating Sequence Orders_OrderID_SEQ ...sequence ORDERS_ORDERID_SEQ created.Creating Sequence Products_ProductID_SEQ ...sequence PRODUCTS_PRODUCTID_SEQ created.Creating Sequence Employees_EmployeeID_SEQ ...sequence EMPLOYEES_EMPLOYEEID_SEQ created.Creating Sequence Categories_CategoryID_SEQ ...sequence CATEGORIES_CATEGORYID_SEQ created.Creating Sequence Shippers_ShipperID_SEQ ...sequence SHIPPERS_SHIPPERID_SEQ created.Creating Sequence Suppliers_SupplierID_SEQ ...sequence SUPPLIERS_SUPPLIERID_SEQ created.PROCEDURE CLOBTOBLOB_SQLDEVELOPER compiledCreating Table Orders ...table ORDERS created.Creating Primary Key Constraint PK_Orders on table Orders ...table ORDERS altered.Creating Index CUSTOMERSORDERS_1 on Orders ...index CUSTOMERSORDERS_1 created.Creating Index EMPLOYEESORDERS_1 on Orders ...index EMPLOYEESORDERS_1 created.Creating Index OrderDate on Orders ...index ORDERDATE created.Creating Index ShippedDate on Orders ...index SHIPPEDDATE created.

Page 20: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Creating Index ShippersOrders on Orders ...index SHIPPERSORDERS created.Creating Index ShipPostalCode on Orders ...index SHIPPOSTALCODE created.Creating Table Products ...table PRODUCTS created.Creating Primary Key Constraint PK_Products on table Products ...table PRODUCTS altered.Creating Check Constraint CK_Products_UnitPrice on table Products...table PRODUCTS altered.Creating Check Constraint CK_ReorderLevel on table Products...table PRODUCTS altered.Creating Check Constraint CK_UnitsInStock on table Products...table PRODUCTS altered.Creating Check Constraint CK_UnitsOnOrder on table Products...table PRODUCTS altered.Creating Index CATEGORYID_1 on Products ...index CATEGORYID_1 created.Creating Index ProductName on Products ...index PRODUCTNAME created.OMMENT on table order_details 'ORIGINAL NAME:ORDER DETAILS' succeeded.Creating Primary Key Constraint PK_Order_Details on table Order_Details ...table ORDER_DETAILS altered.Creating Check Constraint CK_Discount on table Order_Details...table ORDER_DETAILS altered.Creating Check Constraint CK_Quantity on table Order_Details...table ORDER_DETAILS altered.Creating Check Constraint CK_UnitPrice on table Order_Details...table ORDER_DETAILS altered.Creating Index ORDERSORDER_DETAILS_1 on Order_Details ...index ORDERSORDER_DETAILS_1 created.Creating Index PRODUCTSORDER_DETAILS_1 on Order_Details ...index PRODUCTSORDER_DETAILS_1 created.Creating Table CustomerCustomerDemo ...table CUSTOMERCUSTOMERDEMO created.Creating Primary Key Constraint PK_CustomerCustomerDemo on table CustomerCustomerDemo ...table CUSTOMERCUSTOMERDEMO altered.Creating Table CustomerDemographics ...table CUSTOMERDEMOGRAPHICS created.Creating Primary Key Constraint PK_CustomerDemographics on table CustomerDemographics ...table CUSTOMERDEMOGRAPHICS altered.Creating Table Region ...table REGION created.Creating Primary Key Constraint PK_Region on table Region ...table REGION altered.Creating Table Territories ...table TERRITORIES created.Creating Primary Key Constraint PK_Territories on table Territories ...table TERRITORIES altered.Creating Table EmployeeTerritories ...table EMPLOYEETERRITORIES created.Creating Primary Key Constraint PK_EmployeeTerritories on table EmployeeTerritories ...table EMPLOYEETERRITORIES altered.Creating Table Employees ...table EMPLOYEES created.Creating Primary Key Constraint PK_Employees on table Employees ...table EMPLOYEES altered.Creating Index LastName on Employees ...index LASTNAME created.Creating Index PostalCode_2 on Employees ...index POSTALCODE_2 created.Creating Table Categories ...table CATEGORIES created.Creating Primary Key Constraint PK_Categories on table Categories ...table CATEGORIES altered.Creating Index CategoryName on Categories ...index CATEGORYNAME created.Creating Table Customers ...:::Creating Foreign Key Constraint FK_Orders_Customers on table Customers...table ORDERS altered.Creating Foreign Key Constraint FK_Orders_Employees on table Employees...

Page 21: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

table ORDERS altered.Creating Foreign Key Constraint FK_Orders_Shippers on table Shippers...table ORDERS altered.Creating Foreign Key Constraint FK_Products_Categories on table Categories...table PRODUCTS altered.Creating Foreign Key Constraint FK_Products_Suppliers on table Suppliers...table PRODUCTS altered.Creating Foreign Key Constraint FK_Order_Details_Orders on table Orders...table ORDER_DETAILS altered.Creating Foreign Key Constraint FK_Order_Details_Products on table Products...table ORDER_DETAILS altered.Creating Foreign Key Constraint FK_CustomerCustomerDemo on table CustomerDemographics...table CUSTOMERCUSTOMERDEMO altered.Creating Foreign Key Constraint FK_CustomerCustomerDemo_Custom on table Customers...table CUSTOMERCUSTOMERDEMO altered.Creating Foreign Key Constraint FK_Territories_Region on table Region...table TERRITORIES altered.Creating Foreign Key Constraint FK_EmployeeTerritories_Employe on table Employees...table EMPLOYEETERRITORIES altered.Creating Foreign Key Constraint FK_EmployeeTerritories_Territo on table Territories...table EMPLOYEETERRITORIES altered.Creating Foreign Key Constraint FK_Employees_Employees on table Employees...table EMPLOYEES altered.TRIGGER ORDERS_ORDERID_TRG compiledTRIGGER PRODUCTS_PRODUCTID_TRG compiledTRIGGER EMPLOYEES_EMPLOYEEID_TRG compiledTRIGGER CATEGORIES_CATEGORYID_TRG compiledTRIGGER SHIPPERS_SHIPPERID_TRG compiledTRIGGER SUPPLIERS_SUPPLIERID_TRG compiledview CUSTOMER_AND_SUPPLIERS_BY_CITY altered.view ALPHABETICAL_LIST_OF_PRODUCTS altered.::.view CATEGORY_SALES_FOR_1997 altered.view SALES_BY_CATEGORY altered.view SALES_TOTALS_BY_AMOUNT altered.view SUMMARY_OF_SALES_BY_QUARTER altered.view SUMMARY_OF_SALES_BY_YEAR altered.Connection created by CONNECT script command disconnected

Now scripts have run successfully, we can create a connection for the C##dbo_Northwind user. Right-click Connection and select New Connection.

Test and save:

Page 22: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Expand the dbo_Northwind_migrated_MONDB1 connection.

The database tables that were converted to Oracle are listed. Select the CUSTOMERS table.

Page 23: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Select the Data tab. Notice that currently there is no data in the table.

+++++++++++++++++++++++++++++++++++++++++++++Checking Offline Data Move Preferences +++++++++++++++++++++++++++++++++++++++++++++A date format mask can be specified in the preferences so that the Offline Data Move scripts (in particular, the Oracle SQL*Loader control files) can reference the correct format. To do so, perform the following steps:Select Tool > Preferences then Expand Migration and select Data Move Options.

Page 24: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Make sure the Date Mask format matches the following (for loader format) Mon dd yyyy HH:mi:ssAMand the Timestamp Mask matches the following. Mon dd yyyy HH:mi:ss:ff3AM

++++++++++++++++++++++++++++++++Analysis and Estimation ++++++++++++++++++++++++++++++

SQL> @pre_load.sqlTable altered.Table altered.::Table altered.Table altered.Table altered.Table altered.::Trigger altered.Table altered.Table altered.

SQL> exit

SQL> alter user C##DBO_NORTHWIND default tablespace USERS;

User altered.

SQL> alter user C##DBO_NORTHWIND quota unlimited on users;

User altered.

Page 25: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Loading Data with SQL loader+++++++++++++++++++++++++++++++

Oracle@xxxxxxx:/home/oracle/monowar/SQL2ODBU/Data$ sqlldr C##dbo_Northwind/Password@mondb1 control=Oracle/c##dbo_Northwind.Customers.ctl log= C##dbo_Northwind.Customers.log

Oracle@xxxxxxx:/home/oracle/monowar/SQL2ODBU/Data$ sqlldr C##dbo_Northwind/Password@mondb1 control=Oracle/c##dbo_Northwind.Customers.ctl log= C##dbo_Northwi>

SQL*Loader: Release 12.1.0.1.0 - Production on Fri Oct 25 15:16:12 2013

Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.

Path used: ConventionalCommit point reached - logical record count 64Commit point reached - logical record count 91

Table C##DBO_NORTHWIND.CUSTOMERS: 91 Rows successfully loaded.

Check the log file: C##dbo_Northwind.Customers.logfor more information about the load.

Switch to Oracle SQL Developer and Refresh the connection.The data for the table has been loaded successfully.

SQL> @post_load.sql

PL/SQL procedure successfully completed.PL/SQL procedure successfully completed.

Page 26: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

Table altered.Table altered.:::

Trigger altered.Trigger altered.

SQL> exit

NOTE:+++++++++++++++++++pre_load.sql+++++++++++++++++++WHENEVER SQLERROR CONTINUE;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT CK_UnitPrice;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT CK_Discount;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT CK_Quantity;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT CK_Products_UnitPrice;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT CK_ReorderLevel;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT CK_UnitsInStock;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT CK_UnitsOnOrder;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT FK_Order_Details_Products;ALTER TABLE C##dbo_Northwind.EmployeeTerritories DISABLE CONSTRAINT FK_EmployeeTerritories_Territo;ALTER TABLE C##dbo_Northwind.Orders DISABLE CONSTRAINT FK_Orders_Shippers;ALTER TABLE C##dbo_Northwind.EmployeeTerritories DISABLE CONSTRAINT FK_EmployeeTerritories_Employe;ALTER TABLE C##dbo_Northwind.Territories DISABLE CONSTRAINT FK_Territories_Region;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo DISABLE CONSTRAINT FK_CustomerCustomerDemo_Custom;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo DISABLE CONSTRAINT FK_CustomerCustomerDemo;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT FK_Order_Details_Orders;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT FK_Products_Suppliers;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT FK_Products_Categories;ALTER TABLE C##dbo_Northwind.Orders DISABLE CONSTRAINT FK_Orders_Employees;ALTER TABLE C##dbo_Northwind.Orders DISABLE CONSTRAINT FK_Orders_Customers;ALTER TABLE C##dbo_Northwind.Employees DISABLE CONSTRAINT FK_Employees_Employees;ALTER TABLE C##dbo_Northwind.Customers DISABLE CONSTRAINT PK_Customers;ALTER TABLE C##dbo_Northwind.Shippers DISABLE CONSTRAINT PK_Shippers;ALTER TABLE C##dbo_Northwind.Categories DISABLE CONSTRAINT PK_Categories;

Page 27: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

ALTER TABLE C##dbo_Northwind.Suppliers DISABLE CONSTRAINT PK_Suppliers;ALTER TABLE C##dbo_Northwind.Employees DISABLE CONSTRAINT PK_Employees;ALTER TABLE C##dbo_Northwind.EmployeeTerritories DISABLE CONSTRAINT PK_EmployeeTerritories;ALTER TABLE C##dbo_Northwind.Order_Details DISABLE CONSTRAINT PK_Order_Details;ALTER TABLE C##dbo_Northwind.Region DISABLE CONSTRAINT PK_Region;ALTER TABLE C##dbo_Northwind.CustomerDemographics DISABLE CONSTRAINT PK_CustomerDemographics;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo DISABLE CONSTRAINT PK_CustomerCustomerDemo;ALTER TABLE C##dbo_Northwind.Orders DISABLE CONSTRAINT PK_Orders;ALTER TABLE C##dbo_Northwind.Products DISABLE CONSTRAINT PK_Products;ALTER TABLE C##dbo_Northwind.Territories DISABLE CONSTRAINT PK_Territories;ALTER TRIGGER C##dbo_Northwind.CK_Birthdate_SYSDTRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Products_ProductID_TRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Employees_EmployeeID_TRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Orders_OrderID_TRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Categories_CategoryID_TRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Shippers_ShipperID_TRG DISABLE;ALTER TRIGGER C##dbo_Northwind.Suppliers_SupplierID_TRG DISABLE;ALTER TABLE C##dbo_Northwind.Categories add (SQLDEVELOPER_CLOB_4 CLOB);ALTER TABLE C##dbo_Northwind.Employees add (SQLDEVELOPER_CLOB_15 CLOB);

+++++++++++++++++++++++++++++++++c##dbo_Northwind.Customers.ctl+++++++++++++++++++++++++++++++++

load datainfile '[Northwind].[dbo].[Customers].dat' "str '<EORD>'"into table C##dbo_Northwind.Customersfields terminated by '<EOFD>'trailing nullcols(CustomerID "DECODE(:CustomerID, CHR(00), ' ', :CustomerID)",CompanyName "DECODE(:CompanyName, CHR(00), ' ', :CompanyName)",ContactName "DECODE(:ContactName, CHR(00), ' ', :ContactName)",ContactTitle "DECODE(:ContactTitle, CHR(00), ' ', :ContactTitle)",Address "DECODE(:Address, CHR(00), ' ', :Address)",City "DECODE(:City, CHR(00), ' ', :City)",Region "DECODE(:Region, CHR(00), ' ', :Region)",PostalCode "DECODE(:PostalCode, CHR(00), ' ', :PostalCode)",Country "DECODE(:Country, CHR(00), ' ', :Country)",Phone "DECODE(:Phone, CHR(00), ' ', :Phone)",Fax "DECODE(:Fax, CHR(00), ' ', :Fax)")

++++++++++++++++++post_load.sql++++++++++++++++++BEGIN C##dbo_Northwind.CLOBTOBLOB_sqldeveloper('Categories', 'SQLDEVELOPER_CLOB_4', 'Picture'); END;/BEGIN C##dbo_Northwind.CLOBTOBLOB_sqldeveloper('Employees', 'SQLDEVELOPER_CLOB_15', 'Photo'); END;/

Page 28: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

WHENEVER SQLERROR CONTINUE;ALTER TABLE C##dbo_Northwind.Territories ENABLE CONSTRAINT PK_Territories;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT PK_Products;ALTER TABLE C##dbo_Northwind.Orders ENABLE CONSTRAINT PK_Orders;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo ENABLE CONSTRAINT PK_CustomerCustomerDemo;ALTER TABLE C##dbo_Northwind.CustomerDemographics ENABLE CONSTRAINT PK_CustomerDemographics;ALTER TABLE C##dbo_Northwind.Region ENABLE CONSTRAINT PK_Region;ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT PK_Order_Details;ALTER TABLE C##dbo_Northwind.EmployeeTerritories ENABLE CONSTRAINT PK_EmployeeTerritories;ALTER TABLE C##dbo_Northwind.Employees ENABLE CONSTRAINT PK_Employees;ALTER TABLE C##dbo_Northwind.Suppliers ENABLE CONSTRAINT PK_Suppliers;ALTER TABLE C##dbo_Northwind.Categories ENABLE CONSTRAINT PK_Categories;ALTER TABLE C##dbo_Northwind.Shippers ENABLE CONSTRAINT PK_Shippers;ALTER TABLE C##dbo_Northwind.Customers ENABLE CONSTRAINT PK_Customers;ALTER TABLE C##dbo_Northwind.Employees ENABLE CONSTRAINT FK_Employees_Employees;ALTER TABLE C##dbo_Northwind.Orders ENABLE CONSTRAINT FK_Orders_Customers;ALTER TABLE C##dbo_Northwind.Orders ENABLE CONSTRAINT FK_Orders_Employees;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT FK_Products_Categories;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT FK_Products_Suppliers;ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT FK_Order_Details_Orders;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo ENABLE CONSTRAINT FK_CustomerCustomerDemo;ALTER TABLE C##dbo_Northwind.CustomerCustomerDemo ENABLE CONSTRAINT FK_CustomerCustomerDemo_Custom;ALTER TABLE C##dbo_Northwind.Territories ENABLE CONSTRAINT FK_Territories_Region;ALTER TABLE C##dbo_Northwind.EmployeeTerritories ENABLE CONSTRAINT FK_EmployeeTerritories_Employe;ALTER TABLE C##dbo_Northwind.Orders ENABLE CONSTRAINT FK_Orders_Shippers;ALTER TABLE C##dbo_Northwind.EmployeeTerritories ENABLE CONSTRAINT FK_EmployeeTerritories_Territo;ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT FK_Order_Details_Products;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT CK_UnitsOnOrder;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT CK_UnitsInStock;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT CK_ReorderLevel;ALTER TABLE C##dbo_Northwind.Products ENABLE CONSTRAINT CK_Products_UnitPrice;ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT CK_Quantity;ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT CK_Discount;

Page 29: Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database

ALTER TABLE C##dbo_Northwind.Order_Details ENABLE CONSTRAINT CK_UnitPrice;ALTER TRIGGER C##dbo_Northwind.Orders_OrderID_TRG ENABLE;ALTER TRIGGER C##dbo_Northwind.Products_ProductID_TRG ENABLE;ALTER TRIGGER C##dbo_Northwind.Suppliers_SupplierID_TRG ENABLE;ALTER TRIGGER C##dbo_Northwind.Shippers_ShipperID_TRG ENABLE;ALTER TRIGGER C##dbo_Northwind.CK_Birthdate_SYSDTRG ENABLE;ALTER TRIGGER C##dbo_Northwind.Categories_CategoryID_TRG ENABLE;ALTER TRIGGER C##dbo_Northwind.Employees_EmployeeID_TRG ENABLE;~