Tuesday, December 24, 2013

OIAM : Script to Up & Down the Enviornment

OIAM : Script to Up & Down the Enviornment

Create the file and make sure it should be in executable mode(properties > Permission).

Start the Oracle DB:

---------------------------
#!/bin/sh

export ORACLE_BASE=/home/oracle/app/oracle
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
PATH=$JAVA_HOME/bin:$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin

lsnrctl start
${ORACLE_HOME}/bin/sqlplus / as sysdba <startup
exit
END
#emctl start dbconsole
sleep 3

---------------------------

Stop the Oracle DB


---------------------------
#!/bin/sh

export ORACLE_BASE=/home/oracle/app/oracle
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
PATH=$JAVA_HOME/bin:$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/opmn/bin

#emctl stop dbconsole
sqlplus / as sysdba <shutdown immediate
exit
END
lsnrctl stop
sleep 3
 

---------------------------


Start the Weblogic Server(Admin)

---------------------------
#!/bin/sh

# OIM / WLS Specific mods
export MIDDLEWARE_HOME=/home/oracle/Oracle/Middleware
export WL_HOME=/home/oracle/Oracle/Middleware/wlserver_10.3
export DOMAIN_HOME=/home/oracle/Oracle/Middleware/user_projects/domains/oiamDomain
export OIM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1
export DC_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/designconsole
export RM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/remote_manager
#export JAVA_VENDOR=Oracle
#export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
#export PATH=$JAVA_HOME/bin:$PATH

echo "Admin Server logs are located in the following directory:"
echo "$DOMAIN_HOME/servers/AdminServer/logs/"
sleep 3

cd $DOMAIN_HOME
./startWebLogic.sh | tee servers/AdminServer/logs/console.log
sleep 3

---------------------------



Stop the Weblogic Server(Admin)

---------------------------
#!/bin/sh

# OIM / WLS Specific mods
export MIDDLEWARE_HOME=/home/oracle/Oracle/Middleware
export WL_HOME=/home/oracle/Oracle/Middleware/wlserver_10.3
export DOMAIN_HOME=/home/oracle/Oracle/Middleware/user_projects/domains/oiamDomain
export OIM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1
export DC_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/designconsole
export RM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/remote_manager
#export JAVA_VENDOR=Oracle
#export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
#export PATH=$JAVA_HOME/bin:$PATH

cd $DOMAIN_HOME/bin
./stopWebLogic.sh weblogic abcd1234
sleep 3
---------------------------


Start the OIM 11g R2 ps1

 
---------------------------
#!/bin/sh

# OIM / WLS Specific mods
export MIDDLEWARE_HOME=/home/oracle/Oracle/Middleware
export WL_HOME=/home/oracle/Oracle/Middleware/wlserver_10.3
export DOMAIN_HOME=/home/oracle/Oracle/Middleware/user_projects/domains/oiamDomain
export OIM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1
export DC_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/designconsole
export RM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/remote_manager
#export JAVA_VENDOR=Oracle
#export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
#export PATH=$JAVA_HOME/bin:$PATH

#export WLS_USER=weblogic
#export WLS_PW=welcome1

cd $DOMAIN_HOME/bin
./startManagedWebLogic.sh oim_server1 http://orclfmw.example.com:7001 | tee ../servers/oim_server1/logs/console.log
sleep 3
---------------------------


Stop the OIM 11g R2 ps1

 
---------------------------
#!/bin/sh

# OIM / WLS Specific mods
export MIDDLEWARE_HOME=/home/oracle/Oracle/Middleware
export WL_HOME=/home/oracle/Oracle/Middleware/wlserver_10.3
export DOMAIN_HOME=/home/oracle/Oracle/Middleware/user_projects/domains/oiamDomain
export OIM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1
export DC_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/designconsole
export RM_ORACLE_HOME=/home/oracle/Oracle/Middleware/Oracle_IDM1/remote_manager
#export JAVA_VENDOR=Oracle
#export JAVA_HOME=/home/oracle/jrockit-jdk1.6.0_37-R28.2.5-4.1.0
#export PATH=$JAVA_HOME/bin:$PATH

cd $DOMAIN_HOME/bin
./stopManagedWebLogic.sh oim_server1 t3://orclfmw.example.com:7001 weblogic abcd1234
sleep 3

---------------------------