Page 661
Page 662
Oracle Parallel Server is useful for two basic types of application, those that need high- availability and those that can be scaled along with the underlying hardware. In order for parallel instances to run, they need more components than a single instance database. In this chapter, you will find out what these additional components are and how you can use them to manage your Parallel Server database.
Parallel Server is an option that enables two or more instances to mount the same database concurrently. With multiple instances, you increase the number or the net size of a number of resources available to the database. These resources include:
Figure 27.1 shows how these resources multiply with parallel instances. As you can imagine, these increases enable the database to process more work for more users, and this is the primary benefit most people attribute to Parallel Server. As you add more hardware nodes, you can also start extra instances, providing you with a long-term scalability strategy.
FIG. 27.1
Single instance versus
Parallel Server
instances and
resources.
Page 663
You can configure the various instances running in a Parallel Server database with different initialization parameters. This allows you to tune some instances for users who perform heavy transaction processing, others to best support batch report programs, and others to support online decision support activities, depending on your user requirements. You may also need to configure your instances differently if they are running on nodes with dissimilar capacity, such as memory size, number of CPUs, or CPU power.
Additionally, the extra instances can provide a security blanket for the users and for the database administrator. A number of events, scheduled and unscheduled, can cause an Oracle instance to stop running. In a single instance database, a stopped instance closes all access to the database for the users and their applications. With parallel instances, the users who were working on a stopped instance can reconnect to a still-running instance. You can design your system with Parallel Server to include one or more spare instances, to support all your users should their primary instances be unavailable.
If your hardware can support sufficient nodes, you can make use of the scalability features as well as the failover capability of Parallel Server in the same database. You simply have to reserve instances on one or more nodes for use in a failover situation, rather than using them all concurrently for performance gains. It is important, when planning a multi-instance database, for you to make a clear distinction between these two functions. Shifting work onto an instance being kept free for failover reasons is going to cause you contention and performance problems when it is needed by users from a failed instance.
To fully understand how a parallel database is structured, you need to have a good grasp of the distinction between databases and instances. A database consists of a set of files stored on disk. These files include datafiles, redo log files, and control files. An instance comprises a set of memory structures and processes. The major structure is called the System, or Shared, Global Area (SGA) and the required background processes are the database writer (DBWR), redo log writer (LGWR), system monitor (SMON), and process monitor (PMON). Many DBAs also run the optional redo log archiver (ARCH) and the checkpoint (CKPT) processes and can elect to start additional processes. For parallel instances, you must start at least one lock process, and you may start more. These processes are called LCK0, LCK1, LCK2, up to LCK9.
You will also need to know how to start up an instance in parallel mode. A normal, exclusive Oracle instance locks the control file for use by any other instance when it starts up. To avoid setting this lock, the instance must be opened in parallel, or shared, mode. In Version 7.3, you do this by including either of the keywords, PARALLEL or SHARED, in the STARTUP statement in command mode, or by using the SHARED radio button on the instance management screens of the GUI database management tools. In Oracle8, you need to set the parameter, PARALLEL_SERVER, to TRUE in your init.ora file.
Page 664
NOTE |
The instance management GUI screens are part of Oracle's Enterprise Management product, which runs only on NT platforms. Special Parallel Server management tools, including NT-based GUI tools, also NT-based, exist for certain operating systems.n |
Parallel Server runs a single database using two or more concurrent instances. The hardware must support this configuration by allowing independent nodes to share the disks where the database is stored. Many vendors support multiple nodes in UNIX clusters and a number are already providing two or four node clusters under NT. Some vendors support clusters using proprietary operating systems. In all cases, the vendor has to provide software to manage the cluster and the access to the shared disks. This may be part of a proprietary operating system or may be one or more additional products. Oracle certifies Parallel Server on platforms where it can successfully interface with these software functions. In some cases, Oracle may limit the number of nodes on which Parallel Server can be run, even though the vendor might be able to configure more.
Depending on your database version, you need to configure Oracle to interface with a Distributed Lock Manager or to talk directly to the cluster/shared disk management software. Version 7.3 requires the former and Oracle8 the latter (see Figures 27.2 and 27.3 for an overview of each architecture).
In either case, the details of the interface depend on the vendor's requirements, although Oracle created the DLM code for some Version 7 Parallel Server platforms. You will need to read the Oracle Parallel Server installation manual related to your particular hardware, software, and Oracle release to find out the details of this configuration.
The DLM does not go away in Oracle8, by the way, but is integrated into the database code. So, while you have to configure your system to work with the cluster interface, using the Group Membership Services tools provided by Oracle, you do not have to set up the DLM interface as well. You may need to modify some DLM-specific parameters in init.ora, however, as discussed in a later section of this chapter.
There is one final note for you to consider when planning for Parallel Server if you are running on the UNIX or NT operating systems. On these platforms, you will have to use raw devices for the shared disks where you store your database files. In some cases, this may be beneficial due to performance improvements in disk writes, but raw devices are generally more difficult for the system administrator to manage. As well as the operating system documentation for your platform, you can also find details about raw devices in the Oracle Installation and Configuration guide for your specific database release, mostly in a chapter named "Raw Devices."
Parallel Server uses Parallel Cache Management (PCM) locks to ensure that only one instance at a time is allowed to change a block's contents. They are applied to single or multiple blocks, in addition to the normal transaction, row level, locks. A lock can have one of three statuses. A NULL status means the lock is not currently assigned, a SHARED status signals that the current