moving data between the data bases in database

mqasimsheikh5 29 views 26 slides Apr 26, 2024
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Moving data between Data bases


Slide Content

Moving data between databases Group Members: ~ Suhana Sultan. ~Aleena Farooq(GR) ~ Maheen Yameen ~ Maham Shahid

Subtopics: Describe and use methods to move data SQL Loader, objects, External Tables Oracle data pump, use of data pump Export and Import of data

What is data moving: Data moving is the process of transferring data from one storage system or computing environment to another. It refers to the data transfer between different types of file formats, databases and storage systems.

Moving data between databases: It is the process of Moving data between two database engines.
It requires careful planning and testing as there are number of sub tasks involved in the process like storage capacity estimation of the target database, testing application and ensuring data confidentially.

Data migration process: It involves the following 5 steps; 1)Scope identification 2) Data mapping
3) Option selection
4) Migration
5) Validation

Data migration flow:

Methods of moving data: Three techniques for moving a database: 1.detach and copy
2.take the database offline and copy the files
3.back up the database and restore it on the other server.

Detach and attach A database: Once a database is detached, no users can connect to it, the files are unlocked, and you are free to copy the files to a new location. When you attach the database to a new SQL Server, you have the option of changing the locations of the data and log files

Taking the database offline: Taking the Database Offline:-
You can choose to take a database offline and copy the files to a new location as a method for moving the server.

Using database backup and restore: Like the attach and detach method, the backup and restore GUI and Transact-SQL commands support changing the file locations to the new SQL Server instance.
After you’ve backed up the database to a disk file or to tape, you can then restore it to the new database location.

Sql loader: SQL*Loader is the primary method to load data from external flat files (ASCII/TEXT/CSV) into tables of an Oracle Database.

Cont. SQL*Loader works based on a control file, which specifies the location of data, how data should be parsed and interpreted, and target table
where data should be loaded. It also takes inputs from one or more datafiles , which contain data to be loaded into the database.
Output from SQL*Loader for a load session is a table where data is loaded, a log file, and a bad file (with details of bad formatted records) or

Data migration using Sql loader:

Characteristics: Can load data from multiple datafiles and into multiple tables during same load session.
Can perform remote data loading
Selective data loading (load records based on record values)
Supports complex object relational data.
Supports both conventional and direct path loading Supports loading from non-Oracle database

Loading data from non-oracle database: First Non-Oracle database will export the data into a pre-defined file format.
SQL loader will read this file and load the data into Oracle database tables

What is external table: External table is a table that come from flat files stored on outside the database .
The flat files are files that stored on OS level .

Difference between sql loader and external table: So here is the Difference between SQL loader and external table
If there are multiple primary input datafiles with SQL*Loader loads, a bad file and a discard file are created for each input datafile . With external table loads, there is only one bad file and one discard file for all input datafiles . It is the read only data For modify come to the data File and do the modification

ORACLE DATA PUMP:- Oracle Data Pump technology enables very high-speed movement of data and metadata from one database to another. It is a Server-based technology. Oracle data pump is available in Orcale 10 g version and above.

Oracle data pump migration :

CHARACTERISTICS OF DATA PUMP: Enables high speed movement of bulk data and metadata. Simplest approach to export objects from one source to target. Enhanced version of original/legacy import and export utilities. Performed as a server side job. Hence more efficient ( unlike legacy exp /imp where dump file is created at the client side/location)

How does data pump move data: There are several Oracle Data Pump methods that you can use to move data in and out of databases. You can select the method that best fits your use case.

Expdp and impdp : Data pump is a utility for unloading data and metadata into a set of OS files called a “Dump File Set”. The dump file set can be imported only by the Data pump import utility. The Dump file can be imported on the same or as well as on the other system. The dump file set is made up of one or more disl files that contain table data, metadata, and control information.

Privileges: DATAPUMP_EXP_FULL_DATABASE DATAPUMP_IMP_FULL_DATABASE

DIRECTORY OBJECT: CREATE DIRECTORY DIR_NAME AS ‘PATH’; GRANT READ WRITE ON DIR TO USER_NAME

QUIZ: 1) How many ways of moving data into database. A)2. B)3 C)4 D) Many 2) Which version of oracle support Expdp / Impdp . A) 8i. B) 11g C) 12c. D) 10g

~ Practical work will be performed practically. THANK YOU!