Oracle Embedded Database Oracle Embedded Installation Kit For Oracle

Reviews
Shared by: Wu tang clan
Stats
views:
87
rating:
not rated
reviews:
0
posted:
2/11/2009
language:
English
pages:
0
Oracle Embedded Database Oracle Embedded Installation Kit – For Oracle Database focus Expertise Level Publish Date Version Last Modified Comment Installation Kit -For Oracle Embedding silent installation of Oracle Database Software as part of partner Application Software installation Intermediate June 17, 2004 2.1 June 28, 2004 This kit is to be used with Oracle10g Database Table of Contents Conventions......................................................................................................................... 4 Introduction..........................................................................................................................4 Target Audience................................................................................................................... 5 Skill Requirements...............................................................................................................5 Scope of this kit................................................................................................................... 5 Software Requirements........................................................................................................ 5 Technical Support................................................................................................................ 6 Compatibility....................................................................................................................... 6 Contents of the Kit............................................................................................................... 6 Oracle Installation - Quick Overview.................................................................................. 7 Embedding Method..............................................................................................................9 Packaging......................................................................................................................... 9 1. Application Software............................................................................................. 10 2. Oracle Binaries.......................................................................................................10 3. An Oracle Database template (with or without datafiles)......................................10 4. Installation and De-Installation scripts as needed ................................................. 12 5. Unix specific script – preinstall script................................................................... 13 Installation......................................................................................................................13 1. Unix specific script – preinstall script................................................................... 14 2. Application Software............................................................................................. 14 3. Oracle Binaries.......................................................................................................14 4. Unix and Linux specific – post install script......................................................... 15 5. Create Oracle Database from Oracle Database template....................................... 16 6. Additional scripts as needed ................................................................................. 17 De-Installation................................................................................................................17 De-install Oracle Database.........................................................................................17 De-install Oracle software/binaries............................................................................17 Remove all Oracle Software references..................................................................... 18 Appendix A – Description of the Contents of this Kit.......................................................18 oracle10gserver.rsp – The responseFile..................................................................... 18 sample_template.dbc – A sample DBCA Template definition file........................... 18 monitor.c – A C program to monitor the progress of Installation..............................18 Install.cmd (Win32®) and Install.sh (Unix).............................................................. 18 createCloneTemplate.cmd (Win32®) and createCloneTemplate. sh (Unix).............19 createTemplate.cmd (Win32®) and createTemplate. sh (Unix)................................ 19 createDB.cmd (Win32®) and createDB. sh (Unix)................................................... 19 removeDB.cmd (Win32®) and removeDB. sh (Unix).............................................. 19 deInstall.cmd (Win32®) and deInstall. sh (Unix)......................................................19 completeClean.cmd (Win32®) and completeClean. sh (Unix)................................. 19 winutils\changeServiceStartupType(.exe and .c)....................................................... 19 winutils\removeOracleHomeRegistry(.exe and .c).................................................... 19 winutils\removeORADBA (.exe and .c).................................................................... 20 winutils\removeService (.exe and .c)......................................................................... 20 OrainstRoot.sh (Unix only)........................................................................................20 Appendix B – Removing Oracle supplied seed database from package............................20 Appendix C – Running Progress Only Installation............................................................21 Appendix D – Oracle Client Installation............................................................................21 Appendix E – Oracle Web based Installation.................................................................... 22 Appendix F – Backup and Recovery Strategy for Embedded Database............................ 22 Backup........................................................................................................................... 22 Recovery........................................................................................................................ 25 Conventions This kit uses following convention Oracle Database Software Oracle Binaries Oracle Database Application Software Application Installation Software The entire Oracle Database Software as shipped by Oracle Corporation Only Oracle software binaries excluding Oracle Database Only Oracle Database excluding Oracle Binaries Software which is trying to embed Oracle Database Software installation as part of its installation Any program that is used by Application Software for installing it. It can a be third party product such InstallShield, InstallAnywhere or just the shell scripts Introduction The Oracle Embedded Installation Kit (OEI Kit) provides an easy to use interface for Oracle partners and developers to install the Oracle Database Software as part of their Application Software installation. Embedding Oracle Database Software is divided in two phases. The first phase, referred to as packaging, is where a partner creates an integrated installation package to be delivered to their customer for installation. The second phase, referred to as installation, is when an end-user uses this integrated package to install the Application Software with the embedded Oracle Database Software on his or her computer. This kit will provide step-bystep instructions and various different options that can be used to create an integrated package, and how that package can be used to automate the installation of Oracle Database Software. Each customer installation has its own unique challenges, as every environment is different. This kit provides the help needed to build an integrated package and automated installation process, which is very simple yet very flexible to meet the specific needs of each customers. The Oracle Embedded Installation Kit enables a partner: 1. To completely embed the installation of Oracle Database Software; by launching a silent installation of Oracle Database Software from any Application Installation Software. 2. To create a Oracle Database using Oracle seed database (as shipped on the Oracle Media) 3. Clone (package and create) a partner’s own customized Oracle Database (with or without contents) with fully customized Oracle Database creation. The Oracle Database creation can be completely customized by passing arguments for different locations for files (datafiles, logfiles and controlfiles), Oracle Database memory parameters based of percentage of available system memory, and any other Oracle Database parameters. Target Audience This kit is intended for the technical individuals of an Oracle partner organization, responsible for packaging and installing applications and Oracle Database Software. Skill Requirements This kit requires a sound understanding of Application Software installation, and the Application Installation Software, which is used to package and install the Application Software. This kit also requires an understanding of the Oracle installation engine “Oracle Universal Installer” referred as “OUI” in rest of the kit. Please read the Oracle Universal Installer Concepts Manual to get the general understanding of OUI. Scope of this kit This kit provides you with the tools and guidance to build an installable stage of your Oracle Database Software, which you can then use to automate the silent installation of Oracle Database Software. This kit does not include any information about actual installation requirements or the installation process of Oracle Database Software. You should refer to Oracle Database Software installation manuals to understand the installation process and requirements of your specific platform. Software Requirements This kit includes the documentation and auxiliary programs to help you embed the Oracle10g version of Oracle Database Software. You can either download the Oracle10g version of Oracle Database Software from Oracle Technology Network http://otn.oracle.com or order it from Oracle store http://oraclestore.oracle.com. Technical Support All support issues relating to this kit should be directed to Oracle Partner Network (http://opn.oracle.com). However, any issues related to Oracle Database should be directed to Oracle Support. Compatibility This kit has been tested against installations of Oracle10g Enterprise Edition, Standard Edition and Personal Edition on Windows and Linux platform. However, the kit should be able to assist you to build an integrated installation for Oracle10g on any platform. Contents of the Kit NOTE: This kit references Windows NT, Windows 2000, Windows XP and Windows Server 2003 as Win32. This kit also refers all flavors of Unix and Linux as Unix in general unless specificd differently. This kit contains the following files and directory structure:  The “common” directory contains files required for all supported platforms common\ Oracle10gserver.rsp sample_template.dbc monitor.c  The “win32” directory contains files required only on Win32 platforms. Note: that some auxiliary programs are shipped as C source and executables. In normal circumstances, it will not be necessary for you to recompile these. win32\ Install.cmd createCloneTemplate.cmd createDB.cmd createTemplate.cmd removeDB.cmd removeNetworking.cmd deinstall.cmd completeClean.cmd winutils\ changeServiceStartupType.exe changeServiceStartupType.c removeOracleHomeRegistry.exe removeOracleHomeRegistry.c removeORADBA.exe removeORADBA.c removeService.exe removeService.c  The “unix” directory contains files required only for Unix platforms unix\ Install.sh createCloneTemplate.sh createDB.sh createTemplate.sh removeDB.sh removeNetworking.sh deinstall.sh completeClean.sh orainstRoot.sh  The “backup_recovery_scripts” directory contains scripts required for backup and recovery setup on all platforms. backup.rman recover.rman cr_cre_directories.sql cr_cre_tempfiles.sql emca_param.txt config_oem.cmd cr_service.cmd backup_recover_scripts\ Note: Please refer to the Appendix – A for the description of each file in the kit. Oracle Installation - Quick Overview The section relies on prior reading of the manuals for Oracle Universal Installer. Before proceeding any further let’s look at a typical Oracle Database Software installation, using the Oracle Universal Installer. On a Windows based platform Oracle Database Software stage or CDROM a “setup.exe” program, and on a Unix platform a “runInstaller” program launches the java based Oracle Universal Installer (or OUI) engine. There are two copies of these programs on each CD, however the main program is found as below: Windows: \install\setup.exe Unix : /install/runInstaller To run the Oracle Universal Installer in silent mode it must first be called using a “-silent” or “-nowelcome” argument and then must also be supplied with a responseFile using “-responseFile” argument. The responseFile will provide the predetermined response to the installer questions, which otherwise would have been manually provided by the user performing the installation. The “-silent” or “-nowelcome” arguments determine the installation mode. The “silent” installation mode (using “-silent” argument) forces the installer to not prompt for any inputs. If the installer could not find a valid response from the responseFile or otherwise for some required question; it will fail and write an error to the log file. The location of installation logs files depends on your environment and operating system. Please refer to OUI and Oracle installation manuals for more information on this. The “nowelcome” installation mode (using “-nowelcome” argument) prompts for inputs to any required question it could not find a valid response from responseFile or otherwise. In addition to “–silent” or “–nowelcome” to launch the OUI in a particular mode, and passing –responseFile argument for passing responseFile, there are several other arguments that are exposed by OUI. Here is a list of OUI arguments those are relevant to this kit. Please refer to OUI manual for details on these parameters. Option -deinstall -ignoreSysPrereqs -executeSysPrereqs -paramFile -force -noconsole -nontw32FoldersActions -monitorFile -removeHome -waitforcompletion Description For deinstall operations. For ignoring the results of the system pre-requisite checks. Execute system pre-requisite checks only and exit. Don’t actually install Specify location of oraparam.ini file to be used by OUI. Allowing silent mode installation into a non-empty directory. For suppressing display of messages to console. Console is not allocated. – Windows Only For not creating Program Group Folder / Icons – Windows Only Specify location for monitor file to be used by OUI. For removing homes from the OUI inventory. For enabling OUI to wait till end of installation before returning to calling process Embedding Method You can provide your integrated package through a variety of delivery mechanisms. You can choose to ship an entire package on a distribution media such as CD or DVD; or you can choose to provide a small runtime installer for download, and stream the rest of the package via your web server. The following steps will show you how to create an integrated package for installation of Oracle Database Software and your own Application Software. To get to our final stage we will first create an on disk stage with all the required components; depending upon the size of the stage and your preference on how you would like to ship/deliver your entire package to your end customers, you can either ship this stage on a media or provide it for a download via your website. If you are interested in shipping just the Oracle Installer for Oracle related products, and stream Oracle software via a HTTP server, please refer to instructions in Appendix E – Setting up Web server for streaming Oracle software. After following all the steps you should have a directory called c:\mystage that will hold the entire integrated package. Note: These steps are documented as they apply on Win32® platforms; however, you can follow similar steps on any platform. Packaging To create a complete integrated package the following components need to be packaged: 1. Application Software 2. Oracle Binaries 3. An Oracle Database template (with or without datafiles) 4. Additional scripts as needed 5. Unix specific script 1. Application Software Copy your entire ready to install application package under c:\mystage\ 2. Oracle Binaries Create a directory c:\mystage\Ora10gCD and copy entire Oracle10g media to c:\mystage\Ora10gCD. 3. An Oracle Database template (with or without datafiles) This step is optional but very common. It is optional because you have the choice to create an Oracle Database based on Oracle Database Software supplied template and not package any additional Oracle Database template. However, if you wish to design and configure the Oracle Database for your application and/or have your Application Software metadata included in a pre-packaged Oracle Database to speed up the installation, you should package an Oracle Database template for your Application Software. Lets quickly review the DBCA to understand the following steps easily. Oracle Database Configuration Assistant (DBCA) DBCA is Oracle’s Oracle Database configuration tool. It is a standard Oracle tool shipped with Oracle Database Software. DBCA has a concept of Oracle Database templates. An Oracle Database template is a self-contained Oracle Database definition that DBCA can use to creating another Oracle Database. These templates can be created from an existing Oracle Database or from an existing template; and then copied to another machine to be used by DBCA as a source for creating another Oracle Database based on that template. There are two types of Oracle Database templates. The first type of template has two files (.dbc and .dfb). It holds the definition of the Oracle Database in .dbc file and actual datafiles in compressed format in .dfb file. The other type of template has only one file (.dbt), which only holds the Oracle Database definition. DBCA also provides easy to use interfaces (GUI and command line) to help you create and configure an Oracle Database as described above. Following steps will use DBCA command mode interface to run it in silent mode. To package an Oracle Database template you have three options. a. Create an Oracle Database template with contents using Option A. b. Create an Oracle Database template without contents using Option B. c. Use one of shipped Oracle Database template without packaging anything additional. Option A: Copy the “createCloneTemplate.cmd/sh” from this kit to a temporary working location. This script provides a sample command that you should run to create a clone template from your existing Oracle Database. You will need to modify the script with correct Oracle Home, Oracle SID, Oracle Database SYS account name and password along with the desired template name in the script. After you run “createCloneTemplate.cmd/sh”, it will create two Oracle Database template files in your OracleHome\assistants\dbca\templates directory. .dbc and .dfb Option B: Copy the “createTemplate.cmd” from this kit to a temporary working location. This script provides a sample command that will create a template from your existing Oracle Database with no contents. You will need to modify the script with correct Oracle Home, Oracle SID, Oracle Database SYS account name and password along with the desired template name in the script. This will create a single Oracle Database template file in your OracleHome\assistants\dbca\templates directory. .dbt After you have created the Oracle Database Template as above, you have the choice to further modify the templates definition (.dbc or .dbt file). Note: Please use the provided DBCA template definition file “sample_template.dbc” for reference on these changes. Oracle Database File location customization  Oracle Database templates have three inherited file location variables {ORACLE_BASE}, {DB_NAME} and {SID}. These three variables are automatically populated and used by DBCA for various file locations. In addition to these variables, you can also add your own variables in “variables” section and pass their value at runtime as argument to DBCA command line. Here is the format to add your own variables in template definition file. To use a variable in any file location just add {MyVariable1}, and DBCA will replace the variable with value. Oracle Database Memory customization  Oracle Database creation can also be customized to create Oracle SGA as a percentage value of the available system memory, along with the Oracle Database type. To implement this feature; add the following parameters in the MiscParams section; set the databaseType to any of MULTIPURPOSE, DATA_WAREHOUSE, and OLTP, set customSGA to false and set the percentageMemToSGA to desired value. You can also provide value for this parameter at runtime using DBCA command line. MULTIPURPOSE 70 false After making changes to your Oracle Database template as discussed above copy your Oracle Database template file or files to c:\mystage\mydatabase If you choose to package your own Application database, you may benefit by removing Oracle’s supplied database template to conserve some space. This is the only space saving option that is recommended to make sure your Oracle stage is intact and installable. Refer to instructions in “Appendix B” to remove the Oracle supplied seed database to conserve space in package. 4. Installation and De-Installation scripts as needed After you have packaged Application Software, Oracle Binaries and Oracle Database template you need to package scripts and support files that are needed to run the installation of these components in silent mode. This step assumes that you have install time scripts or utilities needed to install your Application Software, and that program is going to make a call to one or more Oracle installation scripts. There are sample scripts provided with this kit (as documented in the installation and de-installation sections). Please use these scripts as a template to build your own installation scripts. You can also embed these scripts as part of you application installer code. These scripts are discussed in the installation and de-installation section to give you a better understanding on how to use them. Copy all the files from common directory and scripts from your platform specific directory (including subdirectory for windows) to c:\mystage\orainst directory. And follow the instructions in Installation and DeInstallation section to make required changes to them. 5. Unix specific script – preinstall script Since the installation in a Unix environment is not run from the root user account; end users are required to perform certain steps as root user. A sample script is provided for reference to build your pre-installation script for Unix. Copy orainstRoot.sh to /mystage/orainst directory. Edit this file for Inventory Location; change to your desired location. You can also convert this to an interactive script, and ask end-user for their input. Installation The second part of the embedding process involves building a process that end customer uses to installing the embedded Oracle Database Software from your Application Software package. Installation steps depend on what was packaged and the choices made during packaging. This section will cover how to build scripts to automate the installation of the components packaged above. After this section, you should package your installation scripts as step 4 of packaging. 1. Unix - preinstall script 2. Application Software 3. Oracle Binaries 4. Unix - post install script 5. Configure Oracle Networking 6. Create Oracle Database from Oracle Database template 7. Additional scripts as needed 1. Unix specific script – preinstall script Since the installation in a Unix environment is not run from the root user account. End users will be required to perform the following steps in preparing the installation environment. You should review the Oracle Database Software installation manuals for the platform specific requirements such as kernel parameters, tmp space, etc.    Login as the "root" Create a UNIX group called "dba" Create a UNIX user called "Oracle" with its home directory as “” and assign "dba" as its primary group. This home does not have to be your Oracle Database Software home; this home will be used to hold the Oracle user and OUI inventory. Run the provided/modified script: “orainstRoot.sh”  2. Application Software OUI is platform independent and works identically on any supported platform. OUI provides command line interface to perform Oracle installation in silent mode. Therefore it is easy to call OUI from any Application Installation Software to launch the installation of Oracle Binaries via a callout function. The installation of your Application Software depends upon what installation software you are using to package your Application Software. However, all installation software(s) provide call-out functions to make OS calls, while the systems waits for the call to complete. Hence use your Application Installation Software ’s call-out function to make a call to OUI to launch an Oracle Binaries installation. You also need to make sure that you collect any user input (such as ORACLE_HOME) into your Application Installation Software variables, so you can pass those to OUI for installing Oracle Binaries. 3. Oracle Binaries To install Oracle Binaries for embedded installation, you need to call OUI in silent mode and pass it your responseFile as an argument. You can also pass any other arguments to overwrite the pre-defined values in the responseFile. Most common parameter those are specific to each installation are ORACLE_HOME, ORACLE_HOME_NAME and FROM_LOCATION. FROM_LOCATION is the location from where Oracle software package is accessible such as a file system or Web server via HTTP. This kit includes sample scripts “Install.cmd” and “Install.sh” to help you build your own script/command. Note: Please make sure to use absolute path for the responseFile. After installation has been initiated as above, you need to monitor the progress of the installation. There are three components to progress monitoring.  It needs to wait for installation to finish, so it can continue next step only after installation is complete. It needs to check if installation was success or failure. It needs to optionally monitor the progress of installation. The OUI launcher “setup.exe” / “runInstaller” has argument to wait till OUI has completed the installation. The OUI will also return a return code to indicate whether it was successful or failed. The return code “0” indicates success, “1” indicate success with failing configuration tools; “<0” indicate a failure. This kit provides a sample progress-monitoring program called “monitor.c”. This program takes monitorFile as argument, and returns a count of number of dots written by OUI to OUI log files. The number of dots count written by this program does not have any direct relation to the percentage completion of installation. This is just a relative indicator of how far along the installation have progressed. You should make a test installation and use that as a reference to monitor the progress on installation. Please use this sample code to implement your progress monitoring. In addition to above process of monitoring the progress by your own UI, you can run OUI in progress only mode to just display the progress of the installation. Please refer to Appendix C – Running Progress Only Installation for details. 4. Unix and Linux specific – post install script After installation of the Oracle software, the installation application must prompt the enduser to perform the post installation steps as outlined below; this is a required step, before an Oracle Database can be created. Login as “root” and execute $ORACLE_HOME/root.sh   5. Create Oracle Database from Oracle Database template After configuring Oracle Networking, you need to create an Oracle Database. To install your Oracle Database, first you need to copy your template files to target machine’s “ORACLE_HOME/assistants/dbca/template” directory. Then launch DBCA in silent mode to create the Oracle Database from Oracle Database template. The DBCA not only created the database, but it can also configure it to be managed by Oracle Enterprise Manager. There are two editions of Enterprise manager; one is called OEM-Database Control and another one is called OEM-Grid Control. The database, you are installing could be managed by Database Control or Grid Control. Please refer to documentation on OEM for details on these editions and management concepts. Here we will simply focus on varies arguments those can be passed to DBCA to achieve the desired configuration. To get the complete list of DBCA argument, please use “dbca – help” command. Here is the list of some of the related DBCA arguments those can be passed to DBCA during a database creation. Create a database by specifying the following parameters: -createDatabase -templateName -gdbName [-sid ] [-sysPassword ] [-systemPassword ] [-emConfiguration -dbsnmpPassword -sysmanPassword [-variables ] [-initParams ] [-memoryPercentage [-databaseType ]] [-recoveryAreaDestination ] [-datafileDestination ] At the minimum you need to you should pass the template name, new Oracle Database global name, SID, sys password, and system password to createDatabase command. The sample script “createDB.cmd/sh”, shows the most typical scenario for embedded environment. The createDB.cmd/.sh script also has a argument “CONFIGURE_EM=[YES/NO]”. If your source database had an OEM repository, and you would like to configure your target database to use OEM Database Control; you should pass this pass this parameter as YES along with values for dbsnmpPassword and sysmanPassword, other wise pass it NO. You can verify the existence of EM repository by checking your template definition file’s (.dbc or .dbt) common attribute section. The provided script also configuring a location for recoveryArea. The recoveryArea destination should be carefully selected, to provide a proper backup and recovery strategy. Please refer to Appendix F – Backup and Recovery Strategy to select the proper value for this parameter. 6. Additional scripts as needed After all the above steps are completed, the target machine will have a running and working Oracle Database ready for use. At this time, you can choose to run any additional script that you may need for your specific application. For example you may want to use “changeServiceStartupType” to change the Startup mode of certain Oracle services from Auto to Manual. De-Installation Embedding the installation concludes the embedded installation. However, there are many instances when you may be interested in silently and automatically de-installing all the software you installed. This section will cover the de-installation of all Oracle related software, and assume you already have a process to silently and automatically de-install your Application Software. As documented above you installed Oracle Database Software in two main pieces – Oracle Binaries and Create Oracle Database. These pieces needed to be de-installed in reverse order of installation. It is advisable that you generate all the de-installation scripts at the time on installation. De-install Oracle Database To completely remove an Oracle Database you need to remove its service (Win32® only), its datafiles, its parameter file, its dump files and its password file. Copy removeDB.cmd/removeDB.sh; This script requires three arguments ORACLE_HOME, ORACLE_SID and password for SYS; make necessary changes or pass arguments to this script to remove your identified Oracle Database. De-install Oracle software/binaries To de-install Oracle software/binaries you need to run OUI in silent mode with “deinstall” argument. Copy deInstall.cmd/deInstall.sh and make necessary changes to remove Oracle software/binaries from identified Oracle Home. This script remove all Oracle services related to this Oracle Home, all program Groups related to this Oracle Home and all the contents of this Oracle Home. This de-installation script also removes Oracle CSS software and services. This software and services might be shared by another Oracle10g Oracle Home. This script assumes you don’t have any other Oracle Home on this machine, running Oracle10g database. Note: You can use the progress monitoring as described in installation of Oracle software/binaries. Remove all Oracle Software references After you have de-installed Oracle Database, Oracle Networking, and Oracle Home your Oracle Software is completely removed from that particular Oracle Home. However, depending on platform Oracle also maintains some common information for any Oracle software including other Oracle homes for database. If you are very sure that there are no other Oracle software running on that machine in any other Oracle Home, and you really want to completely remove any Oracle software references from that machine then follow these steps. Copy completeClean.cmd/completeClean.sh, removeORADBA.exe, removeOracleHomeRegistry.exe and make necessary changes to remove all reference to Oracle software from the machine. Also remove references to Oracle Home and C:\Program Files\Jre from system path. Please note, that this is a destructive operation, that not only removes the Oracle installation, that you have shipped with your product, but it also removes ANY other Oracle Software configuration, that may have been installed by the end user and installed with other software packages using embedded Oracle install. Before running these, you should make sure your end user is warned and understand the implications. Appendix A – Description of the Contents of this Kit oracle10gserver.rsp – The responseFile This is modified responseFile that you will need for embedding. sample_template.dbc – A sample DBCA Template definition file This file is provided for reference to help you make changes to your own DBCA Template definition file. monitor.c – A C program to monitor the progress of Installation This is a C program which can be called by any monitoring thread during execution of setup.exe/runInstaller for installation or deinstallation. This program requires a argument of monitorFile, will return the count of “number of dots” put by setup.exe in its’s logfile to provide the indication of installation/deinstallation progress. Install.cmd (Win32®) and Install.sh (Unix) This is a sample batch file that demonstrates the use of OUI command line options to launch the installation of Oracle Database Software in complete “silent” or “nowelcome” mode. This sample shows you what arguments needs to be passed to OUI. createCloneTemplate.cmd (Win32®) and createCloneTemplate. sh (Unix) This is a sample batch file that demonstrates, how to create a DBCA clone template from an existing Oracle Database with contents (datafiles). createTemplate.cmd (Win32®) and createTemplate. sh (Unix) This is a sample batch file that demonstrates, how to create a DBCA template from an existing Oracle Database without contents (no datafiles packaged). createDB.cmd (Win32®) and createDB. sh (Unix) This is a sample batch file that demonstrates, how to create an Oracle Database using a DBCA template. removeDB.cmd (Win32®) and removeDB. sh (Unix) This is a sample batch file that demonstrates, how to stop and remove an Oracle Oracle Database. deInstall.cmd (Win32®) and deInstall. sh (Unix) This is a sample batch file that demonstrates, how to remove Oracle software/binaries from an Oracle Home. completeClean.cmd (Win32®) and completeClean. sh (Unix) This is a sample batch file that demonstrates, how to remove all Oracle Software references from a machine. winutils\changeServiceStartupType(.exe and .c) This is Win32® specific utility that can be used to change the startup mode of any service to AUTO or MANUAL. Please use –help command with the utility to see the syntax. winutils\removeOracleHomeRegistry(.exe and .c) This is Win32® specific utility that can be used to remove the Oracle Registry key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE from the machine. You should use this utility only when you want to completely remove all versions of Oracle from a machine. This utility implicitly will take backup of Oracle Registry to a file “OracleRegistry.backup” before it will delete the registry. This utility also takes “– restore” argument to restore the OracleRegistry from this backup file. Please use –help command with the utility to see the syntax. winutils\removeORADBA (.exe and .c) This is Win32® specific utility that can be used to remove the ORA_DBA group from the machine. You should use this utility only when you want to completely remove all versions of Oracle from a machine. This utility does not take any arguments. You can use $ORACLE_HOME\Oracle Database\oradba.exe to create ORA_DBA group. winutils\removeService (.exe and .c) This is Win32® specific utility that can be used to remove any Win32® service form the machine. The utility is shipped to enable you to remove Oracle services, but can in fact be used to remove any service. Hence, you should use this utility very carefully and fully understand the implications of using it. Once a Win32® service is removed using this utility, the only way to recreate it is using the program that initially created the service. Please use –help command with the utility to see the syntax. OrainstRoot.sh (Unix only) This script sets the Oracle Universal Installer (OUI) environment to allow it to run in silent mode. It creates an OUI location file “/var/opt/oracle/orainst.loc”, which points the OUI location to the actual location, e.g. /home/Oracle/oraInventory and the Oracle owner group to the actual value such as “dba”. Test scripts.txt (Windows) This text file lists commands for testing the OEI Kit scripts detailed above. Please see usage and examples within this file on how to test the kit in your environment. Appendix B – Removing Oracle supplied seed database from package If you decided to package your own database, it may be useful to remove the Oracle supplied seed database from the package to conserve space. If you decided to remove the Oracle supplied seed database; please make sure that your customer do not attempt to install any seed database during or after the installation. Here are the step-by-step instructions to remove the Oracle provided seed database database from the package: Replace \stage\Components\oracle.rdbms.seeddb\10.1.0.2.0\1\DataFiles\Expanded\seed\te mplates\ Seed_Database.dfb with a 0 byte file of the same name. Appendix C – Running Progress Only Installation This Kit by default describes the process on installing in complete silent mode, and using your own progress monitoring program to optionally monitor the progress of Oracle Binaries installation. However, it is possible to run Oracle Binaries installation in a progress only mode using OUI progress bar. Here are the instructions to obtain this functionality. 1. Run OUI with -nowelcome instead of -silent. 2. Customize the provided response files by changing the following parameter setting to TRUE. SHOW_SPLASH_SCREEN SHOW_DEINSTALL_PROGRESS SHOW_INSTALL_PROGRESS    You can also run the creation of Oracle database in progress only mode by changing -silent argument to –progressOnly in createDB script. Appendix D – Oracle Client Installation Oracle client software can be installed by using one of the 'client' response files provided on the distribution under “Response” directory on Oracle client media package. The clientRuntime.rsp should work for most applications, which connect through OCI, ODBC, and OLE DB etc. However, if your application uses OO4O, you need to use the clientAdmin.rsp response file. In addition to these, Oracle has introduced a simple install of the client (Instant Client). Instant Client allows you to run your applications without installing the standard Oracle client or having an ORACLE_HOME. OCI, OCCI, ODBC, and JDBC applications work without modification. The detailed information on Instant client including the Software download can be found at: http://otn.oracle.com/tech/oci/instantclient/instantclient.html Appendix E – Oracle Web based Installation This setup requires you to just run the Oracle Installer (OUI) from a local machine and stream the Oracle binaries from a HTTP server. The instructions to setup web based installation are available at: http://otn.oracle.com/pub/notes/install_0104.html The OUI package currently can be downloaded from http://metalink.oracle.com Please download the patch number 3540563 In addition to above instructions, you also need to modify the Install.cmd/Install.sh. The supplied Install.cmd/sh script accepts an argument as Disk drive and use that to drive the location for FROM_LOCATION. For a Web based installation, the FROM_LOCATION will need to be changed to the HTTP address of your stage as below: FROM_LOCATION="http://dmcsco1.us.oracle.com:7778/10g_cd/stage/products .xml" Appendix F – Backup and Recovery Strategy for Embedded Database This section briefly covers how to configure automated backups and an appropriate incremental backup strategy using RMAN (Recovery Manager) for embedded database. This section by no means covers the entire backup and recovery solutions offered by Oracle. Also the backup and strategy discussed here is just for recommendation purpose only, and you must evaluate your backup and recovery strategy options based on your business requirements. Backup To successfully implement any effective backup and recovery strategy to protect your database against any type of system failure; you must enable ARCHIVELOG mode for Oracle database; and use of spfile for Oracle parameter file. Please refer to Oracle Database Administration Manual for details. For embedded database, if you are prepackaging a database into a DBCA template, it is advisable to enable ARCHIVELOG and use of spfile before you package the database into the template. That will automatically enabled ARCHIVELOG mode, and create spfile for the database created from that DBCA template. We suggest following backup strategy: 1. Configure Flashback recovery area for on disk backups. Flashback area configuration in controlled by these two parameters. They can be configured via DBCA during a template creation of actual database creation. It is advisable to configure the db_recovery_file_dest to be on separate disk than your database for protection against disk failure. db_recovery_file_dest_size db_recovery_file_dest The minimum amount of disk space required for recovery depends on the following:  The size of your database including all datafiles, one redo logs from each group and one controlfile (assume X) Size of incremental backup, which depends on number and size of database blocks changed since previous backup (assume Y) The amount of archive logs generated between backups, which also depends on amount of changes made since previous backup (assume Z) Frequency of backup; it determines the amount for Y and Z.    Total Space for Flashback recovery area = (X+Y+2Z ) 2. Alter database to use one member of redo log group to be in Flashback recover area. You can use file location variable as discussed in Oracle Database packaging section to achieve it. You can also use a SQL command like this. Alter database add logfile member \ to group ; 3. Create an Oracle Enterprise Manage (OEM) Configuration info file. This file will be used by Enterprise Manager Configuration Assistant (EMCA) to reconfigure OEM in case of complete failure. This file will hold all the required values for configuring EM. Use “emca –help” to learn more about EMCA tool. A sample configuration file “emca_param.txt” is included in the kit. Please create your emca_param.txt file, as part of Database creation process, and store it in your Flashback recover area. This file will also need to be updated, every time you change your sys password. 4. Take complete database backup just once, and then take incremental backup of the database on your desired frequency (preferred daily or sooner). Higher the frequency the better your system is protected. As part of incremental backup routine, we also recommend followings:  Increment your previous image of the backup copy – it will make backup copy as recent as possible to provide quickest possible recovery from failure. And clean non-required files – It will Flashback area size requirements to be minimum. Use RMAN script as below “backup.rman” as a template script to create your own script. Modify the script’s Flash back recover area location with your systems Flash back area destination.  Create a script to recreate required directory structure. Use SQL script “cr_cre_directories.sql” as a template script to create your own script. Modify the script’s Flash back recover area location with your systems Flash back area destination.  Create a script to recreate tempfiles for temporary tablespaces. Use SQL script “cr_cre_tempfiles.sql” as a template script to create your own script. Modify the script’s Flash back recover area location with your systems Flash back area destination. 5. Backup Controlfile any time you make structural changes (add/drop/rename datafiles, redo log files) to your database. Use following RMAN command to backup the controlfile: BACKUP AS COPY CURRENT CONTROLFILE FORMAT '\bkupcontrolfile.ctl'; 6. Backup spfile any time you make changes to your database parameters Use following RMAN command to backup the spfile: BACKUP AS COPY SPFILE FORMAT '\bkupspfile.ora'; 7. Backup the Flashback recovery area to another removable media such as tape or DVD on your desired frequency (preferable every time after you take a incremental backup). Oracle Change Tracking RMAN's change tracking feature for incremental backups improves incremental backup performance by recording changed blocks in each datafile in a change-tracking file. If change tracking is enabled, RMAN uses the change-tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan every block in the datafile. Change tracking is disabled by default, because it does introduce some minimal performance overhead on your database during normal operations. However, the benefit of avoiding full datafile scans during backup are considerable, especially if only a small percentage of data blocks are changed between backups. If your backup strategy involves incremental backups, then you should enable change tracking. You should create the change-tracking file in Flashback recovery area using the following SQL statement: ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '\rman_change_track.f' REUSE; Recovery There are three types of Oracle database recovery: instance recovery, crash recovery, and media recovery. Oracle performs the first two types of recovery automatically at instance startup. Only media recovery requires the user to issue commands. Hence in this section, we will only discuss the media recovery. Media recovery involves two parts: restoring lost database file or files from the backup; and then updating it with the changes made to the database since the last backup. Depending upon your loss, you many need to restore every thing from media or restore just the files you lost; or you may not have to restore anything if the contents of Flashback recovery area are available. Here we will discuss the steps needed to recover from a complete loss. You are advised to implement your recovery strategy based on your application requirements and your ability to detect the kind of failure. Recovering with RMAN The basic RMAN commands are RESTORE and RECOVER. RMAN can be used to restore datafiles from backup using RESTORE command. RECOVER command is used to apply changes to restored datafiles from archived redo logs and online redo logs to complete the recovery operation. RMAN keeps a record of all the essential information in the controlfile. Hence it is important to restore the controlfile first if lost. It is always better to use existing controlfile, if it has not been lost. RMAN runs as database server process; it first need to connects to the database it is recovering. In case of a total failure, you may not have any database instance for RMAN to start with. Here is the step-by-step approach for recovering from a complete loss. You may skip any step depending upon your failure. 1. Restore your hardware and operating system. 2. Install correct version of Oracle software without creating a database. 3. Create database related directories including Flashback recovery area destination directory, dump files (bdump, cdump, udump) and database files (datafile, controlfiles and redolog files), as they existed before loss, and restore your most recent backup of Flashback recovery area from media to Flashback area destination. Use batch script generated by the SQL script “cr_cre_directories.sql”. From the O/S prompt run the script \cr_directories.cmd/sh 4. Create Oracle Database service (Only on Windows platform.) Use (sample script “cr_service.cmd”) oradim to create a new Windows service for Oracle database. And also update the oem_param.txt file with the sys password. 5. Restore and recover the entire database These steps are individual described here only for clarity purpose. You can use single script “recover.rman” to complete following steps: a. Restore spfile via an AUXILARY instance. Connect target / Startup force nomount RESTORE SPFILE FROM '\bkupspfile.ora'; SHUTDOWN IMMEDIATE; b. Restore controlfile STARTUP NOMOUNT; RESTORE CONTROLFILE FROM '\bkupcontrolfile.ctl'; ALTER DATABASE MOUNT; c. Restore database RESTORE DATABASE; d. Recover database RECOVER DATABASE; e. Open database ALTER DATABASE OPEN RESETLOGS; f. Restart in Normal Mode SHUTDOWN DATABASE; STARTUP; 6. Create the temporary tablespace datafiles You need to manually create all the tempfiles for your temporary tablespaces. Use batch SQL script generated by the SQL script “cr_cre_tempfiles .sql”. Connect to SQL*Plus as sysdba and run the script \cr_tempfiles.sql 7. Run “config_oem.cmd/sh” to configure Oracle Enterprise Manager DB Console. 8. Take a full backup of recovered database, using the same process as descried under backup section of this Appendix.

Related docs
oracle
Views: 51  |  Downloads: 14
Oracle
Views: 47  |  Downloads: 11
Oracle_Database
Views: 76  |  Downloads: 12
Oracle
Views: 718  |  Downloads: 85
Computer Notes
Views: 76  |  Downloads: 20
Programmer's Guide to the Oracle
Views: 109  |  Downloads: 44
oracle-database-installation-service
Views: 18  |  Downloads: 5
premium docs
Other docs by Wu tang clan
Standard Form 18 Request for Quotation
Views: 595  |  Downloads: 21
DD Form 1707 Information to Offerors or Quoters
Views: 439  |  Downloads: 3
Common Stock Purchase Certificate
Views: 495  |  Downloads: 11
BILL OF SALE
Views: 223  |  Downloads: 3
employee satisfaction survey
Views: 413  |  Downloads: 41
Goldman Sachs Group Inc Ammendments and Bylaws
Views: 570  |  Downloads: 15
CorpDocs-Adopt Articles and Appoint Directors
Views: 227  |  Downloads: 6
Absence policies
Views: 430  |  Downloads: 21
Minutes of Special Meeting of Shareholders
Views: 301  |  Downloads: 9