Working with Automating SharePlex installations

Installing SharePlex's data replication tool on your servers is really a straight-forward exercise, (after you have completed the pre-installation steps of course).  You download the proper distribution for your server(s), unpack them and run the interactive installer.

The interactive installer prompts you for specific answers concerning where you want to install the software and what instance you are working with.

Now this process works great if you are only working with 1 or 2 servers but what if have several servers you want to install SharePlex on? Or maybe you would prefer to run the installation during off-hours and not have to hit the enter key to answer all of the questions?

Use a Response File!

There are 2 options for running a response file.  Either as Root or as a non-root user.  The response file example shown below uses the non-root file.

A Response File allows you to run the installation in unattended mode. In the /productdir/install directory you will see a non-root-install-only.rsp file.  This file gets created when you unpack the zip file.  You can edit the .rsp file and supply the answers that you would supply when you run the interactive.

IMPORTANT! The response file contains two sections. Only the top section is user configurable. Do not edit the bottom section. The bottom section begins with the line "Do not change settings that appear below."

Edit the top section of the response file to provide the responses for the installation. Only edit the values to the right of the colon, and make certain there is a space between the colon and the response.

The following example is for non-root installation:

# To install SharePlex with the unattended option please

# modify the settings below. You may safely modify only the values

# to the right of the colon, and the colon must be immediately

# followed by a space. Editing the values to the left of the colon

# may impact the unattended install causing the process to become

# interactive.

#

SharePlex Admin group: spadmin

product directory location: /home/splex/proddir

variable data directory location: /home/splex/vardir

ORACLE_SID that corresponds to this installation: oracledb

ORACLE_HOME directory that corresponds to this ORACLE_SID:   /home/oracle/products/version

TCP/IP port number for SharePlex communications: 2100

the License key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

the customer name associated with this license key: SharePlex_Trial

As you can see there are only 8 lines in this file that need to be updated with your environment values.  Once you have updated this file you can run it.

From the command shell of the operating system, run the .tpm installation file with the -r option followed by the full path to the response file.

# ./SharePlex-8.6.2-b86-oracle110-aix-52-ppc.tpm -r /users/shareplex/product.rsp. 

Please note that the example above is just that, an example.  You will need to update the command with the proper version of SharePex tpm file that you are using.

Notice that the instructions say “from the command shell of the operating system….”.  This will run the installer just fine but you may want to set up a batch job to run this and if you want to run this on multiple servers you may need to set up several batch jobs.  Well what if you could set up an automation routine to run these for you?

You will still need to edit the .rsp files for each of your environments but now you can have a “library” of rsp files available to you and you can automate the installation using Toad for Oracle.

Let the Automation begin!

Toad for Oracle has an Automation Designer that allows you to, well, automate various activities.  Setting this up is as simple as connecting to Toad for Oracle and choosing Automation Designer from the toolbar. 

It is a lightning bolt icon (blue arrow below).

Once the Automation Designer window opens click on the Utilities tab and then choose the RExec SSH icon (orange arrow above).

This will create a new “Action” and you can double-click on the action and set the parameters for this job.  

You set the Host name, username and password for the server you want to run on.  In my experience using a SSH connection works the best.

Click on OK and then you can enter your commands in the text box.

These are commands that are appropriate for your target system.  In our case we are passing the commands to run the SharePlex rsp file.  I mention this because once you have completed setting up this task for SharePlex you may find other tasks that you want to automate that may not have anything to do with SharePlex.

Choose Apply to save the changes and then you can either Run the job or click on Cancel to just save it.

You can setup as many of these jobs as you want or need. 

Right-click on the job name to rename it so you don’t get confused.  Also under the right-click menu are options to run the job, copy the job, and schedule the job, along with a few other options.

We are going to choose Schedule from the right-click menu.  This will open a wizard where we will give the job a name. You then click NEXT and you will see the job we are going to run.  Click NEXT again then click on NEW.   This will open the wizard shown below.

This wizard will build a ‘trigger’ for this job.  There are several options to “Begin the task” but if choose the default you will see a calendar where you can choose when you want to run the installation script.

So now you can schedule the installation(s) to run in silent mode when it is convenient for you.  Remember, you can setup several Automation jobs if you have multiple installations to run and you can schedule each of them as needed.

That’s it!  You just learned how to setup a SharePlex silent install file and then use Toad for Oracle schedule and run it.  Pretty cool, right?

Read more about SharePlex utilities and features or for more information on Toad for Oracle utilities and features please visit us on the web at www.toadworld.com.

 

-Mark

 

About the Author