[SOLVED] How to find the versions of adgrants.sql that have been applied previously on Oracle Database 12c under Oracle EBS R12.2.x?

Issue

How to find the versions of adgrants.sql that have been applied previously on Oracle Database 12c under Oracle EBS R12.2.x?

Solution

Step 1. Go to the Linux terminal and login as Oracle Database Tier manager

Step 2. Set the environment and start the SQL * Plus session using the following commands (alternatively you may use Oracle SQL Developer from your Desktop):

[[email protected] ~]$ su - oravis
Last login: Wed Oct 10 10:35:31 PDT 2018 on pts/5

[[email protected] ~]$ . /u01/oracle/VIS/12.1.0/VIS_ebs1227oel75.env run

[[email protected] ~]$ sqlplus '/ as sysdba';
SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 10 13:05:03 2018

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>
 

Step 3. Then run the following SQL to find the versions of adgrants.sql that have been applied previously on Oracle Database 12c under Oracle EBS R12.2.x:

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 apps.ad_bugs a,
  apps.ad_patch_run_bugs b,
  apps.ad_patch_runs c,
  apps.ad_patch_drivers d ,
  apps.ad_applied_patches e,
  apps.ad_patch_run_bug_actions f ,
  apps.ad_file_versions g,
  apps.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; 

Environment
+ Oracle Linux 7.5 - x86-64

+ Oracle E-Business Suite Release 12.2.x 

[Solved] How to disable firewall in Oracle Linux 7...