1. Trang chủ
  2. » Công Nghệ Thông Tin

Oracle Database Administration for Microsoft SQL Server DBAs part 9 pdf

10 352 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 433,14 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

The location of the control files is set at database creation, and theparameter CONTROL_FILES has the values for the location: CONTROL_FILES = /u02/oracle/SID/control01.ctl, /u03/oracle/

Trang 1

Are These Really mdf Files?

The datafiles that make up the tablespaces in Oracle are the most similar to SQL Server’s mdf files, and the redo logs could be considered similar to the ldf files Also, if the database is not running, these files can be copied for a cold backup, similar to SQL Server when taking a database offline or if the instance service has been stopped to take a copy of the mdf file and ldf files SQL Server databases typically have one mdf file and one ldf file per database Larger databases may spread out more files across different drives, using the naming convention mdf for the primary file and ndf for the other files

Oracle tablespaces might be compared to SQL Server filegroups, but the filegroups are specific to one database to manage multiple datafiles and are not at the server level The tablespaces are available at the server level, but might be managed to allocate files to one user

Oracle tends to use the same extension for all of the datafiles It is typical

to use the tablespace name in the datafile name For example, the SYSTEM tablespace may have system01.dbf, and the SYSAUX tablespace may have sysaux01.dbf These examples show one file for one tablespace, but this is normally not the case Especially with older versions, it is typical to see several datafiles make up a tablespace

Multiple datafiles for a tablespace might be due to earlier operating system limitations, to prevent the datafiles from becoming too large

Balancing the need for fewer files to manage against being able to easily restore datafiles is one of the fun tasks of a DBA It’s nice to be able to turn over this task to ASM If faced with an application that has been around for

a couple of versions of Oracle, and the tablespaces seem a little on the unmanageable side, it might be time to convert to ASM

More Files to Manage

Datafiles are just some of the files needed by the Oracle database Then there are control files, parameter files, password files, and log files Each file type has a specific purpose in the Oracle environment, and these files are key pieces for being able to restore systems, configure parameters dynamically, and allow access for privileged users

The control files are critical for database operation They contain

information about the change numbers in the redo logs; records of the datafiles with checkpoints, file names, database name, and creation

timestamp; and backup information With all of these details in the file, you can see that it’s important to have several copies, as noted in the earlier section on disk storage

Trang 2

The location of the control files is set at database creation, and the

parameter CONTROL_FILES has the values for the location:

CONTROL_FILES = (/u02/oracle/SID/control01.ctl,

/u03/oracle/SID/control02.ctl,/u04/oracle/SID/control03.ctl)

Oracle Database Components

The Oracle system is made up of database components Many are included

as options with the database installation Other components—such as client tools and client connectivity pieces, Grid Infrastructure, gateways, and

examples with schemas—are available as separate downloads For Windows and earlier releases of Linux, Clusterware is a separate installation Oracle

Database 11g R2 has Clusterware as part of the Linux database main

installation (Clusterware is discussed in Chapter 10.) You can install the

client from the server media, but if you are installing only the client,

separate downloads are available

The default installation will not install all of the components You will

need to decide which ones you need for your environment Also, you should

understand the licensing impact before installing everything available Installing only the components you will use and have licensed will keep the environment simple and is a first step to a secure configuration Note that even some of the components that are installed by default may require additional licensing for

use in the environment

The following are some of the components that are part of the database installation:

Oracle Advanced Security Oracle Partitioning

Oracle Spatial Oracle Label Security

Data Mining RDBMS Database Extensions for NET

Database Vault Real Application Testing

Oracle Net Services Oracle Net Listener

Oracle Connection Manager Oracle Call Interface

Oracle Programmer XML Development Kit

Oracle Configuration Manager

Trang 3

Also, as part of the Windows installation, the following components are available:

■ Services for Microsoft Transaction Server

■ Administration Assistant for Windows

■ Counters for Windows Performance Monitor

■ OLE, ODBC, and NET drivers

NOTE

Oracle Configuration Manager is available

without additional licensing It hooks into My

Oracle Support, which allows for health checks

and provides details on patches that are

available based on the release of the database

You can add and remove components as necessary after the initial installation This means that the software can be installed in pieces, such as first some components like Clusterware and ASM, and then the binaries for the database system The database creation can be done as part of the installation Taking this approach allows you to make sure each component

is working properly before moving on to the next one It also means that if the prerequisites are not met, you just need to take a quick step back, rather than completely starting over

Oracle Software Installation

Operating system configurations—check; storage—check; users—check You’re ready to install the software With the planning and setup completed, the installation of the Oracle software is the easy part I recommend that you install just the software first, and then run the assistants separately to create

a database and configure other required components

On Windows, start the installation by executing setup.exe to run the Oracle Universal Installer (OUI)

Trang 4

On Linux, a couple of environment variables need to be set up first, and then the installer program can run

> export DISPLAY = ip address:0.0

> export ORACLE_BASE = /u01/oracle

> export ORACLE_HOME = /u01/oracle/product/11.2.0

> export PATH = $PATH:$ORACLE_HOME/bin

> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

> cd /oracle/Disk1

>./runInstaller

When setting up the variables in Linux, they will appear as the selected values in the install screen (similar to Figure 3-6)

After the opening welcome screen, you will be asked to choose between basic and advanced installation, as shown in Figure 3-6 Notice that the

Oracle home location is already filled in by default This is where the

software will be installed, as well as the datafile for the sample database

Note that you can choose the advanced installation and change the Oracle home directory

FIGURE 3-6. Selecting basic or advanced installation

Trang 5

The advanced installation allows for the following:

■ Install the software first without creating any databases

■ Choose which software components to install As noted earlier, this

is part of a secure configuration for the environment Also, knowing which pieces have been installed will help with patching and

upgrading

■ Configure the passwords for the system users differently for each user

■ Install RAC

■ Configure ASM

■ Use a different template or configuration for the database

■ Select a character set

■ Upgrade an existing database

■ Use a different file system for the database files to separate them from the Oracle home

As you can see, these are definitely areas that should be customized

It would not be typical to choose a default installation for a production environment, especially when using ASM and RAC

So, why choose the basic (default) installation? You might take this route for testing the installation and verifying what is installed for new releases With new versions, this is a good place to start, because it will install some

of the recommended default configurations as well as a database You will

be able to check for new parameters or default behaviors that have changed Another reason to choose a basic installation would be to see the flow of the installation process and the checks that it makes You could see where

it sets up the alert logs, control files, and other files

The components that are installed with the basic installation are the some as those that are already selected for the advanced installation—you just can’t change them if you chose the basic installation Figure 3-7 shows the screen to choose components in an advanced installation If you’re walking through the installation a second time to install one or more

components, you will see Installed as the state of the components you have already installed

Trang 6

As you go through the rest of the installation process, the screens provide information and details about the current step of the process; they are not

just a place where you blindly hit the Next button The installation screens have information about where the logs are for the installation, if there are

errors or issues, and other configurations During the installation, make sure the default directories match the planned directories and file systems

Using a Response File

When installing one server, going through the screens and responding is not that bad But the option to silently install and have the same responses is

useful to ensure consistent environments You can do this with a response

file A response file can be recorded, or a template can be used and edited Response files are not just for the server level, but also for the client

installation Having a noninteractive mode for installing the client piece is

probably even more valuable

FIGURE 3-7. Choosing Oracle components for installation

Trang 7

To record a response file, run the installer with the parameters of

-recordand the destination of the response file:

E:\oracle\Disk1> setup -record -destinationFile

d:\oracle\response\install_oracle11.rsp

Select all of the choices and walk through the installation screens On the summary window of the installation, either finish the installation or choose to cancel because the response file has already been recorded

To run the installation with the response file, enter the following:

E:\oracle\Disk1> setup -silent -nowelcome -noconfig –nowait

-responseFile

d:\oracle\response\install_oracle11.rsp

The noconfig option does a software-only installation, and doesn’t go through the configuration assistants There is also an option for passing in the variables instead of updating them in the response file The nowelcome and nowait options suppress the startup screen and exit the installer when installation is complete

Removing Software

Even though you can add and remove components after installing Oracle, it might take a couple of attempts to get everything right You may need to deinstall the software or components to develop a clean installation The OUI can handle this step as well

After opening the OUI, click Installed Products You will see a list of Oracle homes and installed software, as shown in Figure 3-8 Select a home

or component to remove This will remove the software, but some of the file structures will remain They can be removed manually On Windows, information is written to the registry, which could be cleaned up, depending

on if you want to reuse an Oracle home Services can also be removed

Upgrading the Database

As part of the installation, if an Oracle database already exists on the server, there will be an option to upgrade the database The Oracle Database Upgrade Assistant (DBUA) is also available after the installation of the software to perform upgrades

Trang 8

The DBUA will do an in-place upgrade of the database under the new

version of the database But there is work to be done before the DBUA runs

As discussed earlier, installing the database software so you can review the new features and parameters that come with the new release is an excellent way to prepare for this upgrade You may want to create a test database first

to look at which defaults have changed and see which parameters should be adjusted for the upgraded database This information can be used after the DBUA runs to modify the parameters and validate if there are configuration issues or if there are areas that will benefit from the new features

Getting help in planning and looking at some of the pitfalls of an

upgrade are extremely useful for a DBA The Oracle Database Upgrade

Guide and the Upgrade Companion provide some guidance for a successful upgrade The Upgrade Companion, which is a part of My Oracle Support,

isn’t an automatic tool for testing, and even if it were, there would still be

FIGURE 3-8. Installed products

Trang 9

some double-checking and testing that would be done It is partially

automated, however, which helps speed the process for upgrades and provides some recommendations, but the DBA still needs to review the recommendations and tweak as needed

A couple of different upgrade paths are available The software can be installed, and the data can be exported and imported into the new database environment as another method of installation These different methods provide ways to test and develop a back-out plan to roll back changes if necessary There are also extra options for the database to do real application testing and easy ways to do versioning to develop a safer and more consistent way to upgrade the databases

Applying Patches

Patches are nothing new to DBAs SQL Server has hot fixes, security updates, and service packs for patching the base release The patches have one-off fixes for bugs or a group of fixes or security releases Oracle also has different types of patches

Patches are single fixes for issues, and can be applied as issues are discovered The patches are rolled up into patchsets As with managing any database environment, testing and planning are required before

applying patchsets

The Critical Patch Update (CPU) has the latest security updates for the database These are released on a quarterly basis, and applying them in a regular fashion reduces the risks for security vulnerabilities The Patch Set Update (PSU) includes the security patches and the recommended and proactive patches These are also released quarterly Only one patching path can be chosen for the environment If applying the PSUs, then the CPUs cannot be used going forward, and the PSUs will be the way to implement the security updates

The Oracle Configuration Manager component provides help in managing the patches through My Oracle Support, as shown in the example in Figure 3-9 The support tools make recommendations for the patches and issue alerts for security patching to proactively maintain the environment

Trang 10

This chapter walked through the preparations and procedures for installing Oracle It covered the operating system setup for both Windows and Linux, storage planning, an introduction to ASM, and other preinstallation

considerations As you saw, with proper planning and preparation, the

actual installation of Oracle is straightforward

Several options and configurations are possible with the Oracle database Getting it installed is just a first step Setting up a database environment that is easy to maintain, secure, stable, and robust comes next

FIGURE 3-9. My Oracle Support, Patches & Updates tab

Ngày đăng: 04/07/2014, 05:20

TỪ KHÓA LIÊN QUAN