A P P E N D I X  I

HA Oracle Script Samples

This appendix contains sample output of the following scripts:



Note - The Solaris Volume Management software was selected during the creation of these Oracle script samples. If you choose to install the VERITAS Volume Manager software instead, your output will be slightly different.




Sample Output: HAOracle.init

CODE EXAMPLE I-1 HAOracle.init Output

# /etc/opt/SUNWords/HAOracle.init
 
                       Sun Microsystems, Inc.
 
                          IMPORTANT NOTICE
 
The various software programs contained herein are licensed to you under the 
terms of the appropriate license agreements which are set forth herein or which 
are enclosed within the documentation shipped with the system. PLEASE READ THE 
AGREEMENTS BEFORE USING THE SOFTWARE PROGRAMS. By using the software, you are 
accepting and agreeing to such terms. If you do not accept the terms, then 
please return the software programs unused to the place of purchase for a full 
refund.
 
No-Charge 30 Day Trial License
 
ORACLE CORPORATION
 
CAUTION: Signifying acceptance of this license by pressing the "I accept the 
License Terms and Export Restrictions" button below is an indication of your 
agreement to comply with each of the following license and export restrictions 
with respect to the Software (as defined below). 
 
TRIAL LICENSE: Oracle Corporation ("Oracle") grants you a no-charge trial 
license to use the software selected ("Software") solely for evaluation 
purposes for a period of 30 days. You may not use the Software for any 
development, commercial, or production purpose. You must purchase a full-use 
license if you wish to do any of the following: (a) use the Software after the 
end of the 30-day trial period, or (b) use the Software for any development, 
commercial, or production purpose, or (c) distribute the Software for any such 
use. 
 
COPYRIGHT: The Software is the proprietary product of Oracle and is protected 
by copyright law. You acquire only the right to use the Software and do not 
acquire any rights of ownership. You agree not to remove any product 
identification, copyright notices, or other notices or proprietary 
restrictions from the Software. You agree not to cause or permit the reverse 
engineering, disassembly, or decompilation of the Software. You shall not 
disclose the results of any benchmark tests of the Software to any third party 
without Oracle's prior written approval. 
 
WARRANTY DISCLAIMER: Oracle is providing this license on an "as is" basis 
without warranty of any kind; Oracle disclaims all express and implied 
warranties, including the implied warranties of merchantability or fitness for 
a particular purpose. 
 
LIMITATION OF LIABILITY: ORACLE SHALL NOT BE LIABLE FOR ANY DAMAGES, INCLUDING 
DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR 
LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD 
PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF YOU OR ANY OTHER 
PERSON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
 
EXPORT: Customer shall comply fully with all laws and regulations of the 
United States and other countries ("Export Laws") to assure that neither the 
Software, nor any direct products thereof are (1) exported, directly or 
indirectly, in violation of Export Laws, or (2) are used for any purpose 
prohibited by Export Laws, including, without limitation, nuclear, chemical, 
or biological weapons proliferation. 
 
RESTRICTED RIGHTS: Software delivered to the U.S. Defense Dept. is delivered 
with Restricted Rights and the following applies: "Restricted Rights Legend: 
Use, duplication or disclosure by Government is subject to restrictions as 
currently set forth in subparagraph (c)(1)(ii) of DFARS 252-227-7013, Rights 
in Technical Data and Computer Software (October 1988). Oracle Corp. 500 
Oracle Pkwy., Redwood City, CA, 94065. Software delivered to a U.S. 
Government Agency not within the Defense Dept. is delivered with "Restricted 
Rights" as defined in FAR 52.227-14, Rights in Data - General, including 
Alternate III (June 1987)." 
 
EXPORT CONTROLS ON THE SOFTWARE: 
Pressing the "I accept the License Terms and Export Restrictions" button below 
is also an indication of your agreement that you comply with each of the 
following export restriction statements. 
 
* I am not a citizen, national, or resident of, and am not under control of, 
the government of Cuba, Iran, Sudan, Iraq, Libya, North Korea, Syria, nor any 
country to which the United States has prohibited export.
 
* I will not download or otherwise export or re-export the Software, directly 
or indirectly, to the above mentioned countries nor to citizens, nationals or 
residents of those countries.
 
* I am not listed on the United States Department of Treasury lists of 
Specially Designated Nationals, Specially Designated Terrorists, and Specially 
Designated Narcotic Traffickers, nor am I listed on the United States 
Department of Commerce Table of Denial Orders. 
 
* I will not download or otherwise export or re-export the Software, directly 
or indirectly, to persons on the above mentioned lists.
 
* I will not use the Software for, and will not allow the Software to be used 
for, any purposes prohibited by United States law, including, without 
limitation, for the development, design, manufacture or production of nuclear, 
chemical or biological weapons of mass destruction. 
 
Oracle Corporation World Headquarters 
500 Oracle Parkway 
Redwood Shores, CA 94065 USA 
Worldwide Inquiries: 650.506.7000 
Fax: 650.506.7200   
 
If you agree to the license terms above and are in compliance with each of the 
export restrictions listed above, please click on the "I accept the License 
Terms and Export Restrictions" button below. Otherwise please click "Exit" to 
end the installation of the Software.   
 
Do you agree to the terms of this license for all nodes? [default=y] [y,n,?] y
 
Please enter Oracle shared storage mount point [default: /global/oradata] [?] <cr>
 
Thank you. You will now be asked for a series of directories in which
to store the various Oracle data files. Be sure to make them all
subordinate to the mount point you have chosen for shared storage,
/global/oradata.
 
 
Please enter directory for control file one [default:
/global/oradata/orcl/Cntl_file_1] [?] <cr>
 
Please enter directory for control file two [default:
/global/oradata/orcl/Cntl_file_2] [?] <cr>
 
Please enter directory for control file three [default:
/global/oradata/orcl/Cntl_file_3] [?] <cr>
 
Please enter directory for redo log file one [default:
/global/oradata/orcl/Log_group_1] [?] <cr>
 
Please enter directory for redo log file two [default:
/global/oradata/orcl/Log_group_2] [?] <cr>
 
Please enter directory for redo log file three [default:
/global/oradata/orcl/Log_group_3] [?] <cr>
 
Please enter directory for archived redo log files [default:
/global/oradata/orcl/Arch] [?] <cr>
 
Please enter directory for Oracle data files [default:
/global/oradata/orcl/Data_files] [?] <cr>
 
Please enter directory for alert log and trace files [default:
/global/oradata/admin/orcl] [?] <cr>
Please enter database login name [doctor]: <cr>
Please enter database password [heartbeat]: <cr>
Please enter total database size on disk in GB [10]: <cr>
Please enter failover resource group name [oracle-rg]: <cr>
Please enter server application resource name [oracle-server]: <cr>
Please enter listener application resource name [oracle-listener]: <cr>
Please enter HA storage resource name [HAStorage_res]: <cr>
 
Use Veritas Volume Manager? [default: Y] [y,n,?] n
 
Set up DSS server? [default: N] [y,n,?] y
Please enter logical host name: hostname
Please enter logical IP address: IP_Address
Please enter fault probe number of cycles [optional]: <cr>
Please enter fault probe time-out value [optional]: <cr>
Please enter Oracle user environment file [optional]: <cr>
Please enter Oracle parameter LOG_BUFFER in bytes [optional]: <cr>
Please enter Oracle parameter DB_CACHE_SIZE in bytes [optional]: <cr>
Please enter Oracle parameter SHARED_POOL_SIZE in bytes [optional]:<cr> 
Please enter Oracle parameter SORT_AREA_SIZE in bytes [optional]: <cr>
Please enter Oracle parameter JAVA_POOL_SIZE in bytes [optional]: <cr>
 
Now you will see the configuration options as you have chosen them.
If you would like to modify a line, note its line number.
 
Press any key to continue...               
     1 ORADATA_MT_PT=/global/oradata
     2 CNTL_FILE_1=/global/oradata/orcl/Cntl_file_1
     3 CNTL_FILE_2=/global/oradata/orcl/Cntl_file_2
     4 CNTL_FILE_3=/global/oradata/orcl/Cntl_file_3
     5 LOG_FILE_1=/global/oradata/orcl/Log_group_1
     6 LOG_FILE_2=/global/oradata/orcl/Log_group_2
     7 LOG_FILE_3=/global/oradata/orcl/Log_group_3
     8 ARCHIVED_LOG_FILES=/global/oradata/orcl/Arch
     9 DATA_FILE=/global/oradata/orcl/Data_files
    10 TRACE_FILE=/global/oradata/admin/orcl
    11 DB_LOGIN=doctor
    12 DB_PASS=heartbeat
    13 ORADATA_SZ_GB=10
    14 FO_RES_GROUP_NM=oracle-rg
    15 SERVER_RES_NM=oracle-server
    16 LISTENER_RES_NM=oracle-listener
    17 HA_STORAGE_RES_NM=HAStorage_res
    18 USE_VERITAS_VM=N
    19 SIXTY_FOUR_BIT=N
    20 DSS_SERVER=Y
    21 LOGICAL_HOST_NAME=HAOracle
    22 LOGICAL_IP_ADDR=129.153.47.202
 
Note number of line to change. Then press "q".
Enter line number to edit. Else press Return to save. 13 left arrow changing item no. 13
 
Please enter new value for ORADATA_SZ_GB: 12 left arrow new value for item 13
 
Now you will see the configuration options as you have chosen them.
If you would like to modify a line, note its line number.
 
Press any key to continue...   
[?1h=[H[2J[H     1 ORADATA_MT_PT=/global/oradata
     2 CNTL_FILE_1=/global/oradata/orcl/Cntl_file_1
     3 CNTL_FILE_2=/global/oradata/orcl/Cntl_file_2
     4 CNTL_FILE_3=/global/oradata/orcl/Cntl_file_3
     5 LOG_FILE_1=/global/oradata/orcl/Log_group_1
     6 LOG_FILE_2=/global/oradata/orcl/Log_group_2
     7 LOG_FILE_3=/global/oradata/orcl/Log_group_3
     8 ARCHIVED_LOG_FILES=/global/oradata/orcl/Arch
     9 DATA_FILE=/global/oradata/orcl/Data_files
    10 TRACE_FILE=/global/oradata/admin/orcl
    11 DB_LOGIN=doctor
    12 DB_PASS=heartbeat
    13 ORADATA_SZ_GB=12  left arrow new value displayed for item 13
    14 FO_RES_GROUP_NM=oracle-rg
    15 SERVER_RES_NM=oracle-server
    16 LISTENER_RES_NM=oracle-listener
    17 HA_STORAGE_RES_NM=HAStorage_res
    18 USE_VERITAS_VM=N
    19 SIXTY_FOUR_BIT=N
    20 DSS_SERVER=Y
    21 LOGICAL_HOST_NAME=HAOracle
    22 LOGICAL_IP_ADDR=129.153.47.202
 
Note number of line to change. Then press "q".
Enter line number to edit. Else press Return to save. <cr>
 
HAOracle.init: Final configuration written to HAOracle.env.


Sample Output of HAOracleConfig.init

CODE EXAMPLE I-2 HAOracleConfig.init Output

# /etc/opt/SUNWords/HAOracleConfig.init
 
HAOracleConfig.init: Installing Oracle data service.
 
** Installing Sun Cluster - Highly Available Oracle DBMS **
	SUNWscor....done
	SUNWscorx...done
 
Log file - /var/cluster/logs/install/scinstall.log.24753
 
HAOracleConfig.init: Installing Oracle data service on parkplace1.
 
** Installing Sun Cluster - Highly Available Oracle DBMS **
	SUNWscor....done
	SUNWscorx...done
 
Log file - /var/cluster/logs/install/scinstall.log.24696
 
HAOracleConfig.init: Installing HA Oracle Patch 112264-02.
 
Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...
 
Patch number 112264-02 has been successfully installed.
See /var/sadm/patch/112264-02/log for details
 
Patch packages installed:
 SUNWscor
 SUNWscorx
 
HAOracleConfig.init: Installing HA Oracle Patch 112264-02 on parkplace1.
 
Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...
 
Patch number 112264-02 has been successfully installed.
See /var/sadm/patch/112264-02/log for details
Patch packages installed:
 SUNWscor
 SUNWscorx
 
HAOracleConfig.init: Configuring Sun Volume Manager.
fmthard: New volume table of contents now in place.
fmthard: New volume table of contents now in place.
ora_data_1/d11: Concat/Stripe is setup
ora_data_1/d12: Concat/Stripe is setup
ora_data_1/d10: Mirror is setup
ora_data_1/d10: submirror ora_data_1/d12 is attached
 
HAOracleConfig.init: Creating and mounting Oracle data global file system.
/dev/md/ora_data_1/rdsk/d10:	20973568 sectors in 1463 cylinders of 224 tracks, 64 sectors
	10241.0MB in 209 cyl groups (7 c/g, 49.00MB/g, 5952 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 100448, 200864, 301280, 401696, 502112, 602528, 702944, 803360, 903776,
 1004192, 1104608, 1205024, 1305440, 1405856, 1506272, 1606688, 1707104,
 1807520, 1907936, 2008352, 2108768, 2209184, 2309600, 2410016, 2510432,
 2610848, 2711264, 2811680, 2912096, 3012512, 3112928, 3213344, 3313760,
 3414176, 3514592, 3615008, 3715424, 3815840, 3916256, 4016672, 4117088,
 4217504, 4317920, 4418336, 4518752, 4619168, 4719584, 4820000, 4920416,
 5020832, 5121248, 5221664, 5322080, 5422496, 5522912, 5623328, 5723744,
 5824160, 5924576, 6024992, 6125408, 6225824, 6326240, 6426656, 6527072,
 6627488, 6727904, 6828320, 6928736, 7029152, 7129568, 7229984, 7330400,
 7430816, 7531232, 7631648, 7732064, 7832480, 7932896, 8033312, 8133728,
 8234144, 8334560, 8434976, 8535392, 8635808, 8736224, 8836640, 8937056,
 9037472, 9137888, 9238304, 9338720, 9439136, 9539552, 9639968, 9740384,
 9840800, 9941216, 10041632, 10142048, 10242464, 10342880, 10443296, 10543712,
 10644128, 10744544, 10844960, 10945376, 11045792, 11146208, 11246624,
 11347040, 11447456, 11547872, 11648288, 11748704, 11849120, 11949536,
 12049952, 12150368, 12250784, 12351200, 12451616, 12552032, 12652448,
 12752864, 12853280, 12953696, 13054112, 13154528, 13254944, 13355360,
 13455776, 13556192, 13656608, 13757024, 13857440, 13957856, 14058272,
 14158688, 14259104, 14359520, 14459936, 14560352, 14660768, 14761184,
 14861600, 14962016, 15062432, 15162848, 15263264, 15363680, 15464096,
 15564512, 15664928, 15765344, 15865760, 15966176, 16066592, 16167008,
 16267424, 16367840, 16468256, 16568672, 16669088, 16769504, 16869920,
 16970336, 17070752, 17171168, 17271584, 17372000, 17472416, 17572832,
 17673248, 17773664, 17874080, 17974496, 18074912, 18175328, 18275744,
 18376160, 18476576, 18576992, 18677408, 18777824, 18878240, 18978656,
 19079072, 19179488, 19279904, 19380320, 19480736, 19581152, 19681568,
 19781984, 19882400, 19982816, 20083232, 20183648, 20284064, 20384480,
 20484896, 20585312, 20685728, 20786144, 20886560,
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Cntl_file_1.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Cntl_file_2.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Cntl_file_3.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Log_group_1.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Log_group_2.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Log_group_3.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Data_files.
 
HAOracleConfig.init: Created directory /global/oradata/admin/orcl/bdump.
 
HAOracleConfig.init: Created directory /global/oradata/admin/orcl/udump.
 
HAOracleConfig.init: Created directory /global/oradata/admin/orcl/cdump.
 
HAOracleConfig.init: Created directory /global/oradata/orcl/Arch.
 
HAOracleConfig.init: Configuring Oracle initialization parameters.
Sun Microsystems Inc.	SunOS 5.8	Generic	February 2000
 
Make sure the "default-root-password" is changed to preserve security. 
 
Sun Microsystems Inc.	SunOS 5.8	Generic	February 2000
 
Make sure the "default-root-password" is changed to preserve security. 
 
HAOracleConfig.init: Installing Oracle data, control, and redo log files.
 
HAOracleConfig.init: Starting Oracle database. Creating user doctor.
 
SQL*Plus: Release 9.0.1.0.0 - Production on Fri Nov 16 12:59:42 2001
 
(c) Copyright 2001 Oracle Corporation. All rights reserved.
 
Connected to an idle instance.
 
SQL> ORACLE instance started.
 
Total System Global Area 235701304 bytes
Fixed Size		     279608 bytes
Variable Size		 167772160 bytes
Database Buffers	   67108864 bytes
Redo Buffers		     540672 bytes
SQL>   2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33 
Control file created.
 
SQL> 
Database altered.
 
SQL>   2 
Tablespace altered.
 
SQL> 
System altered.
 
SQL> 
System altered.
 
SQL> 
System altered.
 
SQL>   2 
File created.
 
SQL>   2 
User created.
 
SQL> 
Grant succeeded.
 
SQL> 
Grant succeeded.
 
SQL> 
Grant succeeded.
 
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.0.1.2.0 - Production
With the Partitioning and Real Application Clusters options
JServer Release 9.0.1.2.0 - Production
 
HAOracleConfig.init: Configuring Oracle network files.
HAOracleConfig.init: Creating Oracle resource types.
 
HAOracleConfig.init: Creating failover resource group oracle-rg.
 
HAOracleConfig.init: Adding logical host name HAOracle to failover
resource group.
 
HAOracleConfig.init: Enabling logical host name HAOracle.
 
HAOracleConfig.init: Adding storage resource HAStorage_res to failover
resource group.
 
HAOracleConfig.init: Enabling storage resource HAStorage_res.
 
HAOracleConfig.init: Adding application resource oracle-server to failover
resource group.
 
HAOracleConfig.init: Adding application resource oracle-listener to failover
resource group.
 
HAOracleConfig.init: Bringing resource group oracle-rg online.
 
HAOracleConfig.init: completed successfully.

 


Sample Output of HACleanup

CODE EXAMPLE I-3 HACleanup Sample Output

# /etc/opt/SUNWords/HACleanup
 
This program will attempt to remove any cluster objects which may have
been created in a previous run of HAOracleConfig.init. Errors may appear
on your screen if it tries to remove an object which had not been created
at the time the run failed. Therefore, it is safe to ignore these errors
and proceed with another run of HAOracleConfig.init.
 
Do you wish to continue? (y/n) y
 
HACleanup: Taking resource group offline.
 
HACleanup: Disabling all resources.
 
HACleanup: Removing all resources.
 
HACleanup: Removing the resource group.
 
HACleanup: Unregistering resource types.
 
HACleanup: Removing Oracle network files.
 
HACleanup: Bringing down Oracle instance.
 
SQL*Plus: Release 9.0.1.0.0 - Production on Fri Nov 16 13:10:27 2001
 
(c) Copyright 2001 Oracle Corporation. All rights reserved.
 
Connected to an idle instance.
 
SQL> drop user doctor cascade
*
ERROR at line 1:
ORA-01034: ORACLE not available
 
 
SQL> ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory
SQL> Disconnected
HACleanup: Removing Oracle database files.
HACleanup: Pointing Oracle directories back to their defaults.
 
HACleanup: Removing multihosted storage mount points.
/global/oradata: 
/global/oradata: 
 
HACleanup: Removing nodes from the Sun VM disk set.
metaset: parkplace0: no mediator hosts found
 
ora_data_1/d10: submirror ora_data_1/d12 is detached
ora_data_1/d10: Mirror is cleared
ora_data_1/d11: Concat/Stripe is cleared
ora_data_1/d12: Concat/Stripe is cleared
metaset: parkplace0: ora_data_1: host parkplace1 is not in the set
 
HACleanup: Removing Oracle data global file system.
metaset: parkplace0: ora_data_1: drive c1t0d0 is not in set
 
metaset: parkplace0: ora_data_1: drive c2t0d0 is not in set