Upload
emmanuel-hansen
View
28
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Chapter 12 Loading and Transporting Data. Chapter Objectives. Identify the purpose of the Export, Import, and SQL*Loader utilities Perform an interactive export of a table Perform a scripted export of a table. Chapter Objectives (Cont.). Perform an interactive import of an Oracle9 i table - PowerPoint PPT Presentation
Citation preview
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
1
Chapter 12Loading and Transporting Data
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
2
Chapter Objectives
• Identify the purpose of the Export, Import, and SQL*Loader utilities
• Perform an interactive export of a table
• Perform a scripted export of a table
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
3
Chapter Objectives (Cont.)
• Perform an interactive import of an Oracle9i table
• Perform a scripted import of an Oracle9i table
• Load external data into an Oracle9i database
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
4
Export Utility
• Use to:– Create logical backup
Copy contents and structure of database, schema, or tablespace
– Reorganize databaseReduces fragmentation
• Creates a binary dump file for importing
• Compresses extents by default
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
5
Export Types
• Conventional-path– Verifies DDL statements– Default
• Direct-path– Places retrieved rows in dump files, followed
by DDL statements– Specified with DIRECT=Y argument– Saves time for large amounts of data
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
8
Parameter File for Scripted Export
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
10
Import Utility
• Reads (and executes) DDL statements in exported binary dump file
• Recreates tables if necessary
• Can be interactive or scripted
• Access by typing imp operating system prompt
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
12
Parameter File for Scripted Import
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
14
Backup and Recovery of the Recovery Catalog
• Export (or import) entire RMAN schema
• Logical backup supplements physical backup strategy
• Example RMAN schema export command:exp rman/rman@database_name
file=dumpfilename.dmp owner=rman
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
15
SQL*Loader Utility
• Imports data generated by a different type of database (non-Oracle)
• Uses three types of files:– Control file– Input file– Log files (bad, discard, general)
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
16
Control File
Specifies data to be loaded, format, and procedure
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
19
Loading Methods
• Conventional-pathUses INSERT statements, fires triggers
• Direct-pathBypasses the buffer cache, writes directly to data file
• Parallel direct-pathUses multiple load sessions; requires more space
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
21
Chapter Summary
• The Export utility is used to export data from an existing Oracle9i database table
• The entire database, a user’s schema, or simple a database table can be exported using the Export utility.
• Exported data is written to a binary file, known as a dump file.
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
22
Chapter Summary (Cont.)
• The Export utility can be operated in an interactive or scripted mode.
• If a value is not specified, the Export utility assumes the default value for the parameter.
• The Import utility is used to import data that was previously exported to a dump file.
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
23
Chapter Summary (Cont.)
• The Export and Import utilities can be used along with a physical backup strategy to create a backup of the Recovery Catalog.
• The SQL*Loader utility is used to load data from text files.
• SQL*Loader utilizes three types of files: a control file, log files, and input file.
Chapter 12 Oracle9i DBA II: Backup/Recovery and Network Administration
24
Chapter Summary (Cont.)
• The control file specifies the loading parameters and the structure of the data.
• The log files are used to provide information about the loading process and identify any bad or discarded records.
• The input file contains records to be loaded into the database; otherwise the data must be contained in the control file.