课程目标:
1、数据库服务器架构概览
数据库服务器包括数据库和实例。实例包括内存和后台进程。
连接是数据库实例和用户进程之间的通信路径。
用户进程表示用户登录到数据库实例的状态。
2、实例与数据库
一个实例只能关联一个数据库。RAC是不同服务器的多个实例关联一个数据库。
3、Oracle内存结构
SGA:一个数据库实例的包括数据和控制信息的共享内存区域
PGA:服务器或者后台进程的数据和控制信息的私有内存区域,每个服务器进程和后台进程都有自己的PGA。
4、进程架构
Oracle数据库有三种主要进程:
5、进程架构
服务器进程用于:
6、填空
7、进程启动顺序
[root@oracletest1 ~]# cat /etc/init/oracle-ohasd.conf
# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
start on runlevel [35]
stop on runlevel [!35]
respawn
exec /etc/init.d/init.ohasd run >/dev/null 2>&1
在Linux 6平台,/etc/init目录下Oracle创建了一个oracle-ohasd.conf文件,增加了Oracle启动命令。
在Windows平台,是以服务的方式来启动。
8、数据库存储架构
Oracle数据库必须包含以下三种文件:
Oracle数据库正常稳定运行建议还包括以下文件:
9、Oracle数据库的逻辑结构和物理结构
逻辑上,一个数据库包含多个表空间,一个表空间包含多个段,一个段包含多个区,一个区包含多个数据块。
(1)数据段,创建表时自动创建以表名字命名的数据段(2)索引段,创建索引时自动创建以索引名字命名的索引段(3)回滚段:存储undo信息(4)临时段:SQL语句需要临时工作区(比如排序)就会用到临时段
表空间与数据文件相对应,一个表空间由一个或多个数据文件组成,一个数据文件只属于一个表空间,单个数据文件最大大小为(2^22-1)*DB_BLOCK_SIZE。如果是大文件表空间,则只有一个数据文件,最大可以到(2^32-1)*32K=128T。
10、自动存储管理ASM
ASM主要用于Oracle RAC环境的并发访问,是一个集群文件系统,主要用于存放Oracle数据库的文件,包含数据文件,控制文件,联机日志文件,备份,归档等,不能存放操作系统的文件,比如数据库安装文件,如果要放的话,就需要在ASM上面创建一个ACFS文件系统。我们一般主要使用ASM的磁盘组,类似RAID,做了条带化和镜像。
11、ASM存储组件
ASM磁盘可以是物理磁盘或者分区、存储的LUN、LV或者网络文件,多个ASM磁盘构成ASM磁盘组,每个ASM磁盘划分成多个分配单元(AU),分配单元是ASM最小的连续分配磁盘空间,可以设置分配单元为1、2、4、8、16、32或者64M,一个或者多个分配单元构成ASM区(extent),一个或者多个区构成ASM文件。ASM文件只能在一个磁盘组中。
12、ASM实例
ASM实例同样也是由进程和内存组成。
ASM的SGA包括:
ASM实例默认使用自动内存管理,动态调整SGA各个内存组件的大小,内存总大小取决于ASM管理的磁盘空间,最小推荐值为256MB。
ASM实例有很多进程,有的和数据库实例的进程名称一样,但是可能功能不一样。主要的进程如下:
13、DBA配置工具
DBA配置和管理Oracle可以使用以下工具:
14、管理框架以及相关的DBA工具
数据库管理框架三个主要组件:
15、使用Oracle Restar管理数据库
使用Oracle Restart:
16、相
关习题:
(1)Which two statements are true regarding hot patching? (Choose two.)
A. It requires relinking of the Oracle binary .
B. It does not require database instance shutdown.
C. It can detect conflicts between two online patches.
D. It is available for installi ng all patches on all plat forms.
E. It works only in a single database instance environment.
答案:BC
(2)During the installation of Oracle Database 1 1g, you do not set ORACLE_BASE explicitly . Y ou selected the option to create a database as part of the installation. How would this environment variable setting affect the installation?
A. The installation terminates with an error .
B. The installation proceeds with the default value without warnings and errors.
C. The installation proceeds with the default value but it would not be an OF A-compliant database.
D. The installation proceeds with the default value but a message would be generated in the alert log file.
答案:D
(3)In which two aspects does hot patching differ from conventional patching? (Choose two.)
A. It consumes more memory compared with conventional patching.
B. It can be installed and uninstalled via OPatch unlike conventional patching.
C. It takes more time to install or uninstall compared with conventional patching.
D. It does not require down time to apply or remove unlike conventional patching.
E. It is not persistent across instance startup and shutdown unlike conventional patching.
答案:AD
(4)Which two statements are true regarding the starting of the database instance using the following command? (Choose two.)
SQL>STARTUP UPGRADE
A. It enables all system triggers.
B. It allows only SYSDBA connections.
C. It ensures that all job queues remain active during the upgrade process.
D. It sets system initialization parameters to specific values that are required to enable database upgrade scripts to be run.
答案:BD
(5)In your database, the LDAP_DIRECTORY_SYSAUTH initialization parameter has been set to YES and the users who need to access the database as DBAs have been granted SYSDBA enterprise role in Oracle Internet Directory (OID). SSL and the password file have been configured. A user SCOTT with the SYSDBA privilege tries to connect to the database instance from a remote machine using the command:
$ SQLPLUS scott/tiger@DB01 AS SYSDBA
where DB01 is the net service name.
Which authentication method would be used first?
A. authentication by password file
B. authentication by using certificates over SSL
C. authentication by using the Oracle Internet Directory
D. authentication by using the local OS of the database server
答案:A
(6)Globalization support is implemented through the text- and character-processing functions provided by which Oracle feature?
A. RSTLNE
B. NLSRTL
C. LISTENER
D. NLSSORT
E. Linguistic sorts
答案:B
(7)What elements of globalization can be explicitly defined using the NLS_LANG environment variable? (Choose all that apply.)
A. NLS_LANGUAGE
B. NLS_SORT
C. NLS_CALENDAR
D. NLS_CHARACTERSET
E. NLS_TERRITORY
答案:ADE
(8)Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B? (Choose all that apply.)
A. A must contain all of the characters defined in B.
B. A must be Unicode.
C. The encoded values in A must match the encoded values in B for all characters defined in B.
D. A must be a multibyte character set.
E. The encoded values in A must match the encoded values in B for all numeric and alphabetic characters in B.
答案:AC
(9)The NLS_SORT parameter sets the default sort method for which of the following operations?(Choose all that apply.)
A. WHERE clause
B. ORDER BY clause
C. BETWEEN clause
D. NLSSORT function
E. NLS_SORT function
答案:AD
(10)Which view shows all valid values for the NLS_LANGUAGE, NLS_SORT, NLS_TERRITORY, and NLS_CHARACTERSET parameters?
A. V$VALID_NLS_VALUES
B. NLS_VALID_VALUES
C. NLS_VALUE_OPTIONS
D. V$NLS_VALUE_OPTIONS
E. V$NLS_VALID_VALUES
答案:E
(11)Which of the following datatypes store time-zone information in the database?
A. TIMESTAMP
B. DATE
C. TIMESTAMP WITH TIME ZONE
D. TIMESTAMP WITH LOCAL TIME ZONE
E. DATETIME
答案:C
(12)Which of the following are valid settings for the NLS_COMP parameter? (Choose all that apply.)
A. ASCII
B. ANSI
C. BINARY
D. MONOLINGUAL
E. MULTILINGUAL
答案:BC
(13)NLS parameters can be set using the five methods listed. Put the methods in order from highest to lowest according to Oracles order of precedence:
a. Default setting
b. Client environment variable
c. Explicit ALTER SESSION statement
d. Inside SQL function
e. Server initialization parameter
A. b, d, e, a, c
B. e, a, b, c, d
C. d, c, b, e, a
D. a, b, d, c, e
E. d, c, b, a, e
答案:C
(14)What can you determine about the following linguistic sorts based only on their names?
1. GERMAN
2. FRENCH_M
A. 1 is a monolingual sort.
B. 2 is a monolingual sort.
C. 1 is case insensitive.
D. Both 1 and 2 are case insensitive.
E. Case sensitivity is unknown.
答案:A
(15)In a database with the database character set of US7ASCII and a national character set of UTF-8, which data types would be capable of storing Unicode data by default?
A. VARCHAR2
B. CHAR
C. NVARCHAR2
D. CLOB
E. LONG
答案:C
(16)Automatic data conversion will occur if which of the following happens?
A. The client and server have different NLS_LANGUAGE settings.
B. The client and server character sets are not the same, and the database character set is not a strict superset of the client character set.
C. The client and server are in different time zones.
D. The client requests automatic data conversion.
E. The AUTO_CONVERT initialization parameter is set to TRUE.
答案:B
(17)Which of the following NLS_SORT parameter values would result in case-insensitive and accent-insensitive binary sorts?
A. NLS_SORT = BINARY
B. NLS_SORT = BINARY_AI
C. NLS_SORT = BINARY_CI
D. NLS_SORT = BINARY_AI_CI
E. Binary sorts are case insensitive and accent insensitive by default.
答案:B
(18)Which NLS parameter can be used to change the default Oracle sort method from binary to linguistic for the SQL SELECT statement?
A. NLS_LANG
B. NLS_COMP
C. NLS_SORT
D. None of the above
答案:D
(19)Which of the following would be affected by setting NLS_LENGTH_SEMANTICS=CHAR?
A. All objects in the database
B. Tables owned by SYS and SYSTEM
C. Data dictionary tables
D. NCHAR columns
E. CHAR columns
答案:E
(20)Which is not a valid locale definition file type?
A. Language
B. Linguistic sort
C. Calendar
D. Territory
E. Character set
答案:C
(21)How many different calendars does Oracle 11g support?
A. 22
B. 7
C. 6
D. 15
E. 2
答案:B
Oracle supports seven distinct calendars: Gregorian, Japanese Imperial, ROC Official, Persian, Thai Buddha, Arabic Hijrah, and English Hijrah。
(22)Which NLS parameter directly governs linguistic searches?
A. NLS_SEARCH_L
B. NLS_SORT
C. NLS_SEARCH
D. NLS_SORT_L
E. None of the above
答案:B
(23)Case-insensitive sorts are always accent insensitive by default.
A. True
B. False
答案:B
(24)What is the name of the file that identifies the set of available locale definitions?
A. locale.def
B. lxdef.ora
C. lx1boot.nlb
D. lx1boot.ora
E. lang.def
答案:C
(25)Which of the following is not a valid linguistic sort element?
A. Accent expansion
B. Canonical equivalence
C. Reverse secondary sorting
D. Ignorable characters
E. Character rearrangement
答案:A
(26)You installed Oracle Database 11g and are performing a manual upgrade of the Oracle9i database. As a part of the upgrade process, you execute the following script:
SQL>@utlu111i.sql
Which statement about the execution of this script is true?
A. It must be executed from the Oracle Database 11g environment.
B. It must be executed only after the SYSAUX tablespace has been created.
C. It must be executed from the environment of the database that is being upgraded.
D. It must be executed only after AUTOEXTEND is set to ON for all existing tablespaces.
E. It must be executed from both the Oracle Database 11g and Oracle Database 9i environments.
答案:C
(27)You notice that a job in a chain has not completed on a nonconstrained RAC database.
Which of these are valid reasons why that might occur?
A. The job priority is 1 and the resource consumer group CPU emphasis allocation is a low percentage.
B. The job affinity is to a service and one node in that service is unavailable.
C. The job affinity is to an instance and that instance is unavailable.
D. There is no service affinity.
E. None of the above.
答案:C
Question 522
The NLS_LANGUAGE parameter specifies the default conventions to be used for which of the following globalization elements?
A. Languages for server messages
B. Day and month names and abbreviations
C. Symbols to represent a.m., p.m., AD, and BC
D. Affirmative and negative response strings (YES, NO)
E. None of the above
F. All of the above
答案:F
(29)The NLS_TERRITORY parameter specifies the default conventions to be used for which of the following globalization elements? (Choose all that apply.)
A. Date format
B. Decimal character
C. Group separator
D. First day of the month
E. None of the above
F. All of the above
答案:ABC
(30)Your database instance is running. You are not able to access Oracle Enterprise Manager Database Control because the listener is not started.
Which tool or utility would you use to start the listener?
A. Oracle Net Manager
B. Listener Control utility
C. Database Configuration Assistant
D. Oracle Net Configuration Assistant
答案:B
(31)View the Exhibit.
You are creating a database by using Database Configuration Assistant (DBCA). You have chosen the
File System option as the storage mechanism. What would be the result of choosing this option?
Exhibit:
A. Disk mirroring and striping would be done automatically
B. The database files would be managed by the operating system's file system
C. DBCA would not save the database files by using Optimal File Architecture (OFA)
D. The data files are automatically spread across all available storage devices to optimize performance and resource utilization
答案:B
(32)Which mode of database shutdown requires an instance recovery at the time of the next database startup?
A.ABORT
B.NORMAL
C.IMMEDIATE
D.TRANSACTIONAL
答案:A
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) | Powered by Discuz! X3.2 |