Thursday, September 26, 2019

Oracle EBS R12.2.7 on Virtual Box

Oracle EBS R12.2.7 on Virtual Box


Go to the download folder of 12.2.7 and execute below command:

copy /b Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.00 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.01 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.02 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.03 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.04 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.05 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.06 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.07 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.08 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.09 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.10 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.11 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.12 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.13 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.14 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.15 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.16 + Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova.17 Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova

It will create one single Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ova file, which need to be import from Vmbox:

Start Virtual Box and navigate to File -> Import Appliance

Click on ‘Expert Mode’ and edit the ‘Virtual Disk Image’ path to a location with adequate space (~500GB), in this example I am using my Samsung Portable SSD T1 1TB dive mounted at ‘/Volumes/Samsung_T1’

Click ‘Import’, go to lunch or grab a coffee and watch the progress bar if you prefer, the remaining time will re-calulate periodically. Once complete, start up your new Oracle EBS R12.2.6 VM from within Oracle VirtualBox

The initial boot will prompt you to change the ‘root’, ‘oracle’ and ‘applmgr’ passwords, the process will continue to start and configure an Oracle 12.1.0.2 database called ‘EBSDB’.

Use ‘ifconfig -a’ to determine your VM’s IP address from you VirtualBox console before using SSH from your host to connect using your preferred client.
Add the IP address to your local ‘/etc/host’ file so your browser can resolve your Oracle EBS VISION sandbox environment. e.g. #
192.168.0.23 apps.example.com apps
#

Change directory to ‘/u01/install/APPS/scripts’ to access the database and application stop / start scripts and run ‘startdb.sh’ and
‘startapps.sh’

startdb.sh stopdb.sh startapps.sh stopapps.sh

[oracle@apps scripts]$ ./startdb.sh
Logfile: /u01/install/APPS/12.1.0/appsutil/log/EBSDB_apps/addlnctl.txt

You are running addlnctl.sh version 120.4

Starting listener process EBSDB …

LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 15-AUG-2017 07:42:19 Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting /u01/install/APPS/12.1.0/bin/tnslsnr: please wait…

TNSLSNR for Linux: Version 12.1.0.2.0 – Production
System parameter file is /u01/install/APPS/12.1.0/network/admin/EBSDB_apps/listener.ora
Log messages writen to /u01/install/APPS/12.1.0/admin/EBSDB_apps/diag/tnslsnr/apps/ebsdb/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apps.example.com)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=apps.example.com)(PORT=1521))) STATUS of the LISTENER
————————
Alias EBSDB
Version TNSLSNR for Linux: Version 12.1.0.2.0 – Production Start Date 15-AUG-2017 07:42:19
Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off
Security ON: Local OS Authentication SNMP OFF
Listener Parameter File /u01/install/APPS/12.1.0/network/admin/EBSDB_apps/listener.ora
Listener Log File /u01/install/APPS/12.1.0/admin/EBSDB_apps/diag/tnslsnr/apps/ebsdb/alert/log.xml Listening Endpoints Summary… (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apps.example.com)(PORT=1521)))
Services Summary…
Service “EBSDB” has 1 instance(s).
Instance “EBSDB”, status UNKNOWN, has 1 handler(s) for this service… The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/install/APPS/12.1.0/appsutil/log/EBSDB_apps/addlnctl.txt for more information …

You are running addbctl.sh version 120.1 Starting the database EBSDB …
SQL*Plus: Release 12.1.0.2.0 Production on Tue Aug 15 07:42:19 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORACLE instance started.

Total System Global Area 2147483648 bytes Fixed Size 2926472 bytes
Variable Size 1308625016 bytes Database Buffers 822083584 bytes Redo Buffers 13848576 bytes Database mounted.
Database opened.
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

addbctl.sh: exiting with status 0

[oracle@apps scripts]$ ./startapps.sh
Starting the Oracle E-Business Suite Application Tier Services You are running adstrtal.sh version 120.24.12020000.11

All enabled services for this node are started. adstrtal.sh: Exiting with status 0
adstrtal.sh: check the logfile /u01/install/APPS/fs1/inst/apps/EBSDB_apps/logs/appl/admin/log/adstrtal.log for more information …

Before you can log on you will need to enable SYSADMIN and the Demo accounts, Oracle have provided scripts to do this e.g.

[oracle@apps scripts]$ ./enableSYSADMIN.sh

This script will let you set a new password for the SYSADMIN EBS Applications User, the default password most likely was “sysadmin”, so pick a different one now.

Enter new password for SYSADMIN: Re-enter password for SYSADMIN: Changing password for SYSADMIN Log filename : L7583909.log
Report filename : O7583909.out [oracle@apps scripts]$

[oracle@apps scripts]$ ./enableDEMOusers.sh

Enter a new password for the EBS Applications Users, the default password most likely was “welcome”, so pick a different one now…

Enter new password for DEMO users: Re-enter password for DEMO users: Seting password for DEMO users… Log filename : L7583911.log

[oracle@apps scripts]$

Oracle EBS R12 Dashboard

You should now be able to logon as ‘SYSADMIN’ or explore your Oracle EBS R12.2.6 VISION sandbox environment using the Demo users (see below) and the password defined above at: htp://apps.example.com:8000/ (htp://apps.example.com:8000/)

“AFENG”, “AMARLIN”, “AMILLER”, “APOTTER”, “BPALMER”, “BWEBB”
“CBROWN”, “CONMGR”, “CONTMGR”, “CSADM”, “DBAKER”, “EBUSINESS” “FBRAMER”, “HRMS”, “ILANG”, “ISUPPORTADMIN”, “JFROST”
“KJONES”, “LJONES”, “MFG”, “MGRMKT”, “MNT”, “OPERATIONS” “PHENRY”, “PIMMGR”, “PLMMGR”, “PROCESS_OPS”, “PROJMFG” “PSTOCK”, “RBATES”, “SCRIPTUSER”, “SERVICES”, “SFM” “SPAIN”, “SVYADMIN”, “TRADEMGR”

Thursday, September 12, 2019

How to connect to DATABASE and ASM instance in RAC ?

How to connect to DATABASE and ASM instance in RAC ?


Database for 2 node RAC:

set the environment variable for rdbms.
export ORACLE_SID=ORCLPROD1
sqlplus '/as sysdba'

or

export ORACLE_SID=ORCLPROD2
sqlplus '/as sysdba'


ASM for 2 node RAC:

set the environment variable for ASM instance.
export ORACLE_SID=+ASM1
sqlplus / as sysasm

or

export ORACLE_SID=+ASM2
sqlplus /as sysasm




Unable to create Patch Object Exception occured : PatchObject constructor: Input file does not exist.

Unable to create Patch Object Exception occured : PatchObject constructor: Input file does not exist.



Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

Issue:
Error found on invoking patch conflict check using opatch for a PSU patch on database Home.

Error:
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail"not executed
Unable to create Patch Object.
Exception occured : PatchObject constructor: Input file "/u01/stage/etc/config/actions" or "/u01/stage/etc/config/inventory" does not exist.

OPatch succeeded.

Reason:

Error is due to the location (directory) given for the Patch folder given using -ph.

I used the command, "opatch prereq CheckConflictAgainstOHWithDetail -ph ./". Since I gave -ph . the command should have been executed from the directory where the patch was extracted.

In this case the patch folder after extraction was /u01/stage/14275605.

But I invoked the patch conflict check from /u01/stage and specified -ph ./ where it will look for patch files in the current directory and resulted in the error.

Fix:

Move to the folder created after extracting the patch zip file and execute the command again from there.

[oracle@node1 stage]$ cd  /u01/stage/14275605
[oracle@node1 14275605]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

or specify the full directory to -ph command from current directory

opatch prereq CheckConflictAgainstOHWithDetail -ph /u01/stage/14275605

Wednesday, September 4, 2019

Tell me about yourself ? (Weblogic Administrator)

Tell me about yourself ? (Weblogic Administrator)


This is ABC, Currently I'm working with XYZ technologies, I have around 4.8 years of experience as a Weblogic Administrator, from this company i started my career...... initially i started as Oracle Core dba, but later i got a chance to work with Weblogic.

1.I involved in creation and configuration of Domains.
2.Creation and configuration of clusters for providing load balancing and fail over support.
3.Creation and configuration of JDBC and Data sources and connection pools.
4.Deployment of applications.
5.Managing SSL certificates.

Day to day activities.

1.Taking shift handover from previous shifts.
2.Health status check-up of all weblogic server instances
3.Login to admin console and will check the all server status.
4. Make sure all server status should be running
5.If any of the server is failed, Bounse or restart the server manually.
3.Checking the webservices and applications.
4.Periodical deployment on Non prod and production servers.
5.Supporing and following ITIL concepts in Incidents,change and problem management.
6.Providing on call support of 24*7 Basis.
7.Giving shift hand over to next shift.

Working Environment

There are totaly 50 applications deployed on 10 domains.
Each domain contains of 1 horizantal cluster.
Each cluster contains 10-15 managed servers.
Currently we are working on Linux 4.0 and 5.0
Application server weblogic 11g and 12c
webserver Apache 2.0 and 2.2.
Backend DB is Oracle 11g

Weblogic Silent Installation

Weblogic Silent Installation 


1.To install the Bea in Silent mode, we need to specify the arguments as "-mode=silent"

2.and Specify the silent.xml path

3.Silent.xml contains, the BEA Home path,Installation Directory path,Need to specify which component need to install

4.Optionally we can specify the path for the temp directory for extracting the compressed jars

5.Optionally we can specify the log path which can be used for the Tracing the installation errors or exceptions.

6.The installation program does not display any configuration options during the installation process, So u must collect the Licence Agreement and terms & Conditions Documents in advance.

7.Silent Mode of Installation is not available for NetInstallers. So u can use only package Installers.

8.U can use any Package Installer according to your Operating System/Hardware Architecture like: “Jar Installer”   or “executable” Installers  (*.bin or *.exe)

9.Silent-mode installation requires the same amount of temporary disk space and uses the same temporary storage directories as a standard installation.

10.Incorrect entries in the silent.xml file can cause installation failures. So it is always recommend that you create a log file when you start the installation. using (-log option)

11.The XML definition (<?xml version=”1.0″ encoding=”UTF-8″?>) must be at the very beginning of the silent.xml template file, without any preceding space or line breakes in it.

New or Changed Features in WebLogic 12c R2 (12.1.2)

New or Changed Features in WebLogic 12c R2 (12.1.2)



1.WebLogic Server is now availbile in two formats only i.e. zip and jar version. (JDK is mandatory and must be installed prior to WebLogic installation)

2.JDK version 7 or higher (1.7) is recommended to install WebLogic 12.1.2 (though WebLogic 12.1.2 works JDK 1.6 as well)

3.Tool to apply patches in WebLogic has changed from BSU (BEA Smart Update) to opatch

4.Option to install WebLogic in silent mode is now -silent -responseFile [path_to_response_file] (Earlier option was -mode=silent -silent_xml=[path_to_silent.xml])

5.In previous versions of WebLogic upgrade of WebLogic Domain used to be done using Domain Upgrade Wizard but now (12.1.2 onwards) uses Reconfiguration Wizard

6.In earlier version of WebLogic, Node Manager is installed  at WebLogic Home ($WL_HOME) level but now Java Node Manager by default is installed at $DOMAIN level i.e. $DOMAIN_HOME/nodemanager (with an option to configure Node Manager at Server Level or Custom Location)

7.From 12.1.2 there is an option to configure Node Manager at Domain Level or Custom Location (as shown in above screenshot)

8.Offline Cloning of Managed Server is now possible using configuration wizard (config.sh) or WLST (clone) – In previous releases it was possible to clone a Managed Server from WebLogic Console only (Online Cloning)

9.Cluster in pre 12.1.2 version is now also called as Configured Cluster in WebLogic 12.1.2

10.Dynamic Cluster introduced in WebLogic 12c is a cluster with one or more Dynamic Servers (More on Dynamic Cluster and Dynamic Server in WebLogic later)

11.WebLogic 12c supports Database 12c including Application Continuity (AC) , Database Resistence Connection Pooling (DRCP), Global Data Services (GDS)

12.Diagnostics : Built-in Diagnostics Modules added that provides simple and easy mechanism for basic health check and performance monitoring of WebLogic Serve

Common issues in weblogic

Common issues in weblogic


1.Issue in Wls while starting the services:

Unable to get file lock, will retry;
Unable to get file lock, will retry;
Unable to get file lock, will retry;
Unable to get file lock, will retry;

Solution:

Kill the process in background using kill -9 command.


2.High CPU Utilization Finding Cause?

1)jps: to know How to use JPS utility
$ jps -v

2)top: This is an Operating System Utility
$ top -H -b -p 5398

3)jstack: utility
$ jstack -l (pid) >> ThreadDumps.log

Note: The jps and stack are stored in JAVA_HOME/bin.

Weblogic Interview Questions

Weblogic Interview Questions


What is Weblogic server?
A weblogic server is a instance of java process executing in a JVM. Please note each java process runs on a JVM.

Two Type of servers:
1. Administration server:
2. Managed server:

  India –------- New Delhi –------- State Capitals
(wls server)   (Admin.server)      (Managed server)

What is a Administration server?

*Every domain have only one admin server.
*It is the central point of control for the web domain.
*It runs Weblogic admin console.
*It is in charge of congfig.xml.
*Config.xml contains configuration info about domain.
*Central configuration controller for the entire domain
*There is exactly one* Administration Server in domain
*An Administration Server controls only one domain.

Note: The Administration Server does not need to run at all times, but is required for making configuration and deployment changes to servers in the domain.

What is a Managed server ?

A running instance that hosts applications and resources needed by those applications
The real work horses in a WebLogic domains are Managed Servers
A domain can have zero or more managed server.
Each Managed Server is independent of all other Managed Servers in the domain
You can have as many Managed Servers in a domain as you need
Individual Managed Servers are typically added for capacity and application isolation
It will contacts admin server for config info.

In prod env, we host application on Managed servers, not on admin server, though admin server can also host applications.

What is a Domain?
logically related group of WL server resources that are managed as a single unit. It is administrative boundary for all servers, admin server, managed servers,clusters,applications,services etc. Each domain must have its one Admin server. Any given admin or managed server or cluster can belong to only one Domain.
A logically related group of WLS instances that you manage from a single set of configuration artifacts i.e. a single set of config.xml files

What’s in a domain?
Multiple Servers
Configuration pertaining to all the servers
Servers in a domain could be
On the same or different machines
Using the same or different WLS installations

NOTE:
1.Admin server stores the master copy of the domain config, including config for all Managed server.Each Managed server stores local copy of domain config.
2.When any config change is done, the admin server send the  changes to Managed server. So, to do any changes, we need to contact Admin server through console or WLST. Admin server will push those changes to Managed servers.

What is a Node Manager?
Node manager is a utility or process running on a physical server that enables starting, stopping,suspending or restarting admin and managed server remotely. It is not associated with a domain, though can start any server that reside on same physical server.

Installation of Weblogic server
3 ways to install weblogic

1.Graphical mode
$ ./server103_linux32.bin

2. Console mode
$ ./server103_linux32.bin -mode=console

3. Silent mode
$ ./server103_linux32.bin -mode=silent -silent_xml=silent.xml

How to create a Domain ?
$BEA_HOME/$WL_HOME/common/bin
$ ./config.sh

Modes to create a Domain?

1. GUI i.e. Graphical mode
2. Console mode
3. Silent mode, Template based

STARTING/STOPPING

Admin server
StartWeblogic.sh
Stopweblogic.sh

Managed server
$./StartManagedWeblogic.sh <Domain_name>
$./StartManagedWeblogic.sh <Domain_name>

What is Cluster in Weblogic ?

A cluster is a group of Managed Servers running simultaneously and working together to provide increased scalability and reliability
Scalability: through parallelism  (load balancing)
Reliability/Availability: through replication and redundancy ( failover)
I will take care when you are down!
A cluster appears as a single instance to most clients.
Clusters enable advanced features, such as Whole Server Migration, Service Migration, and clustered JMS destinations.
Something like RAC, Many things not like RAC
1.http session replication
in-memory-replication
db based replication
2. Session Stickiness

Config.xml :

One central configuration file for a domain is config.xml. The configuration of a Weblogic domain is maintained in a file called “config.xml”
Config.xml contains the information about servers in the domain, applications deployed and resouces configured. Config.xml is read by weblogic server during startup. Its Located in <Domain_Directory>/config directory

What is HEAP size in Weblogic ?

→ while Weblogic server running it needs some amount of RAM to store temporary data that is objects, sessions etc.
→ so the amount of RAM which we dedicate to Weblogic server is called as HEAP. While user request reach to the Weblogic there will be n number of objects will be created and all these objects will be stored in the heap.
→ once user logout from the application all these temporary objects will be cleared from heap. The default heap size to the Weblogic is 512 MB. Depends on the application usage we may or may not change the heap size. While changing the heap size we may need to consider the bellow points.
1.How big your application is.
2.How many objects it may produced(default objects).
3.Traffic of the application(number of users accessing)
4.fore casting of the application usage.
5.session replication or failover.

NOTE:- The industry standard heap size for large and medium scale applications is 2 GB.

What is GC ?

when the user request comes in the objects are stored in the heap. When the same user requests are completed the related objects are cleaned from the heap. The process of cleaning objects is called as GARBAGE COLLECTION. The process who does is GC(GARBAGE COLLECTOR).
→ Every JVM has its own GC, which does the cleaning process.
→ The default GC Algorithm is called as MARK AND SWEEP algorithm.

PROCESS OF GC ?
→ GC keeps monitoring the heap size either based on heap usage or based on time intervals. When it monitors the heap, if objects are related to running user request it will not clean those objects. If it fines objects are unreferenced(not associated to any user request) it will sweep/clean those objects. since GC is processing we will have heap size under control.
→ If GC is not processing properly, the unreferenced objects will never get cleared and heap will be completely occupied.
→ If Weblogic does not find enough space in heap it will be crashed by throwing an exception called Out of memory exception.

REASONS FOR GETTING OUT OF MEMORY EXCEPTION ?

1.Not enough heap size allocated to Weblogic.
2.If GC is not happening properly.
3.Unexpected increase in the user requests.
4.Memory leak issues.
→ default heap parameters are defined in “setDomainEnv.sh”(setting Domain environment).
→ setDomainEnv.sh is a file where we have default configuration define to start Weblogic.
→ Default parameters are as shown bellow.

INDIVIDUAL STARTUP SCRIPTS ?

→ If we change heap parameters in setDomainEnv.sh, those changes will be applicable to all Weblogic servers running in the domain.
→ This is not a good option, because having same heap size of manage server,Admin server.
→ To avoid this we will go for an option called writing “Individual Startup Scripts”
→ This option is suitable because using individual startup scripts we can apply changes to individual manage server alone.

SAMPLE STARTUP SCRIPTS:
touch icicims1.sh
#!/bin/sh
#individual startup script to start icicims1
USER_MEM_ARGS= “-Xms2048m -Xmx2048m”
export USER_MEM_ARGS;
./startmanaged weblogic.sh icicims1 t3://localhost:7001

HOW MANY WAYS TO CHANGE THE HEAPSIZE?

→ The preferred way of changing the heap size are given bellow:
1.change the setDomainEnv.sh
2.change the individual startup scripts.
3.change through server start option of Weblogic console.
4.change using Weblogic scripting tool(WLST)
→ out of all above options changing Heap size using “individual startup scripts” is preferred way.
→ Apart from using XMS,XMX parameters there are other few parameters which will be used to improve the performance of Weblogic.
→ some of the important parameters are :
*XMS
*XMX
*XNOOP
*XThroughput
XMS:- It is used to define minimum heap size.
XMX:- It is used to define maximum heap size.
XNOOP:- To inform Weblogic not to perform optimization.
XThroughput:- To improve the completion time of user request and responses.
→ To achieve the best performance of the Weblogic, oracle recommends to have both XMS and XMX values are same.
→ while developers doing the code every object which is opened expected to be closed. If they do not closed it properly, objects will still be in the heap and GC is unable to clean those objects. This situation is called as “Memory Leak”.

HOW TO FIX MEMORY LEAKS ?

→ As temporary fix we can restart the Weblogic to that heap will be closed.
→ As a permanent fix developers needs to identify the unclosed objects, fix it as part of the encoding and redeploy the application.

HOW TO FIX OUT OF MEMORY ISSUE ?

1.Increase the heap size if it is not sufficient.
2.Increase the manage servers if those existing servers are not sufficient.
3.fix the memory leak issue.

HOW TO ANALYZE THE HEAP ?

→ Heap can be analyzed to some extent by taking the heap dump. To take a heap dump use a utility called “Jmap”

DEPLOYMENTS In weblogic admin

The process of making Java application is called as deployments. When the development is completed the code needs to be packaged and it is suppose to deployed to Weblogic.
→ Weblogic has the capability of understanding the deployments,understanding the technologies involved, understand the code architecture and provide facility for deployments to run. Once the deployment is successful then only we will be able to access website or application.

→ Deployments are as 2 types:
1. APPLICATION:
2. LIBRARY:

Applications are of 2 types:
1. war(web archive)
2. ear(enterprise archive)

LIBRARY:
→ Library is a piece of shared code which can be shared by any number of war or ear files.
→ using shared libraries we can avoid maintaining duplicated copies of code.
→ Libraries are will be in the format of Jar files.
→ while deploying Jar file, during the deployment we will select the deployment type as library.

DEPLOYMENT ORDER ?

→ when we have the multiple applications we may have dependency between these applications.
→ To maintaining the dependency or to load the applications in proper order we will define the deployment order number.
→ The default deployment order number is 100.

STEPS TO CHANGE THE DEPLOYMENT ORDER NUMBER ?
→ Go to console------>deployments--------->select the application for which you want to change the deployment order.
→ select overview tab------>change the parameter called deployment order.

DEPLOYMENT PLAN ?

→ When we have multiple components with ear we can maintain the deployment plan. So that Weblogic loads these components in a specific dependency order.
→ The best option of maintaining these deployment plan by defining in deployment descriptors by developers.
→ Examples of deployment descriptors are web.xml, Application.xml, weblogic.xml.

DEPLOYMENT MODES ?
→ We have 3 types of deployment modes in Weblogic.
1.NO STAGE MODE.
2.STAGE MODE
3.EXTERNAL STAGE MODE.

NO STAGE MODE:
→ In the no stage mode we will copy the physical file to all Unix servers, Where Weblogic is running. Once we are done with copying we will follow the normal deployment process to complete the deployments.

STAGE MODE:
→ In the stage mode instead of we copy the file manually, Weblogic copy for us to all Unix servers.

EXTERNAL STAGE MODE:
→ In the external stage mode we will use third party tools to push the files to Unix servers.

→ out of all above 3 modes NO STAGE MODE is the safest mode, because network bandwidth can't be more or we don't depend on third party tools.

DIFFERENT STATES OF APPLICATION ?

PREPARED:- When we deploy the application first time.
ACTIV:- when application is in running.
WARNING:- when there are warnings in application.
ERROR:- when there are errors in application.

How to clear weblogic cache?

1)shut down the server
2)delete the contents of the folder:
c\bea\user_projects\domains\domain1\servers\server_name\tmp\wl_user
3)Restart the server.

what happens if we don’t  clear the cache?

If we are redeploying an application or deploying a new version of same application, weblogic  server look up in the above directoryif there are older objects persists that will be conflict with new code objects

what is two phase deployment?

There are two states in two phase deployment
1)prepare state
2)active state
Deployment first prepares the application across all the target servers and then activates the application in a separate phase, If  deployment of an application fails in either of the two phases then the cluster deployment is failed.

Deployment issues?

1)Code issues
2)Out of memory issues
3)Connection pool issues
4)Clear cache issues
5)Library class path issues

What are the Different States of Server Lifecycle?

shutdown
starting
standby
resuming
running
suspending
shutting down
failed
unknown

TYPES OF GC COLLECTORS ?

1.Mark-and-sweep collector
2.Mark-sweep-compact collector
3.Copying collector
4.Incremental collector
5.Generational collector
6.Concurrent collector
7.Parallel collector

What is MDS & Why we use MDS in Oracle SOA?

MDS stands for Oracle MetaData Service. It is central repository inside Oracle Fusion Middleware. MDS purpose is to provide centralized store where we can keep, manage & access metadata.

Types of MDS Repository?
File-Based.
Database Based.

Which configuration file store MDS configurations?
The adf-config.xml file is a configuration file that is used to store MDS Configurations.

How to reclaiming Space from SOA Tablespaces ?

1.alter table deallocate unused;
2.alter table enable row movement;
3.alter table shrink space compact;
4.alter table shrink space;
5.alter table disable row movement;
One of the main focuses when reclaiming memory is tables relating to the Oracle BPEL Process Manager, which contains tables like CUBE_INSTANCE and XML_DOCUMENT.

Before=408.75MB
After=394.94MB

Oracle SOA Application URLs ?

Below are the urls of application comes with Oracle SOA Suite 11g -

Console  -  http://localhost:7001/console
EM console for BPEL  -  http://localhost:7001/em
OSB console - http://localhost:7001/sbconsole
Human task application - http://localhost:7001/integration/worklistapp
Rules composer - http://localhost:7001/soa/composer

How to find SOA Server Version?

Method.1
1.Login to Putty.
2.Run command ./soaversion.sh from location $SOA_ORACLE_HOME/bin

Method.2
1.set home (set ORACLE_HOME=C:\Oracle\PS5.5\Middleware\Oracle_SOA1)
2.opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.9.0
Copyright (c) 2011, Oracle Corporation. All rights reserved.

Scaling up a server in Weblogic ?

We have two scaling options in weblogic
1.vertical scaling
2.horizontal scaling.

1.Vertical scaling relates to adding more CPUs to a machine. To better utilize the server hardware we can add more WebLogic instances to the machine that could lead to increased application throughput.

2.Horizontal scalling relates to adding more machines to the environment, which gives a failover capability that we cannot get with vertical scaling. A good approach is to combine both scaling techniques to obtain better CPU utilization and failover capability.

Vertical and Horizontal Clustering ?

A cluster is defined as a group of application servers that transparently run a J2EE application as if it were a single entity.
There are two methods of clustering: vertical scaling and horizontal scaling:

1.Vertical clustering, however, consists of multiple Java application servers on a single physical machine. With vertical scaling, the machine's processing power, CPU usage, and JVM heap memory configurations are the main factors in deciding how many server instances should be run on one machine

2.Horizontal clustering involves running multiple Java application servers that are run on two or more separate physical machines. Horizontal scaling is more reliable than vertical scaling, since there are multiple machines involved in the cluster environment, as compared to only one machine.

How do you set the classpath?

WebLogic Server installs the following script that you can use to set the classpath that a server requires:
WL_HOME\server\bin\setWLSEnv.cmd (on Windows)
WL_HOME/server/bin/setWLSEnv.sh (on UNIX)

Method of communication between Weblogic servers ?

Multicast – Each server communicates with every member server in the cluster. Which means heartbeats are sent to every server.
Unicast – For the member servers in the cluster, group leaders are chosen and only those group leaders communicate with the servers among the group and these leaders notify each other about the availability of all the other servers.

For example : Suppose there are 6 servers in the cluster. 2 groups are made and there are 2 group leaders. Other 2 servers of the group will notify their leader that they are alive and the group leader will send this information to the leader of other group.

Clustering:

What is a Cluster?

It is a group of WebLogic managed server instances running simultaneously and working together to provide High Availability and Scalability.  All managed severs which are part of Cluster is also known as Cluster Members or Cluster Nodes

Benefits of Clustering ?

Application Fail-over
High Availability
Load Balancing
Scalability

What are the different Types of Cluster?

Clusters are divided into two types:
Vertical Clustering
Horizontal Clustering

Vertical Clustering
Grouping of WebLogic managed servers which are hosted on a single machine

Horizontal Clustering
Grouping of WebLogic managed servers which are hosted on more than one machine ( or multiple machines)

Which one is best Vertical or Horizontal Clustering?

In horizontal clustering, if one of machine goes down the client requests will be handled by managed servers of other machine where as in vertical clustering if the machine goes down, the application hosted on these servers will be down and it will impact clients and end users.

Cluster Constraints ?

All managed servers in the cluster should be of same WebLogic version
A Cluster can't span multiple domains. All managed server instance in a cluster must reside in the single domain
A domain may contain 0 - * clusters

Cluster Members communication modes ?

All managed WebLogic Server instances in a cluster communicate with one another using two basic network technologies:
IP sockets - provides peer-to-peer communication between cluster members
IP unicast or multicast - cluster members use this to broadcast availability of services and heartbeats that indicate availability

When creating a new cluster, Oracle recommends unicast for messaging within a cluster.The default cluster messaging mode is unicast, when creating a cluster using the Configuration Wizard,. The default cluster messaging mode is multicast, when creating a cluster using WLST,

Multicast
In Multicast each managed server will communicate with all members of the cluster by using Multicast IP address and port.

Unicast
In Unicast each Managed server will communicate with their group leader by using unicast broadcast channel

JDBC Data Sources in WebLogic Server

JDBC ?
It is an API which is used for accessing the Databases. JDBC provides Platform independent access to databases

JDBC Data Source ?

In WebLogic Server, you can connect to database by adding JDBC data sources to your WebLogic domain
A JDBC data source is an object bound to the JNDI tree that provides database connectivity through a pool of JDBC connections.
Applications can look up a data source on the JNDI tree and then borrow a database connection from a data source.
A Data Source:
Is stored in the WLS JNDI tree
Is associated with a connection pool
Can support transactions

What is Connection Pool?

It's a pool of connection objects which provides the connectivity between WebLogic Server and Database. It allows an application to borrow a database connection.

Advantages of Connection Pools and Data Sources ?

Connection pools are created at WebLogic Server startup. It provides
Re-usability
Readily available connections (Time and overhead are saved by using an existing database connection)
Can be dynamically resized to accommodate increasing load
The database can be changed without application developer having to modify the underlying code
The number of connections to a database can be controlled

Types of Data Sources ?

1.Generic Data Source - It is nothing but a Data Source. It provides database connectivity through pool of JDBC Connections.

2.Multi Data Source - It is abstraction around a group of data sources which provides  Load balancing or Failover. It determines which data source to use to satisfy the request depending on the algorithm selected in the Multi Data Source Configuration.

3.Grid Link Data Soure - It provides connectivity between WebLogic Server and an Oracle Database service targeted to an Oracle Real Application Cluster (RAC). It uses the Oracle Notification Service (ONS) to adaptively respond to state changes in an Oracle RAC instanc

SSL in WebLogic Server 11g and 12c

By default WebLogic Admin and managed servers are configured with demo identity and demo trust certificates. This should be reconfigured to use real certicates (certificates of certifying authority)in production environments. You can also configure self-signed certificates.
Before configuring SSL we need to understand what is keystore, identity store, trust store, keytool utilities.

Key Store ?
It is used to store the certificates. There are various types of Keystore that WebLogic Server Supports. Most common of them is Java Key Store (JKS) , which is a file based repository with extension .jks

Identity Key Store ?
It is used to store the identity certificates(Signed Certificate issued by a Certificate Authority (CA)) which provides the identity for WebLogic Server or site.

Trust Key Store ?
It is used to store the trusted certificates or certificates of certifying authority which provides trust for WebLogic Server.

keytool ?
This utility is used to generate keypairs, generate the csr, import the certificates, list the certificates, delete the certificates etc.,

In order to configure SSL, you need to perform the below steps:

*Generate a key-pair
*Generate Certificate Signing Request (CSR)
*Send the CSR to Certificate Authorities to get it singed.
*Import the Signed Certificate into keystore
*Configure WebLogic Admin & Managed Servers to use the above certificate keystore

How to find out which weblogic server version installed on the machine ?
Ans)
There are couple of ways you can check which version of weblogic server installed on the machine.
Note: this may vary on your machine.

1. In Middleware home $MW_HOME/registry.xml file look for entry as follows
component name="WebLogic Server" version="10.3.3.0" InstallDir="/u01/Oracle/Middleware/wlserver_10.3"

2. Check AdminServer's log file at $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.log
Run the following command you will see something similar
$ grep "WebLogic Server" AdminServer.log

Difference between 32bit and 64 bit ?

Maximum Heap size for a 32 bit JVM is upto 4GB. In 64bitt JVM it is upto 32 GB.
64Bit JVM supports upto 1TB

Q)What is weblogic server?

Oracle WebLogic Server is J2EE Server (earlier known as BAEWebLogic Server) similar to Oracle Application Server. 
(OR)
Logically related group of java components is nothing but weblogic server.

Q)what oracle weblogic server includes?

Oracle weblogic server includes

1)Domain
2)cluster
3)servers

Q) What is the meaning of BEA (Oracle bought Weblogic from BEA )?

BSU Stands for Bea Smart Update.  This utility is used to apply the WebLogic Server Patches.

Simple, it is first letter of name of founders, Bill Coleman, Ed Scott, and Alfred Chuang

Q)What is domain in WebLogic ?

Logically grouping of all resources and services together as a single unit is called domain.
0r
A domain is a logically related group of weblogic server resources that you manage as a unit.
OR
Domain is a group of weblogic server resources like admin server, managed server, jms, connection pool, data sources etc or
whatever the resource you know of weblogic server since domain is the basic unit
you have to create after installation and everything created and configured under a domain.

OR
A domain has Admin server(AS)+Managed Server(MS).

A domain provides one point of administartion.

Domain is logical grouping of resources and services and consist of Administration Server, Managed Server and cluster.  There can only be one administration Server in domain and zero to N Managed Server.

Q)What is Administration Server ?

Admin server is the central point from where you can configure,Monitor and manage all resources of a domain.

Administration Server is WebLogic Server instance that maintains configuration data for a domain. You can deploy your application on administration Server but it is recommended to create managed Server and deploy your application in managed server and leave Administration domain for configuration and maintenance.

—There will always be atleast one Administration Server in a domain.


Q)What is Managed Server ?

It is an instance of your weblogic server that is running on JVM and has its own configuration.

In Managed server we will deploy the java components
Web Applications
EJB Applications
JMS Applications
Web services

Any WebLogic Server instance apart from Administration Server is called as Managed Servers. This is weblogic server where you deploy your application (Though you can deploy your application in Administration server as well but it is not recommended in production/UAT instance)

Q)What is Cluster in WebLogic ?

Collection of multiple server act like as an single server to end user/Application.

OR

Two or more managed server becomes or forms the cluster in a domain and cluster handle the load balancing across the cluster.

Group of WebLogic Managed Server Instances that work together to provide high availability and scalability for applications is called cluster. WebLogic Servers with in cluster can run on same machine or different machines. These are also called as managed Server cluster.

Q)Node Manager in Oracle WebLogic Server?

Node Manageris Weblogic Server utility to start, stop and restartAdministration and Managed Server Instances from remote location (There are other ways as well to start/stop Weblogic – Node Manager is optional component).

1. Node Manager Process is associated with a Machine and NOT with specific Weblogic Domain (i.e. Use one node manager for multiple domains on same machine)

2. There are two versions of Node Manager - Java-based and Script-based
Java-based node manager – runs with in JVM (Java Virtual Machine) Process and more secure than script-based node manager. Configuration for java-based node manager are stored in nodemanager.properties
Script-based node manager – is available for Linux and Unix systems only and is based on shell script.

3. Access Node Manager
- From Administration Console : Environments -> Machines -> Configuration -> Node Manager

 4. Default port on which node manager listen for requests is localhost:5556, When you configure Node Manager to accept commands from remote systems.

5. Any domains created after the Node Manager Service has been installed should not have to be enrolled against the Node Manager. The Node Manager should automatically be ‘reachable‘ by the domain.

Q)Server
---------
Server is an instance of your weblogic which is running on a JVM and has dedicated RAM.

Q)How to start Node Manager ?
$WL_HOME\server\bin\startNodeManager.sh
To Stop Node Manager
In Unix/Linux, kill the process -
kill -9 `ps -ef | grep -i nodemanager.javahome | grep -v grep | awk {'print $2'} | head -1`

Node Manager Log Files
$WL_HOME/common/nodemanager/nodemanager.log

Important configuration file for node manager
$WL_HOME/common/nodemanager/nodemanager.properties- used by java based node manager. This file is created on first time start of nodemanager (startNodeManager.sh)

$WL_HOME/common/nodemanager/nodemanager.domains - contains mappings between the names of domains managed by Node Manager and their corresponding directories.
entry like
base_domain=D:\Oracle\Middleware\user_projects\domains\base_domain
soa_domain=D:\Oracle\Middleware\user_projects\domains\soa_domain

$WL_HOME/common/nodemanager/nm_data.properties- This file stores the encryption data the Node Manager uses as asymmetric encryption key. This file is created on first time start of nodemanager (startNodeManager.sh)

$DOMAIN_HOME/config/nodemanager/nm_password.properties- This file stores the Node Manager username and password used by Admin Server to connect to Node Manager.

Why node manager is required?
 A Node Manager process is not associated with a specific WebLogic domain but with a machine.
You can use the same Node Manager process to control server instances in any WebLogic Server domain, as long as the server instances reside on the same machine as the Node Manager process. Node Manager must run on each computer that hosts WebLogic Server instances. whether Administration Server or Managed Server that you want to control with Node Manager.

1. How do you differentiate between a server hang and server crash issue?

When a Server crahes, the JAVA process no longer exists. When the Server is hung, it stops responding.
We can use the weblogic.ADMIN utilty to ping the server. In case of a hang situation we can take multiple thread dumps and analyze the cause of hang.

2. What can be the various reasons for a server crash?

a) Native IO
b) SSL Native Libraries
c) JVM
d) Supported Configuration
e) JDBC Driver issue

3. How do you troubleshoot a crash?

JVM crash generates a hs_err_pid file. We need to look into the stack trace of the hs_err_pid file .
If the thread is from a native io, we need to disable native io.
if the stack trace is from the driver, we need to get in touch with the drive team.
Quite possibly its a problem with driver. Changing the type of driver can be a workaround.
If the thread shows it coming from an optimzed code, we can turn of optimization.
If the stack is from native calls of application, its a bug with the application and it has to b modified.

4. Ho do you troubleshoot Server Hang?

We can use java weblogic.Admin PING to check if we get a normal response.
We need to take multiple thread dumps with kill -3 pid on unix and CTLR Break on Windows.
Analyze the thread dump to find the root cause.

5. What can be the reasons of Server hang?

Memory leak, databse query taking a long time to return, Deadlock.

6. What is memory leak?

Memory leak is when objects are not romved from the heap even when they are not required.

7. What are the various causes for OUT OF MEMORY?

a) Insufficient heap size, not able to match the extra load.
b) Objects licing too long, like HTTP Sessions.
c) Memory leak in application code.
d) Full GC not happening due to JVM Bug.

8. How to troubleshoot and overcome such issues?

Gather memory data by enabling GC verbose.
If its due to Http Session, timing out http session after certain interval might help.
Look into the code for jdbc connection handling.
Optimizing the heap size according to the load.

9. When does High CPU Usage occur?

It occurs when one process or one thread utilizes unexpectedly high proportion of CPU.

10. How to troubleshoot it?

In Solaris environment, we need to take pstack and prstack and see what the threads are doing.
In Windows we need to use pslist and process explorer.

11. What is Clustering and what is achieved through it?

Clustering is the grouping together of servers for the purpose of high availability and scalability.
Load balancing and Failover is achieved.

12. How does Cluster Communication Happen?

Members of the Cluster communicate over the Cluster Multicast IP and Port by sending periodic heart beat messages.

13. What is the difference between the Sun JVM and BEA JRockit JVM?

The most well know JVM is the implementation from Sun. The Sun JVM is called HotSpot. The Sun JVM is shipped in the Java Developer’s Kit (JDK) and Java Runtime Environment (JRE) from Sun.

The BEA JRockit JVM from BEA systems is optimized for reliability and performance for server side applications. To achieve this, BEA JRockit JVM uses technologies such as code generation, hot spot detection, code optimization, advanced garbage collection algorithms and tight operating system integration.

14. TUning JVM Parameters.

If you have a single processor, single thread machine then you should use the serial collector (default for some configurations, can be enabled explicitly for with -XX:+UseSerialGC). For multiprocessor machines where your workload is basically CPU bound, use the parallel collector. This is enabled by default if you use the -server flag, or you can enable it explicitly with -XX:+UseParallelGC. If you’d rather keep the GC pauses shorter at the expense of using more total CPU time for GC, and you have more than one CPU, you can use the concurrent collector (-XX:+UseConcMarkSweepGC). Note that the concurrent collector tends to require more RAM allocated to the JVM than the serial or parallel collectors for a given workload because some memory fragmentation can occur.

15. How do you do performance tuning of WLS?

It can be categorized in 4 parts.
a. Application Tuning.
jsp precompilation, ejb pool size cache..

b. OS Tuning

Setting tcp ip parameter.
tcp_time_wait_interval
tcp_conn_req_max_q

c. Core Server Tuning.

tune workmanager, tune chuck size and chunck pool size, using performance packs, conenction backlog buffering.

d. JVM Tuning
tuning gc strategy, monitoring garbage collection..

16. What is the difference between Development mode and Production mode of Weblogic Server?

Development Mode:

1. The default JDK for development domain is Sun Hotspot.
2. You can use the demo certificates for SSL.
3. Auto deployment(to admin server only) is enabled.
4. Server instances rotate their log files on start-up.
5. Admin Server uses an automatically created boot.properties during start-up.
6. The default maximum capacity for JDBC Datasource is 15.
7. The debugFlag which is used to start the WebLogic Workshop Debugger is enabled.
8. In Development Mode any configuration change being done by a user doesn’t need him to take a Lock and Edit session.
9. Availability of web service test client.
10. Nodemanger username and password: Default Admin credentials.
11. Availability of Classloader Analysis Tool: Yes.
12. Default start parameters when using Sun JDK and the default startWebLogic script : java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m.

Production Mode:

1. The default JDK for production domain is JRockit.
2. If you use the demo certificates for SSL a warning is displayed.
3. Auto deployment(to admin server only) is disabled.
4. Server instances rotate their log files when it reaches 5MB.
5. Admin Server prompts for username and password during start-up.
6. The default maximum capacity for JDBC Datasource is 25.
7. The debugFlag which is used to start the WebLogic Workshop Debugger is disabled.
8. In Production Mode the user needs to procure a Lock and Edit session before trying to make any configurational changes.
9. No Availability of web service test client.
10. Nodemanger username and password: Randomly generated
11. Availability of Classloader Analysis Tool: No.
12. Default start parameters when using Sun JDK and the default startWebLogic script : java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m.


17. What is HTTP tunneling? How can we configure it on Weblogic?

HTTP tunneling provides a way to simulate a stateful socket connection between WebLogic Server and a Java client when your only option is to use the HTTP protocol. It is generally used to tunnel through an HTTP port in a security firewall. HTTP is a stateless protocol, but WebLogic Server provides tunneling functionality to make the connection appear to be a regular T3Connection.
Steps to configure Http tunneling.

Login into the Admin Console, click on the server on which you want to enable he Http Tunneling feature
Click on the Protocols tab ? General ? check the “Enable Tunneling” check box.

Now you can communicate with the JVMs (Server Instances) using protocols other than t3

18. What is the difference between T3 and HTTP protocol?

WebLogic uses the T3 protocols for internal and external connections to the servers. The T3 protocol often is used in WebLogic’s implementation of RMI. Proprietary of WebLogic Server.

Http protocols are used primarily for HTTP communication between the browser and the web server. Standard follows the W3C (World Wide Web Consortium).

Note: All of these protocols are, by default, multiplexed over the same connection to the server’s address and port. So you can access a web page hosted by the server using a URL such as http://host:port/page.jsp. An external client can set up an initial JNDI context to a server using the URL t3://host:port/. All that has changed is the protocol over which the client must communicate with the server.

9.States of the Server?

Ans:-There are 9 states of server:-

Shutdown
Starting
Standby
Resuming
Running
Suspending
Shutting down
Failed
Unknown


Q)Difference between .out and .log files

.out will print all logs related to your java application deployed whereas
.log file will print all logs related to weblogic server like startup.stop,deployment etc....

Q)Diff B/W Devlopment - Production

-Development Mode
The default JDK for development domain is Sun Hotspot
You can use the demo certificates for SSL
Auto deployment is enabled
Server instances rotate their log files on startup
Admin Server uses an automatically created boot.properties during startup
The default maximum capacity for JDBC Datasource is 15
The debugFlag which is used to start the WebLogic Workshop Debugger is enabled

-Production Mode
The default JDK for production domain is JRockit
If you use the demo certificates for SSL a warning is displayed
Auto deployment is disabled
Server instances rotate their log files when it reaches 5MB
Admin Server prompts for username and password during startup
The default maximum capacity for JDBC Datasource is 25
The debugFlag which is used to start the WebLogic Workshop Debugger is disabled

Q)Http Error Codes

500 : Internal Error        ( Check your Data-Base )
503: Back end server is not available.
404: Page can't be displayed. File not found exception
403: Forbidden (Unauthorized access)
        SSL is not doing Hand-shake
301: Permanently Redirected
302: Temporarily Redirected
303: Redirected Successfully
200: Able to successful

Multicast - Unicast

Unicast is the best option in real time scenario..Because here is the examples..
In your cluster if u are having 10 Managed server instances then,

Multicast: Each MS is talking to other 9 MS So that total 90 connection was established.
Which is burden on the server in the peak business hours. Bcz of which weblogic performance will may go down.

Unicast: 1st MS will brought up and it will act as a leader..So remaining 9 MS talking to that leader only so only 10 connections will established. So that weblogic performance may not go down.

If there is an issue with MS1 then it will be removed from the cluster and the requests will
be processed by other managed servers in the cluster.So this is not an issue..
Multicast requires network config and support from network team to do it, but unicast doesn't require any additional setup on network or from the network team. Oracle recommends to use Unicast.

Q)How to access admin console ?

ssl enabled admin console accessed as :
https://<hostname_or_ip_address_where_admin_server_running>:<port_on_which_admin_server_is_running>/console
Example - https://localhost:7001/console

non ssl admin console accessed as :
http://<hostname_or_ip_address_where_admin_server_running>:<port_on_which_admin_server_is_running>/console

Example - http://localhost:7001/console

Q)How many admin consoles possible in a single domain ?

only one.

Q)What is the default port of admin server ?

7001

Q)What is config.xml ?

config.xml is the central configuration repository for a domain. every resource you have configured from admin console or by command line or by any other tool registered under this file.

WLS 9.x onwards, this file contain references to other xml configuration files also those are under your domain/config folder ( further sub folder under it for respective resources ) since wls 9.x onwards concept of modules are introduced for sub resources like data source, jms etc otherwise prior to 9.x ( 8.x or older ) every configuration was stored under this single config.xml file. 

Q)What is boot.properties file ?

boot.properties is the file used by admin or managed server during startup for username and password. it exist under your domain/servers/server_name/security folder.

( Below information is for some advance users )

To specify a customer directory for this file you can use

-Dweblogic.system.BootIdentityFile=[location]/boot.properties

 When you create a domain in development mode then it creates automatically during startup of admin server but if you create a domain in production mode then you need to define it explicitly otherwise on every reboot of admin server it will prompt you for username and password.

So in production mode -

Start admin server by manually passing the username and password
stop it ( press cntrl+c on the started session )

go to your domain/servers/your_admin_server/

create a folder "security"

go inside security and create a file "boot.properties" with below contents

username=your_admin_username
password=your_admin_password

now start the admin server, it will not prompt you for username & password further.

If you are going to start your managed servers from admin console then no need to create this file for managed server but if you are going to start managed servers via startManagedweblogic script then you need to follow the same above procedure for each managed server.


What is actually WebLogic Cache?

Basically all the web-tier related files (.jsp .class, JSPCompiled files etc.,) get stored in some directory. This is treated as cache whenever there is restart of a WebLogic instance happen then the WebLogic server will look-up for last serviced object status stored in the cache to service for any pending requests. Usually, when your EJB Classes need sessions, JMS object requires persistance, your web-tier may contain static contents then Cache will be used by WebLogic Application Server instance.

Why we need to remove Cache?

Whenever your application is accessed for the first time that fresh deployment of a new version, WebLogic server lookup in this directory, if there are older objects persists that will be conflict with new code objects. This is where the need of removal of cache arises.
Where there is a need of new version deployment we might need to clear the cache when the changes to the new version is not reflected.

WLS 9.x, 10.x


In new version of WebLogic 9.x onwards removal of cache means deleting each server instance's tmp folder contains cache, stage folders or you can simply remove tmp folder too provided there should not be configuration changes happen to the server.

Generally for WebLogic 9.x and higher versions

WIN: C:\bea\user_projects\domains\yourdomain\servers\yourserver\tmp
UNIX: /bea/user_projects/domains/yourdomain/servers/yourserver/tmp
you can use the following commands to clear the cache:

WIN: rd C:\bea\user_projects\domains\yourdomain\servers\yourserver\tmp\
UNIX: rm -rf /bea/user_projects/domains/yourdomain/servers/yourserver/tmp

Here I am removing all the subdirectories and files in the the given directory.

Thread Dump

Thread dump provides a snapshot of the current active live threads. It provides the stack trace of all the java threads in the JVM. It is used when the server is hung and we want to see the threads executing and take their dump.

There are different ways to take thread dump.

1.Command line:  use the below command when you know the port number. just run the same command 3 times in 5 sec intervel of gaps.
kill -3 PID

2.WebLogic.Admin utility:  javaWebLogic.Admin adminurl -username WebLogic -password WebLogic1 THRED_DUMP

3.Admin console:
Step1: login to the admin console
Step2: Click on server
Step3: Navigate to servers
Step4: Click monitor tab
Step5: Click on tread
Step6: Click on the dumpthread stack.

Location of the Thread Dump: 
/DOMAIN_NAME/servers/logs/KK_stdout.log

======================================================

Thread Dump:

What is Thread dump?
When we will take Thread dump? (Scenarios)
How  Many  ways take Thread Dumps
Thread Dump Generating Procedure
What can I Analysis with Thread Dump?
How can I analysis thread dump?
Actions taken for Issue resolving
References


Coming to step by step learning:
--------------------------------

What is Thread dump?

Thread Dump is a textual dump of all active threads and monitors of Java apps running in a Virtual Machine.

When we will take Thread dump? (Scenarios)

1.  Scenario 1: when server is hang Position, i.e. that time server will not respond to coming requests.

2.  Scenario 2: While sever is taking more time to restart

3.  Scenario 3: When we are Getting exception like “java.lang.OutOfMemoryException”

4.  Scenario 4: Process running out of File descriptors. Server cannot accept further requests because sockets cannot be created

5.  Scenario 5: Infinite Looping in the code


How many ways take Thread Dumps?

Many types we have to take a Thread dumps. As per your flexibility you can choose one Procedure. For analyzing take dumps some Intervals (like every 10mins, 10mins etc.).

Node Manager is a WebLogic Server utility that enables you to start, shut down, and restart Administration Server and Managed Server instances from a remote location.

A Node Manager process is not associated with a specific WebLogic domain but with a machine.
You can use the same Node Manager process to control server instances in any WebLogic Server domain, as long as the server instances reside on the same machine as the Node Manager process.
Node Manager must run on each computer that hosts WebLogic Server instances whether Administration Server or Managed Server that you want to control with Node Manager.

WebLogic Server provides two versions of Node Manager, Java-based and script-based, with similar functionality. However, each version has different configuration and security considerations.

Java-based Node Manager
Java-based Node Manager runs within a Java Virtual Machine (JVM) process.
This version of Node Manager determines its configuration from the nodemanager.properties file.
Java-based Node Manager provides more security than the script-based version.


Script-based Node Manager

For UNIX and Linux systems, WebLogic Server provides a script-based version of Node Manager.
This script is based on UNIX shell scripts, but uses SSH for increased security. SSH uses user-id based security
This version does not provide as much security as the Java-based version.
The advantage of the script-based Node Manager is that it can remotely manage servers over a network that has been configured to use SSH. No additional server installation is required. The scripts merely have to be copied to the remote machine.

What You Can Do with Node Manager

Start, Shut Down, and Restart an Administration Server
Start, Shut Down, Suspend, and Restart Managed Servers
Monitor Servers and View Log Data

Starting Java-based Node Manager
Start scripts for Node Manager are installed in the WL_HOME\server\bin directory, where WL_HOME is the top-level installation directory for WebLogic Server.
Use startNodeManager.cmd on Windows systems and startNodeManager.sh on UNIX systems.
The scripts set the required environment variables and start Node Manager in WL_HOME/common/nodemanager. Node Manager uses this directory as a working directory for output and log files.

Important Node Manager Configuration Files
nodemanager.properties
This is the configuration file used by the Java-based version of Node Manager.
This file is located in WL_HOME/common/nodemanager.
nodemanager.hosts
This file contains a list of all the trusted hosts that can issue commands to Node Manager.
This file is located in WL_HOME/common/nodemanager.
nodemanager.domains
This file contains mappings between the names of domains managed by Node Manager and their corresponding directories.
This file is located in WL_HOME/common/nodemanager.
nm_data.properties
This file stores the encryption data the Node Manager uses a symmetric encryption key. The data is stored in encrypted form.
This file is located in WL_HOME/common/nodemanager.
nm_password.properties
This file stores a username/password pair specific to the Node Manager server that is managing this domain. This is known as the Node Manager secret. The username and password are appended to a salt value (obtained from the SerializedSystemIni.dat of the domain) and SHA-hashed.
This file is located in DOMAIN_HOME/config/nodemanager.
boot.properties
Node Manager uses this file to specify a boot identity when starting a server. This file is located in domain-name/servers/server_name/data/nodemanager.
startup.properties
Each Managed Server instance has its own startup.properties file with properties that control how Node Manager starts up and controls the server. Node Manager automatically creates this file by using properties passed to Node Manager when the Administrative Server was last used to start the server. This allows a Node Manager client or startup scripts to restart a Managed Server using the same properties last used by the Administrative Server.
These properties correspond to the server startup attributes contained in ServerStartMBean and the health monitoring attributes in ServerStartMBean.
This file is located in domain-name/servers/server_name/data/nodemanager.
server_name.addr
server_name.addr stores the IP address added when a server starts or is migrated. This file is generated after the server IP address is successfully brought online during migration. server_name.addr is deleted when the IP address is brought offline. The server IP address is used to validate remove requests to prevent addresses being erroneously removed while shutting down the server.
This file is located in domain-name/servers/server_name/data/nodemanager.
server_name.lck
server_name.lck is generated by each server and contains an internally used lock ID.
This file is located in domain-name/servers/server_name/data/nodemanager
server_name.pid
server_name.pid is generated by each server and contains the process ID of the server. Node Manager checks the process ID generated by the server during crash recovery.
This file is located in domain-name/servers/server_name/data/nodemanager
server_name.state
server_name.state is generated by the server and contains the server's current state. Node Manager monitors the contents of this file to determine the current state of the server.
Note: Do not delete or alter this file. Without this file Node Manager cannot determine the current state of the server.
This file is located in domain-name/servers/server_name/data/nodemanager.


Q. How to check port number?

Ans:- netstat -na |grep connected (to find the ports connected in Linux box.)

netstat -na |grep listen (to find the listening ports in HP-UX,Solaris)

Q. Check the version of java.

Ans:- [root@h1vm /]# java -version run this command in linux to know the java version.

Oracle WebLogic Server – Startup/Shutdown

Oracle WebLogic Server – Startup/Shutdown


There are two type of WebLogic Server instance in a domain, Administration Server and Managed Server.

—You can start Managed Server without Administration Server with exception for first time. If you are starting Managed Server for first time]then Administration Server should be Up. Managed Server can cache config files locally(in its local config directory) and later Managed Server can start on its own.

— To start Managed Server using script, supply Admin Server protocol, Server Name and Listen Port(check startup command for more information).

—If startup mode of domain is “production” then startup will prompt you for username & password to start services (You can create define username/password in boot.properties file.

—If you create domain and startup mode is “development” then startup will not prompt for username/password as username password are stored in boot identity file in security directory of Domain at BEA_HOME / user_projects / domains / <domainName> / servers/ <serverName>/ security / boot.properties.

Ways to start Administration Serverin Oracle WebLogic

1.Using startup script
2. From Windows Start Menu (windows only)
3. Using “java weblogic.Server” command
4. Using WLST (WebLogic Scripting Tool) and Node Manager
5. Using WLST without Node Manager

Ways to start Managed Serverin Oracle WebLogic

1.Using startup script
2. Using Administration Console
3. Using WLST and Node Manager
4. Using “java weblogic.Server” command

1. Starting Administration Server (startWebLogic.cmd or .sh)
2. Starting Managed Server (startManagedWebLogic.sh or .cmd)

A. To Start WebLogic Administration Server Instance.
=======================================

Go to domain for which you wish to start Administration Server

cd $BEA_HOME/user_projects/domains/<domain_name>/bin

startWebLogic.cmd (for Windows)
startWebLogic.sh (for Unix)

confirm that WebLogic Adminstration Server started properly by looking at message “Service started RUNNING mode“. Log file in below picture shows that AdminSever is listening on Port 7001 and all IP addresses on specific machine.

Startup/Shutdown Log file can be found at $BEA_HOME/ user_projects/ domains/ <domain_name> /servers/<ServerName> /logs / <ServerName>.log

B. Start Managed Server Instance.
=========================

If you created Managed Server while creating domain then you can start Managed Server using startManagedWebLogic command

$BEA_HOME/user_projects/domains/<domain_name>/bin

startManagedWebLogic.cmd <managed_server_name> <admin_url> (for Windows)
startManagedWebLogic.sh  <managed_server_name> <admin_url> (for Unix)

I created Managed Server MS1 with Admin Port as 7003
startManagedWebLogic.cmd ms1 http://localhost:7003 (Windows)



What is Weblogic Cluster ?


A WebLogic Server cluster consists of multiple webLogic server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single webLogic server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster’s capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of WebLogic Server.

Cluster is a logical set of multiple Weblogic Server instances running simultaneously across different geographies and working together to achieve  high availability and scalability.
Weblogic Server clusters support multiple algorithms for load balancing and failover: round-robin, weight-based, random, round-robin-affinity, weight-based-affinity, and random-affinity(By default, a Weblogic Server cluster will use the round-robin method)

What is Horizontal and vertical clustering?
There are two method of clustering Horizontal and Vertical.

Horizontal clustering :
involves running multiple Java application servers that are run on two or more separate physical machines. Horizontal scaling is more reliable than vertical scaling, since there are multiple machines involved in the cluster environment, as compared to only one machine.

Vertical Clustering:
however, consists of multiple java applications servers on a single physical machine.
with vertical scaling, the machine's processing power, cpu usage, JVM heap memory configurations are the main factors in deciding how many servers instances should be run on one machine.

Horizontal. Because if one physical machine failed it will runs on other physical machine.

What is the difference between a JNDI and a datasource?


* JNDI (Java Naming and Directory Interface) is a naming service used to locate objects in datasources, JMS, MailSessions etc.

* Datasource is an object used to access the connections in the pool.

* JNDI physically connects to the database where as the datasource is a logical resource.