Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Database 11g.pdf
Скачиваний:
78
Добавлен:
10.06.2015
Размер:
12.69 Mб
Скачать

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

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]