- •About the Authors
- •Contents at a Glance
- •Contents
- •Table of Exercises
- •Introduction
- •Assessment Test
- •Answers to Assessment Test
- •What Is ASM?
- •Working with the ASM Instance
- •Overview of ASM Data Dictionary Views
- •Using ASM Storage
- •Using RMAN with ASM
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Understanding the Oracle Database as It Relates to Backup and Recovery
- •Performing Oracle Offline Backups
- •Performing Oracle Online Backups
- •Backing Up the Control File
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Performing Incomplete Recoveries
- •Performing Other Types of Recoveries
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Why Use RMAN?
- •Exploring the RMAN Architecture
- •Connecting to RMAN
- •Configuring RMAN for Use
- •Backing Up Your Database with RMAN
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Introducing the Recovery Catalog
- •Creating the Recovery Catalog User and Schema Objects
- •Using a Recovery Catalog
- •Maintaining the Recovery Catalog
- •Using the RMAN Virtual Private Catalog
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •RMAN Database-Recovery Basics
- •Using Image Copies to Recover Your Database
- •Other Basic Recovery Topics
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Switching Between RMAN Incarnations
- •Overview of RMAN Database Duplication
- •Performing an RMAN Tablespace Point-in-Time Recovery
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Overview of Flashback Technology
- •Using Automatic Undo Management
- •Using Flashback Technologies
- •Using Additional Flashback Operations
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Diagnosing the Database
- •Managing Database Performance
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Managing Memory
- •Managing Space
- •Managing Resources
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Automating Tasks with the Scheduler
- •Exploring the Scheduler Architecture
- •Exploring Common Administration Tools
- •Using Scheduler Jobs
- •Using Scheduler Programs
- •Using Schedules
- •Creating Lightweight Jobs
- •Using Job Chains
- •Using Scheduler Windows
- •Creating and Using Job Classes
- •Using Advanced Scheduler Concepts to Prioritize Jobs
- •Using Scheduler Views
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •An Overview of Globalization Support
- •Using NLS Parameters
- •Using Datetime Datatypes
- •Using Linguistic Sorts and Searches
- •Summary
- •Exam Essentials
- •Review Questions
- •Answers to Review Questions
- •Lab 1.1: Creating an ASM Instance
- •Lab 1.2: Creating ASM Disk Groups
- •Lab 1.3: Using ASM Disk Groups from a Database
- •Lab 2.2: Putting the Database in ARCHIVELOG Mode
- •Lab 2.3: Executing a Manual Online (Hot) Backup
- •Lab 3.1: Executing a Time-Based Point-in-Time Recovery
- •Lab 3.2: Recovering from Control-File Loss with a Backup Control File
- •Lab 3.3: Recovering from Loss of the Current Online Redo Log
- •Lab 4.1: Creating an RMAN Offline Backup
- •Lab 4.2: Creating an RMAN Incremental Backup
- •Lab 4.3: Creating an Image-Copy Backup
- •Lab 5.1: Implementing RVPC
- •Lab 6.1: Restoring a Datafile Online
- •Lab 6.2: Performing a Change-Based Recovery with RMAN
- •Lab 6.3: Restoring a Control File from an Autobackup
- •Lab 7.1: Monitoring RMAN Backups
- •Lab 7.2: One of My Backups Is Missing!
- •Lab 8.1: Duplicating a Database Using Active Database Duplication
- •Lab 8.2: Duplicating a Database Using Backup-Based Duplication to a Different Point in Time
- •Lab 9.1: Using the Recycle Bin
- •Lab 9.3: Using Flashback Data Archive
- •Lab 10.1: Using Support Workbench to Report a Problem to Oracle Support
- •Lab 11.1: Exporting a Transportable Tablespace
- •Lab 11.2: Testing Resumable Space Allocation
- •Lab 11.3: Manually Configuring the SGA
- •Lab 12.1: Creating a Local External Job
- •Lab 12.2: Creating a Job Window
- •Lab 13.1: Using the Locale Builder to Create a New Linguistic Sort
- •Lab 13.2: Setting NLS Parameters
- •Lab 13.3: Performing Linguistic Sorts
- •What You’ll Find on the CD
- •System Requirements
- •Using the CD
- •Troubleshooting
- •Glossary
- •Index
Lab 11.1: Exporting a Transportable Tablespace |
757 |
Lab 11.1: Exporting a Transportable
Tablespace
This lab was created using Windows XP. However, it should also work using Unix (and in fact was tested using Linux). In this lab, you’ll export a transportable tablespace set.
1.Query the v$transportable_platform view to determine which destination platforms are compatible with the source database platform.
SQL> select |
* from v$transportable_platform; |
|
|
PLATFORM_ID |
PLATFORM_NAME |
|
ENDIAN_FORMAT |
----------- |
-------------------------------- |
-------------- |
|
1 |
Solaris[tm] OE (32-bit) |
Big |
|
2 |
Solaris[tm] OE (64-bit) |
Big |
|
7 |
Microsoft Windows |
IA (32-bit) |
Little |
10 |
Linux IA (32-bit) |
|
Little |
6 |
AIX-Based Systems |
(64-bit) |
Big |
3 |
HP-UX (64-bit) |
|
Big |
5 |
HP Tru64 UNIX |
|
Little |
4 |
HP-UX IA (64-bit) |
|
Big |
11 |
Linux IA (64-bit) |
|
Little |
15 |
HP Open VMS |
|
Little |
8 |
Microsoft Windows |
IA (64-bit) |
Little |
9 |
IBM zSeries Based |
Linux |
Big |
13 |
Linux 64-bit for AMD |
Little |
|
16 |
Apple Mac OS |
|
Big |
12 |
Microsoft Windows |
64-bit for AMD |
Little |
17 |
Solaris Operating |
System (x86) |
Little |
18 |
IBM Power Based Linux |
Big |
|
19 |
HP IA Open VMS |
|
Little |
20 |
Solaris Operating |
System (AMD64) |
Little |
19 rows selected. SQL>
2.After you have identified the names of the tablespaces you want to transport, execute the DBMS_TTS.TRANSPORT_SET_CHECK procedure. Next, query the TRANSPORT_ SET_VIOLATIONS view.
SQL> SET SERVEROUTPUT ON
SQL> exec dbms_tts.transport_set_check (‘USER_DATA’); PL/SQL procedure successfully completed.
758 Appendix A n Lab Exercises
SQL> SELECT * FROM TRANSPORT_SET_VIOLATIONS;
SQL>
3.To generate the transportable tablespace set, you’ll need to place the tablespaces in read-only mode.
SQL>alter tablespace user_data read only; Tablespace altered.
4.Exit to the host prompt and execute the data pump export utility to export the metadata.
SQL>host
C:\>expdp dumpfile=expdat.dmp DIRECTORY=exp_dir TRANSPORT_TABLESPACES= user_data
Export: Release 11.1.0.6.0 - Production on Sunday, 28 September, 2008 14:40:19
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Username: sys as sysdba Password:
Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting “SYS”.”SYS_EXPORT_TRANSPORTABLE_01”: sys/******** AS SYSDBA dumpfile=e
xpdat.dmp DIRECTORY=EXP_DIR TRANSPORT_TABLESPACES= user_data Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK Processing object type TRANSPORTABLE_EXPORT/TABLE Processing object type TRANSPORTABLE_EXPORT/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK Master table “SYS”.”SYS_EXPORT_TRANSPORTABLE_01”
successfully loaded/unloaded
*************************
Dump file set for SYS.SYS_EXPORT_TRANSPORTABLE_01 is:
Lab 11.2: Testing Resumable Space Allocation |
759 |
C:\TEMP\EXPDAT.DMP
*************************
Datafiles required for transportable tablespace USER_DATA: C:\ORACLE\ORADATA\ORCL\USER_DATA01.DBF
Job “SYS”.”SYS_EXPORT_TRANSPORTABLE_01” successfully completed at 14:41:47
5.Now copy the tablespace database files to the staging area, either local or remote. Once the copy is complete, return to SQL*Plus and place the tablespaces in read-write mode:
SQL>alter tablespace user_data read write; Tablespace altered.
SQL>
Lab 11.2: Testing Resumable
Space Allocation
In this lab, you will perform a more detailed resumable-space-allocation exercise. You will create a table, start an insert operation that will create a resumable condition, monitor the table’s space utilization, and then remedy the condition.
1.Shrink the existing USER_DATA tablespace and create a table with minimal storage values.
SQL> alter database datafile ‘c:\oracle\oradata\orcl\user_data01.dbf’ resize 10 m;
Database altered.
SQL> create table scott.resumable_test (x number, y varchar2(10))
storage (initial 1k maxextents 1) tablespace user_data;
Table created.
2.Start an insert operation.
SQL> insert into resumable_test values (1, ‘testtest’); SQL> insert into resumable values (1, ‘testtest’);
1 row created.
SQL> insert into resumable select * from resumable; 1 row created.
760 Appendix A n Lab Exercises
SQL> /
2 rows created. SQL> /
4 rows created. SQL> /
8 rows created. SQL> /
16 rows created. SQL> /
32 rows created. SQL> /
64 rows created. SQL> /
128 rows created. SQL> /
256 rows created. SQL> /
512 rows created. SQL> /
1024 rows created. SQL> /
2048 rows created. SQL> /
4096 rows created. SQL> /
8192 rows created. SQL> /
16384 rows created. SQL> /
32768 rows created. SQL> /
65536 rows created. SQL> /
131072 rows created. SQL> /
The session should hang at this point.
3.Monitor the operation from another SQL*Plus session:
SQL> select session_id, sql_text, error_msg from dba_resumable;