Send your questions to appsdbauniverse@gmail.com

Wednesday, November 30, 2016

adstrtal.sh failing with Exception in thread "main" java.lang.NullPointerException


You are running adstrtal.sh version 120.24.12020000.11
Enter the WebLogic Server password:
The logfile for this session is located at /u01/applmgr/fs1/inst/apps/vis1_server1/logs/appl/admin/log/adstrtal.log
Exception in thread "main" java.lang.NullPointerException
        at oracle.apps.ad.autoconfig.ServiceControl$ServiceGroup.administerServiceGroup(ServiceControl.java:2616)
        at oracle.apps.ad.autoconfig.ServiceControl$ServiceGroup.access$000(ServiceControl.java:2264)
        at oracle.apps.ad.autoconfig.ServiceControl.<init>(ServiceControl.java:686)
        at oracle.apps.ad.autoconfig.ServiceControl.main(ServiceControl.java:2161)
adstrtal.sh: Exiting with status 1


** Fixing s_oaeaname, s_oaea_managed_servers with value oaea_server1 and run autoconfig fixes the issue


Before change:
            <oa_service_name oa_var="s_oaeaname" type="managed_server"/>
            <oa_service_status oa_var="s_oaeastatus">enabled</oa_service_status>
            <oa_managed_server_name oa_var="s_oaea_managed_servers"/>


After change:
            <oa_service_name oa_var="s_oaeaname" type="managed_server">oaea_server1</oa_service_name>
            <oa_service_status oa_var="s_oaeastatus">enabled</oa_service_status>
            <oa_managed_server_name oa_var="s_oaea_managed_servers">oaea_server1</oa_managed_server_name>

Workflow Notification mailer failing with Unable to make a connection with the user and responsibility

Status Information
This automatic Service Component has been restarted the maximum of 10 times after stopping with error. Thus, it has been system deactivated -> oracle.apps.fnd.cp.gsc.SvcComponentContainerException: Could not start component; performing rollback -> oracle.apps.fnd.cp.gsc.SvcComponentException: Validation failed for the following parameters -> {FRAMEWORK_USER=Unable to make a connection with the user and responsibility}.


SQL> select user_id,user_name from apps.fnd_user where user_name='SYSADMIN';
USER_ID USER_NAME
---------- -------------
  12345678 SYSADMIN


Someone have updated user_id of SYSADMIN to different value instead of 0. This is not allowed.


SQL> update apps.fnd_user set user_id=0 where user_name='SYSADMIN' and user_id='12345678';


1 row updated.


SQL> commit;


Commit complete.


SQL> select user_id,user_name from fnd_user_bkp where user_id=0;
USER_ID USER_NAME
---------- -------------
         0 SYSADMIN


Restart Workflow Notification mailer.

Friday, March 18, 2016

Do you know how to create a database link without full TNS connect string starting 11g ?


SQL> CREATE DATABASE LINK test
  2  CONNECT TO remoteschema IDENTIFIED BY password
  3  USING 'remoteserver:port/VIS1';
  
Database link created.

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

Wednesday, March 16, 2016

Useful Apache logging:


12.2 E-Business Suite - How To Enable FND: Debug / AF Logging When Login Is Not Possible (Doc ID 1563168.1)
12.2 Ebusiness Suite - Collecting Fusion Middleware Log Files (Doc ID 1362900.1)
Oracle Applications E-Business Suite 12.2 Fusion Middleware Log Files: Locate,View, and Control (Doc ID 1366187.1)
Troubleshooting the Self Service Framework with Oracle Applications (Doc ID 231137.1)
How to Gather HTTP Header Information From a Client PC (Doc ID 815734.1)

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

Wednesday, March 2, 2016

How to check locks on a particular table/object


set lines 400
col Object format a40
col Locker format a6
col Type format a9
SELECT
SESSION_ID "SID",
serial#,
c.status,
c.audsid "ora_sess_id",
OWNER||'.'||OBJECT_NAME "Object",
  ORACLE_USERNAME "Locker",
-- mysessf(lockwait) "Wait",
-- lockwait "Wait",
  DECODE(LOCKED_MODE,
    2, 'ROW SHARE',
    3, 'ROW EXCLUSIVE',
    4, 'SHARE',
    5, 'SHARE ROW EXCLUSIVE',
    6, 'EXCLUSIVE',  'UNKNOWN') "Lockmode",
  OBJECT_TYPE "Type",
  c.ROW_WAIT_ROW#,
  c.inst_id
-- PROGRAM "Program"
FROM
  SYS.gV_$LOCKED_OBJECT A,
  SYS.ALL_OBJECTS B,
  SYS.gV_$SESSION c
WHERE
  A.OBJECT_ID = B.OBJECT_ID AND
  C.SID = A.SESSION_ID
  and object_name in ('&object_name')
ORDER BY 1 ASC, 5 Desc
/

Provide table_name or object_name in question to check the locks on it. 

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

How to check progress of a long running job


For example:
Let say you are trying to rebuild a table ML_SYSTEM_ITEMS_B with move command

alter table INV.ML_SYSTEM_ITEMS_B move;

This session keep on running and you want to check the status.

select target, opname, totalwork, sofar,units, (sofar/totalwork)*100 PERCENTAGE,elapsed_seconds from v$session_longops where target like '%MTL%SYSTEM%' and totalwork <> sofar;

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

Tuesday, February 23, 2016

Comprehensive list of frequently-asked questions and answers about the Online Patching capability introduced with Oracle E-Business Suite Release 12.2.


Oracle E-Business Suite Release 12.2: Online Patching FAQ (Doc ID 1583902.1)

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

Here is the one place where you can get all 12.2 latest documentation.


Useful 12.2 Documents (Doc ID 1585889.1)

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

Monday, February 22, 2016

How to connect to database using jdbc connect string directly


$ sqlplus apps/apps@VISdbnode1:1521/VIS1

SQL*Plus: Release 10.1.0.5.0 - Production on Mon Feb 22 22:22:08 2016

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


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

SQL> 

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

In 12.2, adautocfg.sh fails with ORA-20001: Node name visnode1 not found in adop repository tables


Script Name    : txkGenADOPWrapper.pl
Script Version : 120.0.12020000.2
ERROR DESCRIPTION:
(*******FATAL ERROR*******
PROGRAM : (/erp/applmgr/fs1/inst/apps/vis1_visnode1/admin/install/txkGenADOPWrapper.pl)
TIME    : Mon Jan 11 09:11:15 2016
FUNCTION: TXK::SQLPLUS::_doExecute [ Level 3 ]
MESSAGES:
SQLPLUS error: buffer=

SQL*Plus: Release 10.1.0.5.0 - Production on Mon Jan 11 09:11:15 2016

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

SQL> SQL> Connected.    visnode1
SQL> SELECT ad_zd_adop.get_node_type('visnode1') FROM DUAL
       *
ERROR at line 1:
ORA-20001: Node name visnode1 not found in adop repository tables
ORA-06512: at "APPS.AD_ZD_ADOP", line 3055

Background:

As part of application tier configuration, ADOP tables got cleaned with fnd_conc_clone.setup_clean procedure.
exec FND_CONC_CLONE.SETUP_CLEAN;

Following query will result 0 records or no entries of the node 'visnode1'
select * from APPLSYS.ADOP_VALID_NODES;

Solution:

Add entry into APPLSYS.ADOP_VALID_NODES table manually and retry autoconfig.
Get value of DEFAULT_EDITION from DATABASE_PROPERTIES table which is needed to add entry manually in ADOP_VALID_NODES table.

select property_value from database_properties where property_name = 'DEFAULT_EDITION';
Result was - ORA$BASE.  This may change based on your patching cycles. Take whatever value returned by this query.

insert into APPLSYS.ADOP_VALID_NODES values('visnode1','vis1_visnode1','ORA$BASE');
commit;

Rerun autoconfig.


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

Sunday, February 21, 2016

Query to check Debug profile options


set lines 400 pages 400; 
col profile_option_value format a25 
col user_profile_option_name format a50 
col Level format a14 

select user_profile_option_name, 
decode(level_id,10001,'Site', 
10002,'Application', 
10003,'Responsibility', 
10004,'User', 
10005,'Server', 
10006,'Organization', 
10007, 'ServResp', 
level_id) "Level", 
profile_option_value, 
level_value 
from fnd_profile_option_values, fnd_profile_options_vl 
where upper(user_profile_option_name) like upper('%Debug%') 
AND fnd_profile_option_values.profile_option_id = fnd_profile_options_vl.profile_option_id 
order by 2;

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

Query to check history of a particular Concurrent Program


col progname for a50
set lines 400 pages 400

SELECT fcp.user_concurrent_program_name progName, fcr.phase_code,fcr.status_code,
TO_CHAR (actual_Start_date, 'DD-MON-YYYY HH24:MI:SS') StartDate,
TO_CHAR (actual_completion_date, 'DD-MON-YYYY HH24:MI:SS') EndDate,
request_id RequestId,
(SYSDATE - actual_start_date) * 24 * 60 * 60 ETime
FROM apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs_tl fcp,
apps.fnd_user fusr,
gv$session sess
WHERE fcp.concurrent_program_id = fcr.concurrent_program_id
AND fcr.program_application_id = fcp.application_id
AND fcp.language = 'US'
AND fcr.requested_by = fusr.user_id
AND fcr.oracle_session_id = sess.audsid(+)
AND fcp.user_concurrent_program_name like '%&program_name%'
ORDER BY 6 DESC;

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

Query to check SSO related profile options


set lines 400 pages 400
col USER_PROFILE_OPTION_NAME for a60
col PROFILE_OPTION_VALUE for a50
col user_name for a15

select fpot.user_profile_option_name, fpov.profile_option_value,fpov.last_update_date,fu.user_name
from apps.fnd_profile_options fpo, apps.fnd_profile_options_tl fpot, apps.fnd_profile_option_values fpov, apps.fnd_user fu
where fpo.profile_option_id = fpov.profile_option_id
and fpov.level_id=10001
and fpov.last_updated_by=fu.user_id
and fpo.profile_option_name in ('APPS_FRAMEWORK_AGENT','APPS_SSO','APPS_SSO_LDAP_SYNC','APPS_SSO_LOCAL_LOGIN','APPS_SSO_ALLOW_MULTIPLE_ACCOUNTS','APPS_SSO_USER_CREATE_UPDATE','APPS_SSO_LINK_TRUTH_SRC','APPS_SSO_AUTO_LINK_USER','FND_OVERRIDE_SSO_LANG')
and fpo.profile_option_name=fpot.profile_option_name
and fpot.language='US'
order by 1;
========================================================================

Query to check recently updated profile options


SET LINES 400 PAGES 400
col PROFILE_OPTION_NAME for a50
col PROFILE_OPTION_VALUE for a50

select a.PROFILE_OPTION_NAME,b.profile_option_value,to_char(b.last_update_date,'DD-MON-YYYY HH24:MM'),b.LAST_UPDATED_BY,b.level_id 
from apps.fnd_profile_options a, apps.fnd_profile_option_values b 
where a.profile_option_id=b.profile_option_id 
and b.last_update_date > sysdate - 10;

Above query show you profile options updated in last 10 days.

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

Query to display a list of tablespaces and their usage information


SET LINES 400 PAGES 400
COLUMN used_pct FORMAT A11

SELECT tablespace_name,
size_mb,
free_mb,
max_size_mb,
max_free_mb,
TRUNC((max_free_mb/max_size_mb) * 100) AS free_pct,
RPAD(' '|| RPAD('X',ROUND((max_size_mb-max_free_mb)/max_size_mb*10,0), 'X'),11,'-') AS used_pct
FROM (SELECT a.tablespace_name, b.size_mb, a.free_mb, b.max_size_mb, a.free_mb + (b.max_size_mb - b.size_mb) AS max_free_mb
      FROM (SELECT tablespace_name, TRUNC(SUM(bytes)/1024/1024) AS free_mb 
            FROM dba_free_space
            GROUP BY tablespace_name) a,
            (SELECT tablespace_name, TRUNC(SUM(bytes)/1024/1024) AS size_mb, TRUNC(SUM(GREATEST(bytes,maxbytes))/1024/1024) AS max_size_mb
             FROM dba_data_files
             GROUP BY tablespace_name) b
      WHERE  a.tablespace_name = b.tablespace_name)
ORDER BY tablespace_name;

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

Query to check concurrency locks in database


set lines 400 pages 400
col wait_class for a50

SELECT blocking_session, sid, serial#, wait_class, seconds_in_wait, inst_id, status 
FROM gv$session
WHERE blocking_session IS NOT NULL
ORDER BY blocking_session;

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

Query to check session details of a HOST Concurrent request


SELECT a.request_id, d.sid, d.serial#, d.osuser, d.process, b.session_id, c.SPID  
FROM apps.fnd_concurrent_requests a,  
apps.fnd_concurrent_processes b,  
gv$process c,  
gv$session d 
WHERE a.controlling_manager = b.concurrent_process_id  
AND c.pid = b.oracle_process_id  
AND b.session_id=d.audsid  
AND a.request_id = &Request_ID  
AND a.phase_code = 'R';

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

How to check application object version in Oracle Apps database


set long 10000

select text from dba_source where name = '<object_name>' and type='<object_type>' and rownum < 5;

select dbms_metadata.get_ddl('<object_type>', '<object_name>', '<owner>') from dual;

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

Oracle E-Business Suite R12.2 functionality disabled during Online Patching Cycles


During an online patching cycle, the following Oracle E-Business Suite setup actions will not be available:

1) Payroll
Users won't be able to define Fast Formulas or use the Fast Formula Assistant 
Users won't be able to perform dynamic trigger maintenance 
Data Pump meta-mapper generator will be disabled 
The Japanese Balance dimensions Concurrent Program will be deferred to after the OLP Cutover 
Users won't be able to Create/Update/Delete US Cities 
Pension Calculation Setup 
US localization earnings and deduction Setup 
Tax Withholding Rules Setup 
Wage Attachment Earnings Rules Setup 
Garnishment Rules Setup 
Quick Paint Reports 
Quantum Program Update Installer execution 

2) Order Management
Creation of a new Defaulting Condition in the Attribute Defaulting Rules form is disabled unless the same seeded condition already exists for given attribute. 

3) Warehouse Management 
WMS Rule creation is restricted 

4) Inventory
Concurrent program "Generate Stock Locator Flexfield Definition for Mobile Transactions" will be disabled 

5) Public Sector Financials International
Users won't be able to run the following concurrent programs: 
Subledger Security: Apply Security 
Subledger Security: Import/Export Data Fix 

6) Subledger Accounting
Users will not be able to Validate the Application Accounting definitions 

7) Accounts Receivable
Users will not be able to create new Transaction Sources 

8) Incentive Compensation
Transaction collection process for new mappings will not be available and any changed mapping will continue to use previous mapping rules 
Users won't be able to run “Synchronize Classification Rulesets” program 
Users won't be able to use the “Formula Generation” feature 
Users won't be able to specify new formulas or changes to compensation rules during an Online Patching Cycle 

9) Oracle Demand Planning
Demand plans will not be available for users during online patching 

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

12.2 Queries to validate application configuration of Managed servers


Verify Admin Server

select node_name from FND_OAM_CONTEXT_FILES
where NAME not in ('TEMPLATE','METADATA','config.txt') 
and CTX_TYPE='A' and (status is null or upper(status) in ('S','F'))
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type') = 'run'
and EXTRACTVALUE(XMLType(TEXT),'//oa_service_group_status[@oa_var=''s_web_admin_status'']')='enabled'
and EXTRACTVALUE(XMLType(TEXT),'//oa_service_list/oa_service[@type=''admin_server'']/oa_service_status')='enabled';


Verify Managed servers of RUN file system

SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports'),
extractValue(XMLType(TEXT),'//nm_port')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='run'
and CTX_TYPE = 'A';

Verify Managed servers of PATCH file system

SELECT  extractValue(XMLType(TEXT),'//host[@oa_var="s_hostname"]'),
extractValue(XMLType(TEXT),'//oacore_server_ports'),
extractValue(XMLType(TEXT),'//forms_server_ports'),
extractValue(XMLType(TEXT),'//oafm_server_ports'),
extractValue(XMLType(TEXT),'//forms-c4ws_server_ports'),
extractValue(XMLType(TEXT),'//oaea_server_ports'),
extractValue(XMLType(TEXT),'//nm_port')
from fnd_oam_context_files
where name not in ('TEMPLATE','METADATA')
and (status is null or status !='H')
and EXTRACTVALUE(XMLType(TEXT),'//file_edition_type')='patch'
and CTX_TYPE = 'A';

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

How to Attach/Detach homes in 12.2


Attach homes

$FMW_HOME/oracle_common/oui/bin/attachHome.sh
$FMW_HOME/webtier/oui/bin/attachHome.sh
$FMW_HOME/Oracle_EBS-app1/oui/bin/attachHome.sh
$FMW_HOME/Oracle_OAMWebGate1/oui/bin/attachHome.sh
$IAS_ORACLE_HOME/oui/bin/attachHome.sh
$ORACLE_HOME/oui/bin/attachHome.sh

Detach homes

$FMW_HOME/oracle_common/oui/bin/detachHome.sh
$FMW_HOME/webtier/oui/bin/detachHome.sh
$FMW_HOME/Oracle_EBS-app1/oui/bin/detachHome.sh
$FMW_HOME/Oracle_OAMWebGate1/oui/bin/detachHome.sh
$IAS_ORACLE_HOME/oui/bin/detachHome.sh
$ORACLE_HOME/oui/bin/detachHome.sh

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

12.2 ADOP phase=prepare fails with [ERROR] Invalid connect string - cannot connect to database


[ERROR]     Failed to execute sql statement :
      begin
        ad_zd_seed.prepare('FND_PROFILE_OPTION_VALUES');
        ad_zd_seed.prepare('WF_RESOURCES');
        ad_zd_seed.prepare('IBY_BEPINFO');
      end;

[ERROR]     Invalid connect string - cannot connect to database
Invalid Connect string - cannot connect to database
ERROR:
ORA-12521: TNS:listener does not currently know of instance requested in
connect descriptor
Invalid connect string - cannot connect to database
Invalid Connect string - cannot connect to database
ERROR:
ORA-12521: TNS:listener does not currently know of instance requested in
connect descriptor

[UNEXPECTED]Error while runPendingClone sub-routine is called


SOLUTION:

Copy TNS_ADMIN files from RUN edition to PATCH edition
Restart PREPARE phase again

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

Where to find R12.2 log files for Apache, OPMN & Weblogic


Apache Logs

$IAS_ORACLE_HOME/instances/*/diagnostics/logs/OHS/EBS_web_*/*log

OPMN Logs

$IAS_ORACLE_HOME/instances/*/diagnostics/logs/OPMN/opmn/*

Weblogic Logs

$IAS_ORACLE_HOME/../wlserver_10.3/common/nodemanager 
$EBS_DOMAIN_HOME/servers/oa*/logs/*
$EBS_DOMAIN_HOME/servers/forms*/logs/*
$EBS_DOMAIN_HOME/servers/AdminServer/logs/*
$EBS_DOMAIN_HOME/sysman/log/*


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

How to check Weblogic version in 12.2


$ cd $FMW_HOME

$ grep "WebLogic Server" registry.xml

<component name="WebLogic Server" version="10.3.6.0" InstallDir="/erp/applmgr/fs1/FMW_Home/wlserver_10.3">
<component name="WebLogic Server Clients"/>


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

How to check accessgate version in 12.2


$ cd $FMW_HOME/Oracle_EBS-app1/applications/accessgate

$ java -jar fndauth.war

Oracle E-Business Suite AccessGate 1.2.3.5 : Mon Apr 13 10:54:19 UTC 2015


Another method:

strings -a $EBS_DOMAIN_HOME/servers/oaea*/tmp/_WL_user/accessgate/*/war/style/EbusinessAccessGate.class|grep AccessGate

*Oracle_Ebusiness_AccessGate_Copyright_2011
KOracle E-Business Suite AccessGate 1.2.3.5 : Mon Apr 13 10:54:19 UTC 2015
style/EbusinessAccessGate
*Oracle E-Business Suite AccessGate 1.2.3.5
*Oracle_Ebusiness_AccessGate_Copyright_2011
KOracle E-Business Suite AccessGate 1.2.3.5 : Mon Apr 13 10:54:19 UTC 2015
style/EbusinessAccessGate

*Oracle E-Business Suite AccessGate 1.2.3.5

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

How to check OAM webgate version in 12.2


$ cd $FMW_HOME/Oracle_OAMWebGate1/webgate/ohs/config

$ cat np1112_wg.txt

Product: Oracle Access Manager
Component: WebGate
WebServer: OHS11g
Platform: linux64
Locale: en-us
Release: 11.1.2.2.0
Date: 12/20/2013


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

How to monitor long running 12.2 ADOP abort or cleanup sessions progress


Sometimes adop phase=cleanup or abort runs very long and will not show you any progress on the screen.

Use following SQL's to check the session.

select sid,serial#,inst_id,module,to_char(logon_time,'DD-MON-YYYY HH24:MM') from gv$session where module like '%perl%';

select * from apps.ad_zd_logs order by log_sequence desc;


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

Frequent session disconnects due to Apache crashing and getting restarted by OPMN very frequently.


httpd.pid file is under NAS and pid file gets recreated very often due to Apache will be restarted by OPMN.

Tried changing httpd.pid file location to SAN, enabled Apache debug but no luck.

The exact cause of the problem is unknown but is believed to be environmental / unix kernel related.

cd $FMW_HOME/webtier/instances/*OHS1/config/OHS/*

$ grep AcceptMutex httpd.conf
AcceptMutex fcntl
AcceptMutex fcntl

- Take backup of httpd.conf
- Change "AcceptMutex" from fcntl to pthread 
- Restart OPMN & Apache to fix the problem.

cd $ADMIN_SCRIPTS_HOME
adopmnctl.sh stopall
adopmnctl.sh startall

Reference: 562624.1

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

srvctl add database gives PRCR-1006, PRCT-1011 error


As oracle user 

$ srvctl add database -d VIS1 -o $ORACLE_HOME 

PRCR-1006 : Failed to add resource ora.vis1.db for vis1
PRCT-1011 : Failed to run "osdbagrp". Detailed error: null 

$ osdbagrp -a
Memory fault

- Enable detailed SRVM trace as follows.

script /tmp/srvctl_trace.log 
date
export SRVM_TRACE=TRUE 
srvctl add database -d VIS1 -o $ORACLE_HOME 
exit 

cat /tmp/srvctl_trace.log 

[main] [ 2014-12-04 07:44:18.533 EST ] [RuntimeExec.runCommand:192] Returning from RunTimeExec.runCommand 
[main] [ 2014-12-04 07:44:18.534 EST ] [UnixSystem.dorunRemoteExecCmd:3232] retval = 139 
[main] [ 2014-12-04 07:44:18.534 EST ] [CmdToolUtil.doexecute:474] nativeSystem.runRemoteExecCmd failed. Command = /vis1/11.2.0.4/bin/osdbagrp arguments = [-a] env = null error = null 
[main] [ 2014-12-04 07:44:18.535 EST ] [AddAction.executeDatabase:667] removing server group vis1 that was created 
[main] [ 2014-12-04 07:44:18.536 EST ] [CRSNative.internalQueryResources:1577] About to doQueryResources: eType resource, nodeName null, filter ((TYPE == ora.database.type) && (SERVER_POOLS CONTAINS ora.vis1)) 
[main] [ 2014-12-04 07:44:18.565 EST ] [CRSNative.internalQueryResources:1585] found 0 resources 
[main] [ 2014-12-04 07:44:18.565 EST ] [DatabaseFactoryImpl.getDatabases:1145] No database was found hosted by server pool =ora.vis1
[main] [ 2014-12-04 07:44:18.566 EST ] [ServerPoolImpl.remove:1250] The dblist size is 0 
[main] [ 2014-12-04 07:44:18.566 EST ] [CRSNative.unregisterEntity:791] About to unregister: name: ora.vis1, force: false, type: 3 
[main] [ 2014-12-04 07:44:18.626 EST ] [FrameworkException.<init>:72] Set warning status: 2 
PRCR-1006 : Failed to add resource ora.vis1.db for vis1
PRCT-1011 : Failed to run "osdbagrp". Detailed error: null 

- Action plan to fix the above issue:

Copy the "osdbagrp" from the $GI_HOME/bin to the $RDBMS_HOME/bin

1) take a back up of $RDBMS_HOME/bin/osdbagrp 
2) copy $GI_HOME/bin/osdbagrp to $RDBMS_HOME/bin/ 
3) try below command again from RDBMS Home 
   osdbagrp -a  --> this should now result asmadmin instead of Memory fault
4) srvctl add database -d VIS1 -o $ORACLE_HOME <-- this works now.

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

How to make Invalid object from dba_registry table to Valid


SQL> select comp_id,comp_name,status from dba_registry where status='INVALID';

COMP_ID    COMP_NAME                    STATUS
---------- ---------------------------- --------
SDO        Spatial                      INVALID
ORDIM      Oracle Multimedia            INVALID
EXF        Oracle Expression Filter     INVALID


SQL> exec dbms_registry.valid('SDO');

PL/SQL procedure successfully completed.

SQL> exec dbms_registry.valid('ORDIM');

PL/SQL procedure successfully completed.

SQL> exec dbms_registry.valid('EXF');

PL/SQL procedure successfully completed.

SQL> select comp_id,comp_name,status from dba_registry where status='INVALID';

no rows selected

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

How to check Port usage:


lsof -i:<port>

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

Compiling an Object returns ORA-00600: internal error code, arguments: [kqlobjlod-no-result-from-proc$], [1403], [14145284]


SQL> alter package apps.GMD_TECH_PARAMS compile body; 

alter package apps.GMD_TECH_PARAMS compile body 

ERROR at line 1: 
ORA-00600: internal error code, arguments: [kqlobjlod-no-result-from-proc$], [1403], [14145284], [], [], [], [], [], [], [], [], [] 

The error is self explanatory.

1403 - no data found
14145284 - object# from sys.procedure$ table

This happens when utlrp.sql trying to compile an object and DBA killed the session in the database.

SQL> select * from sys.procedure$ where obj# = 14145284;

no rows selected

SQL> select owner, object_name, object_type, status from dba_objects where object_id=14145284;

no rows selected

There is no direct solution for the dictionary table corruption.

Workaround is to insert a record in sys.procedure$ table for the missing object#.

Make sure you have complete backup of your database, atleast the sys.procedure$ table.

SQL> insert into sys.procedure$ values (14145284,'--------------------------------',null,2);

1 row created.

SQL> commit;

Commit complete.

Recompile the object again.

SQL> alter package apps.GMD_TECH_PARAMS compile body;

Package body compiled.


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

Saturday, February 20, 2016

How to flush used memory on Linux


Result before drop_cache command

$ cat /proc/meminfo | grep MemFree

MemFree:        59842804 kB


Run following command as ROOT user

$ sync;echo 3 > /proc/sys/vm/drop_caches


Result after drop_cache command

$ cat /proc/meminfo | grep MemFree
MemFree:        239955544 kB

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

After AD & TXK Delta.7 patching, ADPRECLONE.PL fails with SP2-0640: Not connected


There is already an ACTIVE ADOP CYCLE with session id : SP2-0640: Not connected
adpreclone cannot be run with pending ADOP session

Below is just a WORKAROUND until Oracle releases a solution.

cp $AD_TOP/admin/template/adpreclone.pl $AD_TOP/admin/template/custom

cd $AD_TOP/admin/template/custom

Edit adpreclone.pl and comment below at line # 1056

# bug# 16717511
# validate_adopSessions();

Run autoconfig

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