logo资料库

OCM核心内参(OCM考试题库).pdf

第1页 / 共48页
第2页 / 共48页
第3页 / 共48页
第4页 / 共48页
第5页 / 共48页
第6页 / 共48页
第7页 / 共48页
第8页 / 共48页
资料共48页,剩余部分请下载后查看
一、术语说明 db 机:是指在 section 0 阶段进行手动建库的机器。 gridcontrol 机:是指在 section 2 阶段进行 grid control 软件安装的机器。 RAC 机:是指在 section 7 阶段使用 VNC 连接到远程服务器安装 RAC 时使用的远程机器。 奇数机(ODD)与偶数机(EVEN):在真正考试时,每个人面前会有两台机器, 一台称为奇数机(ODD),一台称为偶数机(EVEN),要你在 ODD 机器上做什么或者在 EVEN 机 器上做什么,偶数还是奇数是依靠机器的 hostname 最后一位或者两位数字来定的,通常会 要求你在奇数机上创建数据库,在偶数机上安装 Grid Control 的 OMS。偶数机上是没有 Oracle 软件的,因此 OMS 需要的 Repository 这个数据库也需要创建在奇数机上,再加上之 后第二天会要求创建的 Standby 实例,总共会有三个实例运行在奇数机上。 二、考试安排及要求 (一)时间安排 第一天: section 0:创建一个数据库 45 分钟 section 1:数据库和网络配置 120 分钟 section 2:Gridcontrol 安装配置 120 分钟 section 3:数据库备份恢复 60 分钟 section 4:数据仓库管理 90 分钟 第二天: section 5:数据库管理 120 分钟 section 6:数据库性能管理 120 分钟 section 7:部署 Oracle RAC 数据库 105 分钟 sectoin 8:部署 Dataguard 数据库 60 分钟
(二)注意事项 1、早点儿到考场,可以挑自己满意的机子,去晚了就只有别人挑剩下的了。正式考试前可 以有 15 分钟的时间熟悉考试环境。 2、请一定在坐到考试桌前之后,尽快检查你面前的机器,会是两台 RHEL4 的 Linux 服务器, Gnome 的图形界面(喜欢用 KDE 的兄弟们请去熟悉一下 Gnome 的操作),有鼠标有键盘,检 查你的键盘输入是否顺畅,检查你的鼠标移动是否顺畅,检查机器的电源插座是否插牢,检 查 Oracle 10gR2 的软件是否已经安装,检查$ORACLE_HOME 等环境参数是否已经设置好,检 查联机文档是否可以正常读取。按照常理来说,这些都不应该出问题,但是万一你运气好碰 到有问题的机器,一旦考试开始计时,那损失的就只能是你自己了。哦,为什么是两台机器 呢?因为一台是用来创建数据库,而另外一台是用来安装 Grid Control 的 OMS。 3、请检查一下两台考试机的硬件配置,重点看一下其内存大小,如果是 2g 大小的,每个数 据库实例可以考虑分配 350m 的内存;如果是 1g 大小的,每个数据库实例最多分配 250m 的 内存。 4、考试时可以参考 oracle 的官方文档,在考试机上就有。另外,还有安装介质。 5、在进行 section 0,section 1 时注意审题,如果提示对数据库进行备份,请按要求进行 备份。在接下来的考试中有可能 oracle 设置陷阱在后面的题要求恢复。 6、section0、2、7、8 都是死题,而且都是必考的。并且可能包含如下陷阱:第一,可能 需要先恢复,数据库才能用。第二,安装 rac 时,ssh 可能不通。第三,安装 grid control 时,注意 prefill 等。 7、时刻注意查看随机自带的 oracle DOC,一些命令操作可以从 doc 中复制、粘贴、修改。 8、可以用 Gnome 下的 Text Editor 对一些复制好的命令进行编辑,以提高效率。 9、时刻注意 OCM 考试中的各种陷阱。
三、考试题库及讲解 (一)Section 0:创建数据库(即手动建库)【在 db 机操作】 1、手动建库 1)确定实例名。 export ORACLE_SID=test 2)建立密码文件。 orapwd file=orapwtest password=oracle 3)建立 pfile。 cat init.ora|grep -v ^ #|grep -v ^ $ >inittest.ora 在 inittest.ora 里只包含如下初始化参数: db_name=test processes=150 controlfiles=(xxxxxx,xxxxxx) db_block_size=8192 log_buffer=50000000 sga_target=300m undo_management=auto undo_tablespace=undotbs background_dump_dest core_dump_dest user_dump_dest 4)建立 spfile 并启动实例。 sql>sqlplus / as sysdba sql>create spfile from pfile sql>startup nomount 5)手工创建数据库(使用 create database 命令) CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY pz6r58 USER SYSTEM IDENTIFIED BY y1tz5p LOGFILE GROUP 1 ('/u01/oracle/oradata/mynewdb/redo01.log') SIZE 100M, GROUP 2 ('/u01/oracle/oradata/mynewdb/redo02.log') SIZE 100M, GROUP 3 ('/u01/oracle/oradata/mynewdb/redo03.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE '/u01/oracle/oradata/mynewdb/system01.dbf' SIZE 325M REUSE EXTENT MANAGEMENT LOCAL SYSAUX DATAFILE '/u01/oracle/oradata/mynewdb/sysaux01.dbf' SIZE 325M REUSE DEFAULT TABLESPACE tbs_1(在考试时去掉这条语句) DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u01/oracle/oradata/mynewdb/temp01.dbf' SIZE 20M REUSE UNDO TABLESPACE undotbs DATAFILE '/u01/oracle/oradata/mynewdb/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED; 6)运行相关脚本。 CONNECT SYS/password AS SYSDBA @/u01/oracle/rdbms/admin/catalog.sql @/u01/oracle/rdbms/admin/catproc.sql @?/rdbms/admin/catblock.sql @?/rdbms/admin/catoctk.sql @?/rdbms/admin/owminst.plb connect system/oracle
@?/sqlplus/admin/pupbld.sql 2、section0 阶段考试需要注意的具体事项 1)按题目要求设置“字符集” 2)有 5 块磁盘,建库建在指定位置,一般都是建在文件系统上。 3)考试的结果是美国那边直接用脚本连到你的服务器上,通过数据字典抓取结果,然后判 断你哪些错了,所以,一定要保证在最后的时候,数据库是 OPEN 的,监考老师说还有 5 分 钟结束考试的时候,不要再做什么其它操作了。如果之前你创建完数据库,想要 shutdown 以后冷备一下的话,请估算好时间。我听到的案例是冷备刚完成,数据库还未 startup,结 果美国那边开始抓取考试结果,因为无法连接数据库,因此第一天上午的 section 得了零分。 4)为了减省时间,如果题目里没有明确要求备份,可以先不备份。 5)如果有时间,用 root 用户修改/etc/hosts 文件,使该文件里包括 2 个节点的主机名和 相应的 ip 地址。 3、参考的联机文档 1、administrator’s guide->2 creating a oracle database-> Manually Creating an Oracle Database (二)Section 1:数据库和网络的配置【在 db 机操作】 1、数据库配置(管理表空间) 有如下考题需要注意: 一、Create a temporary tablespace group that contains two temporary tablespaces to support batch process about creation of large indexes,and analyzing tables. Use the following specification: 1、Temporary tablespace group named TEMP_GRP containing temporary tablespaces TEMP1 and TEMP2. 2、Make TEMP_GRP the default temporary tablespace for all new users.
答案: create temporary tablespace temp1 tempfile '/u01/app/oradata/temp1.dbf' size 50m tablespace group TEMP_GRP; create temporary tablespace temp2 tempfile '/u01/app/oradata/temp2.dbf' size 50m tablespace group TEMP_GRP; alter database default temporary tablespace TEMP_GRP; select * from database_properties; 二、Create a permanent tablespace to store sample test data.Use the following specification: 1、Tablespace name of EXAMPLE 2、Initial datafile size of 400MB with the file expected to grow to 4GB. 3、Initial extent size of 1MB 4、Next extent size of 1MB 答案: create tablespace example datafile 'xxxxxxx' size 400m autoextend on maxsize 4g extent management local uniform size 1m; 三、Create a permanent tablespace to store indexes.Use the following specification: 1、Tablespace name of INDX 2、File size of 40MB 答案: create tablespace indx datafile ‘………’size 40m; 四、Create a permanent tablespace to store data collected from the various Oracle tools.Use the following specification: 1、Tablespace name of tools 2、File size of 48MB 3、Initial extent size of 4MB 4、Next extent size of 4MB 答案: create tablespace tools datafile ‘……’size 48m extent management local uniform size 4m;
五 、Create a permanent tablespace for storing segments associated with online transaction processing with high insert rates.Due to the potential high volume of concurrent inserts,every effort should be taken to reduce contention such of the tables that will be stored in this tablespace.Use the following specification: 1、Tablespace name of OLTP 2、File size of 48MB 3、Initial extent size of 2MB 4、Next extent size of 2MB 答案: create tablespace oltp datafile ‘……’ size 48m extent managemnet local uniform size 2m segment space management auto; 六、Due to the expected high volumn of transaction, the database should have the following configuration: 1、A minimum of 5 redo log groups 2、Each redo log group should not be a single point of failure 3、File size of 100MB 4、Specify the Location such that it minimizes contention and reduces the risk of a single point of failure case of disk drive failure. 答案: sql>ALTER DATABASE ADD LOGFILE GROUP 4 ('/u01/app/oradata/test/log4a.log', '/u01/app/oradata/test/log4b.log') SIZE 100m,group 5 (‘/u01/app/oradata/test/log5a.log’,’/u01/app/oradata/test/log5b.log’) size 100m; sql>alter database add logfile member '/u01/app/oradata/shuai/redo1b.log' to group 1; 注意:日志组的 2 个 member 应该分布在 2 个不同的磁盘上。 七、Triplex the controlfile to minimize recovery in case of disk drive failure. 答案: 将数据库关闭,然后拷贝控制文件到目标路径,然后改 pfile 中的 control 参数,重新 生成 spfile,最后启动数据。
八、As user SYS,run the script /home/oracle/scripts/create_bishhr.sql. Ignore any errors concerning OE.But do not ignore any other errors. Investigate the parameter file for reasonable size for each parameter listed. Add additional parameters as you deem necessary to support an optimal database environment. In addition, modify or add the following listed parameters: UTL_FILE_DIR=('/home/oracle','/home/oracle/temp','/home/oracle/scripts') Note:Applications that use Oracle10g features will be running therefore, ensure the database and instance are appropriately configured. 答案: 主要是根据题目要求调整数据库的初始化参数。 九、Backup the database to prepare for complete recovery under all circumstances. 答案: 给数据库做一个冷备,可以使用操作系统命令直接进行拷贝,最后记着 Open the database. 十、管理临时表空间组及更改默认的临时表空间 一些相关的命令: ALTER TABLESPACE lmtemp3 TABLESPACE GROUP '';--指 lmtemp3 不属于任何表空间组。 alter database default tablespace tbs1; select * from database_properties; 2、网络配置  例题 一、如何配置一个非默认端口的监听,并启动它。 答案: 第一,配置 listener.ora 文件 LISTENER= (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=sale-server)(PORT=1421)) (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
分享到:
收藏