Wednesday, July 31, 2013

ORA-12547: TNS:lost contact error

Issue: When trying to connect to the database we are getting the ORA-12547: TNS:lost contact error.

[oraem@linux01 ~]$ export ORACLE_SID=orcl
[oraem@linux01 ~]$ export ORACLE_HOME=/u01/app/oracle/product/112030/dbhome_1
[oraem@linux01 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oraem@linux01 ~]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 31 04:43:52 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password: 
ERROR:
ORA-12547: TNS:lost contact

Tried a lot of scenarios by changing the listener.ora, sqlnet.ora & tnsnames.ora files but still the issue was not resolved.
Finally checked the ORACLE_HOME/bin, there was file permission issues for oracle binary file

-rwxr-x--x 1 oraem   dba 232399123 Jul 29 09:20 oracle

As per Oracle the file permission should be 6751 for oracle binary file, so changed the permission of that file

[oraem@linux01 bin]$ chmod 6751 oracle
[oraem@linux01 bin]$ ls -lrt oracle
-rwsr-s--x 1 oraem dba 232399123 Jul 29 09:20 oracle

Tried to login to the database and it was success.

[oraem@linux01 bin]$ sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 31 06:39:02 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Enter password: 

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
ORCL      READ WRITE

Monday, July 29, 2013

ORA-01506: missing or illegal database name

Sometimes when we try to start a database in windows or other OS platform, we get the error ORA-01506: missing or illegal database name

Environment Details:
OS: Windows Server 2008
Database Version: 11gR2
User: oracle
Oracle Home: E:\oracle\product\11.2.0\dbhome_1
Oracle SID: orcldb

Debugging: 
TNS Ping is working fine
E:\>tnsping orcldb

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 29-JUL-2013 07:56:32

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
E:\oracle\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=winhost1.com)(PORT=1521)) (CONNECT_DATA=(SID=orcldb)))
OK (60 msec)

Listener is also up and running
E:\>lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 29-JUL-2013 12:37:21

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=winhost1.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date                29-JUL-2013 07:42:58
Uptime                    0 days 4 hr. 54 min. 23 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   E:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         E:\oracle\diag\tnslsnr\winhost1\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=winhost1.com)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcldb.us.oracle.com" has 1 instance(s).
  Instance "orcldb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

but if we login & start the database we get error 

E:\>set ORACLE_HOME=E:\oracle\product\11.2.0\dbhome_1
E:\>set PATH=%ORACLE_HOME%\bin;%PATH%
E:\>set ORACLE_SID=orcldb
E:\>sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 29 12:50:28 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter password:
Connected to an idle instance.

SQL> startup
ORA-01506: missing or illegal database name
SQL> exit
Disconnected


Solution:
Verify the content of parameter file used to start the database especially the db_name parameter. Provide correct name of the database and then start the database
Location of parameter file %ORACLE_HOME%\database
parameter file name: initorcldb.ora

E:\>sqlplus sys as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 29 12:55:28 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Enter password:
Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  518922240 bytes
Fixed Size                  1375676 bytes
Variable Size             159384132 bytes
Database Buffers          352321536 bytes
Redo Buffers                5840896 bytes
Database mounted.
Database opened.

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------

ORCLDB    READ WRITE


Wednesday, July 24, 2013

Oracle 11g Installation Error


Issue: 
1. Even if all the oracle software installation pre requisites are met and the DISPLAY variable is set correctly, when running the runInstaller it is throwing error. 

2. When Starting the Listener there is ERROR Linux Error: 29: Illegal seek

Environment Details:
OS: Linux Server 5.8 64bit
Database Version: 11gR2
User: oracle
Software Location: /u01/stage/database

[oracle@linux01 ~]$ cd /u01/stage/database/
[oracle@linux01 database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 132493 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 22159 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 65536    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-13_09-24-35AM. Please wait ...[oracle@linux01 database]$ #
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGILL (0x4) at pc=0x00000031d8614be0, pid=12186, tid=140422856902346
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_30-b03 mixed mode)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x14be0]
#
# An error report file with more information is saved as hs_err_pid12186.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#


[oracle@linux01 ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 13-JUL-2013 10:34:58

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...

TNS-12537: TNS:connection closed
 TNS-12560: TNS:protocol adapter error
  TNS-00507: Connection closed

   Linux Error: 29: Illegal seek

Resolution: set the environment variable LD_BIND_NOW to 1 and then invoke the installer, it will go through. Setting the LD_BIND_NOW force the loader to do the Procedure Linkage Table fixups 

[oracle@linux01 database]$ export LD_BIND_NOW=1
[oracle@linux01 database]$ ./runInstaller

Monday, July 22, 2013

Weblogic Installation

Simple Weblogic Installation

Environment Details:
OS: Linux Server 5.8 64bit
Version: Weblogic Server 10.3.6
Installation location: /u01/app/oracle/product/fmw
User: oraem(We can have any user)

Steps to be executed as oraem user:

Step 1: First install 64 bit java of the desired version, here in our installation we are using Java 6u32 64 bit

execute the command ./jdk-6u32-linux-x64.bin, it will install the java in the particular directory 




Step 2: Invoke the command java -jar -d64 wls1036_generic.jar (here -d64 option installs 64bit version of weblogic)


Step 3: Click Next on the "Welcome Screen"


Step 4: Give the complete location where we are going to install the weblogic server and click Next



Step 5: In these screen the installer asks for the Oracle Support username password, which can be skipped by un checking the box and confirming to remained uninformed of critical issues by clicking Yes. Then click Next


Step 6: Click Custom and click Next


Step 7: This screen shows what all components we are going to install. Click Next



Step 8: Select the Java Home which we installed and uncheck the other java which was mentioned, and click Next


Step 9: Choose the Product Installation Directory, we can keep them as default and click Next


Step 10: Review the Installation Summary and click Next



Step 11: Installation Progress Screen



Step 12: The installation is over, uncheck the Run Quickstart box and click Done.




Note: After the installation is over the base domain can be created by invoking the config.sh script from location /u01/app/oracle/product/fmw/wlserver_10.3/common/bin.


Installation Issues/Error:

1. Sometime if there is a space issue on the server we may get the below mentioned error 
Fatal error encountered during self-extraction.[No space left on device]


To Resolve this we need to find a mount point where there is space available and then use the -Djava.io.tmpdiroption while doing the installation

[oraem@Linux1 stage]$ java -d64 -Djava.io.tmpdir=/u03/stage/temp -jar wls1036_generic.jar


2. In windows machine the -d64 option doesn't work and we may get the error: Could not create the Java virtual machine.

Simply invoke the installer by omitting that option(-d64)



Friday, July 12, 2013

Public Yum Configuration | Oracle Linux

Public Yum Configuration.

Operating System: Oracle Linux 5.8

Install the yum repos as follows:

Step 1. Login as a root user to the linux box and go to the location /etc/yum.repos.d

[root@host1 ~]# cd /etc/yum.repos.d/
[root@host1 yum.repos.d]# 

Step 2. Get the public yum file using the below mentioned command

[root@host1 yum.repos.d]#  wget http://public-yum.oracle.com/public-yum-el5.repo

Step 3. Open the file using a text editor (here I am using vi editor).

[root@host1 yum.repos.d]# vi /etc/yum.repos.d/public-yum-el5.repo

Step 4. Search for the below mentioned parameters 

ol5_u8_base and el5_addons and set the value for "enabled=1"





Step 5. This step is optional.

Type the following commands in a shell to check that your yum repository is configured correctly:

[root@host1 ~]#sudo yum repolist

The output should look like this:

el5_addons              |  951 B     00:00    
ol5_u8_base             |  1.1 kB    00:00    
repo id       repo name                             status
base          Red Hat Linux - Base                  enabled:3,024
el5_addons    Enterprise Linux 5 - x86_64 - addons  enabled:   93
ol5_u8_base   Oracle Linux 5 - U8 - x86_64 - base   enabled:4,551

Make sure that both the el5_addons and ol5_u8_base repos are listed. The list of repos can be different depending on the Linux version and current user's configuration of yum.

Thursday, July 11, 2013

Database auto start on server reboot: Solaris

The objective of this script is to capture whatever databases and listeners were running prior to server reboot and stop and start them automatically.

Environment:
OS: Solaris

Note: We are placing all the scripts at location /u01/app/oracle/scripts

Version:
Applicable to Oracle database version 9i, 10g, 11g

Steps to be executed as oracle user:

Step 1. Create the scripts 1-7 and keep them at location /u01/app/oracle/scripts
(once you have created the scripts go the directory /u01/app/oracle/scripts and execute the command chmod a+x *.sh)

Step 2. Create a crontab job to run the Script logcapture.sh at a particular time stamp. This script will capture the listener and database running at that particular time.

Command for crontab Entry: 

[oracle@host1 ~]$ export EDITOR=vi
[oracle@host1 ~]$ crontab -e 

and add the lines mentioned below from the oracle userid.
-- we are capturing the logs every night at 8 PM

0 20 * * * sh /u01/app/oracle/scripts/logcapture.sh >> /dev/null 2>&1

save it

Steps to be executed as root user:

Step 3. create a file with the name dbora at location /etc/init.d   (Content are given below)

Step 4. Change the Permission of the dbora file
chmod 775 /etc/init.d/dbora

Step 5. create links to this script to be executed under different run levels using given commands:

ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
ln -s /etc/init.d/dbora /etc/rc1.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora

Scripts:

Script 1. startdb.sh
#!/bin/bash
# SCRIPT: startdb.sh
# PURPOSE: Automatically starts all the databases which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/dbrunning.log
export FILENAME
cat $FILENAME | while read LINE
do
ORACLE_SID=${LINE}
export ORACLE_SID
echo $ORACLE_SID
ORACLE_HOME=`cat /var/opt/oracle/oratab|grep $ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
sqlplus -S "/as sysdba" @/u01/app/oracle/scripts/startdb.sql
done

Script 2. stopdb.sh
#!/bin/bash
# SCRIPT: stopdb.sh
# PURPOSE: Automatically stops all the databases which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/dbrunning.log
export FILENAME
cat $FILENAME | while read LINE
do
ORACLE_SID=${LINE}
export ORACLE_SID
echo $ORACLE_SID
ORACLE_HOME=`cat /var/opt/oracle/oratab|grep $ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
sqlplus -S "/as sysdba" @/u01/app/oracle/scripts/stopdb.sql
done

Script 3. listenerstart.sh
#!/bin/bash
# SCRIPT: listenerstart.sh
# PURPOSE: Automatically starts all the listeners which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/lsnrup.log
cat $FILENAME | while read LINE
do
ORACLE_HOME=`echo $LINE | cut -f1 -d' '`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
LISTENER=`echo $LINE|cut -f2 -d' '`
export LISTENER
echo $LISTENER
lsnrctl start $LISTENER
done

Script 4. listenerstop.sh
#!/bin/bash
# SCRIPT: listenerstop.sh
# PURPOSE: Automatically stops all the listeners which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/lsnrup.log
cat $FILENAME | while read LINE
do
ORACLE_HOME=`echo $LINE | cut -f1 -d' '`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
LISTENER=`echo $LINE|cut -f2 -d' '`
export LISTENER
echo $LISTENER
lsnrctl stop $LISTENER
done

Script 5. startdb.sql
startup;
select * from global_name;
exit;

Script 6. stopdb.sql
select * from global_name;
shutdown immediate;
exit;

Script 7. logcapture.sh (add this script to run as crontab job)
/usr/ucb/ps -wwxaa| grep smon| grep -v grep | awk '{print $5}' | cut -f3 -d'_' > /u01/app/oracle/scripts/dbrunning.log

/usr/ucb/ps -wwxaa| grep tnslsnr| grep -v grep | awk '{print $5" " $6}' | sed 's/\/bin\/tnslsnr//' |grep -v tnslsnr > /u01/app/oracle/scripts/lsnrup.log

Script. dbora

#!/bin/bash
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Owner: Samrat
# Set ORA_OWNER to the user id of the owner of the oracle software

ORA_OWNER=oracle

case "$1" in
'start')
                su - $ORA_OWNER -c /u01/app/oracle/scripts/startdb.sh > /u01/app/oracle/scripts/startup_db.log 2>&1
su - $ORA_OWNER -c /u01/app/oracle/scripts/listenerstart.sh > /u01/app/oracle/scripts/startup_lsnr.log 2>&1
                touch /var/lock/subsys/dbora
                ;;
'stop')
                su - $ORA_OWNER -c /u01/app/oracle/scripts/stopdb.sh > /u01/app/oracle/scripts/shutdown_db.log 2>&1
su - $ORA_OWNER -c /u01/app/oracle/scripts/listenerstop.sh > /u01/app/oracle/scripts/shutdown_lsnr.log 2>&1
                rm -f /var/lock/subsys/dbora
                ;;
esac

Database auto start on server reboot: Linux

The objective of this script is to capture whatever databases and listeners were running prior to server reboot and stop and start them automatically.

Environment:
OS: Linux Server

Note: We are placing all the scripts at location /u01/app/oracle/scripts

Version:
Applicable to Oracle database version 9i, 10g, 11g

Steps to be executed as oracle user:

Step 1. Create the scripts 1-7 and keep them at location /u01/app/oracle/scripts
(once you have created the scripts go the directory /u01/app/oracle/scripts and execute the command chmod a+x *.sh)

Step 2. Create a crontab job to run the Script logcapture.sh at a particular time stamp.

Command for crontab Entry: 

[oracle@host1 ~]$ export EDITOR=vi
[oracle@host1 ~]$ crontab -e 

and add the lines mentioned below from the oracle userid.
-- we are capturing the logs every night at 8 PM

0 20 * * * sh /u01/app/oracle/scripts/logcapture.sh >> /dev/null 2>&1

save it

Steps to be executed as root user:

Step 3. create a file with the name dbora at location /etc/init.d   (Content are given below)

Step 4. Change the Permission of the dbora file
chmod 775 /etc/init.d/dbora

Step 5. create links to this script to be executed under different run levels using given commands:

ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc1.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc2.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc4.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc6.d/K01dbora

Step 6. Add this to chkconfig and verify the same.

chkconfig –-add dbora

chkconfig –-list dbora (to verify its added to the run levels)


Scripts:

Script 1. startdb.sh
#!/bin/bash
# SCRIPT: startdb.sh
# PURPOSE: Automatically starts all the databases which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/dbrunning.log
cat $FILENAME | while read LINE
do
ORACLE_SID=$LINE
export ORACLE_SID
echo $ORACLE_SID
ORACLE_HOME=`cat /etc/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -S "/as sysdba" @/u01/app/oracle/scripts/startdb.sql
done

Script 2. stopdb.sh
#!/bin/bash
# SCRIPT: stopdb.sh
# PURPOSE: Automatically stops all the databases which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/dbrunning.log
cat $FILENAME | while read LINE
do
ORACLE_SID=$LINE
export ORACLE_SID
echo $ORACLE_SID
ORACLE_HOME=`cat /etc/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -S "/as sysdba" @/u01/app/oracle/scripts/stopdb.sql
done

Script 3. listenerstart.sh
#!/bin/bash
# SCRIPT: listenerstart.sh
# PURPOSE: Automatically starts all the listeners which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/lsnrup.log
cat $FILENAME | while read LINE
do
ORACLE_HOME=`echo $LINE | cut -f1 -d' '`
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
LISTENER=`echo $LINE|cut -f2 -d' '`
export LISTENER
echo $LISTENER
lsnrctl start $LISTENER
done

Script 4. listenerstop.sh
#!/bin/bash
# SCRIPT: listenerstop.sh
# PURPOSE: Automatically stops all the listeners which were running prior to server reboot.
# Owner: Samrat
FILENAME=/u01/app/oracle/scripts/lsnrup.log
cat $FILENAME | while read LINE
do
ORACLE_HOME=`echo $LINE | cut -f1 -d' '`
export ORACLE_HOME
export PATH=$ORACLE_HOME/bin:$PATH
LISTENER=`echo $LINE|cut -f2 -d' '`
export LISTENER
echo $LISTENER
lsnrctl stop $LISTENER
done

Script 5. startdb.sql
startup;
select * from global_name;
exit;

Script 6. stopdb.sql
select * from global_name;
shutdown immediate;
exit;

Script 7. logcapture.sh (add this script to run as crontab job)
ps aux | awk '{print $11}' | grep pmon | cut -f3 -d'_' > /u01/app/oracle/scripts/dbrunning.log
ps aux | awk '{print $11" " $12}' |grep -i tns |grep -v grep |sed 's/\/bin\/tnslsnr//' > /u01/app/oracle/scripts/lsnrup.log

Script. dbora

#!/bin/bash
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Owner: Samrat
# Set ORA_OWNER to the user id of the owner of the oracle software

ORA_OWNER=oracle

case "$1" in
'start')
                su - $ORA_OWNER -c /u01/app/oracle/scripts/startdb.sh > /u01/app/oracle/scripts/startup_db.log 2>&1
su - $ORA_OWNER -c /u01/app/oracle/scripts/listenerstart.sh > /u01/app/oracle/scripts/startup_lsnr.log 2>&1
                touch /var/lock/subsys/dbora
                ;;
'stop')
                su - $ORA_OWNER -c /u01/app/oracle/scripts/stopdb.sh > /u01/app/oracle/scripts/shutdown_db.log 2>&1
su - $ORA_OWNER -c /u01/app/oracle/scripts/listenerstop.sh > /u01/app/oracle/scripts/shutdown_lsnr.log 2>&1
                rm -f /var/lock/subsys/dbora
                ;;

esac

Weblogic Clustering

If you have already installed Oracle Weblogic, please follow the below steps to make a cluster else use this link Weblogic Installation to install weblogic first on both the servers.

Environment:

We have two linux servers: host1.com & host2.com
Installation Requirement: One Admin Server on Host1.com & one Managed Server in cluster in Host1.com & Host2.com

Weblogic Software Version:

10.3.6

We need to create a domain in the first server and use the pack/unpack command to have it in the second server.


Step 1. Go to the location $MW_HOME/wlserver_10.3/common/bin (in host1.com)


Step 2. Execute config.sh file to create a domain

        ./config.sh


Step 3. You will get a window similar to below to create a domain


Select Create a new Weblogic doamin and click Next



Select Domain Source and click Next


Give a name to your weblogic Domain and specify the location for domain



Provide Administrator username & Password and click Next



Verify the Java Location & click Next



Check box Administration Server & Managed Server, Clusters and Machines and click Next




Give the name of the admin Server and Listen Port Address (In our case its AdminServer & 7001)



Provide the names of Managed Servers, since its in cluster, we need to add two Managed Servers
In our case its ManagedServer_1 & ManagedServer_2, provide the hostname in the respective Listen address space and Provide the Listen Port, we 7003 for both.



Add a cluster with unicast messaging mode




Assign both the Managed Server to the cluster, to configure it in cluster.





Choose Unix Machine and provide the Name(Machine Name), Hostname and port



Since our configuration is Admin Server & Managed Server in first Host & a Managed Server in Cluster in Second Host. Assign the same accordingly.




Verify the details & click Create.









The domain is created.


[oraem@host1 bin]$ pwd
/u01/app/oracle/product/fmw/wlserver_10.3/common/bin

Use the pack command

[oraem@host1 bin]$ ./pack.sh -managed=true -domain=/u01/app/oracle/product/fmw/user_projects/domains/base_domain -template=base_domain.jar -template_name=base_domain

Output of the above command=>
<< read domain from "/u01/app/oracle/product/fmw/user_projects/domains/base_domain"
>>  succeed: read domain from "/u01/app/oracle/product/fmw/user_projects/domains/base_domain"
<< set config option Managed to "true"
>>  succeed: set config option Managed to "true"
<< write template to "/u01/app/oracle/product/fmw/wlserver_10.3/common/bin/base_domain.jar"
....................................................................................................
>>  succeed: write template to "/u01/app/oracle/product/fmw/wlserver_10.3/common/bin/base_domain.jar"
<< close template
>>  succeed: close template


Now copy this template base_domain.jar from server host1.com to server host2.com

[oraem@host1 bin]$ scp base_domain.jar oraem@host2:/u01/app/oracle/product/fmw/wlserver_10.3/common/bin


[oraem@Host2 bin]$ pwd
/u01/app/oracle/product/fmw/wlserver_10.3/common/bin

Use the unpack command now

[oraem@Host2 bin]$ ./unpack.sh -domain=/u01/app/oracle/product/fmw/user_projects/domains/base_domain -template=base_domain.jar

Output of the above Command=>
<< read template from "/u01/app/oracle/product/fmw/wlserver_10.3/common/bin/base_domain.jar"
>>  succeed: read template from "/u01/app/oracle/product/fmw/wlserver_10.3/common/bin/base_domain.jar"
<< set config option DomainName to "base_domain"
>>  succeed: set config option DomainName to "base_domain"
<< write Domain to "/u01/app/oracle/product/fmw/user_projects/domains/base_domain"
...............................................................................................
>>  succeed: write Domain to "/u01/app/oracle/product/fmw/user_projects/domains/base_domain"
<< close template
>>  succeed: close template


Now Modify the nodemanager.properties file at location /u01/app/oracle/product/fmw/wlserver_10.3/common/nodemanager on both the servers
Change the parameter StartScriptEnabled=true

Start the Node manager on both the servers.
[oraem@Host1 ]$ cd /u01/app/oracle/product/fmw/wlserver_10.3/server/bin

[oraem@Host1 bin]$ nohup ./startNodeManager.sh >> nodemgr.log &

[oraem@Host2 ]$ cd /u01/app/oracle/product/fmw/wlserver_10.3/server/bin

[oraem@Host2 bin]$ nohup ./startNodeManager.sh >> nodemgr.log &

Start the Admin Server

[oraem@Host1 ]$ cd /u01/app/oracle/product/fmw/user_projects/domains/base_domain/bin

[oraem@Host1 bin]$ nohup ./startWebLogic.sh >> weblogic.log & 

From the console page start the Managed Server

Environment--> Server--> Control--> (Select the Managed Servers) --> Start