Thursday 22 November 2018

ORA-28367: wallet does not exist When Opening TDE Wallet


SYMPTOMS

On 11gR1 or 11gR2, when executing "ALTER SYSTEM SET WALLET OPEN IDENTIFIED BY <password>", the following error is observed:


ORA-28367: wallet does not exist
 (On 12c, the "ADMINISTER KEY MANAGEMENT" commands are used instead.)

CAUSE

In the sqlnet.ora, ENCRYPTION_WALLET_LOCATION is formatted incorrectly.  Specifically, there is no indentation; the entry had multiple lines, but no whitespace.  For example:

ENCRYPTION_WALLET_LOCATION=
(SOURCE=
(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/u01/app/oracle/product/11.2.0/network/admin)))


SOLUTION

Modify the sqlnet.ora so that everything is either on one line, or use indentation (whitespace) as follows:

ENCRYPTION_WALLET_LOCATION=
   (SOURCE=
   (METHOD=FILE)
   (METHOD_DATA=
   (DIRECTORY=/u01/app/oracle/product/11.2.0/network/admin)))

Reference : "ORA-28367: wallet does not exist" When Opening TDE Wallet (Doc ID 809763.1)

Export Database Takes Time in 12cR1 (12.1.0.2) - Oracle E-Business Suite Objects

Export Database (expdp) of Oracle E-Business Suite R12.2 takes time while doing Full Table Scan

Solution:


Collect Dictionary Statistics: 

SQL> connect / as sysdba
SQL> exec dbms_stats.gather_dictionary_stats;
SQL> exec dbms_stats.lock_table_stats (null,'X$KCCLH');
SQL> exec dbms_stats.gather_fixed_objects_stats;


Configure stream_pool_size, e.g. set streams_pool_size to a minimum of 256M.
Note that depending on the size of the database and the number of partitions, this value could be greater

For 12.1.0.2 apply the following patch: 


Patch 21554480
This is an merge generic patch available on top of the 12.1.0.2 for 18793246, 20236523, 20548904, 21128593

To obtain a patch from MOS:
1) Click on Patches.
2) Click on Simple Search
3) Enter patch number: 21554480
4) Select yourO/S
5) Click Go.

Try exporting the same database after executing the above steps. The performance will be better than earlier.

Bugs Resolved by This Patch

18793246 BASE OBJECT LOOKUP DURING DATAPUMP EXPORT CAUSES FULL TABLE SCAN PER OBJECT
20236523 DATAPUMP EXPORT SLOW USING CONTENT=METADATA_ONLY
20548904 EXPDP HANG IN METADA_ONLY ON A PARTITION TABLE WITH AROUND 40000 SUBPARTITIONS
21128593 UPDATING THE MASTER TABLE AT THE END OF DP JOB IS SLOW STARTING WITH 12.1.0.2

Oracle E-Business Suite Database Health Check Script

SQL>conn apps/apps
SQL>spool health_check_apps_db_EBS.txt

set pages 1000
set linesize 135
col PROPERTY_NAME for a25
col PROPERTY_VALUE for a15
col DESCRIPTION for a35
col DIRECTORY_PATH for a70
col directory_name for a25
col OWNER for a10
col DB_LINK for a40
col HOST for a20
col "User_Concurrent_Queue_Name" format a50 heading 'Manager'
col "Running_Processes" for 9999 heading 'Running'
set head off
set feedback off
set echo off

break on utl_file_dir

select '--------------------------------------------------------------------------------' from dual;
select '-----------------------     Database Checks    ---------------------------------' from dual;
select '--------------------------------------------------------------------------------' from dual;
Prompt
select '************************ Getting Database Information  *************' from dual ;

select 'Database Name..................... : '||name from v$database;
select 'Database Status................... : '||open_mode from v$database;
select 'Archiving Status.................. : '||log_mode  from v$database;
select 'Global Name....................... : '||global_name from global_name;
select 'Creation Date..................... : '||to_char(created,'DD-MON-YYYY HH24:MI:SS') from v$database;
select 'Checking For Missing File......... : '||count(*) from v$recover_file;
select 'Checking Missing File Name ....... : '||count(*) from v$datafile where name like '%MISS%';
select 'Total SGA ........................ : '||round(sum(value)/(1024*1024))||' MB' from v$sga ;
select 'Database Version.................. : '||version from v$instance;
select 'Temporary Tablespace.............. : '||property_value from database_properties
                                                where property_name like 'default_temp_tablespace';
select 'Apps Temp Tablespace.............. : '||temporary_tablespace from dba_users where username like '%APPS%';
select 'Temp Tablespace size.............. : '||sum(maxbytes/1024/1024/1024)||' GB' from dba_temp_files group by tablespace_name;
select 'No of Invalid Object ............. : '||count(*) from dba_objects where status = 'INVALID' ;
select 'service Name...................... : '||value from v$parameter2 where name='service_names';
select 'plsql code type................... : '||value from v$parameter2 where name='plsql_code_type';
select 'plsql subdir count................ : '||value from v$parameter2 where name='plsql_native_library_subdir_count';
select 'plsql native library dir.......... : '||value from v$parameter2 where name='plsql_native_library_dir';
select 'Shared Pool Size.........,........ : '||(value/1024/1024) ||' MB' from v$parameter where name='shared_pool_size';
select 'Log Buffer........................ : '||(value/1024/1024) ||' MB' from v$parameter where name='log_buffer';
select 'Buffer Cache...................... : '||(value/1024/1024) ||' MB' from v$parameter where name='db_cache_size';
select 'Large Pool Size................... : '||(value/1024/1024) ||' MB' from v$parameter where name='large_pool_size';
select 'Java Pool Size.................... : '||(value/1024/1024) ||' MB' from v$parameter where name='java_pool_size';
select 'utl_file_dir...................... : '||value from v$parameter2 where name='utl_file_dir';
select directory_name||'.................... : '||directory_path from all_directories where rownum  < 15 ;

select '************************ Getting Apps Information *****************' from dual ;

select 'Home URL.......................... : '||home_url from apps.icx_parameters ;
select 'Session Cookie.................... : '||session_cookie from apps.icx_parameters ;
select 'Applicaiton Database ID........... : '||fnd_profile.value('apps_database_id') from dual;
select 'GSM Enabled....................... : '||fnd_profile.value('conc_gsm_enabled') from dual;
select 'Maintainance Mode................. : '||fnd_profile.value('apps_maintenance_mode') from dual;
select 'Site Name......................... : '||fnd_profile.value('Sitename')from dual;
select 'Bug Number........................ : '||bug_number from ad_bugs where bug_number='2728236';

select '************************ Doing Workflow Checks ********************' from dual ;

select 'No Open Notifications............. : '||count(*) from wf_notifications where mail_status in('MAIL','INVALID','OPEN');
select 'Name(wf_systems).................. : '||name from wf_systems;
select 'Display Name(wf_systems).......... : '||display_name from wf_systems;
select 'Address........................... : '||address from wf_agents;
select 'Workflow Mailer Status............ : '||component_status from applsys.fnd_svc_components
                                                where component_name like 'Workflow Notification Mailer';
select 'Test Address...................... : '||b.parameter_value
                                                from fnd_svc_comp_param_vals_v a, fnd_svc_comp_param_vals b
                                                where a.parameter_id=b.parameter_id
                                                and a.parameter_name in ('TEST_ADDRESS');
select 'From Address...................... : '||b.parameter_value
                                                from fnd_svc_comp_param_vals_v a, fnd_svc_comp_param_vals b
                                                where a.parameter_id=b.parameter_id
                                                and a.parameter_name in ('FROM');
select 'WF Admin Role..................... : '||text from wf_resources where name = 'WF_ADMIN_ROLE' and  rownum =1;


Prompt
Prompt Getting Apps Node Info
Prompt ************************
select Node_Name,'........................ : '||server_id from fnd_nodes;
select server_type||'......................: '||name from fnd_app_servers, fnd_nodes
                                                where fnd_app_servers.node_id =fnd_nodes.node_id;

select '************************ Doing Conc Mgr Checks  ********************' from dual ;

Prompt Getting Con Mgr Status
Prompt ************************
Prompt
Prompt Manager Name                                                 Hostname          No of Proc Running
Prompt ~~~~~~~~~~~~                                                 ~~~~~~~~          ~~~~~~~~~~~~~~~~~~
set lines 145
Column Target_Node   Format A12
select User_Concurrent_Queue_Name,'....... : '||Target_Node||' ...... : '||Running_Processes
                                                from fnd_concurrent_queues_vl
                                                where Running_Processes = Max_Processes
                                                and Running_Processes > 0;

Prompt
Prompt Getting Pending Request
Prompt ***********************
--select user_concurrent_program_name||'........ : '||request_id
--                                                  from fnd_concurrent_requests r, fnd_concurrent_programs_vl p, fnd_lookups s, fnd_lookups ph
--                                                  where r.concurrent_program_id = p.concurrent_program_id
--                                                 and r.phase_code = ph.lookup_code
--                                                and ph.lookup_type = 'CP_PHASE_CODE'
--                                               and r.status_code = s.lookup_code
--                                                  and s.lookup_type = 'CP_STATUS_CODE'
--                                                  and ph.meaning ='Pending'
--                                                  and rownum < 10
--                                                  order by to_date(actual_start_date, 'dd-MON-yy hh24:mi');
--

Prompt
Prompt Getting Workflow Components Status
Prompt **********************************

set pagesize 1000
set linesize 125
col COMPONENT_STATUS for a20
col COMPONENT_NAME for a45
col STARTUP_MODE for a12

select fsc.COMPONENT_NAME,
fsc.STARTUP_MODE,
fsc.COMPONENT_STATUS,
fcq.MAX_PROCESSES TARGET,
fcq.RUNNING_PROCESSES ACTUAL
from APPS.FND_CONCURRENT_QUEUES_VL fcq, APPS.FND_CP_SERVICES fcs,
APPS.FND_CONCURRENT_PROCESSES fcp, fnd_svc_components fsc
where fcq.MANAGER_TYPE = fcs.SERVICE_ID
and fcs.SERVICE_HANDLE = 'FNDCPGSC'
and fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
and fcq.concurrent_queue_id = fcp.concurrent_queue_id(+)
and fcq.application_id = fcp.queue_application_id(+)
and fcp.process_status_code(+) = 'A'
order by fcp.OS_PROCESS_ID, fsc.STARTUP_MODE;

select '--------------------------------------------------------------------------------' from dual;
select '-----------------------     End Of Database Checks  ----------------------------' from dual;
select '--------------------------------------------------------------------------------' from dual;

SQL>spool off

Tuesday 10 July 2018

Relinking of ad module “adwrknew” failed while applying patch 9239089

Relink failed with below error while applying patch 9239089 as part of oracle applications upgrade from 12.1.1 to 12.1.3


make: *** [/u01/applmgr/PROD/apps/apps_st/appl/ad/12.0.0/bin/adwrknew] Error 1
Done with link of ad executable 'adwrknew' on Sat Sep 16 23:00:50 IST 2017

Relink of module "adwrknew" failed.
See error messages above (also recorded in log file) for possible
reasons for the failure.  Also, please check that the Unix userid
running adrelink has read, write, and execute permissions
on the directory /u01/applmgr/PROD/apps/apps_st/appl/ad/12.0.0/bin,
and that there is sufficient space remaining on the disk partition
containing your Oracle Applications installation.
Done with link of product 'ad' on Sat Sep 16 23:00:50 IST 2017
adrelink is exiting with status 1
End of adrelink session
Date/time is  Sat Sep 16 23:00:50 IST 2017
**********************************************************

You are running adrelink, version 120.43.12010000.6

Solution: Download patch 12415211 and perform below steps.


[applmgr@localhost ~]$ cd $ORACLE_HOME/lib
[applmgr@localhost lib]$ pwd
/u01/applmgr/PROD/apps/tech_st/10.1.2/lib
[applmgr@localhost lib]$ cp -p -R stubs stubsORIG
[applmgr@localhost lib]$ cd stubs
[applmgr@localhost stubs]$ cp /u02/Softwares/apps_R12_Linux_x86_64/12.1.3/12415211/files/lib/stubs/libgcc_s-2.3.2-stub.so .
[applmgr@localhost stubs]$ ln -s libgcc_s-2.3.2-stub.so libgcc_s.so.1
[applmgr@localhost stubs]$ ln -s libgcc_s.so.1 libgcc_s.so

[applmgr@localhost stubs]$ pwd
/u01/applmgr/PROD/apps/tech_st/10.1.2/lib/stubs
 [applmgr@localhost stubs]$ cd ../../../10.1.3/
[applmgr@localhost 10.1.3]$ cd lib/
[applmgr@localhost lib]$ cp -p -R stubs stubsORIG
[applmgr@localhost lib]$ cd stubs
[applmgr@localhost stubs]$ cp /u02/Softwares/apps_R12_Linux_x86_64/12.1.3/12415211/files/lib/stubs/libgcc_s-2.3.2-stub.so .
[applmgr@localhost stubs]$  ln -s libgcc_s-2.3.2-stub.so libgcc_s.so.1
[applmgr@localhost stubs]$  ln -s libgcc_s.so.1 libgcc_s.so

Restart the failed patch 9239089


Wednesday 4 July 2018

How to enable Flashback in oracle database 11g

Flashback in Oracle Database

Flashback technology is a set of features in Oracle database that make your work easier to view past states of data or to move your database objects to a previous state without using point in time media recovery.

View past states of data or move database objects to previous state means you have performed some operations like  DML + COMMIT and now you want to rollback that operation, this can be done easily through FLASHBACK technology without using point in time media recovery.

How to enable FLASHBACK in Oracle Database 11G R1 and below versions


1. Database has to be in ARCHIVELOG mode.

     To change ARCHIVE mode refer to -- Change ARCHIVE mode of database

2. Flash Recovery Area has to be configured. To configure PFB steps :-

SQL> show parameter db_recovery_file_dest

NAME                                  TYPE           VALUE
------------------------------------       ----------- -       -----------------------------
db_recovery_file_dest             string
db_recovery_file_dest_size     big integer     0

Currently flashback is disabled. To enable :-

A. Set db_recovery_file_dest_size initialization parameter.

SQL> alter system set db_recovery_file_dest_size=2g;

System altered.

B. After db_recovery_file_dest_size parameeter has been set, create a location in OS where your FLASHBACK logs will be stored.

bash-3.2$ cd /u01
bash-3.2$ mkdir FLASHBACK
bash-3.2$ pwd
/u01/FLASHBACK

C. Now set db_recovery_file_dest initialization parameter.

SQL> alter system set db_recovery_file_dest='/u01/FLASHBACK';    ======For Standalone database========
System altered.

SQL> alter system set db_recovery_file_dest='/u01/FLASHBACK' sid='*';    =======For RAC database=======

System altered.

SQL> show parameter db_recovery

NAME                                 TYPE           VALUE
------------------------------------      -----------         ------------------------------
db_recovery_file_dest            string           /u01/FLASHBACK
db_recovery_file_dest_size     big integer    2G

3. Create an Undo Tablespace with enough space to keep data for flashback operations. More often users update the database more space is required.

4. By default automatic Undo Management is enabled, if not enable it. In 10g release 2 or later default value of UNDO management is AUTO. If you are using lower release then PFB to enable it:-

SQL> alter system set undo_management=auto scope=spfile;

System altered

5. Shut Down your database

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down

6. Startup your database in MOUNT mode

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1025298432 bytes
Fixed Size                  1341000 bytes
Variable Size             322963896 bytes
Database Buffers          696254464 bytes
Redo Buffers                4739072 bytes
Database mounted.

7. Change the Flashback mode of the database

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL>alter database flashback ON;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL> alter database open;

Database altered.

FLASHBACK mode of the database has been enabled.

How to disable FLASHBACK in Oracle Database 11G R1 and below versions


1. Shut Down your database

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down

2. Startup your database in MOUNT mode

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1025298432 bytes
Fixed Size                  1341000 bytes
Variable Size             322963896 bytes
Database Buffers          696254464 bytes
Redo Buffers                4739072 bytes
Database mounted.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

SQL>alter database flashback OFF;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO


SQL> alter database open;

Database altered.

FLASHBACK mode of the database has been disabled.


How to enable/disable FLASHBACK in Oracle Database 11G R2 and above versions.


From 11GR2 we do not have to bounce the database to alter flashback.


1. Database has to be in ARCHIVELOG mode.

     To change ARCHIVE mode refer to -- Change ARCHIVE mode of database

2. Flash Recovery Area has to be configured. To configure PFA steps.

3.  TO enable or disable flashback , we can change this while database is in open mode. PFB


SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL> alter database flashback on;

Database altered.

SQL> alter database flashback off;

Database altered.

Friday 29 June 2018

Oracle E-Business Suite (EBS) AD Administration error R12.1

AD Administration error: The following file is missing:

adpatch /12.0.0/bin/adpatchnew: not found

SOLUTION:

Run following Relink’s

adrelink.sh force=y "ad adworker"

adrelink.sh force=y "ad adpatch"

adrelink.sh force=y "ad adpatchnew"

adrelink.sh force=y "ad adadmin"

adrelink.sh force=y "ad adadminnew"

adrelink.sh force=y "ad all"

a.) adadmin

b.) select --> '2. Maintain Applications Files menu'

c.) select --> '1. Relink Applications programs'

--> select all modules to relink

Thursday 8 February 2018

Default Administrator Password of Tomcat Apache Server

Tomcat 7 and Tomcat 8

Tomcat users are defined in the file – $TOMCAT_HOME/conf/tomcat-users.xml, by default, there is NO user, it means no one can access the Tomcat manager page.

To enable users to access the Tomcat manager page, add a user as the role manager-gui.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
$TOMCAT_HOME/conf/tomcat-users.xml (Original)
<tomcat-users>
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->
</tomcat-users>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

$TOMCAT_HOME/conf/tomcat-users.xml (Updated)
<tomcat-users>
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->

  <role rolename="manager-gui"/>
  <user username="admin" password="admin" roles="manager-gui"/>
  <role rolename="admin-gui"/>
  <user username="tomcat" password="admin" roles="admin-gui"/>

</tomcat-users>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Saved it and restart Tomcat, now you should able to access the default manager page (http://ipaddress:8080/manager) with user = “admin” and password = “admin”


Friday 12 January 2018

Restart the Failed Installation of Siebel Database

Recovering from a Failure While Initializing a Regional Database:

If the regional database initialization fails, then you must recover from this failure before you restart Replication Manager. An example cause for failure is insufficient storage space on the regional database.

To recover from a failure while initializing a regional database:

Restart the Regional Database Initialization program.
Examine the log files.
The log files include srvrinit.log and upgwiz.log on Windows or srvrupgwiz1.log on UNIX.

Do the required corrective actions.
To resume the procedure for initializing a regional database, restart the Siebel Upgrade Wizard.
To restart the executable for this wizard on Windows, you type siebupg.exe. On UNIX, you type srvrupgwiz.

The state logging feature of the Siebel Upgrade Wizard allows you to restart the Siebel Upgrade Wizard. The Siebel Upgrade Wizard remembers the progress of the initialization process and resumes from the same location where it stopped.

Restarting the Procedure to Initialize a Regional Database:

This topic describes how to restart an interrupted initialization procedure.

To restart the procedure to initialize a regional database:

1. On the regional node, navigate to the SIEBEL_ROOT/bin folder.

2. If you are working in Windows, then do the following steps:
                  a)  Run the Siebel Upgrade Wizard.
                  b)  Click Cancel when this wizard prompts you to choose Yes to retry, No to abort,
                  or Cancel to abort and clean up.

3. If you are working in UNIX, then do the following steps:
                  a)  Locate the upgwiz.ucf file, and then delete it.
                  b)  Navigate to the SIEBEL_ROOT/upgrade folder, and then delete all files that
                  contain state.log in the file name.

4. Rerun the initialization procedure, starting with Step 1.