Presentation is loading. Please wait.

Presentation is loading. Please wait.

11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)

Similar presentations


Presentation on theme: "11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)"— Presentation transcript:

1 11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)

2 11-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Migrate the schema and data online Migrate the schema and data offline Use SQL*Loader to load data into the Oracle database Identify objects migrated by Migration Workbench Analyze the migration process by using Migration Workbench reports

3 11-3 Copyright © 2004, Oracle. All rights reserved. Migration Workbench Workflow Capture Migrate Map 1 2 3 Source ModelOracle ModelSource database Destination database

4 11-4 Copyright © 2004, Oracle. All rights reserved. Stage 3: Migrating to the Oracle Database Create the schema in the Oracle destination database. Transfer the data from the source database to the Oracle destination database. Use one of three methods to migrate the schema and data. Data transfer Schema creation Migrate Source ModelOracle ModelSource database Destination database

5 11-5 Copyright © 2004, Oracle. All rights reserved. Migrating Online Versus Offline Does Migration Workbench have to connect to the source or destination database? Option Source database Destination database Utility used Online schema creationNoYes Migration Wizard Offline schema creationNo Scripts Online data transferYes Migration Wizard Offline data transferNo Scripts

6 11-6 Copyright © 2004, Oracle. All rights reserved. Three Common Scenarios Use one of three most common combinations to migrate the database: I.Online schema creation and online data transfer II.Offline schema creation and offline data transfer III.Online schema creation and offline data transfer

7 11-7 Copyright © 2004, Oracle. All rights reserved. I. Online Schema Creation and Online Data Transfer Source database Destination database Migration Workbench Extract data Transfer data Create schema

8 11-8 Copyright © 2004, Oracle. All rights reserved. II. Offline Schema Creation and Offline Data Transfer Source database Destination database Migration Workbench Extract data Transfer data Create schema Data files Generate DDLs Scripts

9 11-9 Copyright © 2004, Oracle. All rights reserved. III. Online Schema Creation and Offline Data Transfer Destination database Create schema Data files Source database Migration Workbench Transfer data Extract data

10 11-10 Copyright © 2004, Oracle. All rights reserved. Order of Migration Oracle recommends that you migrate the database in the following order: 1.Migrate tablespaces, users, and user tables 2.Migrate the data 3.Migrate the schema objects such as constraints, indexes, and triggers

11 11-11 Copyright © 2004, Oracle. All rights reserved. Creating the Schema Online You use the Migration Wizard to create the schema and optionally transfer data online: 1.Specify the destination database connection information. 2.Migrate tablespaces, users, and user tables.

12 11-12 Copyright © 2004, Oracle. All rights reserved. Creating the Schema Online 3.Optionally migrate the data. 4.Select the schema objects to migrate.

13 11-13 Copyright © 2004, Oracle. All rights reserved. Resolving Migration Errors When you encounter an error, depending on its nature you can do one of the following: Ignore the error. Ignore all errors. Correct the error. Stop the process.

14 11-14 Copyright © 2004, Oracle. All rights reserved. Creating the Schema Offline If you create the schema offline, Oracle Corporation recommends that you adhere to the recommended order of migration: 1.Generate two separate migration scripts: –Script A to create tablespaces, users, and user tables –Script B to create remaining schema objects 2.Run Script A. 3.Migrate the data. 4.Run Script B.

15 11-15 Copyright © 2004, Oracle. All rights reserved. Transferring Data Offline Source databaseData filesDestination database Migration Workbench 1. Generate SQL*Loader scripts Data unload script 2. Unload 3. Load

16 11-16 Copyright © 2004, Oracle. All rights reserved. Step 1: Generate Data Unload and SQL*Loader Scripts

17 11-17 Copyright © 2004, Oracle. All rights reserved. Locating the Generated Scripts The following is created under the install_omwb_dir\omwb\sqlloader_scripts\SQL Server2K\[timestamp] directory: The oracle subdirectory, which contains SQL*Loader control files bcp_extract.bat, which is a data unload script

18 11-18 Copyright © 2004, Oracle. All rights reserved. Step 2: Unload Data from SQL Server 2000 to Flat Files 1.Edit the bcp_extract.bat file as follows: –Original –After 2.Execute the script from the command line: 3.Copy the generated data files to the oracle subdirectory. >bcp_extract.bat bcp hr.dbo.COUNTRIES out COUNTRIES.dat -c -t " " -r " " -Usa -P -S bcp hr.dbo.COUNTRIES out COUNTRIES.dat -c -t " " -r " " -Usa -Psa -S edrsr30p1

19 11-19 Copyright © 2004, Oracle. All rights reserved. Full Notes Page

20 11-20 Copyright © 2004, Oracle. All rights reserved. Step 3: Load Data into the Oracle Database Using SQL*Loader To load data into the Oracle database, you run the data load script by using SQL*Loader: Execute the script from the command line: Review the SQL*Loader.bad file for records that are not inserted into the database. >sql_load_script.bat

21 11-21 Copyright © 2004, Oracle. All rights reserved. Overview of SQL*Loader Input data files Control file SQL*Loader Log file Bad files Discard files Tables and indexes

22 11-22 Copyright © 2004, Oracle. All rights reserved. Full Notes Page

23 11-23 Copyright © 2004, Oracle. All rights reserved. What Objects Are Migrated Physical Databases Schema Tables and data Temporary tables Indexes Views Integrity constraints User-defined types Logical Stored procedures Triggers Security Users Groups Privileges

24 11-24 Copyright © 2004, Oracle. All rights reserved. Full Notes Page

25 11-25 Copyright © 2004, Oracle. All rights reserved. Consolidating SQL Server Databases OE OE_East OE_West Instance A DB3 FIN HR Instance B Instance A Database consolidation Instance consolidation

26 11-26 Copyright © 2004, Oracle. All rights reserved. Consolidating SQL Server Databases: Example OE OE_East OE_West Instance A DB3 FIN HR Instance B Instance A Database consolidation Instance consolidation sa.country sa.country_1 fin.country hr.country dbo.country

27 11-27 Copyright © 2004, Oracle. All rights reserved. Migration Workbench Reports Migration Workbench reports: –Contain information about the source and destination database –Summarize activities during the migration stages –Record warnings and errors Migration Workbench reports enable you to: –Determine the number of objects that are successfully and completely migrated into the destination database –Determine the objects that require manual intervention to complete the migration process –Evaluate errors that occurred and when they occurred

28 11-28 Copyright © 2004, Oracle. All rights reserved. Types of Reports There are three types of reports: Database Summary report Database Detailed report Database Errors and Warnings report

29 11-29 Copyright © 2004, Oracle. All rights reserved. Generating and Viewing Database Migration Reports

30 11-30 Copyright © 2004, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Migrate the schema and data online Migrate the schema and data offline Use SQL*Loader to load data into the Oracle database Identify objects migrated by Migration Workbench Analyze the migration process by using Migration Workbench reports

31 11-31 Copyright © 2004, Oracle. All rights reserved. Practice Overview: Migrating Database Objects Including Data This practice covers the following migration topics: Migrating the tablespace, users, and user tables online Transferring the data offline Generating and viewing reports

32 11-32 Copyright © 2004, Oracle. All rights reserved.


Download ppt "11 Copyright © 2004, Oracle. All rights reserved. Performing a Migration Using Oracle Migration Workbench (Part II)"

Similar presentations


Ads by Google