DBLOG
» WTF
Toggle navigation
DBLOG
主页
OCM
1、概览
2、数据导入导出
3、GaussDB(DWS)数据库管理
4、数据库调优与开发实践
5、湖仓一体
6、开发应用
7、集群管理
8、巡检和维运维
About Me
归档
标签
M4原题
无
2025-03-31 17:18:12
7
0
0
admin
``` ocrdump -local acfsutl snap create aa dir bakuploc crsctl get css misscount s1 failback yes failovertype s3 -pe racdb1 racdb2 alter删除primary key create unique index uidx_cust_id on sales(cust_id) global partition by hash(cust_id) partitions 4 parallel 4; alter table sales add constraint pl_sales primary key(cust_id) using index uidx_cust_id; paral poli anto local true seq start with 10 increment by 1 maxvalue 1111 nocycle orader cache 10 alter diskgroup dgflex add filegroup PDB3_filegroup database PDB3 alter diskgroup dgflex add quotagroup=PDB3_filegroup set 'quota'=8G; cvu modify -t 720 oclumon manage -repos checkretentiontime 259220 oclumon manage -repos changerepossize 3896 chactl query repository chactl set maxretention - time 90 ``` ### Module 4: Configuring Real Application Clusters #### Description In this module, you will manage Grid infrastructure and RAC database. Activities include creating RAC database and administering Clusterware. #### Objectives - Create RAC database. - Convert RAC database to RAC One Node database and convert RAC One Node database to RAC database. - Administer ASM disk group. - Configure and manage Grid Infrastructure. #### End State At the end of this module, your RACDB databases must be open. --- ### IMPORTANT: Read First #### Connection Details You must use ssh to connect to the virtual machines from the Candidate Gateway machine. - To connect to host03 virtual machine: `ssh -X oracle@host03` or `ssh -X grid@host03` - To connect to host04 virtual machine: `ssh -X oracle@host04` or `ssh -X grid@host04` - The oracle password on the host03 and host04 virtual machines is `oracle`. - The grid password on the host03 and host04 virtual machines is `oracle`. #### Passwords Do not change any of the default passwords for the databases or the OS. You may fail the exam if you change the passwords. - The sys and system schema password in all databases can be accessed with the password `oracle4U`. - The root password on the host03 and host04 virtual machines is `oracle`. #### Directories All scripts are located in `/home/oracle/scripts` or `/home/grid/scripts` on host03. - Do not delete or change the directory structure or files unless instructed. Unspecified deletions or changes to the directory structure or files can cause you to fail the exam. - Do not use `/home/oracle/scripts` on the virtual machines or `/home/oracle/temp` on the Candidate Gateway machine to store any of your files. ### Documentation To access the Oracle Database documentation, enter the following URL: `file:///stage/doc/db/index.html` --- ### General - You can configure and use GUI tools such as Enterprise Manager Database Express, if desired. - Datafiles should not exceed 2 GB in size. - At the end of solving the module, ensure that a minimum of 1 GB free space is available in the FRA for each database. - At the end of the module, before the proctor starts the scoring, ensure that you have a minimum of 15% free space for the / (root) file system on the Database Server (host03). Use the `df -h` command at the command prompt to check the free space. --- ### TASKS #### Section 1: Enabling Grid Infrastructure 1. **All Grid infrastructure components are currently shut down on both host03 and host04. Startup Grid infrastructure on both nodes and ensure that future reboots of either node will automatically start Grid infrastructure on that node.** ``` oifog getif获取 setif -gloabl ens/12.23.213 获取的最后 ``` ### Section 2: Configuring Grid Infrastructure and Creating ASM Disk Groups For network configuration for Grid infrastructure, use `eth0` as the public network and `eth1` and `eth2` for the ASM and the private interconnect networks. 1. **Connect as grid user, and use eth3 to build high availability of the Grid infrastructure private interconnect network (ASM & Private).** 2. **Create a disk group, +DGACFS, with external redundancy that can be used as an ADVM volume file. Select the following ASM disks:** 3. **Create a disk group, +DGFRA, with external redundancy to hold the Fast Recovery Area (FRA). Select the following ASM disks:** 4. **Create and mount ACFS filesystem on host03 using an ADVM volume called ACFS_VOL1 in the +DGACFS disk group with the following specifications:** 5. **Adjust the attribute of disk group +DGDATA such that ASM will wait for 8 hours when a disk goes offline before dropping it and rebalances the disk group.** 6. **Create a disk group template in +DGDATA called 'unprotect' with external redundancy.** ### Section 3: Administering Grid Infrastructure 1. **Mirror the OCR into the DGFRA and DGACFS disk group.** 2. **Dump the Oracle Local Repository (OLR) file on host03. Create the dump file named ASMOLR in TEXT format in the location /home/grid/.** 3. **Copy the pictures.zip file from /home/grid/scripts/ on host03 to the ACFS file system mounted on /u01/app/oracle/acfs_share.** 4. **Create a snapshot of the ACFS file system and name it SNAP01 in upper case.** 5. **Configure clusterware so that new OCR backups are created on +DGFRA disk group.** 6. **Set Cluster Synchronization Services maximum time that a network heartbeat can be missed to 120 seconds.** ### Section 4: Creating a RAC Database 1. **Create a Real Application Database, called RACDB (SID Prefix: RACDB), with these attributes:** - **Two instances, one each on host03 and host04.** - **General Purpose or Transaction Processing Container Database.** - **The configuration type should be administrator-managed.** - **Supports two pluggable databases: RACPDB1 and RACPDB2, and local UNDO.** - **The Sys and SYSTEM users must use the password oracle_4U.** - **Disk group +DGDATA stores all the database files.** - **A Fast Recovery Area (FRA) of 12 GB in the disk group: +DGFRA.** - **No sample schemas installed.** - **Use Automatic Shared Memory Management and set the SGA to 2GB and the PGA to 500 MB.** ### Section 5: Configuring the RAC Environment 1. **Configure the degree of parallelism for the channel when RMAN takes backups to 3.** 2. **Convert the RACDB database to a RAC One Node database. You should stop the instance on host04. When the conversion completes, run `/home/oracle/scripts/2_5_2.sh` to ensure that the type is RAC One Node.** 3. **Run the script `/home/oracle/scripts/8_2_5.sql` using SQL*Plus. SALSEQ will be used to populate the primary key of table SH.SALES, which will contain approximately 125 leaf rows per leaf block. Occasionally, high table insert activity may result in leaf block contention across instances. Modify the sequence or index definitions or both to reduce contention, speed up range scans, and to hold a range of 100,000 sequence values in memory.** 4. **Convert the RAC One Node database back to a two-instance RAC database.** 5. **Create a service SERV1 that meets the following requirements:** - **i. Create a service called SERV1 which is associated with the RACPDB1 pluggable database. This service runs on the preferred instance as RACDB1 and the available instance as RACDB2.** - **ii. After the service fails over from the preferred instance to the available instance, configure the service to fall back automatically when the preferred instance becomes available.** - **iii. Start the SERV1 on the preferred instance.** 6. **Create a service SERV2 that meets the following requirements:** - **i. Create a service called SERV2 which is associated with the RACPDB2 pluggable database. This service runs on the preferred instance as RACDB2 and the available instance as RACDB1.** - **ii. In the event of a single instance failure, this service must support transaction failover to the remaining instances.** - **iii. Start the SERV2 on the preferred instance.** 7. **Create a service SERV3 that meets the following requirements:** - **i. Create a service called SERV3 which is associated with the RACPDB2 pluggable database. This service starts on all instances.** - **ii. When this service starts, the associated pluggable database must be opened.** - **iii. Start the SERV3 which you created.** 8. **Configure RACDB to reduce the number of duplicated block images for tables queried in parallel, when such duplicate images are stored in more than one instance's buffer cache.** 9. **Create a sequence, SYS.PS_SEQ, where the sequence number is generated in order across all instances. The sequence must retain the original value of NEXTVAL during replay for Application Continuity. The sequence specifications are as follows:** - **Starting Number:** 100 - **Maximum Value:** 99999 ### Section 6: Configuring Additional Options 1. **Consider adding the pluggable database PDB3 to the RACDB database. This pluggable database uses a flex disk group. Configure a flex disk group that meets the following requirements:** - **i. The disk group name is DGFLEX.** - **ii. Use the following ASM disks:** - **iii. Create a file group which should be used by the pluggable database PDB3. The file group name is PDB3_filegroup.** - **iv. The quota of PDB3_filegroup must be 8 GB. The quota group name you specify must be PDB3_limit.** 2. **Use PDB3_filegroup to create the pluggable database PDB3 in the RACDB database. The PDB3 you create must be open.** 3. **The interval between checks for Cluster Verification Utility (CVU) should be 12 hours.** 4. **You must use Cluster Health Monitor (CHM) to maintain information about OS and cluster resources. Perform the necessary operations to set the retention time for the administrative database to 200,000 seconds and ensure that the retention time is 200,000 seconds.** 5. **Configure the Cluster Health Advisor (CHA) to monitor cluster nodes and databases. Set the maximum retention time for data collected by the Cluster Health Advisor to 90 hours.**
上一篇:
M3原题
下一篇:
Module 1
0
赞
7 人读过
新浪微博
微信
腾讯微博
QQ空间
人人网