OCA: Oracle Database 11g Administrator Certified Associate- P13

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:50

lượt xem

OCA: Oracle Database 11g Administrator Certified Associate- P13

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Tham khảo tài liệu 'oca: oracle database 11g administrator certified associate- p13', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả

Chủ đề:

Nội dung Text: OCA: Oracle Database 11g Administrator Certified Associate- P13

  1. Installing Oracle 11g 431 NÛ Copying the files from the install media to $ORACLE_HOME NÛ Compiling the Oracle binaries NÛ Performing post-install operations using configuration assistants Mounting the CD and Starting the OUI To begin the install process, insert the Oracle 11g CD in the server. On some Unix systems, you may have to use the appropriate operating-system command to mount the CD in your server before it is accessible. After mounting the CD, you may want to copy its contents to a staging directory so that you can install from there instead of from the CD. If you download software from the OTN, you don’t need to mount the CD. You can start the install from the disk. OUI installations on Unix systems must also set the X Windows DISPLAY environment variable; otherwise, the OUI will not appear. Performing Preinstallation Checks Start the OUI using the runInstaller.sh command, as shown in Figure 8.14. F I g u r e 8 .1 4 Invoking Oracle 11g install Notice that the output shows that the OUI checked the server’s operating-system ver- sion, available RAM, temporary and swap space, and so on. If needed, you can turn off the system verification that occurs prior to the installation by using the -ignoreSysPrereqs option of the runInstaller command.
  2. 432 Chapter 8 N Introducing Oracle Database 11g Components and Architecture Once the preinstallation tests are completed and passed, the OUI displays the initial OUI screen shown in Figure 8.15. Choose the Oracle Database 11g option, and click the Next button on the OUI screen to proceed with the installation. F I g u r e 8 .1 5 The initial OUI installation screen Responding to OUI Prompts The next OUI screen, Select Installation Method, provides the option to perform a basic or advanced installation. In the basic installation, no more questions are asked, and the OUI takes all the default values to install the software. If you select the Create Starter Database check box and provide a name for the database, OUI will create a database along with the software install. For this example, choose Advanced installation on this screen, as shown in Figure 8.16. The next OUI screen, Specify Inventory Directory and Credentials, prompts you for two pieces of information: NÛ The location for the inventory files that the OUI uses to keep track of which Oracle products are installed on the server NÛ The name of the operating-system group of which the user doing the install is a member You can see both items in Figure 8.17.
  3. Installing Oracle 11g 433 F I g u r e 8 .1 6 Select Installation Method screen F I g u r e 8 .17 Specify Inventory Directory and Credentials screen
  4. 434 Chapter 8 N Introducing Oracle Database 11g Components and Architecture The value suggested for the oraInventory location, /u01/app/oraInventory, was selected based on the $ORACLE_BASE environment variable. The value suggested for the operating-system group, oinstall, is the Oracle default value. Because both settings are correct for our example environment, click the Next button to continue the installation. Selecting Products to Install The next screen, Select Installation Type, prompts you to select the type of installation to perform. In this example, I selected the Enterprise Edition option, as shown in Figure 8.18. Choose Enterprise Edition or Standard Edition based on the license you purchased. You may also choose Custom, if you want to pick and choose the products. F I g u r e 8 .1 8 Select Installation Type screen The next screen, Install Location, sets the software installation locations, as shown in Figure 8.19. On the screen shown in Figure 8.19, the default values are populated based on the ORACLE_BASE variable. Click the Next button to open the next screen, which is shown in Figure 8.20. The OUI goes through a second round of installation checks that confirm that the serv- er’s operating-system version and configuration are appropriate for the Enterprise Edition installation of Oracle 11g. If all the verification checks complete successfully, click the Next button to open the Select Configuration Option screen, as shown in Figure 8.21. If these operating-system checks do not succeed, you must correct the areas that are failing the checks before continuing.
  5. Installing Oracle 11g 435 F I g u r e 8 .1 9 Install Location screen FIgure 8.20 Prerequisite checks
  6. 436 Chapter 8 N Introducing Oracle Database 11g Components and Architecture F I g u r e 8 . 21 Select Configuration Option screen The next screen, Privileged Operating System Groups, asks whether you want to cre- ate a database following the installation process. Because creating a database is covered in Chapter 2, you’ll skip this step for now. Choose the Install Software Only option, and then click Next to specify the privileged OS groups, as shown in Figure 8.22. FIgure 8.22 Privileged Operating System Groups screen You can choose the defaults or specify specific OS groups for each function. Click Next to open the Summary screen, as shown in Figure 8.23.
  7. Installing Oracle 11g 437 FIgure 8.23 The Summary screen This screen summarizes all the options you selected and all the components that will be installed. If you need to make changes, click the Back button to modify your previous selec- tions. If you are satisfied with your selections, click the Next button to start copying the Oracle binaries to the $ORACLE_HOME directory. Copying and Compiling Files The OUI displays status information while the installation and setup is in progress. Once the file-copy portion of the installation is complete, the OUI begins linking the binaries to create the executable files needed to make the Oracle 11g software run on the server. On Unix systems, after the linking process, you are prompted to execute configuration scripts as the superuser root from the Unix command line, as shown in Figure 8.24. FIgure 8.24 Running the script as root
  8. 438 Chapter 8 N Introducing Oracle Database 11g Components and Architecture The orainstRoot.sh script creates the inventory location and necessary inventory direc- tory. The following example shows this orainstRoot.sh script being executed from another session: $ su - Password: # cd /u01/app/oraInventory ./orainstRoot.sh Creating the Oracle inventory pointer file (/etc/oraInst.loc) Changing permissions of /u01/app/oraInventory to 770. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete $ Running the script creates some directory structures that are used to support the Oracle installation and sets the proper file permissions on those directories as well as other files. Once the orainstRoot.sh script executes, click the Continue button to choose the installa- tion type. On Unix and Linux platforms, the orainstRoot.sh script creates a file named /etc/oraInst.loc, which has information about the Oracle Inven- tory location and the software installation owner name. The content of the /etc/oraInst.loc is as follows: $ cat /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall $ The root.sh script should be executed as root. Executing the root.sh script copies some files to a location outside $ORACLE_HOME and sets the permissions on several files inside and outside $ORACLE_HOME. Once the root.sh script executes successfully, click OK to continue the installation. One important file created by the root.sh script is the /etc/oratab file (the /var/opt/ oracle/oratab file on Solaris). When databases are created on this server, this file will have information about the database and which oracle home directory is used by the database. If you have multiple installations to perform, you can speed up the process and minimize errors by building an OUI response file. This text file contains all the necessary responses to the OUI prompts so that an unattended, silent install is possible.
  9. Installing Oracle 11g 439 Performing Postinstall Tasks Once the root.sh script has completed, the OUI will perform some brief postinstalla- tion configuration activities before displaying the End of Installation screen, as shown in Figure 8.25. FIgure 8.25 End of Installation screen Click the Exit button and then the OK button on the pop-up screen to exit the OUI and return to the Unix prompt. The OUI on Windows systems also offers a Basic Installation mode in which only a few installation questions are asked before the file copying begins. If you select the Advanced Installation mode, the prompts will closely follow those shown for Unix in this section. Once the OUI is complete, you should have a completely installed and configured $ORACLE_HOME. You’ll use this software to create your first database in Chapter 9, “Creating and Oracle 11g Database.”
  10. 440 Chapter 8 N Introducing Oracle Database 11g Components and Architecture Summary This chapter introduced you to the Oracle 11g database architecture and installing the Oracle 11g software. First I covered the Oracle database fundamentals and the Oracle data- base components, and then I showed how to create the database by installing the Oracle 11g software. Most popular databases today are relational databases. Relational databases consist of data composed of a set of relational objects. Data is stored in tables as rows and columns. Oracle is a relational database. SQL is the language used to manage and administer Oracle databases. Several tools are available to administer an Oracle 11g database. The most com- mon ones used by DBAs are SQL*Plus and Oracle Enterprise Manager. SQL Developer is a GUI tool that can be used to interact with the Oracle 11g database. The Oracle 11g database architecture consists of three major components: memory, processes, and storage. A user process initiates a connection with the Oracle database and starts a server process. The server process is responsible for performing the tasks on the database. The memory structures and background processes together are an Oracle instance. The server process communicates with the memory structure known as the sys- tem global area. The SGA consists of a shared pool, database buffer cache, and redo log buffer. The shared pool also includes components such as a Java pool, large pool, result cache, and streams pool. There are many types of background processes, each performing a specific job to main- tain and manage the database instance. All databases have five background processes: data- base writer, checkpoint writer, log writer, process monitor, and system monitor. Depending on the configuration of the database, there may be other background processes such as archiver, ASM balancing, and so on. The physical data structure consists of several files stored on disk. The most important file is the control file, which keeps track of several important pieces of information such as database name, names of data files and redo log files, backup information, so on. The CKPT process is responsible for keeping the control file updated. Redo log files contain information from the redo log buffer. The LGWR process is responsible for writing the redo log buffer contents to the redo log files. Oracle metadata and application data are stored in data files. The DBWn process is responsible for writing dirty blocks from the database buffer cache to the data files. Looking at the logical structure of the database, a tablespace is the highest level of logical unit. A tablespace consists of several segments. A segment consists of one or more extents. An extent is a contiguous allocation of blocks. A block is the smallest unit of stor- age in an Oracle database. Installing the Oracle 11g software is a relatively easy task once the preinstall checks and hardware requirements are met. Installing Oracle 11g is a joint task between the sys- tem administrator and DBA, because certain scripts need to be run as root on Linux/Unix platforms.
  11. Exam Essentials 441 Exam Essentials Describe the Oracle tools and what they are used for. Know which tools are available for connecting to and interacting with an Oracle database. Understand how these tools differ from one another. Understand the Oracle architecture components. Be able to describe the logical and phys- ical components of the Oracle architecture and the components that make up each. Know the relationship between segments, extents, database blocks, and operating-system blocks. Know the background processes Understand the Oracle 11g background processes and how they are used. The important ones to know are DBWn, SMON, CKPT, PMON, LGWR, ARCn, RBAL, and ASMB. Identify the three types of database files that constitute the database. Understand the pur- pose and key differences between the control files, data files, and redo log files. Explain and categorize the SGA memory structures. Identify the SGA areas along with the subcomponents contained within each of these areas. Explain Oracle 11g system requirements. Know what the requirements are for available server disk space and memory prior to performing an Oracle 11g installation. Describe the Optimal Flexible Architecture. Be able to explain the concepts associated with the OFA model and how to implement an OFA-compliant installation and database directory structure. Describe the steps for installation and configuration. Know how to set up the Oracle installation environment so that the OUI can be used to install and configure the Oracle 11g software.
  12. 442 Chapter 8 N Introducing Oracle Database 11g Components and Architecture Review Questions 1. What are the benefits of using the OFA standard for installing Oracle 11g? (Choose all that apply.) A. Helps eliminate fragmentation of free space in the SYSTEM tablespace B. Helps improve the database performance C. Facilitates routine administrative tasks such as software backups D. Helps avoid data-block corruption 2. You are trying to install Oracle 11g and the OUI prerequisite check failed. What should you do? A. Ignore the error, and proceed with installation. B. Cancel the installation, and try to install on a different server. C. Correct the underlying issue, and retry the installation. D. Cancel the installation, correct the underlying issue, and restart the installation. 3. When installing Oracle 11g on the Linux platform, which file is created by executing the orainstRoot.sh script as root? A. /etc/oratab B. /etc/oraInst.loc C. $ORACLE_HOME/root.sh D. None—the orainstRoot.sh script starts background processes required to start the OUI. 4. Which component is not part of the Oracle instance? A. System global area B. Process monitor C. Control file D. Shared pool E. None 5. Which background process guarantees that committed data is saved even when the changes have not been recorded in data files? A. DBWn B. PMON C. LGWR D. CKPT E. ARCn
  13. Review Questions 443 6. You’ve just been hired as a DBA for a large company. During the interview process, you were shown the job description for the position. Which of the following tasks might have been included in this job description? A. Install and configure Oracle 11g software. B. Implement database installations according to OFA guidelines. C. Use OFA-compliant naming conventions for database files and directories. D. Any of the above may have been included on the DBA job description. 7. Which of the following best describes a RAC configuration? A. One database, multiple instances B. One instance, multiple databases C. Multiple databases on multiple servers D. Multiple shared server processes catering one database 8. Which component of the SGA contains the parsed SQL code? A. Database buffer cache B. Dictionary cache C. Library cache D. Parse cache 9. Which are the tasks accomplished by the SMON process? (Choose all that apply.) A. Performs recovery at instance startup B. Performs cleanup after a user session is terminated C. Starts any server process that stopped running D. Coalesces contiguous free space in dictionary-managed tablespaces 10. Choose the best statement from the options related to segments. A. A contiguous set of blocks constitutes a segment. B. A nonpartitioned table can have only one segment. C. A segment can belong to more than one tablespace. D. All of the above are true. 11. The Oracle Universal Installer prompts for which variable if not set? A. ORACLE_HOME B. ORACLE_SID C. ORACLE_BASE D. ORACLE_INSTALL_BASE
  14. 444 Chapter 8 N Introducing Oracle Database 11g Components and Architecture 12. Which SGA component will you increase or configure so that RMAN backups are not using area from the shared pool? A. Java pool B. Streams pool C. Recovery pool D. Large pool 13. When a user session is terminated, which processes are responsible for cleaning up and releasing locks? (Choose all that apply.) A. DBWn B. LGWR C. MMON D. PMON E. SMON 14. The LRU algorithm is used to manage what part of the Oracle architecture? A. Users who log on to the database infrequently and may be candidates for being dropped B. The data file that stores the least amount of information and will need the least fre- quent backup C. The tables that users rarely access so that they can be moved to a less active tablespace D. The shared pool and database buffer cache portions of the SGA 15. Two structures make up an Oracle server: an instance and a database. Which of the follow- ing best describes the difference between an Oracle instance and a database? A. An instance consists of memory structures and processes, whereas a database is com- posed of physical files. B. An instance is used only during database creation; after that, the database is all that is needed. C. An instance is started whenever the demands on the database are high, but the data- base is used all the time. D. An instance is configured using a pfile, whereas a database is configured using an spfile. 16. Which of the following is the proper order of Oracle’s storage hierarchy, from smallest to largest? A. Operating-system block, database block, segment, extent B. Operating-system block, database block, extent, segment C. Segment, extent, database block, operating-system block D. Segment, database block, extent, operating-system block
  15. Review Questions 445 17. You’ve been asked to install Oracle 11g on a new Unix server. You’re likely to ask the Unix system administrator to do all but which of the following for you in order to get the new server ready for Oracle? A. Modify the server’s kernel parameters. B. Create a new Unix user to own the Oracle software. C. Create the mount points and directory structure using the OFA model. D. Determine which directory will be used for $ORACLE_HOME. 18. Oracle’s OFA model specifies a naming convention for all but which of the following? A. Database name B. Mount points C. Directory paths D. Database filenames 19. The Oracle Universal Installer is started by executing which program? A. emctl B. runInstaller C. ouistart D. isqlplusctl 20. On Unix systems, the script root.sh must be executed during the installation process. What is the purpose of this script? A. It creates the root user in the database. B. It creates the root directory for the server. C. It grants root superuser privileges to the Oracle Unix account. D. It copies files and sets permissions on files outside $ORACLE_HOME.
  16. 446 Chapter 8 N Introducing Oracle Database 11g Components and Architecture Answers to Review Questions 1. A, C. The OFA standard helps in administering the Oracle software installation and all related Oracle files, such as alert logs and data files. OFA recommends that separate tablespaces be created to store application data; the SYSTEM tablespace should be used only for the data dictionary. By separating the software from database files, backups are made easy. 2. C. On the prerequisite check screen, you have the option to retry a failed test. So, you can fix the underlying issue and let OUI perform the test again to continue the installation. 3. B. If an Oracle installation is performed the first time on a server, the orainstRoot.sh script needs to be executed to create the /etc/oraInst.loc file. The oraInst.loc file specifies the Oracle inventory location. 4. C. Control file, data file, and redo log files are part of the Oracle database. The Oracle instance constitutes the memory structures and background processes. 5. C. The log writer (LGWR) process writes the redo log buffer information to the online redo log files. A commit operation is completed only after the redo buffer is written to online redo log files. 6. D. The tasks that a DBA performs encompass all these areas plus managing database stor- age, security, and availability. 7. A. With Real Application Clusters, multiple instances (known as nodes) can mount one database. One instance can be associated with only one database. 8. C. The shared SQL area is stored in the library cache in a shared pool and is shared between users. If a query is executed again before it is aged out of the library cache, Oracle will use the parsed code and execution plan from the library cache. The database buffer cache has the data blocks cached. The dictionary cache caches data dictionary information. There is no SGA component called the parse cache. 9. A, D. SMON is responsible for performing instance recovery using the online redo log files and for coalescing contiguous free space in tablespaces. The PMON is responsible for ses- sion cleanup and for freeing up all resources after a user session is terminated. 10. B. A table or index has a segment. A segment consists of one or more extents. A segment can belong to only one tablespace, but it can span across multiple data files. 11. C. To better conform to the OFA standard, the Oracle 11g OUI prompts for the ORACLE_ BASE value if the ORACLE_BASE environment variable is not already set. The ORACLE_HOME value is derived from ORACLE_BASE, but you have the option to change the derived value. 12. D. The large pool is configured to have RMAN not use the shared pool; hence, the shared pool is totally dedicated to application space. 13. D. PMON is responsible for cleaning up failed user processes. It reclaims all the resources held by the user and releases all locks on tables and rows held by the user. No other process is involved in the session cleanup.
  17. Answers to Review Questions 447 14. D. The LRU mechanism ensures that each user’s server process can find free space in the shared pool and database buffer cache whenever they need it, but it also keeps frequently used objects cached in those memory areas. 15. A. The instance consists of the SGA and all the Oracle background processes. The database is composed of the control files, data files, and redo logs. 16. B. Multiple operating-system blocks make up database blocks, contiguous chunks of which make up extents. A segment consists of one or more extents. 17. D. Although the Unix system administrator is responsible for creating volume groups and mount points, the DBA generally decides where the Oracle binaries will be installed—the location derived from $ORACLE_BASE or designated by the $ORACLE_HOME environment variable. 18. A. The OFA model does not include any reference to naming conventions for the database or things inside the database, such as users, tables, or tablespaces. 19. B. The runInstaller executable performs a preinstall check of the operating system and hardware resources before starting the OUI graphical tool. 20. D. The root.sh script copies configuration files to directories outside $ORACLE_HOME and sets the permissions on those files accordingly.
  18. Chapter Creating an 9 Oracle 11g Database OraCle Database 11g: aDministratiOn i exam ObjeCtives COvereD in this Chapter: Creating an Oracle Database ÛÛ NÛ Create a database by using the Database Configuration Assistant (DBCA) Managing the Oracle Instance ÛÛ NÛ Setting database initialization parameters NÛ Describe the stages of database startup and shutdown NÛ Using alert log and trace files NÛ Using data dictionary and dynamic performance views
  19. As a DBA, you are responsible for creating and managing Oracle databases and services within your organization. Ora- cle provides a comprehensive and cohesive set of tools to help DBAs perform these tasks. It is important for you to understand these tools and how to use them properly. Oracle has been using Java-based tools to manage the Oracle Database because Java gives the same look and feel for the tools across all platforms. In this chapter, I will cover how to use the Oracle Database Configuration Assistant tool, which creates and removes Oracle Databases, and how you can use templates to create databases. After creating the database using DBCA, the database will be up and running. I will then cover how to shut down and restart the database for some configuration changes, apply patches, perform server maintenance, and so on. I’ll describe the various database startup and shutdown options and explain the circumstances under which you use these options. You will also learn more about the Oracle data dictionary, including how the dictionary is created, where it is created, and so on. Finally, I will cover initialization parameter files and discuss how you can use them to manage, locate, and view the database alert log. Using DBCA to Create Oracle 11g Databases The Oracle Database Configuration Assistant (DBCA) is a Java-based tool used to create Oracle Databases. If you’ve been a DBA for a few years, you probably remember the days of writing and maintaining scripts to create databases. Although it is still possible to manu- ally create a database, the DBCA provides a flexible and robust environment in which you not only can create databases but also can generate templates containing the definitions of the databases created. This provides you with the ease of using a GUI-based interface with the flexibility of Oracle-generated XML-based templates that you can use to maintain a library of database definitions. You can also use the DBCA to add options to a running database or to remove a data- base. In recent years, I have seen many diehard command-line DBAs switching to the DBCA tool to create databases, mainly because of its flexibility and ease of use.


Đồng bộ tài khoản