/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Oracle 11g - Silent Installation

08/09/2017 5445 views
Morning, I am creating a script to push out one of our applications, The first part of my script is to install Oracle 11g via a response file. I have never done one of these and I don't think it's taking my response file. I am new to powershell so having a play around really. Can anyone spot why this is not working?

#Checks and Installs Oracle 11g + TNS Entries
        $a = Test-Path HKLM:\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient11g_home1
        IF ($a = "True") {Write-Host "Installing Oracle"} ELSE {Write-Host "Oracle Installed"}
        $args = "-waitforcompletion -ignorePrereq -responseFile \\FileShare\rollout\Installations\Scripts\Files\Confirm\Oracle 11g\client\client.rsp -force -silent -noconsole -showProgress"
        IF ($a = "False") {Start-Process "\\FileShare\rollout\Installations\Scripts\Files\Confirm\Oracle 11g\client\setup.exe" -wait -ArgumentList $args
        }

Any advice would be great!

Thank
0 Comments   [ + ] Show comments

Comments


All Answers

0
One, you don't say if the OUI starts but just doesn't read the response file.

Two, can you please remove your duplicate post? Thanks.
Answered 08/09/2017 by: VBScab
Red Belt

  • Hi, Yes no problem. No basically the OUI doesn't appear to load. No syntax errors either.
  • This is Oracle 11G R2 32bit
0
What happens if you substitute the command line '\\FileShare\[blah, blah, blah]' with 'cmd.exe' or 'notepad.exe'? What happens if you remove the 'If...' construct?
Answered 08/09/2017 by: VBScab
Red Belt

  • Hi, CMD does open with the IF still in.

    #Checks and Installs Oracle 11g + TNS Entries
    $a = Test-Path HKLM:\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient11g_home1
    IF ($a = "True") {Write-Host "Installing Oracle"} ELSE {Write-Host "Oracle Installed"}
    $args = "-waitforcompletion -ignorePrereq -responseFile \\prometheus\rollout\Installations\Scripts\Files\Confirm\Oracle 11g\client\client.rsp -silent -noconsole -force -showProgress"
    IF ($a = "False") {Start-Process "C:\windows\system32\cmd.exe" -wait -ArgumentList $args
    }
    • Not sure if its an issue with my response file?

      ###############################################################################
      ## Copyright(c) Oracle Corporation 1998,2008. All rights reserved. ##
      ## ##
      ## Specify values for the variables listed below to customize ##
      ## your installation. ##
      ## ##
      ## Each variable is associated with a comment. The comment ##
      ## can help to populate the variables with the appropriate ##
      ## values. ##
      ## ##
      ###############################################################################

      #-------------------------------------------------------------------------------
      # Do not change the following system generated value.
      #-------------------------------------------------------------------------------
      oracle.install.responseFileVersion=http://www.oracle.com/2007/install/rspfmt_clientinstall_response_schema_v11_2_0

      #-------------------------------------------------------------------------------
      # This variable holds the hostname of the system as set by the user.
      # It can be used to force the installation to use an alternative
      # hostname rather than using the first hostname found on the system
      # (e.g., for systems with multiple hostnames and network interfaces).
      ORACLE_HOSTNAME=000.000.000.000
      #-------------------------------------------------------------------------------
      # Unix group to be set for the inventory directory.
      UNIX_GROUP_NAME=
      #-------------------------------------------------------------------------------
      # Inventory location.
      INVENTORY_LOCATION=C:\Program Files (x86)\Oracle\Inventory
      #-------------------------------------------------------------------------------
      # Specify the languages in which the components will be installed.
      #
      # en : English ja : Japanese
      # fr : French ko : Korean
      # ar : Arabic es : Latin American Spanish
      # bn : Bengali lv : Latvian
      # pt_BR: Brazilian Portuguese lt : Lithuanian
      # bg : Bulgarian ms : Malay
      # fr_CA: Canadian French es_MX: Mexican Spanish
      # ca : Catalan no : Norwegian
      # hr : Croatian pl : Polish
      # cs : Czech pt : Portuguese
      # da : Danish ro : Romanian
      # nl : Dutch ru : Russian
      # ar_EG: Egyptian zh_CN: Simplified Chinese
      # en_GB: English (Great Britain) sk : Slovak
      # et : Estonian sl : Slovenian
      # fi : Finnish es_ES: Spanish
      # de : German sv : Swedish
      # el : Greek th : Thai
      # iw : Hebrew zh_TW: Traditional Chinese
      # hu : Hungarian tr : Turkish
      # is : Icelandic uk : Ukrainian
      # in : Indonesian vi : Vietnamese
      # it : Italian
      #
      # Example : SELECTED_LANGUAGES=en,fr,ja
      SELECTED_LANGUAGES=en,en_GB
      #-------------------------------------------------------------------------------
      # Complete path of the Oracle Home
      ORACLE_HOME=C:\oracle\product\11.2.0\client_1
      #-------------------------------------------------------------------------------
      # Complete path of the Oracle Base.
      ORACLE_BASE=C:\Oracle
      #------------------------------------------------------------------------------
      #Name : INSTALL_TYPE
      #Datatype : String
      #Description: Installation type of the component.
      #
      # The following choices are available. The value should contain
      # only one of these choices.
      # InstantClient : InstantClient
      # Administrator : Administrator
      # Runtime : Runtime
      # Custom : Custom
      #
      #Example : INSTALL_TYPE = "Administrator"
      #------------------------------------------------------------------------------
      oracle.install.client.installType=Custom
      #-------------------------------------------------------------------------------
      # Name : oracle.install.client.customComponents
      # Datatype : StringList
      #
      # This property is considered only if INSTALL_TYPE is set to "Custom"
      #
      # Description: List of Client Components you would like to install
      #
      # The following choices are available. You may specify any
      # combination of these choices. The components you choose should
      # be specified in the form "internal-component-name:version"
      # Below is a list of components you may specify to install.
      #
      # oracle.sqlj:11.2.0.1.0 -- "Oracle SQLJ"
      # oracle.rdbms.util:11.2.0.1.0 -- "Oracle Database Utilities"
      # oracle.javavm.client:11.2.0.1.0 -- "Oracle Java Client"
      # oracle.sqlplus:11.2.0.1.0 -- "SQL*Plus"
      # oracle.dbjava.jdbc:11.2.0.1.0 -- "Oracle JDBC/THIN Interfaces"
      # oracle.ldap.client:11.2.0.1.0 -- "Oracle Internet Directory Client"
      # oracle.rdbms.oci:11.2.0.1.0 -- "Oracle Call Interface (OCI)"
      # oracle.precomp:11.2.0.1.0 -- "Oracle Programmer"
      # oracle.xdk:11.2.0.1.0 -- "Oracle XML Development Kit"
      # oracle.network.aso:11.2.0.1.0 -- "Oracle Advanced Security"
      # oracle.assistants.oemlt:11.2.0.1.0 -- "Enterprise Manager Minimal Integration"
      # oracle.oraolap.mgmt:11.2.0.1.0 -- "OLAP Analytic Workspace Manager and Worksheet"
      # oracle.network.client:11.2.0.1.0 -- "Oracle Net"
      # oracle.ordim.client:11.2.0.1.0 -- "Oracle Multimedia Client Option"
      # oracle.ons:11.2.0.0.0 -- "Oracle Notification Service"
      # oracle.odbc:11.2.0.1.0 -- "Oracle ODBC Driver"
      # oracle.has.client:11.2.0.1.0 -- "Oracle Clusterware High Availability API"
      # oracle.dbdev:11.2.0.1.0 -- "Oracle SQL Developer"
      # oracle.rdbms.scheduler:11.2.0.1.0 -- "Oracle Scheduler Agent"
      #
      # Example : oracle.install.client.customComponents="oracle.precomp:11.2.0.1.0","oracle.ons:11.2.0.0.0","oracle.oraolap.mgmt:11.2.0.1.0","oracle.rdbms.scheduler:11.2.0.1.0"
      #-------------------------------------------------------------------------------
      oracle.install.client.customComponents=oracle.odbc:11.2.0.1.0
      #-------------------------------------------------------------------------------
      #Name : MTS_PORT
      #Datatype : int
      #Description: Port number to be used for by the Oracle MTS Recovery Service to listen
      # for requests. This needs to be entered in case oracle.ntoramts is
      # selected in the list of custom components in custom install
      #
      #
      #Example : MTS_PORT = 2030
      #------------------------------------------------------------------------------
      oracle.install.client.oramtsPortNumber=49156

      #------------------------------------------------------------------------------
      # Host name to be used for by the Oracle Scheduler Agent.
      # This needs to be entered in case oracle.rdbms.scheduler is selected in the
      # list of custom components during custom install
      #
      # Example : oracle.install.client.schedulerAgentHostName = acme.domain.com
      #------------------------------------------------------------------------------
      oracle.install.client.schedulerAgentHostName=

      #------------------------------------------------------------------------------
      # Port number to be used for by the Oracle Scheduler Agent.
      # This needs to be entered in case oracle.rdbms.scheduler is selected in the
      # list of custom components during custom install
      #
      # Example: oracle.install.client.schedulerAgentPortNumber = 1500
      #------------------------------------------------------------------------------
      oracle.install.client.schedulerAgentPortNumber=
0
CMD works, so the Start-Process part is OK.

Does OUI open if you run the command line on its own, but non-silently? If you saved the RSP using the OUI in 'record' mode, it'll be fine. If it's hand-edited, though...who knows!
Answered 08/09/2017 by: VBScab
Red Belt

  • Hi. It seems to run perfectly when removing -silent -noconsole -force -showProgress. The OUI opens. Yes I just saved this at the end of the installation.
0
From there, does it run to completion or fail at some missing pre-requisite?
Answered 08/09/2017 by: VBScab
Red Belt

  • Hi, The OUI opens and looks like it's installing but then closes
  • I get a please wait... and then it closes
0
The OUI opens and looks like it's installing but then closes
Try adding the '-ignoreSysPrereqs' argument. Remember that Oracle is dumb and that therefore case is important.
Answered 08/09/2017 by: VBScab
Red Belt

0
I managed to resolve my scripting fault, For some reason this was not creating the Admin folder so had to create this manually in the script. Here's what I used;

#Checks and Installs Oracle 11g + TNS Entries
        $a = Test-Path HKLM:\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient11g_home1
        IF ($a = "False") {Write-Host "Installing Oracle"} ELSE {Write-Host "Oracle Installed"}
        $args = "-silent -nowelcome -noconsole -waitforcompletion -noconfig -responseFile \\Share\rollout\Installations\Scripts\Files\Confirm\Oracle11g\client\client.rsp"
        IF ($a = "True") {Start-Process -FilePath \\Share\rollout\Installations\Scripts\Files\Confirm\Oracle11g\client\Setup.exe -ArgumentList $args -Wait -Passthru}.ExitCode
        New-Item -ItemType directory -Path C:\Oracle\product\11.2.0\client_1\network\admin\ -force


Answered 08/09/2017 by: djordan
Senior White Belt

0
I managed to resolve my scripting fault, For some reason this was not creating the Admin folder so had to create this manually in the script. Here's what I used;

#Checks and Installs Oracle 11g + TNS Entries
        $a = Test-Path HKLM:\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient11g_home1
        IF ($a = "False") {Write-Host "Installing Oracle"} ELSE {Write-Host "Oracle Installed"}
        $args = "-silent -nowelcome -noconsole -waitforcompletion -noconfig -responseFile \\Share\rollout\Installations\Scripts\Files\Confirm\Oracle11g\client\client.rsp"
        IF ($a = "True") {Start-Process -FilePath \\Share\rollout\Installations\Scripts\Files\Confirm\Oracle11g\client\Setup.exe -ArgumentList $args -Wait -Passthru}.ExitCode
        New-Item -ItemType directory -Path C:\Oracle\product\11.2.0\client_1\network\admin\ -force



Thanks for the help!


Answered 08/09/2017 by: djordan
Senior White Belt

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ