THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

Creating a test database in 5 minutes

What is the most boring part of being a DBA? Many of us reply with “installing and creating a database”. Really, that is not true, at least not creating a database. If you think create database is a boring ad-hoc work and takes a whole day to do, that is because you used wrong tool or you misunderstood what is going on.

DBCA is what you need to create a test database in only 5 mins.

You don’t need X windows
You don’t need VNC
All you need is DBCA

Read the rest of this entry . . .

Oracle Silent Mode, Part 9: Remove a Node from an 11.1 RAC database

This 9th post will describe how to remove a node from a 11.1 RAC cluster in silent mode. It will differ from the associated documentation in that it will allow you to remove the node even if it is not available anymore. This procedure has only a few differences from the 10.2 one in the 6th post. For a complete series agenda, see below:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database (this post!)
  10. A ton of other stuff you should know

In what follows, we’ll remove rac-server5 from the configuration. We assume that rac-server5 is not accessible anymore. However, to cover the case when the node is still available, I’ll mark specific sections with a (*), meaning that the step should be done only if you still have access to that node; it can just be ignored otherwise.

Read the rest of this entry . . .

Oracle Silent Mode, Part 8: Add a Node to a 11.1 RAC Database

The process of adding a node to a 11.1 RAC is very similar to the 10.2 process described in Part 5 of this series. For this reason, this post will just focus on what has changed between the 2 versions. Here is the complete series up to now:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database (this post!)
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

Before you start

Make sure you’ve kept a copy of the voting disk and that you have a backup of the OCR. Check that the locations for all the components to be installed, i.e.: Inventory, Clusterware, ASM, database software, OCR, Voting Disks, and data files, are writable. Confirm that all the prerequisites are met for the node and for the whole cluster with the node to be added.

Refer to the Oracle Clusterware Administration and Deployment Guide
11g Release 1 (11.1) – 4 Adding and Deleting Oracle Clusterware Homes

and the Oracle Real Application Clusters Administration and Deployment Guide
11g Release 1 (11.1) – 9 Adding and Deleting Oracle RAC from Nodes on Linux and UNIX Systems
for the complete reference of how to perform these steps.

Read the rest of this entry . . .

Oracle Silent Mode, Part 7: Installing an 11.1 RAC Database

This seventh post digs into some of the silent installation commands of an 11.1 RAC. For a complete series agenda up to now, see below:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database (this post!)
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

As for the Installation of a 10.2 RAC Database, this post shows how to (1) install the 11.1 clusterware, (2) install the 11.1 database, and (3) create a RAC database. It doesn’t explore any Patch Set upgrade since 11.1.0.7 is not out for now. Another interesting question, however, is how to upgrade the 10.2 clusterware to 11.1, since it has to be done in place.

So let’s get into it.

Read the rest of this entry . . .

Oracle Silent Mode, Part 6: Removing a Node From a 10.2 RAC

This sixth post describes how to remove a node from a 10.2 RAC cluster in silent mode. It differs from the associated documentation in that it will show how to remove a node, even if it has been made unavailable for any reason, including an error by a DBA or a SA.

Here is the complete series agenda:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database (this post!)
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

Now for the substance of this part.

Read the rest of this entry . . .

Oracle Silent Mode, Part 5: Adding a Node to a 10.2 RAC

This fifth post assumes that you want to add a new node to your cluster and database. It describes most of the associated “silent” syntaxes. Even if you don’t leverage RAC’s ability to add or remove nodes to gain in agility, it’s still very likely you’ll come to these techniques when you want to upgrade some of your Servers or Operating Systems. For a complete series agenda up to now, see below:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database (this post!)
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

Adding a node involves adding all the components of the RAC in their order of appearance, i.e.: (1) The Clusterware and the associated resources, (2) the database software, (3) the listeners, (4) the ASM instance if necessary, and (5) the database instance. The last is the subject of this post.

For a complete reference to this procedure, see to the corresponding section of the 10.2 documentation.

Make Sure You Can Add The New Node To The Cluster

Before you start with anything else, proceed with the hardware and OS configuration. The new node must access the shared storage, the networks, the packages, parameter, users, etc. There is no difference if you add a node later or at the time of the initial install. You can use Oracle CVU and RDA as described in the corresponding section of the previous post to check that all the nodes can be part of a single cluster.

Adding a Node to the Clusterware

This step is actually pretty easy if the prerequisites are met. It’s also the one that can have the deepest impact on the cluster and the one that can end up badly. A lot of components are impacted by this addition: the voting disk, the cluster registry (OCR), and the inventories from all the nodes. Make sure you know how to revert any changes you are going to make. Make sure also that you have everything you need to revert the changes.

Note
Before you start with the node addition, make sure you’ve backed up the voting disk. There is no need to backup the OCR because it’s done automatically but it’s probably a good idea to locate the backup and make sure it contains the latest changes you’ve made.

You should also make sure that the Clusterware owner, oracle, or crs, or whatever it is, can write into the Clusterware ORACLE_HOME and the Oracle Inventory on the new server. Create the associated directory if necessary.

We’ll assume we want to add a new node rac-server5 to the cluster we’ve build in the previous post. In order to proceed, connect as the Clusterware owner on any of the existing nodes and run the set of commands below:

Read the rest of this entry . . .

Oracle Silent Mode, Part 4: Installation Of A 10.2 RAC

This fourth post introduces the fundamental silent installation commands for a 10.2 RAC. For a complete series agenda, see below:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database (this post!)
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

As the title suggests, this post will dig into how to (1) install the 10.2 Clusterware, (2) apply the latest Patch Set on top of it, (3) install the 10.2 database, (4) apply the latest Patch Set on top of it, and (5) create a RAC database. These operations will be performed with the Oracle Universal Installer, NETCA and DBCA in silent mode. Before you start, just in case you’re not familiar yet with Oracle Silent Installation, have a look at the first post of the series

Checking the prerequisites

Before you start the installation, make sure all the prerequisites are met. Use the 10.2 Clusterware and Real Application Clusters Installation Guide for your platform to set them up. You should also refer to Metalink Note 169706.1 for the latest updates and make sure the prerequisites for non-RAC databases are met by running the RDA HCVE module as described in the 1st post of the series.

To check that you haven’t missed anything, you should also run the Cluster Verify Utility (CVU). This utility is part of the Clusterware distribution or can be downloaded — get the latest release from here (note that you don’t have to be connected to OTN to download the latest release; you can just wget it once you’ve got its URL).

To run the latest Cluster Verify Utility, create a directory and unzip the CVU there. You can run the check as below:

Read the rest of this entry . . .

Oracle Silent Mode, Part 3: Cloning Software and Databases

This post is the third of the series of ten posts that explore some of the Oracle Universal Installer (OUI), Network Assistant (NETCA), Database Creation Assistant (DBCA), Database Upgrade Assistant (DBUA) and other syntaxes you can use to script or speed up Oracle Installations. The complete series should look like this:

  1. Installation of 10.2 And 11.1 Databases
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases (this post!)
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

In the first post and second post, we focused on how to leverage these tool to perform a standard installation and apply patches on top of 10.2 and 11.1 databases. This post will dig into the cloning features of both the Universal Install (OUI) and the Database Configuration Assistant (DBCA).

Foreword

The Universal Install and Database Configuration Assistant Cloning features enable you to:

  • Install the database software once, apply to it all the patches you need, including Patch Set, CPU, and One-Off patches, and create a “Gold Image” of that software you’ll be able to deploy on all the servers you need as soon as they run the same Operating System.
  • Create a database, apply all the scripts you need including the catupgrd.sql, the cpu.sql or any other script associated with patches. You can also run any script that will create a skeleton for installing your application, create tablespaces, create objects, or set parameters. Once done, you’ll be able to create a template from that database and to use it on any servers that run the same operating system and the same database software.

How to clone Oracle database software

You can refer to the product documentation for the whole database software cloning process:

The process is straightforward and consists of three different steps:

Read the rest of this entry . . .

Oracle Silent Mode, Part 1: Installation Of 10.2 And 11.1 Databases

This post is the first of a series of ten posts that will explore some of the Oracle Universal Installer (OUI), Network Assistant (NETCA), Database Creation Assistant (DBCA), Database Upgrade Assistant (DBUA), and many more syntaxes you can use to script or speed up Oracle Installations. The agenda should follow the one below:

  1. Installation of 10.2 And 11.1 Databases (this post!)
  2. Patches of 10.2 And 11.1 databases
  3. Cloning Software and databases
  4. Install a 10.2 RAC Database
  5. Add a Node to a 10.2 RAC database
  6. Remove a Node from a 10.2 RAC database
  7. Install a 11.1 RAC Database
  8. Add a Node to a 11.1 RAC database
  9. Remove a Node from a 11.1 RAC database
  10. A ton of other stuff you should know

Actually, I may have to split the post #10 into ten more posts to cover all the other syntaxes you could use with Oracle Enterprise Manager, Application Server, or on Windows. Anyway, for now let’s focus on the very beginning: how to install 10.2 or 11.1 non-RAC database; how to apply the latest patch set; and how to create a instance database from a template.

Foreword

First, just because it’s on the Internet doesn’t make it true — even if it’s on the Pythian Blog. There will be a lot of syntaxes in those ten posts and even if they’ve been all tested, (1) the testing conditions are probably very different from your environment, and (2) the commands have been customized so that they appear generic. Be careful; it’s very likely that the syntaxes will be wrong for you. Test them yourself on a test environment and don’t execute them if you don’t understand what every part of them is supposed to do.

One of the reasons for these posts is that it’s kind of difficult to figure out by yourself how you should run one particular tool. The information is spread across the reference manuals, the response files, the online help, and sometimes Oracle Metalink or people that managed to make it work.

In addition, if the syntax looks similar for all the tools, they differ more than we can guess first. Let’s take some examples to illustrate that and to begin with the syntaxes:

Read the rest of this entry . . .

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @sheeri: #confoo talk "Bending Queries to your Will with EXPLAIN" slides http://bit.ly/explainslides & handout
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more