Monday, October 30, 2017

Reset the AdminServer Password in WebLogic 11g and 12c

Reset the AdminServer Password in WebLogic 11g and 12c

If you forget the AdminServer password for your WebLogic 11g domain, you can reset it from the command line using the following process.
  • Set up the following environment variables. They are not necessary for the process itself, but will help you navigate. In this case my domain is called "ClassicDomain". Remember to change the value to match your domain.
    export MW_HOME=/u01/app/oracle/middleware
    export DOMAIN_HOME=$MW_HOME/user_projects/domains/ClassicDomain
  • Shut down the WebLogic domain.
    $ $DOMAIN_HOME/bin/stopWebLogic.sh
  • Rename the data folder.
    $ mv $DOMAIN_HOME/servers/AdminServer/data $DOMAIN_HOME/servers/AdminServer/data-old
  • Set the environment variables.
    $ . $DOMAIN_HOME/bin/setDomainEnv.sh
  • Reset the password using the following command. Remember to substitute the appropriate username and password.
    $ cd $DOMAIN_HOME/security
    $ java weblogic.security.utils.AdminAccount <username> <password> .
  • Update the "$DOMAIN_HOME/servers/AdminServer/security/boot.properties" file with the new username and password. The file format is shown below.
    username=<username>
    password=<password>
  • Start the WebLogic domain.
    $ $DOMAIN_HOME/bin/startWebLogic.sh
For more information see:

Wednesday, October 11, 2017

sqlplus "/as sysdba" ORA-01017: invalid username/password; logon denied

sqlplus /as sysdba

ORA-01017: invalid username/password; logon denied
[root@ORACLE ~]# su - oracle
[oracle@ORACLE ~]$ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=oracle entries=10 force=y
[oracle@ORACLE ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
[oracle@ORACLE ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Dec 1 15:59:37 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys / as sysdba
Enter password: (oracle)
Connected to an idle instance.
USER is "SYS"
SQL>

Friday, October 6, 2017

OPATCH_JAVA_ERROR=OPatch Exception: Patch "22288381" has a minimum OPatch version "11.1.0.9.0" greater than the current OPatch version. Please go to My Oracle Support and get latest OPatch.

Weblogic Patch Issue 22288381

 OPATCH_JAVA_ERROR=OPatch Exception: Patch "22288381" has a minimum OPatch version "11.1.0.9.0" 

greater than the current OPatch version.

 Please go to My Oracle Support and get latest OPatch.


Applying patch i got a error .

 Patch "22288381" has a minimum OPatch version "11.1.0.9.0" greater than the current OPatch version



It seems OPatch failed because of Inventory problem. Validate the OUI inventory with the following commands:
  
   $ opatch lsinventory  -jre $ORACLE_HOME/jdk/jre

Exit the session and try 

From the session where you are running opatch apply,

1) Did you export the ORACLE_HOME & the PATH.

ORACLE_HOME by default points to the 10.1.2 Home.

As this Patch is on top of FMW webtier. The Oracle Home for webtier should be exported.

Example:
Assuming my FMW Webtier is /u01/apps/fs1/FMW_Home/webtier

export ORACLE_HOME=/u01/apps/fs1/FMW_Home/webtier
export PATH=$ORACLE_HOME:$ORACLE_HOME/OPatch:$PATH:.
opatch  lsinventory  -jre $ORACLE_HOME/jdk/jre

Try above and check !!!
 opatch apply 22288381 

It worked for me opatch applied successfully 

Wednesday, October 4, 2017

ADOP PATCHING

ADOP PATCHING 


ADOP PHASES 
--------------------

prepare       : Prepare the instance for online patching.
apply         : Apply patch(es) to the Patch Edition.  
finalize      : Ready the instance for cutover.  
abort         : Abort the patching cycle.  
cutover       : Promote the Patch Edition to Run Edition.   
cleanup       : Drop obsolete objects and seed data from Old Editions.
actualize_all : Actualize all objects in the Patch Edition.   
cleanup_full  : Cleanup and drop Old Editions.   
abandon       : yes|no - Abandon failed patches.


ADOP PATCH LOG DIRECTORY
-----------------------

<INSTALL BASE>/fs_ne/EBSapps/log/adop
ADOP PATCH PROCESS CYCLE STEPS
------------------------------
Download any required technology patches and unzip the contents.
 The patch contents may be unzipped into  $NE_BASE/EBSapps/patch.

1. Prepare the system for patching. 

   source <EBS_ROOT>/EBSapps.env run

   $ adop phase=prepare 

2. Apply technology patches to the Oracle Home under the Patch f/s 
using the information below. 

   source <EBS_ROOT>/EBSapps.env patch 

3. Apply any Oracle E-Business Suite patches planned for this patching cycle 

   $ adop phase=apply patches=<patch_list> 

4. After all patches have been successfully applied, complete the patching cycle. 

   $ adop phase=finalize 
   $ adop phase=cutover 

Note: Below steps can be done when applications are up and running 

5. source <EBS_ROOT>/EBSapps.env run 
   
   $ adop phase=cleanup

6. To complete the process and synchronize the technology level between patch 
and run f/s. 

   $ adop phase=fs_clone

Adop hotpatch steps (we cannot abort hotpatch and abondon cannot be done):
Hotpatch which can apply directly on run fs

$ adop phase=apply patches=<patch_list> hotpatch=yes

After hotpatch please run phase=cleanup and phase=fs_clone 
to sync the run fs with patch fs to prepare for next patching cycle





Wednesday, September 13, 2017

How to change the Oracle EBusiness Suite url

How to change the Oracle EBusiness Suite url 


Normally while you install oracle R12 it takes the hostname as url name. So, you can access the oracle apps instance as http://:/OA_HTML/AppsLogin

An example is http://machinename.domainname:8000/OA_HTML/AppsLogin

The following article will explain you how you can change the url to other name instead of hostname of the machine.

Here I am assuming the hostname of the server is HOSTNAME and currently the instance is accesible  from http://HOSTNAME.domainname:8000/OA_HTML/AppsLogin 
and we'll change the url to 
http://URLNAME.domainname:8000/OA_HTML/AppsLogin 




  • Set the apps environment file. 
  • Check the CONTEXT_FILE name
  • Take a backup of the context file


Now change the following values in context file accordingly .


1. s_webentryhost

This is the name of the host that receives the first HTTP request from the desktop client. Previously it was set as hostname of the server [HOSTNAME]. Change this value to URLNAME.



2. s_webentrydomain

This is domain name of the host that receives the first HTTP request from the desktop client
Change the domain name if required.


3. s_login_page

This is the URL used to access the Applications logon page.
Change it from the old value http://HOSTNAME.domainname:8000/OA_HTML/AppsLogin  to new value http://URLNAME.domainname:8000/OA_HTML/AppsLogin .



4. s_external_url

This is URL that third party tools use to connect to the E-Business Suite System. 
old value = http://HOSTNAME.domainname:8000/
new value = http://URLNAME.domainname:8000/



After changing the values, do the following.

  • Run the AutoConfig utility on all the application tier Servers
  • Restart application server processes
  • Test sign on from the web entry point

Friday, September 8, 2017

Resize Operation Completed For File#

Resize Operation Completed For File# (Doc ID 1982901.1)
---------------------------------------------------------------------

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 13-Jun-2016***

SYMPTOMS

File Extension Messages are seen in alert log.There was no explicit file resize DDL as well.
Resize operation completed for file# 45, old size 26M, new size 28M
Resize operation completed for file# 45, old size 28M, new size 30M
Resize operation completed for file# 45, old size 30M, new size 32M
Resize operation completed for file# 36, old size 24M, new size 26M
In a busy system with lots of DML (insert/update/delete),the alert log could be flooded with many such file extension messages.

CAUSE

These file extension messages were result of diagnostic enhancement through unpublished to record automatic datafile resize operations in the alert log with a message of the form:
 "File NN has auto extended from x bytes to y bytes"
This can be useful when diagnosing problems which may be impacted by a file resize. 

SOLUTION

In busy systems, the alert log could be completely flooded with file extension messages. A new Hidden parameter parameter "_disable_file_resize_logging" has been introduced through bug 18603375 to stop these messages getting logged into alert log.
(Unpublished) Bug 18603375 - EXCESSIVE FILE EXTENSION MESSAGE IN ALERT LOG 
Set the below parameter along with the fix.
SQL> alter system set "_disable_file_resize_logging"=TRUE ; (Its default value is FALSE)
The bug fix 18603375 is included in 12.1.0.2 onwards.

Wednesday, August 30, 2017

ORA-39181: Only partial table data may be exported due to fine grain access control

ORA-39181: Only partial table data may be exported due to fine grain access control





ORA-39181: Only partial table data may be exported due to fine grain access control on “”.”WORKFLOW_ACTION_PARAM”
. . exported “******”.”WORKFLOW_ACTION_PARAM” 0 KB 0 rows
ORA-39181: Only partial table data may be exported due to fine grain access control on “******”.”WORKING_LIST”

I tried expdp as system user.It seems system user is not able to export full data of these tables due to vpd policies enabled (FGAC).
We can check that  in dba_policies
select object_name from dba_policies where object_owner=’OWNER_NAME’;
Solution :
In order to avoid this error,we have to grant EXEMPT ACCESS POLICY to the exporting user(in our case user:system) and restart export.Database users granted the EXEMPT ACCESS POLICY privilege, either directly or through a database role, are exempt from VPD enforcements.

grant EXEMPT ACCESS POLICY to SYSTEM;
EXEMPT ACCESS POLICY is a very powerful privilege and should be carefully managed.so once we are done with export,just revoke it.

revoke EXEMPT ACCESS POLICY  from system;

Sunday, August 13, 2017

Useful scripts for Concurrent Managers

Useful scripts for Concurrent Managers



Thursday, August 10, 2017

Oracle apps R12 : Login Page is blank

Oracle apps R12 : Login Page is blank

Issue:

While launching URL getting the login page as Blank.

Solution:

Note from oracle metalink:1491845.1

Compile the jsp's manually using the below command,

Login to the apps server and execute below

$perl $FND_TOP/patch/115/bin/ojspCompile.pl --compile --flush -p 2

--> Check whether all the jsp's are getting compiled successfully

--> Restart the application services and 

--> Clear the browser cache

Wednesday, August 9, 2017

R12: Concurrent Manager Status


Very nice script to check status concurrent manager status

Taken from http://applicationsdba.blogspot.com/
DBA's can make use of in sql prompt to check the concurrent manager's statuses with out going to GUI.

Run the Below Code in sqlplus as APPS account. 
set verify off
set lines 256
set trims ON
set pages 60
col concurrent_queue_id format 99999 heading "QUEUE Id"
col concurrent_queue_name format a20 trunc heading "QUEUE Code"
col user_concurrent_queue_name format a30 trunc heading "Concurrent Queue Name"
col max_processes format 999 heading "Max"
col running_processes format 999 heading "Act"
col running format 999 heading "Run"
col target_node format a15 heading "Node"
col status format a12 trunc heading "Status"
col run format 9999 heading 'Run'
col pend format 9999 heading 'Pending'
col cmgr_program FOR a65;
SELECT 'Instance : '
    ||NAME instance_name
FROM   v$database;

Prompt ===========================
Prompt concurrent manager status
Prompt ===========================
SELECT q.concurrent_queue_id,
      q.concurrent_queue_name,
      q.user_concurrent_queue_name,
      q.target_node,
      q.max_processes,
      q.running_processes,
      running.run                               running,
      pending.pend,
      Decode(q.control_code, 'D', 'Deactivating',
                             'E', 'Deactivated',
                             'N', 'Node unavai',
                             'A', 'Activating',
                             'X', 'Terminated',
                             'T', 'Terminating',
                             'V', 'Verifying',
                             'O', 'Suspending',
                             'P', 'Suspended',
                             'Q', 'Resuming',
                             'R', 'Restarting') status
FROM   (SELECT concurrent_queue_name,
              COUNT(phase_code) run
       FROM   fnd_concurrent_worker_requests
       WHERE  phase_code = 'R'
              AND hold_flag != 'Y'
              AND requested_start_date <= SYSDATE
       GROUP  BY concurrent_queue_name) running,
      (SELECT concurrent_queue_name,
              COUNT(phase_code) pend
       FROM   fnd_concurrent_worker_requests
       WHERE  phase_code = 'P'
              AND hold_flag != 'Y'
              AND requested_start_date <= SYSDATE
       GROUP  BY concurrent_queue_name) pending,
      apps.fnd_concurrent_queues_vl q
WHERE  q.concurrent_queue_name = running.concurrent_queue_name(+)
      AND q.concurrent_queue_name = pending.concurrent_queue_name(+)
      AND q.enabled_flag = 'Y'
ORDER  BY Decode(q.application_id, 0, Decode(q.concurrent_queue_id, 1, 1,4, 2)),
         Sign(q.max_processes) DESC,
         q.concurrent_queue_name,
         q.application_id;


             



    This is as equivalent as Concurrent -> Manager -> Administer in forms GUI.