Oracle Essentials Oracle Database 11g (14 page)

BOOK: Oracle Essentials Oracle Database 11g
5.17Mb size Format: txt, pdf, ePub

What are the availability requirements?

What elements of redundancy, such as additional disk drives, do you need to provide the required availability? ASM also provides automatic mirroring for data, which can help to provide data resiliency.

What are my performance requirements?

What response times do your users expect, and how much of that time can you give them? Will you measure performance in terms of average response time, maximum response time, response time at peak load, total throughput, or average load?

What are my security requirements?

Will the application, the operating system, or the Oracle database (or some combination of these) enforce security?

The Value of Estimating

Even if you are unsure of things such as sizing and usage details, take your best guess as to initial values and growth rates and document these estimates. As the database evolves, youcan compare your initial estimates with emerging information to react and plan more effectively. For example, suppose you estimate that a certain table will be 5 GB in size initially and will grow at 3 GB per year, but when you are up and running you discover that the table is actually 3 GB, and six months into production you discover that it has grown to 8 GB. Youcan now revise your plans to reflect the higher growth rate and thereby avoid space problems. Comparing production measures of database size, growth, and usage patterns with your initial estimates will provide valuable insights to help you avoid problems as you move forward. In this way, documented guesses at an early stage are useful later on.

The same is true for key requirements such as availability and performance. If the exact requirements are not clear, make some assumptions and document them.

These core requirements will heavily influence the decisions you make regarding redundancy and capacity. As the system evolves and these requirements become clearer, the history of these key decision criteria will be crucial in understanding the choices that you made and will make in the future.

Creating a Database

|

61

The Automatic Workload Repository (AWR), first available in Oracle Database 10
g
, maintains a history of workload and performance measurements, which are used by the Automatic Database Diagnostic Monitor (ADDM) to spot performance anomalies. You can also use AWR to track ongoing changes in workload.

Tools for Creating Databases

There are two basic ways to create an Oracle database:

• Use the GUI Oracle Database Configuration Assistant.

• Run character-mode scripts.

Oracle ships with a GUI utility called the Oracle Database Configuration Assistant, which can be run standalone or from the Oracle Installer. It is written in Java and therefore provides the same look and feel across platforms. The Assistant is a quick and easy way to create, modify, or delete a database. It allows youto create a typical preconfigured database (with minimal input required) or a custom database (which involves making some choices and answering additional questions). The Database Configuration Assistant is typically initially accessed as part of a standard installer

session. The Assistant is shown in Figure 3-2.

Figure 3-2. Oracle Database Configuration Assistant

62

|

Chapter 3: Installing and Running Oracle

If youchoose to create a database, youcan then select the type of database youwant to create, as shown in
Figure 3-3
for Oracle Database 11
g
. The different types of databases will be created with different default configuration values.

Figure 3-3. Selecting a database to create

The alternative method for creating a database is to create or edit an existing SQL

script that executes the various required commands. Most Oracle DBAs have a preferred script that they edit as needed. In Oracle7 and Oracle8, youexecuted the script using a character-mode utility called Server Manager; since Oracle8
i
, you could use SQL*Plus. The Oracle software CD-ROM also includes a sample script called
BUILD_DB.SQL
, described in the Oracle documentation. Today, most users choose to create the database with the standard installer interface.

Configuring Oracle Net

Oracle Net (known as Net8 for Oracle8 and Oracle8
i
and SQL*Net prior to Oracle8) is a layer of software that allows different physical machines to communicate for the purpose of accessing an Oracle database.

Configuring Oracle Net

|

63

The name Net8 was changed to Oracle Net in Oracle9
i
, and we will generally use
“Oracle Net”
in this chapter as a neutral term to apply to all versions of Oracle networking. The term “Oracle Net Services” in Oracle refers to all the components of Oracle Net, including dispatchers, listeners, and shared servers; these are explained later in this chapter.

A version of Oracle Net runs on the client machine and on the database server, and allows clients and servers to communicate over a network using virtually any popular network protocol. Oracle Net can also perform network protocol interchanges.

For example, it allows clients that are speaking LU 6.2 to interact with database servers that are speaking TCP/IP.

Oracle Net also provides
location transparency—
that is, the client application does not need to know the server’s physical location. The Oracle Net layer handles the communications, which means that you can move the database to another machine and simply update the Oracle Net configuration details accordingly. The client applications will still be able to reach the database, and no application changes will be required.

Oracle Net supports the notion of
service names
, or
aliases
. Clients provide a service name or Oracle Net alias to specify which database they want to reach without having to identify the actual machine or instance for the database. Oracle Net looks up the actual machine and the Oracle instance, using the provided service name, and transparently routes the client to the appropriate database.

Resolving Oracle Net Service Names

The following Oracle Net configuration options resolve the service name the client specifies into the host and instance names needed to reach an Oracle database:
Local name resolution

For local name resolution, you install a file called
TNSNAMES.ORA
on each client machine that contains entries that provide the host and Oracle instance for each Oracle Net alias. Youmust maintain this file on the client machines if any changes are made to the underlying database locations. Your network topology is almost certain to change over time, so use of this option can lead to an increased maintenance load. If youare u

sing Oracle Internet Directory,

described later in this section, you do not need a
TNSNAMES.ORA
file.

Oracle Names service

Oracle Names was supported in earlier Oracle releases, providing a way to eliminate the need for a
TNSNAMES.ORA
file on each client. That was the good part.

The bad part was that Oracle Names was a proprietary solution. Since Oracle Internet Directory is based on standards and provides this functionality, Oracle declared Oracle Names obsolete after the Oracle9
i
release.

64

|

Chapter 3: Installing and Running Oracle

Oracle Internet Directory

The need for a centralized naming service extends far beyond the Oracle environment. In fact, there is a well-defined standard for accessing this type of information, the Lightweight Directory Access Protocol (LDAP). As of the Oracle Database 11
g
release, Oracle Internet Directory (OID) is a part of Fusion Middleware, which is described in
Chapter 15.
OID is an LDAP-enabled directory that can fulfill the same role as the previously available Oracle Names service. The OID is also used for a variety of other purposes, such as enabling single sign-on for the Oracle Application Server Portal product, also described in

Chapter 15.
Since Oracle Database 10
g
, youcan export directory entries to create a local
TNSNAMES.ORA
file; this file may be used for clients not using the directory or if the directory is unavailable.

Host naming

Clients can simply use the name of the host on which the instance runs. This is valid for TCP/IP networks with a mechanism in place for resolving the hostname into an IP address. For example, the Domain Name Service (DNS) translates a hostname into an IP address, much as Oracle Names translates service names.

Since Oracle Database 10
g
, youcan use this method with either a host name, domain-qualified if appropriate, or a TCP/IP address, but the connection will not support advanced services such as connection pooling.

Third-party naming services

Oracle Net can interface with external or third-party naming and authentication services such as Kerberos or Radius. Use of such services may require Oracle Advanced Security (known as the Advanced Networking Option prior to Oracle8
i
).

These name resolution options are not mutually exclusive. For example, you can use Oracle Internet Directory and local name resolution (
TNSNAMES.ORA
files) together. In this case, you specify the order Oracle should use in resolving names in the
SQLNET.ORA
file (for example, check OID first, and if the service name isn’t resolved, check the local
TNSNAMES.ORA
file). This is useful for cases in which there are corporate database services specific to certain clients. You would use OID

for the standard corporate database services, such as email, and then use
TNSNAMES.ORA
entries for the client-specific database services, such as a particular development database.

Youalso have the option to connect directly to an Oracle database with what Oracle refers to as the
easy connect naming method
. This method uses the host name or TCP/IP identifier for the Oracle server machine and the name of the Oracle database instance. The method is limited to use with TCP/IP networks, and is recommended only for fairly small installations where the host identifier is rarely changed.

Configuring Oracle Net

|

65

Other books

Dawson's Web by William Hutchison
Deception's Playground by al-Fahim, Kevin Williams
Surrender My Love by Johanna Lindsey
Roadmarks by Roger Zelazny