The Standby Wizard For Oracle

 

User Manual

 

For UNIX and Linux Servers

 

Version 7

 

Copyright 2002-2005 Relational Database Consultants, Inc.

 

All Rights Reserved.


 

 

 

The Standby Wizard For Oracle

 

User Manual

 

For UNIX & Linux Servers

 

Relational Database Consultants, Inc. (RDC)

12021 Wilshire Blvd

Suite 108

Los Angeles, CA. 90025

310-281-1915

 

www.relationalwizards.com

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Restricted Rights Notice

 

Copyright 2001.  All Rights Reserved.  No portion of this document may be reproduced, recorded, transmitted, or copied without permission from the copyright holders.  Information in this document is subject to change without notice.

 

Trademark Notice

 

All trademarks in this document belong to their respective holders.

 

 

 


 

 

 

 

Table of Contents

 

 

 

                        Introduction

 

Chapter 1         Installation of the Standby Wizard

 

Chapter 2         Standby Database Creation - Preliminary Checklist

 

Chapter 3         Creating a Standby Database

 

Chapter 4         Building a Standby Database

 

Chapter 5         Mounting Your Standby Database and Confirming Synchronization With Your Primary Database

 

Chapter 6         Managing Your Standby Database Using the Standby Database Manager

 

Chapter 7         Understanding the Primary and Standby Agents

 

Chapter 8         Troubleshooting a Standby Database Configuration

 

Chapter 9         Rebuilding Your Standby Database

 

Chapter 10       Creating Multiple Standby Databases From Your Primary Database

 

Chapter 11       Emergency Fail-Over to a Standby Database (Activation)

 

Chapter 12       Graceful Switchback to the Primary Database

 

Appendix A.     The Standby Wizard and the Initialization File (init.ora)

 

Appendix B.     Modifying the Operating System Parameters of the Standby Wizard

 

Appendix C.     Uninstalling the Standby Wizard

 

Appendix D.     Using The Standby Wizard With Oracle’s Managed Standby Option

 

 


 

Introduction

 

Today’s environment dictates that our information be stored in highly available systems.  As we move into the 21st Century, we are faced with increased incidents of cyber-crime, power shortages, and real terrorism.  Yet, at the same time, our information systems must meet the 24/7 demands of a global networked economy.  In this age, the threats to our information systems are greater than ever before - yet so are the demands put upon them.  Therefore, high-availability will soon become a standard for all information retrieval systems in this new century.

 

The Oracle Corporation, through its popular Oracle RDBMS, offers the standby database as its high availability paradigm.  In the Oracle model, a production primary database archives changes (redo logs) to a dormant standby database.  This standby database constantly recovers those same logs to stay synchronized with the primary database. In the event of a failure, this standby database can be activated - made ready to perform the crucial tasks of the primary database and thus become available for use.

 

Unfortunately, up to this point, setting up an Oracle standby database is a very complex and costly project.  Only skilled DBA’s can accomplish the many steps required to both build and maintain a standby database configurations.  Because of the these high human resource costs, Relational Database Consultants, Inc. (RDC) has automated the labor involved in creating and maintaining standby databases in the form of the new software offering: The Standby Wizard for Oracle.

 

The Standby Wizard for Oracle is designed to lower your costs, automate your labor, and increase the fitness of your high-availability solution.  With the Standby Wizard, any Oracle DBA can set up a standby database configuration in only a few hours.  After a user becomes proficient with the Standby Wizard, one can define and begin building a standby database in only a few minutes.  The Standby Wizard is also not dependent on the Oracle Enterprise Edition, Oracle 9i, or Net8.  This will help smaller companies reduce their Oracle licensing costs, or at least, allow them to purchase other Oracle offerings they find necessary.

 

The fact that the Standby Wizard is not dependent on Oracle’s Net8 will allow you to build standby databases across any network connection - to remote databases that might not even be a part of your Oracle domain.  This feature allows you to clone database copies to any remote server that can house your Oracle standby database. 

  

The Standby Wizard not only automates the creation of your standby database(s) – diagnostic and maintenance functions are also automated. Managing a standby database configuration used to involve the querying of complex data dictionary views or mulling over raw output.  Now all this information is at your fingertips with a simple Windows interface and an easy-to-understand auditing log for each standby database that you create.

 

Some maintenance tasks that used to be crucial to keeping a standby database viable are no longer necessary with the Standby Wizard.  The Standby Wizard can actually detect if a tablespace (data file) or redo log specification has changed and will perform intelligently an incremental rebuild of your standby database, making only the minimal changes necessary.  The Standby Wizard will also detect database changes that are not logged (no logging) and will perform an intelligent rebuild on only those data files that need repair.  This not only saves human resource hours but it will save you disk and CPU usage maintaining your standby database configuration. 

 

If disaster ever hits, the Standby Wizard can be activated along with your standby database without the need for an Oracle DBA to issue SQL commands to start, mount, activate, and open your standby database.  Simply click on an automated command file from your mouse.  The Standby Wizard automates these tasks, and with our powerful monitoring and validation tools, the chances of your standby database performing incorrectly during a crisis greatly diminish.

 

In your high-availability planning to migrate back to your primary database after a crisis, the graceful switchback features of the Standby Wizard are second to none.  Simply click on a single button with your mouse and the Standby Wizard rebuilds your original primary database from memory!   Because of this graceful switchback feature, the Standby Wizard can be used as an automated backup tool for your production databases or as a tool to clone databases with.

 

The amount of person-hours you will save using the Standby Wizard is amazing.  We at Relational Database Consultants, Inc. (RDC) have experienced a 95% reduction in labor costs when using the Standby Wizard to build and maintain standby databases.  Once you use the Standby Wizard, the complex project of implementing Oracle’s standby database technology will become nothing more than a simple task – no more difficult than creating or dropping a table while drinking your morning cup of java. 

 

However, as you drink your java for the first time with the Standby Wizard User Manual, we strongly recommend that you carefully read each chapter of this user manual before you perform the associated tasks or function of the Standby Wizard.   Don’t be fooled by the ease-of-use of this product, behind the scenes the complex tasks of standby database creation are still taking place.  When you first install the Standby Wizard, there is a checklist you need to go through.  Therefore, we urge you to learn as much as you can about the Standby Wizard and Oracle’s standby database paradigm – yet leave the actual work to the Standby Wizard.

 


 

 

Chapter One – Installation of the Standby Wizard

 

1. Requirements

 

The Standby Wizard for Oracle on Unix/Linux requires the following to be implemented successfully on your Oracle platform(s):

 

1. An Oracle database of version 8.1.6 to 10.X with the Java option installed (default). 

 

2. An Oracle database that is archiving its redo logs (alter database archivelog).  Oracle 10g users need to define an archive destination, the parameter db_recovery_file_dest is not used.

 

3. To run the Java user-interface of the Standby Wizard - you will need the Java JRE 1.3 or higher installed and running on either your Windows/Unix/Linux Server or a network accessible client.  If you are running Oracle9i, the Java JRE 1.3 is supplied by Oracle.  You can download the Java JRE 1.4 from SUN at this link:

 

http://java.sun.com/products/archive/j2se/1.4.1_02/index.html

 

The .exe extractable version of the Standby Wizard for Oracle installs on a Windows Client.  If you plan on running the Standby Wizard user-interface from a Unix/Linux server directly - You can simply FTP the Standby Wizard’s installation files up to a Unix machine. These files exist in the “c:\Program Files\Standby Wizard 7.0” directory and should exist in a single Unix directory after you upload them.

 

4. Technical ability to perform basic Windows Administration tasks.

 

5. Technical ability to perform Oracle DBA tasks.

 

6. A valid Oracle support license.

 

7. A Network Configuration between servers (Intranet, extranet (VPN), or LAN/WAN) that will allow either standard rcp, scp, or ftp to copy and receive files from your primary database to a given standby host without password prompting.   

 

8. Access to the Oracle Unix/Linux user account running the borne shell.  (bash shell is acceptable)

 

Once you have determined that these above conditions are met, Installation of the Standby Wizard is performed in three easy steps:

 

2. Installation Step One - Client Installation

 

The first step of installing the Standby Wizard is to choose any windows client that is Network accessible to your primary database. 

 

Win32 Client Installation:

 

The first Installation step is performed on windows client after you download the Standby Wizard for Oracle and open the installation file, StandbyWizardJava.exe.  The Standby Wizard will create a program group called “Standby Wizard 7.0” and guide you through a generic windows installation.  The Standby Wizard Windows Installation places all of the Standby Wizard programs in the c:\Program Files\Standby Wizard 7.0 directory.  Be sure to read your license agreement that resides in this directory.  The demo version of this release only works for a limited time and must not be used on production systems.

 

You may run the Standby Wizard from a remote windows client or directly on the Windows server of the primary database.

 

            Zip File Installation

 

This installation is primarily for Unix and Linux users.  Once you download the .zip file for the Standby Wizard, simply extract the contents into a single directory on your client.  If you plan on running the Java User Interface from a Unix server directly - you may transfer the extraction to a new directory on your Unix workstation or server.

 

3. Installation Step Two - Database Installation

 

The Standby Wizard for Oracle server component is always installed on the primary database that we are going to create standby databases from and never on a standby database.  The database installation script is run from SQL*Plus either locally or via a remote client.  The following is a list of the actions performed by the Database Installation script when it is run on the primary database:

 

1. Creates an Oracle user account named rdc_standby_user and grants certain resource and system privileges.

 

2. Creates the tables that the Standby Wizard uses.

 

3. Compiles the intelligent PL/SQL packages that comprise the Standby Wizard.

 

4. Creates your license information.

 

The installation script gives you a license for one copy of the Standby Wizard to evaluate on one database.  If your physical server has 3 production databases (Oracle SID’s) that you would like to build your standby databases against - then you must install the Standby Wizard three times, one copy for each database.

 

When you click on the Database Installation icon, you will need to have DBA privileges required to create the Standby Wizard user rdc_standby_user.  This is why the first prompt that you will receive when running the install script will be for the SYSTEM account password.  The database installation script rdc_standby_install.sql, first connects as SYSTEM to create an Oracle user account by the name rdc_standby_user.   This new account is granted the following roles:

 

1. Connect

2. Resource

3. Execute_Catalog_Role

4. Select_Catalog_Role

5. Select Any Dictionary

6. Select Any Table

7. Manage Tablespace

8. Alter Database

9. Alter System

10. Administer Database Trigger

11. Execute Any Procedure

12. JavaSysPriv

 

Aside from the SYSTEM password that you will be prompted for, you will be asked to provide information necessary to create the rdc_standby_user Oracle user and grant rdc_standby_user the above privileges needed to create standby databases.  If you make a mistake at any point in the process, just hit control-c or cancel from sqlplus and simply run the database installation script again.  

 

If you are re-installing the Standby Wizard, make sure no one is connected as the Standby Wizard user, rdc_standby_user and that the primary agent is offline.  The Database Installation script first drops the Standby Wizard user account and all of its objects, to insure a clean install.

 

 

Starting the Database Installation Script From Windows:

 

Once you have installed the Standby Wizard product on your client Windows machine, you will need to start the Database Installation icon from the Program Menu - simply navigate to Start | Programs | Standby Wizard for Windows 7.0. | Database Installation. The database installation script creates the Standby Wizard user and installs the Standby Wizard tables and intelligent PL/SQL packages within the Oracle RDBMS via SQL*Plus.   To run this script, click on the icon within the Standby Wizard program group labeled: “Database Installation”.  If you wish, you may chose to run the script directly from SQL*Plus as shown below.

 

If the Database Installation step never starts, and you are not prompted for these five items, it probably indicates that your SQL*Plus executable“sqlplusw” is not located in the current OS path.  If this is the case, you can fix the OS path, use sqlplus.exe as the target, or evoke SQL*Plus from the Program Menu and run the script rdc_standby_install.sql as such:

 

SQL>start “c:\Program Files\Standby Wizard 7.0\rdc_standby_install.sql”

 

Starting the Database Installation script from Unix, Linux, or the Windows Command Prompt

 

Unix and Linux users can install the Standby Wizard by simply starting SQL*Plus in the directory containing the Standby Wizard extract.  Once SQL*Plus is started, simply start the Database installation script from the SQL*Plus prompt as such:

 

SQL>@rdc_standby_install

 

Or

 

SQL>start rdc_standby_install

 

Note: If you are not using Net*8 you will need to remove the “@service” parameters in your script.


 

            Database Installation Script Walk-Through

           

Here is a list of the five prompts you will receive when running the Database Installation script:

                    

                     1. Enter the password for the Oracle user account SYSTEM:

 

This is the sting of the system account password.  By default in Oracle, it is manager.  So for instance, if you connect as system/foobar, you would enter the string foobar after this prompt.  This password is only used to create the Standby Wizard user account rdc_standby_user and is immediately undefined in the SQL*Plus script.

 

2. Enter the Net8 service_name used to connect to this database:

 

This is the service name that you currently use in your connection strings to login into the database for which you are installing the Standby Wizard, your primary database.  For instance, if you log in as: scott/tiger@mydb, then your Net8 service name is mydb. 

 

3. Enter the password you would like for the new Standby Wizard account rdc_standby_user:

 

This will be the Oracle user account password that you use would like to use when connecting to the Standby Wizard User Interface.  This password is for the Oracle user account rdc_standby_user.  Because this new account has certain system privileges granted to it, protect this new password as you would any Oracle administrator password.

 

Warning:

 

Because the Standby Wizard stores the password for its own account rdc_standby_user encrypted within its own schema, you will need to execute the following Standby Wizard package whenever you change the password for this account, for example:

 

SQL> Alter User RDC_Standby_User Identified By new_password

(Changing the password can also be performed from your favorite DBA tool)

 

SQL>Exec RDC_Standby_User.RDC_Standby_Util.UpdatePassword('&WizardPassword');

 

4. Enter the default tablespace for the Standby Wizard user (optional):

 

Enter a tablespace name where the Standby Wizard is to create its small schema.  In most environments, the Standby Wizard schema will never grow over a few megabytes.  This parameter is optional.

 

5. Enter the default temporary tablespace for the Standby Wizard user (optional):

 

Enter the default temporary tablespace for the Standby Wizard.  This parameter is optional. 


 

When the Database Installation script finishes, you will be notified of a successful installation.  Check the output of the Database Installation by editing the file: "rdc_standby_install.log” in Program Files | Standby Wizard 7.0 or located in your current directory.  Once the install script has notified you of its successful completion, you are ready to run the Standby Wizard User Interface to register your Standby Wizard license. 

 

4. Installation Step Three - Java User Interface Configuration and Verification

 

The main menu of the Standby Wizard User Interface is a Java class which exists in the Standby Wizard user interface file named StandbyWizard.jar.   To successfully run the Standby Wizard’s Java User Interface, a Java JRE (1.3 or higher) must be installed on the client machine you wish to run the User Interface from.  To test that you have the proper java version in your command path, issue this command from either your Windows command prompt or a Unix/Linux shell:

 

>java –version

 

Make sure the version of the java runtime is 1.3 or higher.  If java cannot be recognized by the operating system, you will need to include the correct JRE in your OS path.  Oracle already has the Java JRE 1.3 installed by default on its 9i databases, yet this JRE might not be in the default OS path of your client machine.

 

Setting the proper Java path for Windows Users:

 

1.                          Navigate to: Control Panel | Administrative Tools | Computer management

 

2.                          Choose: Actions | properties | Advanced | Environment Variables

 

3.                          Click on the system variable in the lower list called “path” and click on EDIT to modify the path to include the proper java path.

 

Example: (In this example mypath is already defined)

 

Path = c:\mypath;C:\Program Files\s1studio_jdk\j2sdk1.4.1_02\bin

 

For Oracle 9i users who don’t want to install the SUN JRE, the following example uses the Oracle JRE 1.3.  In this example, ORACLE_HOME is defined as c:\oracle\ora92.  In Oracle 9i the JRE path is: ORACLE_HOME/jdk/jre/bin.

 

Path = c:\mypath;c:\oracle\ora92\jdk\jre\bin;

           

Once you have edited the path information and clicked on OK - open a new command prompt window and run the command “java –version” again.


 

Setting the Proper Path for Unix/Linux users:

 

After you have extracted the Standby Wizard for Oracle, move all of the files up to a single Unix directory where you wish to start the Standby Wizard.

 

If you cannot run “java –version” - then to change the Java path, simply edit your .profile or .bash_profile file in the home directory of the Unix account that will run the Standby Wizard to include the proper Java path.  You do not need to run the Standby Wizard User Interfacefrom the “Oracle” Unix account.

 

Note:

 

Make sure to set the script StandbyWizard.sh as an executable for Unix as such:

 

$chmod 744 StandbyWizard.sh

 

5. Starting the Standby Wizard User Interface

 

To invoke the Standby Wizard User Interface from a windows client simply click on the icon labeled Standby  Wizard for Java, located in your Windows start menu in the Standby Wizard 7.0 program group

 

You may also run the bat file named StandbyWizard.bat directly from the directory C:\Program Files\StandbyWizard 7.0

 

If you are running a Unix or Linux client - simply execute the provided shell script that you modified in the previous step:

 

$./StandbyWizard.sh

 


 

After you start the User Interface, you will be prompted for your database login to the Standby Wizard account, rdc_standby_user

 

 

In this example, the password we specified during the Standby Wizard install is rdc and the Database SID is prod817.  In this example, the host machine where the Oracle server resides is rdc4 - if you do not have a host name you can instead use the IP address of the database server.

 

In most cases the default Oracle port number is 1521. Feel free to change this value dependent on the settings of the listener.ora file located on your primary database server. 

 

Note:

 

The Standby Wizard connects to your Oracle database through a “thin” JDBC client.  We recommend you run the Standby Wizard from any location on a secure network, yet we do not recommend you run the Standby Wizard across the Internet without a secure shell -  unless you are using the Standby Wizard for testing and/or development purposes.


 

Once Java connects you to your RDBMS, you will see the Standby Wizard Main Menu:

 

 

 

 

From the Standby Wizard main menu, you can always see the following useful items:

 

1. The Version No. of the Standby Wizard.

2. The Expiration Date (remains blank after purchase).

3. The Host Name of the physical machine the Standby Wizard has been installed on.

4. The primary database Oracle SID.

5. The current Operating System of the primary database.

 

When you first enter the Main Menu - you will need to enter a demo license code which can be obtained at swdemo@relationalwizards.com.


 

To complete your installation, click on the menu button labeled: “Install/Uninstall the Standby Wizard”.  This action will open the Administration Screen:

 

 

 

When you enter this screen for the first time, you will need to enter your demo license code.  To do this simply type in your email address, a space, and then your 3 digit demo code obtained from Relational Database Consultants, Inc. or your appropriate vendor.  In the above example Sue Jones has typed in her email address and the 3 digit code.  Once you have entered this code simply click on the button at the bottom of the screen labeled “Register Wizard” to complete the registration process.

 

Now you are ready to create standby databases…hot off your primary database.  Yet, before we attempt standby database creation for the first time with the Standby Wizard, we must go through the Preliminary Checklist.


 

Chapter Two - Standby Database Creation - Preliminary Checklist

 

Using the Standby Wizard to create standby databases is very simple.  The Standby Wizard interface takes you through four easy steps to create a standby database.  In each step, you define or clarify basic information that the Standby Wizard will need to create your new standby database.   Yet, don’t be fooled by the simplicity of this process - creating a Standby Database is always a complex task and a very CPU/Disk intensive one also.  This is why we must go through a preliminary checklist before we create our first standby database with the Standby Wizard.

 

1. Check Free Disk Space

 

Essentially, what must occur in standby database creation is the duplication of all database data from the primary host on the standby host.  If your database is large, this step could take hours or even days!  

 

For instance, if your current database size is 300 gigabytes, then 300 gigabytes of data will need to be copied from your primary host to your standby host.  And although the Standby Wizard efficiently deletes old redo logs after they are successfully applied, you will need more than 300 gigabytes of disk space free on your standby host to accommodate both the Oracle Installation itself and any bulk transfer of redo logs that might need to be applied to the standby database after a network shortage. 

 

If you are creating a standby database on the same host as your primary database, then the new standby database will still require enough free disk space to copy all of the Oracle data files to a new location and the ability to accommodate any unexpected bulk transfer of redo logs.

 

To find out your total database size, enter the Standby Wizard main menu. At the bottom of the window - your total database size is listed next to the label "Current Database Size".  To create a standby database for an OLTP production system, we recommend that you have free disk space of not less than 150% of the current database size – after you have installed the Oracle software on the standby host

 

2. Prepare the Standby Host

 

If you plan to create your standby database on the same physical host as your primary database, then you do not need to perform an installation check because your primary instance is already assumed to exist and be running.

 

If the new standby host is to be on a separate machine, you are required to install the same Oracle RDBMS version as installed on the primary host (or as close as possible).  Furthermore, the standby host must be running the same operating system version and using the same file system (Unix, NTFS, FAT32) as the primary host.  A warning to Sun Solaris users: Solaris for Intel can never be used to build standby databases against SPARC Solaris servers and visa/versa because there file systems are different.

 

The Standby Wizard does not require that you connect to the standby host unless you wish to use the GUI activation screen and/or the graceful switchback features of the Standby Wizard.  If you would like to implement these features on your standby host, you will need to install the Standby Wizard forms on the standby host and/or create a Net8 connection for them on the standby host.  This can be accomplished by editing the tnsnames.ora and listener.ora files on the standby host and the tnsnames.ora file on your Java client to include your new standby SID(s) IP address identifier or a Global Name you wish to assign it. 

 

If you are going to use the Standby Wizard front-end on your standby host for activation, you can execute the Standby Wizard menu using the StandbyWizard.sh installation file, or by activating from a Windows client.

 

            Caution:

 

Never perform a Database Installation on a standby database created by the Standby Wizard.  By definition, the standby database is a copy of the primary database, and thus already contains the Standby Wizard schema – necessary for a graceful switchback.

 

When you install the Oracle RDBMS on your standby host, feel free to create the default Oracle installation database for any other instances you require.  As long as the standby database’s Oracle Sid and database name is unique for each physical standby host - there will be no conflicts.  If you are installing Oracle for the first time on the standby host, you should allow the installer to create the default instance so you can test the fitness of your new database server. 

 

Tip:

 

If you need to save disk space on your standby host, you can shutdown the default Oracle instance after testing the Oracle installation and remove the data files created in $Oracle_Home/./oradata.  The Standby Wizard is not dependent on the existence of any instances on the standby host, only the installation of the Oracle RDBMS software.

 

Many times critical applications require that certain executable files, directory structures, and cron jobs be present and running on the standby host server.  If this is the case at your site, a valid application environment will also have to be installed on the standby host in case of a fail-over.  You should test this environment first, by activating your first standby database and using it as a duplicate test site.  If this step is avoided or not completed properly, then during a crisis your Oracle database will be working perfectly when activated by the Standby Wizard - yet your ability to use it will not exist!

 

3. Chose Transfer Method(s) to Copy Files to the Standby Host

 

If you plan to use the Standby Wizard to build standby databases on remote machines, you will be prompted for a method for copying files to the remote standby host.  The three methods available to you for transferring files:

 

            1. RCP              - Remote Copy

            2. SCP              - Secure Copy

            3. FTP              - File Transfer Protocol

 

Because the Standby Wizard is partially a response to the harsh security environment of this age, the remote transfer command that you intend to use does not require you to grant any permissions to any machines to copy or view files on your primary production host.  Your production host instead, needs to be granted permission to read files, write files and create directories on your remote standby host.  This security methodology insures that the use of the Standby Wizard will not decrease the security of your network or database servers.

 

Because the Standby Wizard’s secure methodology requires that your primary host be granted permissions to read and write files and directories on your standby host connecting as the local “oracle” Unix user. 


 

Note:

 

If you are using a different account than “oracle” to run the Oracle software on your standby host or primary host, make sure to note the account name, for you will need to specify this alternate account name when creating your standby database with the Standby Wizard.

 

Another requirement to use these remote copy methods with the Standby Wizard, is that there be no password prompting.   This does not, in any way, limit security or password authentication, yet requires additional setup steps.  Once you have decided on your transfer protocol, and they could be multiple protocols, these are the guidelines we recommend to test the fitness of your remote copying.

 

1. Guidelines For Implementing RCP (Remote Copy)

 

The Standby Wizard requires that RCP prompts for no password and implements the flags –p and –r.  To verify this, type man rcp from the Unix prompt.

 

            The Standby Wizard copies files to the remote host via rcp in the following way:

 

            $rcp –p <local filename> oracle@standbyhost:<remotefilename>

 

            The Standby Wizard gets files from the remote host via rcp in the following way:

 

            $rcp –p  oracle@standbyhost:<remotefilename> <localfilename>

           

            The Standby Wizard creates remote directories via rcp in the following way:

 

$rcp –r /tmp/stanby/dir/subdir oracle@standbyhost:/mnt/subidr

 

 

                      2. Guidelines For Implementing SCP (Secure Copy)

 

Secure Copy is always more difficult to implement than RCP.  The reason being is that the Standby Wizard requires the use of the –B flag which insures that there will be no password prompting.  By default, Secure Copy requires password prompting.  Thus, you will need to either turn authentication off on the standby host or you will need to place encrypted keys on both the standby and primary host machines that will allow the primary host to identify itself and copy files without password prompting.  Refer to www.openssh.com for more information on how to accomplish this Herculean task.

 

Aside from the –B flag, SCP requires the –r and –p flags for the Standby Wizard to function at 100% capability.  The –q flag, which is a Standby Wizard default, is not required and you can change it if required by referring to Appendix B of this document: Modifying the Operating System Parameters of the Standby Wizard.

 

            The Standby Wizard copies files to the remote host via scp in the following way:

 

            $scp –B –q -p <local filename> oracle@standbyhost:<remotefilename>

 

The Standby Wizard copies files from the remote host via scp in the following way:

 

            $scp –B –q -p  oracle@standbyhost:<remotefilename> <localfilename>

           

            The Standby Wizard creates remote directories via. scp in the following way:

 

$scp –B –r –q -p /tmp/stanby/dir/subdir oracle@standbyhost:/mnt/subidr

 

3. Guidelines for Implementing FTP or  (Secure) SFTP ( File Transfer Protocol)

 

The Standby Wizard uses a very small and stable subset of FTP.  The only catch, of course, is that the Standby Wizard, as with rcp and scp, requires that no password prompting occur.  Usually this can be accomplished by placing a secure .netrc copy (chmod 600) in the primary host’s Oracle account home directory.  Type in man ftp from the Unix prompt for more information on how to store passwords for FTP hosts.

 

If you are using SFTP you will need to configure your standby database to accept a secure FTP login via a set of authentication files and encrypted keys.  Regardless of if you are using FTP or SFTP you should verify that the below sequence of commands will work for the Standby Wizard:

 

            The Standby Wizard copies files via ftp in the following way:

 

            $ftp

 

            >open <standby host>

            >binary

            >put <local filename> <remote filename>

            >chmod <umask> <remote filename>

 

 

The Standby Wizard gets files via ftp in the following way:

 

$ftp

 

            >open <standby host>

            >binary

            >get <local filename> <remote filename>

 

            The Standby Wizard creates remote directories via ftp in the following way:

 

$ftp

 

            >open <standby host>

            >binary

            >mkdir <remote filename>

 

Whatever transfer method you chose to work with, make sure to test it out before using the Standby Wizard GUI to implement your standby database solution.  You can test your copy commands by copying a file, then getting a file, and then copying an empty subdirectory using either the above discussed copy commands for RCP and SCP or by issuing an FTP mkdir command from FTP as shown above.


 

4. Chose the directories on your Standby Host to house the new standby database(s)

 

We must consider at least three directories that the Standby Wizard is going to create and/or populate with data. The Unix mount points that will house these directories must be accessible to the Oracle Unix account for the reading, writing and the executing of files.  Here are the functional descriptions of the three directory locations utilized by the Standby Wizard:

 

1. The default data file directory - This will be where the Standby Wizard stores the data files of the primary host as well as the standby database’s own redo logs.  By default, the Standby Wizard will create a series of sub-directories in the default data file directory with the original primary machine path names.  Of course, if you have a mission-critical OLTP database that must be optimized, then you may want to separate your new standby data files on multiple drives.  In this scenario, the Standby Wizard will map any configuration of drives you need.

 </