Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all 1640 articles
Browse latest View live

Article 0

$
0
0
ERROR WHILE UPGRADING APPLICATION FROM R12.1.1 to R12.1.3
Received the below error when applying the prerequisite patch 9239089 for R12.1.1 to R12.1.3:
Error from log the adrelink.log :
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/applebs/EBSDB/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 Feb 18 02:02:40 IST 2017
adrelink is exiting with status 1
End of adrelink session

REFERENCE:
Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.1.1) for Linux x86-64 (Doc ID 761566.1)

SOLUTION:
cd $AD_TOP/bin
cp -rp  adrelinknew.sh  adrelinknew.sh_orig
vi $AD_TOP/bin/adrelinknew.sh
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh'
with
CPP_LDFLAGS=' -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -lclntsh -Wl,--noinhibit-exec'

--Apply the patch again, now the patch will complete successfully.

Additional Information: The application of an EBS Release Update Pack (RUP) or AD family pack could over-write the adrelinknew.sh file - users must then re-edit and make changes to the above file in order to avoid relinking failures(Before Applying RUP 9239090 again edit the adrelinknew.sh file)

Steps to add the disk to existing diskgroups

$
0
0

Steps:


sqlplus / as sysasm;

TO CHECK DISKGROUP NAME:

select group_number, name from v$asm_diskgroup;

GROUP_NUMBER NAME
------------ ------------------------------
  1 DATA

show parameter asm_dis;

alter system set asm_diskstring='ORCL:*';

SELECT MOUNT_STATUS,HEADER_STATUS,STATE,TOTAL_MB,FREE_MB,NAME,PATH,LABEL FROM V$ASM_DISK;

MOUNT_S HEADER_STATUS STATE  TOTAL_MB FREE_MB NAME PATH LABEL
CACHEDMEMBER    NORMAL  12284    9950 DISK1  ORCL:DISK1 DISK1


ADD DISK TO EXISTING DISK GROUP:

alter diskgroup DATA add disk 'ORCL:DISK2';

TO CHECK REBALANCE OPERATION:

Select operation, state, est_work, est_minutes from v$asm_operation;


REBALANCE OPERATION:

OPERA STAT   EST_WORK EST_MINUTES
----- ---- ---------- -----------
REBAL RUN 19690


REBALANCE OPERATION COMPLETED:

no rows selected

set lines 270 pages 10000
col diskgroup for a10
col DISKNAME for a30
select dg.NAME diskgroup, dg.TYPE, dg.VOTING_FILES,ds.NAME diskname, ds.TOTAL_MB, ds.FREE_MB, dg.USABLE_FILE_MB from V$ASM_DISKGROUP dg, V$asm_disk_stat ds where dg.GROUP_NUMBER =ds.GROUP_NUMBER order by diskgroup, diskname;

DISKGROUP  TYPE   V DISKNAMETOTAL_MB   FREE_MB USABLE_FILE_MB

DATA  EXTERN Y DISK112284   9956 18535
DATA  EXTERN Y DISK210550   8579 18535

TO CHECK DISK GROUP USED AND FREE SPACE:

select group_number, name, total_mb, free_mb, type from v$asm_diskgroup where name='DATA'; 

GROUP_NUMBER NAME  TOTAL_MB FREE_MB   TYPE
 1           DATA  22834   18535    EXTERN

Oracle 11G Grid Installation ASM Disk Not Visible Issue

$
0
0


        Oracle 11G Grid Installation ASM Disk Not Visible Issue

 

Disk Not shown Must Install the below RPM:

Make sure that below is installed across nodes for oracleasm


kmod-oracleasm-2.0.8-6.el6_7.x86_64
oracleasmlib-2.0.4-1.el6.x86_64.rpm 
oracleasm-support-2.1.8-1.el6.x86_64.rpm

 


Resolve the SCAN Issue while Installing Oracle Real Application Clusters 11g Release 2

$
0
0



 

mv /usr/bin/nslookup /usr/bin/nslookup.original


ext, create a new shell script named /usr/bin/nslookup as shown below while
replacing 24.154.1.34 with your primary DNS, rac-scan with your
SCAN host name, and 192.168.56.91 with your SCAN IP address:
#!/bin/bash
HOSTNAME=${1}
if [[ $HOSTNAME = "racnode-cluster-scan" ]]; then
 echo "Server: 24.154.1.34"
 echo "Address: 24.154.1.34#53"
 echo "Non-authoritative answer:"
 echo "Name: racn-scan"
 echo "Address: 192.168.56.91 "
else
 /usr/bin/nslookup.original $HOSTNAME
fi
Finally, change the new nslookup shell script to executable:
[root@rac1 ~]# chmod 755 /usr/bin/nslookup
Remember to perform these actions on both Oracle RAC nodes.
The new nslookup shell script simply echo's back your SCAN IP address
whenever the CVU calls nslookup with your SCAN host name.









Article 3

$
0
0
               LOGIN PAGE SHOWS BLANK IN Oracle Applications R12


When logging into E-Bussiness Suit Login page appears blank,


 Solution 1:

1. Shutdown the application services.
   sh  adstpall.sh apps/<appspassword>


2.we need  Compile jsp’s Manually
perl $FND_TOP/patch/115/bin/ojspCompile.pl –compile –flush -p 2

3. Restart the application services.
  sh adstrtal.sh apps/<appspassword>

4. Retest the issue.

This would be a first workaround .

 Solution 2:

1. We need to edit the parameter in the context file ,

 Set the parameter “s_jsp_main_mode” in XML file from “just run” to “recompile”
<jsp_debug_parameters oa_var=”s_jsp_main_mode”>justrun</jsp_debug_parameters>
change it to  <jsp_debug_parameters oa_var=”s_jsp_main_mode”>recompile</jsp_debug_parameters>

2. Execute autoconfig to apply the change done in XML File.

Autoconfig will update file $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml

3. Re-start the applications and test the issue.


Article 2

$
0
0


              Re-routing the oracle application forms two node to one node in load-balance.


 This post helps you to change the oracle applications which is running in two-nodes and re-route to one node.

This type of scenario is explicitly for any network latency in one of the application node. And in order to over come the business loss for the customer . The following steps are to be performed in order to change it .


Solution :

1. First, check the network latency of the two application nodes and finalize to which node to re-route.

2. After that , take the context_file backup to avoid any mishap.

3. Now, the edit the following parameter in order to move to other node to take effect,

a)   <login_page oa_var="s_login_page">http://hostname.domain.com:8005/OA_HTML/AppsLogin</login_page>    

                    to

 <login_page oa_var="s_login_page">http://hostname2.domain.com:8005/OA_HTML/AppsLogin</login_page>


b)  <externURL oa_var="s_external_url">http://hostname.domain.com8005</externURL>
                                    to
<externURL oa_var="s_external_url">http://hostname2.domain.com:8005</externURL>


c) <webentryhost oa_var="s_webentryhost">hostname</webentryhost>
                                   to
webentryhost oa_var="s_webentryhost">hostname2</webentryhost>


Considering the hostname as shared form name, hostname1 as first node and hostname2 as second node.

In this example we have re-routed to second node of the application server.







Article 1

$
0
0



                Query to find the idle time of the forms

Query
----------

col timeout format a8
col user_name format a15
col mins_idle format 999.99
set pages 100
set lines 132

select
  disabled_flag,
  to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
  to_char(sysdate,'HH:MI:SS') Current_Time,
  USER_NAME,
  session_id,
  (SYSDATE-last_connect)*24*60 Mins_Idle,
  fnd_profile.value_specific
    ('ICX_SESSION_TIMEOUT',
     a.user_id,
     a.responsibility_id,
     a.responsibility_application_id,
     a.org_id,
     NULL
    ) TimeOut
from
  ICX_SESSIONS a, fnd_User b
where
  a.user_id=b.user_id
  and last_connect > sysdate-1/24
order by user_name, session_id;

Article 0

$
0
0


  APEX 5.0: There are issues with the configuration of the Static Files in your        environment.


After installing Oracle APEX 5.0, do you get the alert “There are issueswith the configuration of the Static Files in your environment. Please consult the “Configuring Static File Support” section in the Application Express Installation Guide.


when you try to login into the APEX Development Environment, This is not something which should be ignored just because it goes away when the OK button is clicked. This is actually a serious installation error message! Without fixing it, non of your Static Work space, Application, Plug-in and Theme files will work anymore.


The message will appear the Oracle HTTP Server / mod_plsql and in the XML Database if the following entries are missing from the DAD definition:

Oracle HTTP Server (OHS) / modplsql


1. Back up the existing dads.conf.

2. Add the following values to the APEX DAD definition in dads.conf:

PlsqlPathAlias  r
PlsqlPathAliasProcedure    wwv_flow.resolve_friendly_url


3. Restart the OHS so that these new values will be recognized.

Issue is resolved.



For different HTTP services like ORDS and Embedded PL/SQL Gateway use the note id:Doc ID 2004672.1



ORA-15040: diskgroup is incomplete

$
0
0

ASM is running but diskgroup is not mounted and its in incomplete state.

[oracle@primary bin]$ps -ef|grep asm

oracle    4222     1  0 02:19 ?        00:00:00 asm_pmon_+ASM
oracle    4224     1  0 02:19 ?        00:00:01 asm_psp0_+ASM
oracle    4226     1  2 02:19 ?        00:01:43 asm_vktm_+ASM
oracle    4230     1  0 02:19 ?        00:00:12 asm_gen0_+ASM
oracle    4232     1  0 02:19 ?        00:00:00 asm_mman_+ASM
oracle    4236     1  0 02:19 ?        00:00:00 asm_diag_+ASM
oracle    4238     1  0 02:19 ?        00:00:02 asm_dia0_+ASM
oracle    4240     1  0 02:19 ?        00:00:00 asm_dbw0_+ASM
oracle    4242     1  0 02:19 ?        00:00:00 asm_lgwr_+ASM
oracle    4244     1  0 02:19 ?        00:00:00 asm_ckpt_+ASM
oracle    4246     1  0 02:19 ?        00:00:00 asm_smon_+ASM
oracle    4248     1  0 02:19 ?        00:00:00 asm_lreg_+ASM
oracle    4250     1  0 02:19 ?        00:00:00 asm_pxmn_+ASM
oracle    4252     1  0 02:19 ?        00:00:00 asm_rbal_+ASM
oracle    4254     1  0 02:19 ?        00:00:01 asm_gmon_+ASM
oracle    4256     1  0 02:19 ?        00:00:00 asm_mmon_+ASM
oracle    4258     1  0 02:19 ?        00:00:00 asm_mmnl_+ASM
oracle    4739     1  0 02:32 ?        00:00:00 ora_asmb_prod
oracle    4743     1  0 02:32 ?        00:00:00 oracle+ASM_asmb_prod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle    6901  3508  0 03:36 pts/0    00:00:00 grep asm

Issue:

[oracle@primary bin]$asmcmd

asmcmd> lsdg


No diskgroups as shown.

When I tried to start asm, ora.asm resource was found in intermediate state.

SQL> alter diskgroup DATA mount;
alter diskgroup data mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15040: diskgroup is incomplete

Workaround:

When I listed ASM disks on node primary,VOLSTB was not listed

[root@primary bin]# oracleasm listdisks


[root@primary bin]# oracleasm init

Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size 
Mounting ASMlib driver filesystem: /dev/oracleasm

[root@primary bin]# oracleasm scandisks

Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "VOLSTB"

[root@primary bin]# oracleasm listdisks

VOLSTB

Now I could mount VOLSTB disk successfully

Now can I mount DATA diskgroup successfully,

SQL> alter diskgroup DATA mount;

Diskgroup altered.

asmcmd> lsdg

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576     15358    15264                0           15264              0             N  DATA/

Licensing Setups in R12 / Pre and Post Upgrade Requirements from 11i to R12 for Oracle Financials for India (India Localization)

$
0
0
Licensing Setups in R12 / Pre and Post Upgrade Requirements from 11i to R12 for Oracle Financials for India (India Localization) 


Pre Upgrade Steps:

Following points should be taken care of before applying the upgrade patch:-

=> Minimum Patch set Requirement - Customers must apply patch 5498551(IN60107) & 6167056 (Budget Patch) before upgrade. This is the minimum patch set requirement for any upgrade from 11i to R12. One can check the existence of above patches through following query:-

SELECT * FROM JAI_APPLIED_PATCHES WHERE PATCH_NUMBER IN ('5498551','6167056');

Post Upgrade Steps:

Following points should be considered after applying the upgrade patch:-

a. Post upgrade check whether JAI is licensed or not. To check whether JAI is licensed please follow the below navigation:-
1. Navigate to System Administrator Responsibility
2. Oracle Application manager > License Manager > Country Specific Localization
3. Check if Singapore is Enabled or not. For JAI (India Localization the country used in Singapore)
4. If it is not selected then select the same and Save. This will enable the license for JAI

b. Please make sure that none of the JAI triggers are disabled. Please use the following query to check if any of the triggers are disabled:-

SELECT table_name,trigger_name, SUBSTR(owner,1,10) OWN,status FROM all_triggers
WHERE trigger_name like 'JAI%'
and STATUS = 'DISABLED'
ORDER BY 4,1;

If this query retrieves any triggers then please enable them immediately.

c. Please check if the JAI_EXISTENCE_OF_TABLES is set or not. This is very important step because if JAI_EXISTENCE_OF_TABLES is false i.e. not set, then OFI will not work even if all the triggers are enabled and there are no invalid.To validate this please follow the below steps:-

1. Execute the below script in apps schema using SQL*PLUS

[set serveroutput on;
begin
IF (AD_EVENT_REGISTRY_PKG.Is_Event_Done( p_Owner => 'JA', p_Event_Name => 'JAI_EXISTENCE_OF_TABLES' ) = TRUE) THEN
dbms_output.put_line ( 'Event JAI_EXISTENCE_OF_TABLES for JA is set!!');
else
dbms_output.put_line ( 'Event JAI_EXISTENCE_OF_TABLES for JA is NOT set.
Please apply jai5188052.drv!!');
end if;
end;
/
]

2. If AD_EVENT_REGISTRY_PKG.Is_Event_Done returns 'FALSE' for JA Owner it means the JAI_EXISTENCE_OF_TABLES is not set.

For 12.1.X please follow below steps to make "Event JAI_EXISTENCE_OF_TABLES for JA as set"

3. Apply jai5188052.drv using adpatch.The driver file takes care of inserting the events and enables OFI Triggers if they are not enabled.

4. The file jai5188052.drv can be obtained from the Patch Directory.(cd $JA_TOP/patch/115/driver/)

For 12.2.X please follow below steps to make "Event JAI_EXISTENCE_OF_TABLES for JA as set"

5.Manually run below two files:

a. jai_set_ad_event.sql. Pass input as JA. and not Application ID 7000
b. jai_enable_trg.sql

The files will be located in cd $JA_TOP/patch/115/sql

6.Once done please bounce the instance.

Convert .FMB (Binary Format) to .FMT (Text Format) in oracle froms

$
0
0
Convert .FMB (Binary Format) to .FMT (Text Format) in oracle froms:

set oracle_home, forms_path and PATH variables and try to run it from oracle_home\bin folder

Also you can try to provide physical path for *.fmb

example: for %%f IN (C:\Oracle1\Middleware\Oracle_FRHome5\forms\*.fmb)

#UNIX Forms to Text 
#convert_to_text.sh 
for i in `ls *.fmb` 
do 
echo Converting $i .... 
frmcmp userid=scott/tiger@v11g batch=yes module=$i module_type=FORM script=YES window_state=minimize 
done 

Upgrading Oracle EBS to Release 12.2

$
0
0

Upgrading Oracle EBS to Release 12.2?  whatwe should keep in mind!

  

There is always a generic question that arises: “Our current EBS release is stable and running without any issues. Why should we upgrade to a newer release?” Software development is a continuous process, and we need to align with current and future information technology trends. We need to ensure we are moving forward and ready to accept these changes. Moreover, Oracle stopped development on the release 12.1.3, and all future enhancements are focused on the 12.2 release.


In this scenario there is a huge requirement of Upgrade to the latest versions (R12.2). Oracle, no doubt  adopted latest technology and moves to give the best in industry and so on the  Oracle Application side. Latest version on Oracle application is 12.2.6


The below points gives the high level overview of upgrade to R12.2 from the lower versions. Let’s start with Tech stack versions


TECHNOLOY COMPONENT

11.5.10.2

R12.0.4

R12.1

R12.2/R12.2.5

Database

9.2.0.6

10.2.0.3

11.2.0.1

11.2.0.3/11.2.0.4

Forms/Reports

6.0.8.25

10.1.2.2

10.1.2.3

10.1.2.3

ApplicationServer

1.0.2.2.2

10.1.3.0

10.1.3.4

11.1.1.6/11.1.1.6.7



Webtier




11.1.1.6/11.1.1.9
 

Any upgrade to R12.2 goes through below  phases


Plan for Upgrade– Better plan is surety of success most of the time. We need to plan and also document all the issues reported so that during the Final Production upgrade downtime can be minimal. We need to plan and check all the intermediate version are supported if not operational. That is the key point during the planning. Follow the best practices for minimizing the upgrade downtime suggested by Oracle and also as per the client and DBA experiences.


Prepare for Upgrade– This phase starts after the planning phase and includes Database and Application preparation for upgrade activity. This is the main upgrade phase where we perform all the upgrade activities

Database Upgrade– Select the latest version for database. If 11g database, consider for 11.2.0.4 version or 12c version is highly recommended. Also apply the latest Consolidate patches as per the database versions. On the application side we need to be on the Minimum base line patches as per the Oracle recommendations.

File System Lay down - As we know R12.2 comes with latest technology and file system, so we need to lay down the R12.2 file system using the latest startCD.

Upgrade to 12.2.0  - We need to first upgrade to 12.2.0 and need to apply AD and TXK patches on the 12.2 filesystem. As this is the intermediate stage we need to perform it as preinstall activity. At this stage Application will not be operational.

Enable Online Patching - As you know new feature of R12.2 is online patching so we need to enable our old instance for the same. This is bit time consuming activity and we need to follow the Online Patching Readiness document 1531121.1 from MOS. 

This phase fixes:
 
Any Coding Violation
Enable edition of Application and or any custom schema.
Generate edition views and column
  
Upgrade further to 12.2.X - We are at 12.2 with latest database now. Now on the application side we can come to the 12.2.5 version. We need to apply the latest technology patches (Delta 7) and EBS RUP patches after that.

 
Middle Tier patches >1594274.1
AD-TXK RUP patches >1617461.1 
EBS R12.2.X Document >12.2.4 or 12.2.5
All the post upgrade patches and steps.

  
Oracle always recommends to apply the latest technology patches, the newest version includes the maximum no. of bug fixes and newest enhancements. Technology(AD/TXK) patches are regularly updated in MOS Doc ID:1583092.1.
 

Translations – In case multiple languages are there then we need to take care of Translation patches as well. 12.2 and then 12.2.X translated patches and also we need to apply TSP (Translation Sync Patches).


Customization– Once standard/seeded code is at R12.2.X level we need to take care of the customization’s in our old versions. For R12.2 we have new development standards and need to follow the same to get the custom code compliant with our applications.
 

 References
 
Planning Your Oracle E-Business Suite (EBS) Upgrade from Release 11i to Release 12 (1406960.1)
Best Practices for Minimizing Oracle E-Business suite Release 12 Upgrade Downtime (1581549.1)
Developing and Deploying customization’s(157766.1)
 
Happy EBS Upgrading..

ORA-00600: internal error code, arguments: [kccsbck_first], [1], [1473686710], [], [], [], [], [], [], [], [], []

$
0
0
Cause:

Unexpected server reboot.

Checking the system messages file, we can see that at the same time the instances fail to mount, there are several errors reported at OS level. For example:


Aug 21 16:30:04 ....sis_agent_syncml:  [ERROR]  "select() to host 'pbgw' on port 21000""System Error 113: No route to host""-"
Aug 2116:30:04 ....sis_agent_syncml:  [WARNING]  "SQL Server: Native Error: No SQL-Server connection available. bind() failed [master pool], connections in use: 1""-""-"
 


Fix:

Resolve all the OS errors. In my case another reboot of the same server fixed the issue.

ORA-38760: This database instance failed to turn on flashback database

$
0
0
Cause:

Unexpected server reboot.

When starting the instance after mount we will face this issue.
This is due to missing current flashback log missing/deleted

SQL> startup
ORACLE instance started.
Total System Global Area 1161966444 bytes
Fixed Size 1787966 bytes
Variable Size 1145750568 bytes
Database Buffers 225163524 bytes
Redo Buffers 1262132 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback database.

Fix:
Solution A:

1. startup mount;
2. alter database flashback off;
3. alter database flashback on;
4. alter database open;

Solution B:

1. Startup mount.
2. Check db_recovery_file_dest parameter and ensure this directory exists.
3. Check restore points:
select NAME,SCN,GUARANTEE_FLASHBACK_DATABASE,DATABASE_INCARNATION#
from v$restore_point;
4. Drop restore point:
drop restore point ;
5. alter database flashback off;
6. Shutdown immediate;
7. Startup

DST V25 Timezone

$
0
0

DST  V14 to V25 Upgrading:



If your E-Business Suite Release environment is configured to support Daylight Saving Time (DST) or international time zones, it's important to keep your timezone definition files up-to-date. They were last changed in November 2015 and released as DSTv25.


1. Check the invalid count before upgrade
SQL>select count(1) from dba_objects where status='INVALID';

2. Check the TZ version before upgrade.
SQL> SELECT version FROM v$timezone_file;

   VERSION
---------------
14

3. Bringdown Apps services and Database and Listener
$ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps

sqlplus '/ as sysdba'
shut immediate
lsnrctl stop TEST

4. Set the inventory

cat /etc/oraInst.loc
inventory_loc=/etc/oracle/oraInventory
inst_group=dba

5. Verify the inventory

$ORACLE_HOME/OPatch/opatch lsinventory

6.Apply DST25 Patch

cd /stageall/patches/DST/22037014
$ORACLE_HOME/OPatch/opatch apply

7.Verify patch applied or not?

$ORACLE_HOME/OPatch/opatch lsinventory | grep 22037014

8.Post steps of DST  patch

Download scripts from Note: 1585343.1

cd /stagall/patches/DST/DBMS_DST_scriptsV1.9

Conn / as sysdba
spool countstatsTSTZ.log
@countstatsTSTZ.sql
spool off

Conn / as sysdba
spool upg_tzv_check.log
@upg_tzv_check.sql
spool off

Conn / as sysdba
spool upg_tzv_apply.log
@upg_tzv_apply.sql
spool off

9.Verify DST version post upgrade

SQL> SELECT version FROM v$timezone_file;

VERSION
--------------
25

10.Verify invalid objects

select count(1) from dba_objects where status='INVALID';

11. Bring up services, validate the environment and release
------------------------------------------------------------
sqlplus ' /as sysdba'
startup
exit
lsnrctl start TEST


$ADMIN_SCRIPTS_HOME/adstrtal.sh apps/appspwd


Reference

Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12cR1 database . (Doc ID 1585343.1)

Complying with Daylight Saving Time (DST) and Time Zone Rule Changes in E-Business Suite 12 (Note 563019.1)

Thank you ! 

Online Patching (ADOP) in Oracle EBS R12.2

$
0
0
Online patching is the most important new feature in Oracle EBS 12.2.

The phase parameter specifies the parts (phases) of the online patching cycle to be executed. The five standard phases are executed in the order shown below.

Standard phases:
prepare      - Prepare the instance for patch application.
apply        - Apply patches (to the patch edition).
finalize     - Ready the instance for cutover.
cutover     - Make the patch edition the new run edition.
cleanup     - Drop obsolete objects and data from old editions.

There are also three special phases, for use when needed.

Special phases:
abort             - Abort the current online patching cycle.
actualize_all - Create actual copies of all code objects in the patch edition.
fs_clone        - Copy the run file system to the patch file system.

General parameters applicable to all phases:

workers=<number> [default: computed]
Number of parallel workers used to execute tasks.  Default value is computed principally according to number of available CPU cores.

input_file=<file_name>
As well as being entered directly on the command line, adop parameters can be specified in a text file, with one <parameter>=<value> on each line of the file.  Command line parameters override input file parameters.

loglevel=(statement|procedure|event|warning|error|unexpected)
[default: event]
Controls the level of diagnostic log detail displayed on the console.

prompt=(yes|no)  [default: yes]
Specifies whether adop should prompt for user input on warnings. By default adop will ask user whether to continue or exit on some warning messages.  If this parameter is set to "no" adop will remain fully non-interactive, and will continue past any warning messages without user confirmation.

Phase-specific parameters control operation of a particular phase:

Apply parameters:
patches=<patch#>[,<patch#>...]
patches=<patch_directory>:<driver>[,<patch_directory>:<driver>...]
This parameter specifies a comma-separated list of patches to be applied.  Patches can be specified either as the patch number or by the patch directory and driver file.  All patches are expected to be in the $PATCH_TOP directory on all tiers.  Patches are applied serially unless the merge=yes parameter is specified.

restart=(yes|no)  [default: no]
Use restart=yes to resume the previous failed apply command from where processing terminated.

abandon=(yes|no)  [default: no]
Use abandon=yes to abandon the previous failed apply command and start a new apply command.

apply_mode=(online|downtime|hotpatch)  [default: online]
Use online mode to apply a patch to the patch edition during an online patching cycle; downtime mode to apply a patch to the run edition when application services are down; and hotpatch mode to apply a patch to the run edition when application services are up. Only use hotpatch mode when explicitly directed by documentation.

apply=(yes|no)  [default: yes]
To run adop in test mode (without applying any patches), use apply=no

 options=<patch_option>[,<patch_option>...]
 Advanced options to control patching behavior.
       
See adop -examples for details.
flags=<patch_flag>[,<patch_flag>...]
 Advanced flags to control patching behavior.
 See adop -examples for details.

Finalize parameters:

finalize_mode=(full|quick)  [default: quick]
Quick mode will provide the shortest execution time, by skipping non-essential actions. Full mode performs additional actions such as gathering statistics that may improve performance after cutover.

Cutover parameters:

mtrestart=(yes|no)  [default: yes].
Specifies whether to restart application tier servers after cutover. Leave at default unless you need to perform manual steps during the cutover downtime.

cm_wait=<minutes>  [default: forever]
Specifies the number of minutes to wait for Concurrent Manager shutdown.  Adop cutover starts by requesting a concurrent manager shutdown and then waits for in-progress requests to complete.
If Concurrent Manager does not shutdown within the specified time limit, remaining concurrent requests will be killed and cutover will proceed.

Cleanup parameters:

cleanup_mode=(full|standard|quick)  [default: standard]
Quick mode provides the shortest execution time, by skipping non-essential actions. Standard mode performs additional processing to drop obsolete code objects from old editions.
Full mode performs additional processing to drop empty database editions and unused table columns.

Fs_clone parameters:

force=yes/no [default: no]
Use force=yes to restart a previous failed fs_clone command from the beginning.  By default fs_clone will restart where it left off.

Command flags:

-status [<session_id>]
Display status of the latest adop session, or a specified session.

-validate
Runs ADOP validations for verifying the current system state.

-examples
Display extended help information with common usage examples.

-help
This help screen.

Script For adgrants Version in Oracle Database

$
0
0
How to check the adgrants version in oracle database.

SELECT DISTINCT RPAD(h.filename,15) ,
  RPAD(g.version,20) ,
  RPAD(TRUNC(c.end_date),12) ,
  RPAD(a.bug_number,10) ,
  RPAD(e.patch_name,10) ,
  RPAD(b.applied_flag,4) "File:vers:Date:Bug:Patch:Apply"
FROM ad_bugs a,
  ad_patch_run_bugs b,
  ad_patch_runs c,
  ad_patch_drivers d ,
  ad_applied_patches e,
  ad_patch_run_bug_actions f ,
  ad_file_versions g,
  ad_files h
WHERE a.bug_id              = b.bug_id
AND b.patch_run_id          = c.patch_run_id
AND c.patch_driver_id       = d.patch_driver_id
AND d.applied_patch_id      = e.applied_patch_id
AND b.patch_run_bug_id      = f.patch_run_bug_id
AND f.patch_file_version_id = g.file_version_id
AND g.file_id               = h.file_id
AND h.filename LIKE 'adgrants.sql'
ORDER BY 1 DESC;

Output:




Thanks !!

EXPORT IN PARALLEL AND IMPORT WITH DATAPUMP

$
0
0



#!/bin/bash
#############################################################################
#  EXPORT IN PARALLEL WITH DATAPUMP
#############################################################################
#
# Description: This script will create multiple export job in parallel
#              to export table
#
#############################################################################


BASE_SCHEMA=$1
BASE_TABLE=$2
PARALLEL=$3;
PARTITION=$4

function usage(){
  echo "USAGE:
        Parameter 1 is the SCHEMA
        Parameter 2 is the TABLE NAME
        Parameter 3 is the DEGREE of parallelism
        Parameter 4 (optional) is the partition (if any)"
}

if [ $# -lt 3 ]; then
    usage
    exit 1
fi

if [ $# -eq 4 ]; then
    PARFILE=${BASE_SCHEMA}_${BASE_TABLE}_${PARTITION}.par
    echo "tables=${BASE_SCHEMA}.${BASE_TABLE}:${PARTITION}">  $PARFILE
    START_MESSAGE="Beginning export of partition : ${BASE_SCHEMA}.${BASE_TABLE}:${PARTITION} "
    END_MESSAGE "Finished export of partition: ${BASE_SCHEMA}.${BASE_TABLE}:${PARTITION}"
    DUMPFILE_BASE=${BASE_SCHEMA}_${BASE_TABLE}_${PARTITION}
    LOGFILE_BASE=${BASE_SCHEMA}_${BASE_TABLE}_${PARTITION}
else
    PARFILE=${BASE_SCHEMA}_${BASE_TABLE}.par
    echo "tables=${BASE_SCHEMA}.${BASE_TABLE}">  $PARFILE
    START_MESSAGE="# Beginning export of table : ${BASE_SCHEMA}.${BASE_TABLE}"
    END_MESSAGE "# Finished export of table: ${BASE_SCHEMA}.${BASE_TABLE}"
    DUMPFILE_BASE=${BASE_SCHEMA}_${BASE_TABLE}
    LOGFILE_BASE=${BASE_SCHEMA}_${BASE_TABLE}
fi

# Adding parameters to the parfile
echo "directory=DATA_PUMP">>  $PARFILE
echo "EXCLUDE=STATISTICS">>  $PARFILE
echo "CLUSTER=N">>  $PARFILE

echo "#########################################################################################"
echo $START_MESSAGE
echo "#########################################################################################"
echo ""

LIMIT=$(expr $PARALLEL - 1)

START_TIME=`date`

for i in `seq 0 $LIMIT`
do
   QUERY="where mod(dbms_rowid.rowid_block_number(rowid), ${PARALLEL}) = $i"
   expdp userid=\'/ as sysdba\' query=$BASE_SCHEMA.$BASE_TABLE:\"$QUERY\" dumpfile=${DUMPFILE_BASE}_${i}.dmp logfile=${LOGFILE_BASE}_${i}.log parfile=$PARFILE &
   sleep 3
done

wait `pidof expdp`

echo "#########################################################################################"
echo $END_MESSAGE
echo "# Start time : $START_TIME "
echo "# End time is: `date`"
echo "#########################################################################################"



#!/bin/bash
#############################################################################
#  IMPORT IN PARALLEL WITH DATAPUMP
#############################################################################
#
# Description: This script will import multiple dumpfiles in parallel
#
#############################################################################

export ORAENV_ASK=NO
export ORACLE_SID=$1
. oraenv

TABLE_NAME=$2
PARTITION=$3

function usage(){
  echo "USAGE:
        Parameter 1 is the SID of the database where you want to import
        Parameter 2 is the TABLE you want to import
        Parameter 3 (optional) is the PARTITION name you want to import (if any)"
}

if [ $# -lt 2 ]; then
    usage
    exit 1
fi

if [ $# -eq 3 ]; then
    PARFILE=${TABLE_NAME}_${PARTITION}.par
    START_MESSAGE="Beginning import of partition : ${TABLE_NAME}:${PARTITION} "
    END_MESSAGE "Finished import of partition: ${TABLE_NAME}:${PARTITION}"
    SEARCH_PATTERN=${BASE_TABLE}_${PARTITION}
    SUCCESS_MESSAGE="partition: ${TABLE_NAME}:${PARTITION} successfully imported, started at"
    ERROR_MESSAGE="partition: ${TABLE_NAME}:${PARTITION} failed to import, check logfile for more info"
    MAIL_OBJECT="Successfully imported partition ${TABLE_NAME}:${PARTITION}"
else
    PARFILE=${TABLE_NAME}.par
    START_MESSAGE="Beginning import of table : ${TABLE_NAME}"
    END_MESSAGE "Finished import of table : ${TABLE_NAME}"
    SEARCH_PATTERN=${BASE_TABLE}
    SUCCESS_MESSAGE="Table ${TABLE_NAME} successfully imported, started at "
    ERROR_MESSAGE="Table ${TABLE_NAME} failed to import, check logfile for more info"
    MAIL_OBJECT="Successfully imported table ${TABLE_NAME}"
fi

#directories
BASEDIR=/u10/
DUMPDIR=$BASEDIR/DUMP
PARFILEDIR=$BASEDIR/parfiles

mkdir -p $PARFILEDIR

# building the parfile
echo "DIRECTORY=MY_DUMP_DIR">  ${PARFILEDIR}/$PARFILE
echo "CLUSTER=N">>  ${PARFILEDIR}/$PARFILE
echo "TABLE_EXISTS_ACTION=APPEND">>  ${PARFILEDIR}/$PARFILE
echo "DATA_OPTIONS=DISABLE_APPEND_HINT">>  ${PARFILEDIR}/$PARFILE


echo "#########################################################################################"
echo $START_MESSAGE
echo "#########################################################################################"
echo ""

START_TIME=`date`

for dump in `ls ${DUMPDIR}/*${SEARCH_PATTERN}*.dmp`
do
   DUMPFILE=${dump}
   LOGFILE=imp_${dump}.log
   impdp userid=\'/ as sysdba\' dumpfile=$DUMPFILE logfile=${LOGFILE} parfile=${PARFILEDIR}/$PARFILE &
   sleep 3
done

wait `pidof impdp`

echo "#########################################################################################"
echo $END_MESSAGE
echo "# Start time : $START_TIME "
echo "# End time   : `date`"
echo "#########################################################################################"

# Verifying errors
errors_count=`grep ORA- *${SEARCH_PATTERN}*.log | wc -l`

if [ $errors_count -eq 0 ]; then
        echo "$SUCCESS_MESSAGE $START_TIME and finished at `date`" |  mail -s $MAIL_OBJECT you@your-email.com
else
        echo $ERROR_MESSAGE |  mail -s $MAIL_OBJECT you@your-email.com
fi

MOVING OBJECTS

$
0
0
set serveroutput on
set lines 300
DECLARE   
    V_CURRENT_TABLESPACE VARCHAR2(50);
    V_DEST_TABLESPACE VARCHAR2(50);
BEGIN
    V_CURRENT_TABLESPACE := '&current_tablespace';
    V_DEST_TABLESPACE := '&destination_tablespace';

    FOR LIST_OWNER IN (SELECT DISTINCT OWNER FROM DBA_SEGMENTS WHERE TABLESPACE_NAME=V_CURRENT_TABLESPACE)
   
        DBMS_OUTPUT.PUT_LINE('MOVING TABLES:');
        DBMS_OUTPUT.PUT_LINE('------------------');
        FOR LIST_TABLES IN (SELECT SEGMENT_NAME, SEGMENT_TYPE FROM DBA_SEGMENTS WHERE OWNER=LIST_OWNER.OWNER AND TABLESPACE_NAME=V_CURRENT_TABLESPACE AND SEGMENT_TYPE='TABLE')
        LOOP
            DBMS_OUTPUT.PUT_LINE('MOVING ' || LIST_TABLES.SEGMENT_TYPE || '' || LIST_TABLES.SEGMENT_NAME || '...');
            V_SQL := 'ALTER TABLE "' || LIST_OWNER.OWNER  || '"."' || LIST_TABLES.SEGMENT_NAME || '" MOVE TABLESPACE ' || V_DEST_TABLESPACE;               
            EXECUTE IMMEDIATE V_SQL;
        END LOOP;
       
        DBMS_OUTPUT.PUT_LINE('');
        DBMS_OUTPUT.PUT_LINE('MOVING LOBS:');
        DBMS_OUTPUT.PUT_LINE('------------------');
       
        FOR LIST_LOBS IN (SELECT TABLE_NAME, COLUMN_NAME FROM DBA_LOBS WHERE OWNER=LIST_OWNER.OWNER AND TABLESPACE_NAME=V_CURRENT_TABLESPACE)
        LOOP
            DBMS_OUTPUT.PUT_LINE('MOVING LOB FROM TABLE ' || LIST_LOBS.TABLE_NAME || ' TO TABLESPACE ' || V_DEST_TABLESPACE || '...');
            V_SQL := 'ALTER TABLE ' || LIST_OWNER.OWNER || '.' ||  LIST_LOBS.TABLE_NAME || ' MOVE LOB(' || LIST_LOBS.COLUMN_NAME || ') STORE AS (TABLESPACE ' ||  V_DEST_TABLESPACE || ')';
            EXECUTE IMMEDIATE V_SQL;
        END LOOP;       
       
        DBMS_OUTPUT.PUT_LINE('');
        DBMS_OUTPUT.PUT_LINE('MOVING INDEXES:');
        DBMS_OUTPUT.PUT_LINE('------------------');
       
        FOR LIST_INDEXES IN (SELECT SEGMENT_NAME, SEGMENT_TYPE FROM DBA_SEGMENTS WHERE OWNER=LIST_OWNER.OWNER AND TABLESPACE_NAME='USERS' AND SEGMENT_TYPE='INDEX')
        LOOP
            DBMS_OUTPUT.PUT_LINE('MOVING ' || LIST_INDEXES.SEGMENT_TYPE || '' || LIST_INDEXES.SEGMENT_NAME || '...');           
            V_SQL := 'ALTER INDEX ' || LIST_OWNER.OWNER  || '."' || LIST_INDEXES.SEGMENT_NAME || '" REBUILD TABLESPACE ' || V_DEST_TABLESPACE;
            EXECUTE IMMEDIATE V_SQL;
        END LOOP;               
       
        DBMS_OUTPUT.PUT_LINE('');       
       
    END LOOP;
END;
/

DBUPGDIAG script to check integrity of database before 11g upgrade

$
0
0
col TODAY NEW_VALUE _DATE
col VERSION NEW_VALUE _VERSION
set termout off
select to_char(SYSDATE,’fmMonth DD, YYYY’) TODAY from DUAL;
select version from v$instance;
set termout on
set echo off
set feedback off
set head off
set verify off
Prompt
PROMPT Enter location for Spooled output:
Prompt
DEFINE log_path = &1
column timecol new_value timestamp
column spool_extension new_value suffix
SELECT to_char(sysdate,’dd-Mon-yyyy_hhmi’) timecol,’.log’ spool_extension FROM
sys.dual;
column output new_value dbname
SELECT value || ‘_’ output FROM v$parameter WHERE name = ‘db_name’;
spool &log_path/db_upg_diag_&&dbname&&timestamp&&suffix
set linesize 150
set pages 100
set trim on
set trims on
col Compatible for a35
col comp_id for a12
col comp_name for a40
col org_version for a11
col prv_version for a11
col owner for a12
col object_name for a40
col object_type for a40
col Wordsize for a25
col Metadata for a8
col ‘Initial DB Creation Info’ for a35
col ‘Total Invalid JAVA objects’ for a45
col ‘Role’ for a30
col ‘User Existence’ for a27
col “JAVAVM TESTING” for a15
Prompt
Prompt
set feedback off head off
select LPAD(‘*** Start of LogFile ***’,50) from dual;
select LPAD(‘Oracle Database Upgrade Diagnostic Utility’,44)||
LPAD(TO_CHAR(SYSDATE, ‘MM-DD-YYYY HH24:MI:SS’),26) from dual;
Prompt
Prompt ===============
Prompt Database Uptime
Prompt ===============
SELECT to_char(startup_time, ‘HH24:MI DD-MON-YY’) “Startup Time”
FROM v$instance;
Prompt
Prompt =================
Prompt Database Wordsize
Prompt =================
SELECT distinct(‘This is a ‘ || (length(addr)*4) || ‘-bit database’) “WordSize”
FROM v$process;
Prompt
Prompt ================
Prompt Software Verison
Prompt ================
SELECT * FROM v$version;
Prompt
Prompt =============
Prompt Compatibility
Prompt =============
SELECT ‘Compatibility is set as ‘||value Compatible
FROM v$parameter WHERE name =’compatible’;
Prompt
Prompt ================
Prompt Component Status
Prompt ================
Prompt
SET SERVEROUTPUT ON;
DECLARE

ORG_VERSION varchar2(12);
PRV_VERSION varchar2(12);
P_VERSION VARCHAR2(10);

BEGIN

SELECT version INTO p_version
FROM registry$ WHERE cid=’CATPROC’ ;

IF SUBSTR(p_version,1,5) = ‘9.2.0’ THEN

DBMS_OUTPUT.PUT_LINE(RPAD(‘Comp ID’, 8) ||RPAD(‘Component’,35)||
RPAD(‘Status’,10) ||RPAD(‘Version’, 15));

DBMS_OUTPUT.PUT_LINE(RPAD(‘ ‘,8,’-‘) ||RPAD(‘ ‘,35,’-‘)||
RPAD(‘ ‘,10,’-‘) ||RPAD(‘ ‘,15,’-‘));

FOR x in (SELECT SUBSTR(dr.comp_id,1,8) comp_id,
SUBSTR(dr.comp_name,1,35) comp_name,
dr.status Status,SUBSTR(dr.version,1,15) version
FROM dba_registry dr,registry$ r
WHERE dr.comp_id=r.cid and dr.comp_name=r.cname
ORDER BY 1)

LOOP

DBMS_OUTPUT.PUT_LINE(RPAD(SUBSTR(x.comp_id,1,8),8) ||
RPAD(SUBSTR(x.comp_name,1,35),35)||
RPAD(x.status,10) || RPAD(x.version, 15));
END LOOP;

ELSIF SUBSTR(p_version,1,5) != ‘9.2.0’ THEN

DBMS_OUTPUT.PUT_LINE(RPAD(‘Comp ID’, 8) ||RPAD(‘Component’,35)||
RPAD(‘Status’,10) ||RPAD(‘Version’, 15)||
RPAD(‘Org_Version’,15)||RPAD(‘Prv_Version’,15));

DBMS_OUTPUT.PUT_LINE(RPAD(‘ ‘,8,’-‘) ||RPAD(‘ ‘,35,’-‘)||
RPAD(‘ ‘,10,’-‘)||RPAD(‘ ‘,15,’-‘)||RPAD(‘ ‘,15,’-‘)||
RPAD(‘ ‘,15,’-‘));

FOR y in (SELECT SUBSTR(dr.comp_id,1,8) comp_id,
SUBSTR(dr.comp_name,1,35) comp_name, dr.status Status,
SUBSTR(dr.version,1,11) version,org_version,prv_version
FROM dba_registry dr,registry$ r
WHERE dr.comp_id=r.cid and dr.comp_name=r.cname
ORDER BY 1)

LOOP

DBMS_OUTPUT.PUT_LINE(RPAD(substr(y.comp_id,1,8), 8) ||
RPAD(substr(y.comp_name,1,35),35)||RPAD(y.status,10) ||
RPAD(y.version, 15)||RPAD(y.org_version,15)||RPAD(y.prv_version,15));

END LOOP;

END IF;
END;
/
SET SERVEROUTPUT OFF
Prompt
Prompt
Prompt ======================================================
Prompt List of Invalid Database Objects Owned by SYS / SYSTEM
Prompt ======================================================
Prompt
set head on
SELECT case count(object_name)
WHEN 0 THEN ‘There are no Invalid Objects’
ELSE ‘There are ‘||count(object_name)||’ Invalid objects’
END “Number of Invalid Objects”
FROM dba_objects
WHERE status=’INVALID’
AND owner in (‘SYS’,’SYSTEM’);
Prompt
DOC
################################################################

If there are no Invalid objects below will result in zero rows.

################################################################
#
Prompt
set feedback on
SELECT owner,object_name,object_type
FROM dba_objects
WHERE status=’INVALID’
AND owner in (‘SYS’,’SYSTEM’)
ORDER BY owner,object_type;
set feedback off
Prompt
Prompt ================================
Prompt List of Invalid Database Objects
Prompt ================================
Prompt
set head on
SELECT case count(object_name)
WHEN 0 THEN ‘There are no Invalid Objects’
ELSE ‘There are ‘||count(object_name)||’ Invalid objects’
END “Number of Invalid Objects”
FROM dba_objects
WHERE status=’INVALID’
AND owner not in (‘SYS’,’SYSTEM’);
Prompt
DOC
################################################################

If there are no Invalid objects below will result in zero rows.

################################################################
#
Prompt
set feedback on
SELECT owner,object_name,object_type
FROM dba_objects
WHERE status=’INVALID’
AND owner not in (‘SYS’,’SYSTEM’)
ORDER BY owner,object_type;
set feedback off
Prompt
Prompt ==============================================================
Prompt Identifying whether a database was created as 32-bit or 64-bit
Prompt ==============================================================
Prompt
DOC
###########################################################################

Result referencing the string ‘B023’ ==> Database was created as 32-bit
Result referencing the string ‘B047’ ==> Database was created as 64-bit
When String results in ‘B023’ and when upgrading database to 10.2.0.3.0
(64-bit) , For known issue refer below articles

Note 412271.1 ORA-600 [22635] and ORA-600 [KOKEIIX1] Reported While
Upgrading Or Patching Databases To 10.2.0.3
Note 579523.1 ORA-600 [22635], ORA-600 [KOKEIIX1], ORA-7445 [KOPESIZ] and
OCI-21500 [KOXSIHREAD1] Reported While Upgrading To 11.1.0.6

###########################################################################
#
Prompt
SELECT SUBSTR(metadata,109,4) “Metadata”,
CASE SUBSTR(metadata,109,4)
WHEN ‘B023’ THEN ‘Database was created as 32-bit’
WHEN ‘B047’ THEN ‘Database was created as 64-bit’
ELSE ‘Metadata not Matching’
END “Initial DB Creation Info”
FROM sys.kopm$;
Prompt
Prompt ===================================================
Prompt Number of Duplicate Objects Owned by SYS and SYSTEM
Prompt ===================================================
Prompt
Prompt Counting duplicate objects ….
Prompt
SELECT count(1)
FROM dba_objects
WHERE object_name||object_type in
(SELECT object_name||object_type
from dba_objects
where owner = ‘SYS’)
and owner = ‘SYSTEM’;
Prompt
Prompt =========================================
Prompt Duplicate Objects Owned by SYS and SYSTEM
Prompt =========================================
Prompt
Prompt Querying duplicate objects ….
Prompt
SELECT object_name, object_type
FROM dba_objects
WHERE object_name||object_type in
(SELECT object_name||object_type
FROM dba_objects
WHERE owner = ‘SYS’)
AND owner = ‘SYSTEM’;
Prompt
DOC

################################################################################

If any objects found please follow below article.
Note 1030426.6 How to Clean Up Duplicate Objects Owned by SYS and SYSTEM schema
Read the Exceptions carefully before taking actions.

################################################################################
#
Prompt
Prompt ================
Prompt JVM Verification
Prompt ================
Prompt
SET SERVEROUTPUT ON
DECLARE

V_CT NUMBER;
P_VERSION VARCHAR2(10);

BEGIN

— If so, get the version of the JAVAM component
EXECUTE IMMEDIATE ‘SELECT version FROM registry$ WHERE cid=”JAVAVM”
AND status 99’ INTO p_version;

SELECT count(*) INTO v_ct FROM dba_objects
WHERE object_type LIKE ‘%JAVA%’ AND owner=’SYS’;

IF SUBSTR(p_version,1,5) = ‘8.1.7’ THEN
IF v_ct>=6787 THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Installed properly’);
ELSE
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Not Installed properly’);
END IF;
ELSIF SUBSTR(p_version,1,5) = ‘9.0.1’ THEN
IF v_ct>=8585 THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Installed properly’);
ELSE
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Not Installed properly’);
END IF;
ELSIF SUBSTR(p_version,1,5) = ‘9.2.0’ THEN
IF v_ct>=8585 THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Installed properly’);
ELSE
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Not Installed properly’);
END IF;
ELSIF SUBSTR(p_version,1,6) = ‘10.1.0’ THEN
IF v_ct>=13866 THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Installed properly’);
ELSE
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Not Installed properly’);
END IF;
ELSIF SUBSTR(p_version,1,6) = ‘10.2.0’ THEN
IF v_ct>=14113 THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Installed properly’);
ELSE
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – Not Installed properly’);
END IF;
END IF;

EXCEPTION WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE(‘JAVAVM – NOT Installed. Below results can be ignored’);

END;
/
SET SERVEROUTPUT OFF
Prompt
Prompt ================================================
Prompt Checking Existence of Java-Based Users and Roles
Prompt ================================================
Prompt
DOC

################################################################################

There should not be any Java Based users for database version 9.0.1 and above.
If any users found, it is faulty JVM.

################################################################################
#

Prompt
SELECT CASE count(username)
WHEN 0 THEN ‘No Java Based Users’
ELSE ‘There are ‘||count(*)||’ JAVA based users’
END “User Existence”
FROM dba_users WHERE username LIKE ‘%AURORA%’ AND username LIKE ‘%OSE%’;
Prompt
DOC

###############################################################

Healthy JVM Should contain Six Roles.
If there are more or less than six role, JVM is inconsistent.

###############################################################
#

Prompt
SELECT CASE count(role)
WHEN 0 THEN ‘No JAVA related Roles’
ELSE ‘There are ‘||count(role)||’ JAVA related roles’
END “Role”
FROM dba_roles
WHERE role LIKE ‘%JAVA%’;
Prompt
Prompt Roles
Prompt
SELECT role FROM dba_roles WHERE role LIKE ‘%JAVA%’;
set head off
Prompt
Prompt =========================================
Prompt List of Invalid Java Objects owned by SYS
Prompt =========================================
SELECT CASE count(*)
WHEN 0 THEN ‘There are no SYS owned invalid JAVA objects’
ELSE ‘There are ‘||count(*)||’ SYS owned invalid JAVA objects’
END “Total Invalid JAVA objects”
FROM dba_objects
WHERE object_type LIKE ‘%JAVA%’
AND status=’INVALID’
AND owner=’SYS’;
Prompt
DOC

#################################################################

Check the status of the main JVM interface packages DBMS_JAVA
and INITJVMAUX and make sure it is VALID.
If there are no Invalid objects below will result in zero rows.

#################################################################
#
Prompt
set feedback on
SELECT owner,object_name,object_type
FROM dba_objects
WHERE object_type LIKE ‘%JAVA%’
AND status=’INVALID’
AND owner=’SYS’;
set feedback off
Prompt
Prompt INFO: Below query should succeed with ‘foo’ as result.
set heading on
select dbms_java.longname(‘foo’) “JAVAVM TESTING” from dual;
set heading off
Prompt

set feedback off head off
select LPAD(‘*** End of LogFile ***’,50) from dual;
set feedback on head on
Prompt
spool off
Prompt
set heading off
set heading off
set feedback off
select ‘Upload db_upg_diag_&&dbname&&timestamp&&suffix from “&log_path” directory’
from dual;
set heading on
set feedback on
Prompt
Viewing all 1640 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>