Thursday, September 24, 2015

unable to extend index DEV_MDS.MDS_ATTRIBUTES_U2 by 1024 in tablespace DEV_MDS

This issue sometimes appear while installing AIA

To resolve this we need to extend the datafile associated to the tabelspace

Identify the existing datafile location

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/opt/app/oracle/oradata/fmw12c/system01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_mds.dbf
/opt/app/oracle/oradata/fmw12c/sysaux01.dbf
/opt/app/oracle/oradata/fmw12c/undotbs01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_iassdpm.dbf
/opt/app/oracle/oradata/fmw12c/users01.dbf
/opt/app/oracle/oradata/fmw12c/DEV_soainfra.dbf
/opt/app/oracle/oradata/fmw12c/DEV_orabam.dbf
/opt/app/oracle/oradata/fmw12c/DEV_odi_user.dbf

9 rows selected.

Identify the tables spaces

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
DEV_IAS_ORASDPM
DEV_MDS
DEV_SOAINFRA
DEV_IAS_TEMP
DEV_ORABAM
DEV_ODI_TEMP

TABLESPACE_NAME
------------------------------
DEV_ODI_USER

12 rows selected

Alter the tablespace having space issue as follows

SQL> alter tablespace DEV_MDS add datafile '/opt/app/oracle/oradata/fmw12c/DEV_mds01.dbf' size 1024m;

Tablespace altered.

How to delete/remove an existing weblogic domain

To remove the domain named "base_domain" , do the following steps:

Stop the processes associated with the domain.

Remove the relevant domain entry from the "$MW_HOME/domain-registry.xml" file.

<?xml version="1.0" encoding="UTF-8"?>
<domain-registry xmlns="http://xmlns.oracle.com/weblogic/domain-registry">
  <domain location="/u01/app/oracle/middleware/user_projects/domains/base_domain"/>
</domain-registry>

Remove the relevant domain entry from the "$WLS_HOME/common/nodemanager/nodemanager.domains" file.

#Domains and directories created by Configuration Wizard
base_domain=/u01/app/oracle/middleware/user_projects/domains/base_domain

Delete the "base_domain" application and domain directories.
$ rm -Rf $MW_HOME/user_projects/applications/base_domain
$ rm -Rf $MW_HOME/user_projects/domains/base_domain

Monday, September 21, 2015

How to apply middleware patch using opatch utiltiy

1. Download the patch
2. If it is a .zip file unzip it
3. on the terminal/putty navigate to the root directory of the extracted content
4.Set the path variable

    In Linux, the path variable can be set as follows

export PATH=$ORACLE_HOME/OPatch;$PATH

for e.g for SOA patches

            export PATH=/opt/app/oracle/Middleware/Oracle_SOA1/OPatch:$PATH

for e.g for AIA  patches

               export PATH=/opt/app/oracle/Middleware/AIAHome/OPatch:$PATH

5. run the following command( please note the command is case sensitive)

   opatch apply  -invPtrLoc <path to SOA/AIA oraInstl.loc> -oh <path to SOA/AIA Home> -jre <jre location>


for e.g for AIA patches

  opatch apply -invPtrLoc /opt/app/oracle/Middleware/AIAHome/oraInst.loc -oh /opt/app/oracle/Middleware/AIAHome -jre /opt/app/java/jdk1.7.0_79/jre


Sample Execution:
------------------------------------------------------------------
[oracle@fmw12c 17553612]$ opatch apply -invPtrLoc /opt/app/oracle/Middleware/AIAHome/oraInst.loc -oh /opt/app/oracle/Middleware/AIAHome -jre /opt/app/java/jdk1.7.0_79/jre
Oracle Interim Patch Installer version 11.1.0.9.9
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/app/oracle/Middleware/AIAHome
Central Inventory : /opt/app/oraInventory
   from           : /opt/app/oracle/Middleware/AIAHome/oraInst.loc
OPatch version    : 11.1.0.9.9
OUI version       : 11.1.0.9.0
Log file location : /opt/app/oracle/Middleware/AIAHome/cfgtoollogs/opatch/17553612_Sep_22_2015_14_01_16/apply2015-09-22_14-01-16PM_1.log


OPatch detects the Middleware Home as "/opt/app/oracle/Middleware"

Applying patch set update 17553612 to /opt/app/oracle/Middleware/AIAHome
Applying interim patch '17553612' to OH '/opt/app/oracle/Middleware/AIAHome'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.aia.top, 11.1.1.7.0...
ApplySession adding Patch Set Update '17553612' to inventory

Verifying the update...
Patch 17553612 successfully applied
Log file location: /opt/app/oracle/Middleware/AIAHome/cfgtoollogs/opatch/17553612_Sep_22_2015_14_01_16/apply2015-09-22_14-01-16PM_1.log

OPatch succeeded.

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

 

How to setup Node Manager for Weblogic on Linux

To Setup Node Manager follow the below steps

1. Start Admin Server
2. logon to console and goto machines
3.Click on the unix machine and verify the node name and status of it. At this point it will be in inactive state

4. Goto  WLS_HOME/server/bin

     Execute the command  ./startNodeManager.sh

5. Once the node manager is started, it will create a nodemanager.properties file under  WLS_HOME/common/nodemanager

6. Open the nodemanager.properties file using vi editor and change the value for   StartScriptEnabled from false to true .

StartScriptEnabled=true


Save the file

7.Now once again start node manager ( kill the previous instance of node manager)

8. Goto WLS_HOME/common/bin

  Start the wlst interpreter by executing ./wlst.sh

9. Now from the wlst console try to connect to the admin server

wls:/offline> connect('weblogic','weblogic1','t3://localhost:7001')
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.

10. Now enroll the node manager to the domain

nmEnroll('/opt/app/oracle/Middleware/user_projects/domains/base_domain','/opt/app/oracle/Middleware/wlserver_10.3/common/nodemanager')

wls:/base_domain/serverConfig> nmEnroll('/opt/app/oracle/Middleware/user_projects/domains/base_domain','/opt/app/oracle/Middleware/wlserver_10.3/common/nodemanager')
Enrolling this machine with the domain directory at /opt/app/oracle/Middleware/user_projects/domains/base_domain ...
Successfully enrolled this machine with the domain directory at /opt/app/oracle/Middleware/user_projects/domains/base_domain.
wls:/base_domain/serverConfig>

11. Now copy the classpath entry which is visible when you start the node manger on the terminal. Then goto admin console, select the managed server. goto startup tab.
In the classpath field past the copied classpath value from the node manager startup window.

12. Now try to start the manged server from the admin console


Friday, September 11, 2015

Illegalstateexception applications is not readable while starting weblogic managed server

This issue comes if the user trying to start the server is not the owner of soa_server1

To fix login as root user

start the managed server as usual

./runManagedServer.sh soa_server1 http://localhost:7001

Thursday, September 10, 2015

ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file

Sometimes while trying to start oracle database the following errors may happen

ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file

This could be due to the invalid value for the ORACLE_SID environment value

To verify the valid value for SID execute the following command

cat /etc/oratab


[oracle@fmw12c ~]$ cat /etc/oratab
#

# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
fmw12c:/opt/app/oracle/db/product/12.1.0/dbhome_1:N

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

At the end of the file the valid SIDs will be visible as shown above.

Now set the ORACLE_SID to any of the valid value from the above file

\[oracle@fmw12c ~]$ export ORACLE_SID=fmw12c

After this logon to sqlplus as sysdba

Then execute startup

SQL> startup

How to increase the disk size for the .vmdk files for oracle VM

To increase the size of .vmdk file, first convert it to .vdi format and then resize.


C:\Installed\Oracle\VirtualBox>VboxManage clonehd "C:\VirtualBox
VMs\FMW12c_Training\OracleLinux_6.6-disk1.vmdk" "C:\VirtualBox VM
s\FMW12c_Training\cloned.vdi" --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 101956ff-cd49-46e7-aeb1-26e2ecf12a7c


C:\Installed\Oracle\VirtualBox>VboxManage modifyhd "C:\VirtualBox
 VMs\FMW12c_Training\cloned.vdi" --resize 46080
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

C:\Installed\Oracle\VirtualBox>VboxManage clonehd "C:\VirtualBox
VMs\FMW12c_Training\OracleLinux_6.6-disk2.vmdk" "C:\VirtualBox VM
s\FMW12c_Training\cloned2.vdi" --format vdi
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone medium created in format 'vdi'. UUID: 30b2ff1d-bb19-4059-bed6-1c79c85dc3a1


C:\Installed\Oracle\VirtualBox>VboxManage modifyhd "C:VirtualBox
 VMs\FMW12c_Training\cloned2.vdi" --resize 46080
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Once the vdi files have been resized

On the VirtualBox->Settings->Storage

Remove the .vmdk storage and then add .vdi storage created above