Hi,
We could try to automate the steps mentioned in "Step-01" and "Step-02" using a batch file, you can follow the instructions below:
Step 1: Create the Batch File
Open a text editor (e.g., Notepad) and paste the following commands:
@echo off
set ORACLE_CLIENT_32BIT_SOURCE="C:\Path\to\Oracle11_Client_32bit"
set ORACLE_CLIENT_64BIT_SOURCE="C:\Path\to\Oracle11_Client_64bit"
set ORACLE_ODAC_SOURCE="C:\Path\to\Oracle11_Client_32bit\Oracle 11g ODAC\ODTwithODAC112012"
set TNSNAMES_FILE_SOURCE="C:\Oracle\11.2.0\client_64\network\admin\tnsnames.ora"
set TNSNAMES_FILE_DESTINATION="C:\Oracle\11.2.0\client_1\network\admin\tnsnames.ora"
echo Step-01: Installing Oracle 11g Client 32-bit...
start /wait "%ORACLE_CLIENT_32BIT_SOURCE%\setup.exe"
echo Step-01: Oracle 11g Client 32-bit installation completed.
echo Step-01: Copying tnsnames.ora from 64-bit folder to 32-bit folder...
copy /Y "%TNSNAMES_FILE_SOURCE%" "%TNSNAMES_FILE_DESTINATION%"
echo Step-01: tnsnames.ora file copied successfully.
echo Step-01: Removing Oracle 11g Client 32-bit installation files...
rd /S /Q "%ORACLE_CLIENT_32BIT_SOURCE%"
echo Step-01: Oracle 11g Client 32-bit installation files removed.
echo Step-02: Installing Oracle ODAC 11g...
start /wait "%ORACLE_ODAC_SOURCE%\setup.exe"
echo Step-02: Oracle ODAC 11g installation completed.
echo Step-02: Removing Oracle ODAC 11g installation files...
rd /S /Q "%ORACLE_ODAC_SOURCE%"
echo Step-02: Oracle ODAC 11g installation files removed.
echo All steps completed. Oracle 11g Client and ODAC are now installed.
pause
exit
Step 2: Save the Batch File
Save the file with a .bat
extension, for example, install_oracle.bat
.
Step 3: Configure Paths
Before running the batch file, replace the placeholder paths:
-
"C:\Path\to\Oracle11_Client_32bit"
: Replace this with the actual path to your Oracle 11g Client 32-bit installation files. -
"C:\Path\to\Oracle11_Client_64bit"
: Replace this with the actual path to your Oracle 11g Client 64-bit installation files. -
"C:\Path\to\Oracle11_Client_32bit\Oracle 11g ODAC\ODTwithODAC112012"
: Replace this with the actual path to your Oracle ODAC installation files. -
"C:\Oracle\11.2.0\client_64\network\admin\tnsnames.ora"
: Replace this with the actual path to yourtnsnames.ora
file in the 64-bit folder. -
"C:\Oracle\11.2.0\client_1\network\admin\tnsnames.ora"
: Replace this with the actual path to the destination folder where you want to copy thetnsnames.ora
file.
To deploy the batch file using SCCM, follow these steps:
Step 1: Create the SCCM Package
- Open the SCCM console.
- Navigate to "Software Library" > "Application Management" > "Packages."
- Right-click on "Packages" and choose "Create Package."
Step 2: Configure Package Settings
- Provide a name and optional comments for the package.
- Specify the source folder containing the batch file and any other required files (e.g., Oracle installation files, response files) as the "Source folder" for the package.
- Specify a destination folder on the distribution point as the "Destination folder."
- Under the "Data source" tab, select "This package contains source files" to copy the files to the distribution point.
Step 3: Deploy the Package
- After creating the package, select it in the SCCM console.
- Right-click on the package and choose "Distribute Content."
- Select the distribution point(s) where you want to store the package content.
- Wait for the distribution process to complete.
Step 4: Create a Program for the Batch File
- While the package is still selected in SCCM, click on the "Programs" tab.
- Click "Add" to create a new program.
- In the "Program Type" dropdown, select "Standard Program."
- Provide a name and optional comments for the program.
- For the "Command line" field, enter the following:
install_oracle.bat
- Optionally, you can set the "Start in" field to the directory containing the batch file, or you can set it to the UNC path of the package content location (e.g.,
\\<server>\Packages\Oracle11gInstall
). - Under the "Environment" tab, check the "Run with administrative rights" box.
- Configure any other desired program settings, such as requirements, dependencies, and schedule.
Step 5: Deploy the Program
- Select the program you created in the previous step.
- Right-click on the program and choose "Deploy."
- Select the target collection(s) of computers you want to deploy the package to.
- Configure any other deployment settings, such as deployment purpose, user experience, alerts, etc.
- Click "Deploy" to start the deployment.
Once deployed, SCCM will execute the batch file on the target computers, automating the installation of Oracle 11g Client and Oracle ODAC as per the script.