- •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
Answers to Review Questions |
677 |
Answers to Review Questions
1.B. The NLS Runtime Library (NLSRTL) provides the language-independent textand character-processing functionality for Oracle.
2.A, D, E. The client-side NLS_LANG parameter can define language, territory, and character set all at once. Though the value for NLS_SORT is derived from the NLS_LANGUAGE parameter setting, it is not explicitly set by NLS_LANG. NLS_CALENDAR is not affected by the setting of
NLS_LANG.
3.A, C. A strict superset must contain all characters found in the other character set and have matching encoded values for those characters.
4.A, D. The NLS_SORT parameter defines the default sort method (binary or linguistic) for both SQL WHERE clause operations and NLSSORT function operations. The default sort method for ORDER BY and BETWEEN (and all other SQL operations that support linguistic sorts) is defined by the NLS_COMP parameter. NLS_SORT is an invalid function name.
5.E. The V$NLS_VALID_VALUES view shows the names of all language, territory, sort, and character-set definitions that are available in the database.
6.C. Only the TIMESTAMP WITH TIME ZONE datatype actually stores time-zone information in the database. The TIMESTAMP WITH LOCAL TIME ZONE datatype converts the timestamp to local time and drops the time-zone information before storing it in the database. DATE and TIMESTAMP datatypes do not deal with time-zone information at all. DATETIME is not a valid datatype.
7.B, C. The NLS_COMP parameter can be set to BINARY or ANSI. This parameter determines the default sort type for certain SQL functions. (A setting of ANSI specifies that linguistic sorts should be used.)
8.C. NLS settings embedded in a SQL function have the highest precedence, followed by explicit ALTER SESSION statements, client environment variables (which execute an implicit ALTER SESSION statement), server-initialization parameters, and finally default settings.
9.A. A is the only true statement. An _M appended to the end of a sort name denotes a multi lingual sort. Its absence denotes a monolingual sort. Case-sensitive and accent-insensitive sorts have _CI or _AI appended to the name. Its absence denotes case sensitivity and accent sensitivity.
10.C. NLS datatypes (NCHAR, NVARCHAR, and NCLOB) store data using the character set defined as the national character set by default. Because the national character set is UTF-8 (a Unicode character set), data stored in these datatypes will be Unicode data by default. All other datatypes use the character set defined as the database character set. Because US7ASCII is not a Unicode character set, it does not store Unicode data by default.
11.B. Automatic data conversion occurs when data is moved between character sets. However, if the server character set is a strict superset of the client character set, no conversion is necessary.
678 Chapter 13 n Implementing Globalization Support
12.B. The _AI suffix implies that an accent-insensitive sort will be performed. Accent-insensi- tive sorts are also case insensitive by default. The _CI suffix implies that a case-insensitive sort will be performed, but it will not be accent insensitive. Specifying both suffixes (_AI_ CI) is illegal.
13.E. The SQL SELECT statement does not invoke a sort.
14.E. Only option E is correct. Tables owned by the SYS and SYSTEM users are not affected by default-length semantics. Data dictionary tables always use byte semantics, and NCHAR columns always use character semantics. Therefore, neither is affected by the setting of the
NLS_LENGTH_SEMANTICS parameter.
15.C. Calendar definitions are not stored as locale definition files. Only languages, linguistic sorts, territories, and character set definitions are stored as locale definition files.
16.B. Oracle supports seven distinct calendars: Gregorian, Japanese Imperial, ROC Official, Persian, Thai Buddha, Arabic Hijrah, and English Hijrah.
17.B. Linguistic searches are closely related to linguistic sorts and are governed by the NLS_SORT parameter.
18.B. Accent-insensitive sorts are always case insensitive, not the other way around.
19.C. The lx1boot.nlb file identifies the available locale definitions to the NLSRTL.
20.A. Linguistic sort elements define the rules for linguistic sorting. There is no linguistic sort element named “accent expansion.” The other choices are all valid rules.
Appendix Lab Exercises
A
This appendix contains lab exercises for each chapter so that you can practice your skills before the exam.
Lab 1.1: Creating an ASM Instance
This lab was created using Windows XP. However, it should also work using Unix (and in fact was tested using Linux). We have taken certain liberties in this lab to make the use of Automatic Storage Management (ASM) as easy as possible. We will note them as the lab proceeds. Where there is a difference between the use of Windows and Unix, we will note that difference and provide some guidance. The RMAN labs will be using ASM as the flash recovery area (FRA), so this lab and Lab 1.2 will be prerequisites to future labs.
To create your ASM instance, do the following:
1.Start the Oracle Database Configuration Assistant (DBCA). You should be familiar with this tool as it was covered as a part of your OCA studies.
2.Click though the Welcome page and select Configure Automatic Storage Management from the DBCA Operations page.
3.A window appears indicating that you need to install Oracle Cluster Synchronization Service (CSS) and that it needs to be running. The window will instruct you on how to install this service (running localconfig reset). Open a command-line window and run the command to configure CSS. Here is an example of the output from this command after a successful execution:
C:\>c:\oracle\product\11.1.0\db_1\bin\localconfig reset Step 1: stopping local CSS stack
Step 2: deleting OCR repository Step 3: creating new OCR repository
Successfully accumulated necessary OCR keys. Creating OCR keys for user ‘robert’, privgrp ‘’.. Operation successful.
Step 4: creating new CSS service successfully created local CSS service successfully reset location of CSS setup
After configuring CSS, click OK in the DBCA pop-up window and then Next on the DBCA Operations page to continue.
Lab 1.1: Creating an ASM Instance |
681 |
4.You will be prompted for the SYS password in the DBCA. Enter the password you want to use for SYS. Click Next.
5.A pop-up window appears indicating that DBCA will create the ASM instance. Click OK to create the instance.
6.The DBCA ASM Disk Groups page appears. We will add disk groups to our ASM instance in the next lab, so simply click Finish to complete the ASM instance creation. A pop-up window appears asking if you want to perform another operation. Click the No button to exit DBCA.
7.Check to see whether you can connect to your ASM instance. In Windows, from a command line set your ORACLE_SID=+ASM and connect to the ASM instance, as shown here:
C:\Documents and Settings\Robert>sqlplus sys as sysasm
SQL*Plus: Release 11.1.0.6.0 - Production on Sun Aug 10 13:21:17 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter password: Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining
and Real Application Testing options SQL>
8.Shut down and then start up your ASM service with the shutdown command:
C:\Documents and Settings\Robert>sqlplus sys as sysasm
SQL*Plus: Release 11.1.0.6.0 - Production on Sun Aug 10 18:37:11 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved.
Enter password: Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name
ASM instance |
shutdown |
|
SQL> startup |
|
|
ASM instance |
started |
|
Total System |
Global Area 535662592 bytes |
|
Fixed Size |
1334380 |
bytes |
Variable Size |
509162388 |
bytes |
ASM Cache |
25165824 |
bytes |
ORA-15110: no diskgroups mounted