Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 50 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
50
Dung lượng
1,47 MB
Nội dung
Installing Oracle11g 431 Copying the files from the install media to ÛN $ORACLE_HOME Compiling the Oracle binaries ÛN Performing post-install operations using configuration assistants ÛN Mounting the CD and Starting the OUI To begin the install process, insert the Oracle11g 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. FIgure 8.14 Invoking Oracle11g 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. 95127c08.indd 431 2/17/09 12:45:22 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 432 Chapter 8 N Introducing OracleDatabase11g 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 OracleDatabase11g option, and click the Next button on the OUI screen to proceed with the installation. FIgure 8.15 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: The location for the inventory files that the OUI uses to keep track of which Oracle ÛN products are installed on the server The name of the operating-system group of which the user doing the install is a member ÛN You can see both items in Figure 8.17. 95127c08.indd 432 2/17/09 12:45:22 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Installing Oracle11g 433 FIgure 8.16 Select Installation Method screen FIgure 8.17 Specify Inventory Directory and Credentials screen 95127c08.indd 433 2/17/09 12:45:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 434 Chapter 8 N Introducing OracleDatabase11g 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. FIgure 8.18 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. 95127c08.indd 434 2/17/09 12:45:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Installing Oracle11g 435 FIgure 8.19 Install Location screen FIgure 8.20 Prerequisite checks 95127c08.indd 435 2/17/09 12:45:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 436 Chapter 8 N Introducing OracleDatabase11g Components and Architecture FIgure 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. 95127c08.indd 436 2/17/09 12:45:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Installing Oracle11g 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 Oracle11g 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 95127c08.indd 437 2/17/09 12:45:23 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 438 Chapter 8 N Introducing OracleDatabase11g 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. 95127c08.indd 438 2/17/09 12:45:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. Installing Oracle11g 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 Oracle11g Database.” 95127c08.indd 439 2/17/09 12:45:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. 440 Chapter 8 N Introducing OracleDatabase11g Components and Architecture Summary This chapter introduced you to the Oracle11gdatabase architecture and installing the Oracle11g software. First I covered the Oracledatabase fundamentals and the Oracle data- base components, and then I showed how to create the database by installing the Oracle11g 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 Oracle11g 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 Oracle11g database. The Oracle11gdatabase architecture consists of three major components: memory, processes, and storage. A user process initiates a connection with the Oracledatabase 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 Oracle11g software is a relatively easy task once the preinstall checks and hardware requirements are met. Installing Oracle11g is a joint task between the sys- tem administrator and DBA, because certain scripts need to be run as root on Linux/Unix platforms. 95127c08.indd 440 2/17/09 12:45:24 PM Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... outside $ORACLE_ HOME and sets the permissions on those files accordingly Chapter 9 Creating an Oracle 11gDatabaseOracleDatabase 11g: Administration I exam objectives covered in this chapter: ÛÛ Creating an OracleDatabase NN Create a database by using the Database Configuration Assistant (DBCA) ÛÛ Managing the Oracle Instance NN Setting database initialization parameters NN Describe the stages of database. .. Chapter 9 Creating an Oracle 11gDatabase n F i g u r e 9 5 DBCA Database Identification screen The Oracle SID is the name of the instance associated with the database Usually this name is the same as the database name For RAC databases where you have multiple instances associated with the database, the instance name is usually different from the database name The Oracle SID can be a maximum... certification exam, refer to OCP: Oracle Database11gAdministratorCertified Professional Study Guide (Sybex, 2009) Choose Create a Database, and click Next to open the Database Templates screen In the coming sections, I will discuss database templates and the various screens in the DBCA to create a databaseDatabase Templates The DBCA comes with two preconfigured database templates These XML-based... the Database Identification screen Database Identification The Database Identification screen (see Figure 9.5) allows you to enter the global database name and Oracle system identification name (commonly referred to as the Oracle SID) The global database name is the fully qualified name of the database in the enterprise It is composed of a database name and a database domain and takes the format database_ ... and locations later in the database- definition process 462 Chapter 9 Creating an Oracle 11gDatabase n Use Oracle- Managed Files If you choose Use Oracle- Managed Files, you let the OracleDatabase manage the operatingsystem files comprising the database As a DBA, you just specify the location of the database files The tasks of creating and deleting files as required by the database are automatically... 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 Oracle11g Databases The OracleDatabase Configuration Assistant (DBCA) is a Java-based tool used to create Oracle Databases If you’ve... maintain a library of database definitions You can also use the DBCA to add options to a running database or to remove a database 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 Using DBCA to Create Oracle11g Databases 451 You can also use the DBCA to create a database while the Oracle software... an Oracle- recommended method for designing a flexible directory structure and naming convention for your OracleDatabase files 460 Chapter 9 Creating an Oracle 11gDatabase n ASM Storage Automatic Storage Management (ASM) is a newer type of storage mechanism available since Oracle 10g ASM is designed to relieve the burden of disk and storage management and relies on Oracle to maintain your database. .. use the OracleDatabase 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. .. sample schemas to the database, which is explored in the next section, “Sample Schemas and Custom Scripts.” F i g u r e 9 1 2 DBCA Database Content Screen for predefined database template If you chose to create a custom database on the Database Templates screen, you will be presented with the Database Content screen shown in Figure 9.13 Using DBCA to Create Oracle11g Databases 465 F i g u . Creating an Oracle 11g Database ORACLE DATABASE 11g: ADMINISTRATION I EXAM OBJECTIVES COVERED IN THIS CHAPTER: Creating an Oracle Database Create a database. Oracle Database 11g Components and Architecture Summary This chapter introduced you to the Oracle 11g database architecture and installing the Oracle 11g