Database Architect,Core DBA ,APPSDBA,Mysql DBA,MongoDB,PostgreSQL,Installations,Upgrades on all Flavors of UNIX (LINUX,SOLARIS,HP(AIX)). Oracle E-Business Suite R12 (Upgrades,Patching,Cloning) AWS upgrades and implementation expert. OCI (Oracle Cloud Infrastructure) Architect, Exadata (Oracle Database Exadata Cloud at Customer(Exacc)),Superclusters ,Autonomous Databases, AWS RDS Customs , Sql Tuning Expert. ***Never Stop sharing,Learning and Growing***
Saturday, July 31, 2021
FRM-92101 error when attempting to launch Forms
Monday, July 26, 2021
Common Users & SYSDBA with #Oracle 12c Multitenancy
Common Users & SYSDBA with #Oracle 12c Multitenancy
A typical requirement is to have a superuser other than SYS, but with the same power. Like the common user C##_SYS
Or suppose we have many pluggable databases (PDBs) and different superusers responsible for different PDBs like C##_ADMIN1 and C##_ADMIN2:
Let’s implement it as above. Initially, my demo environment looks like this:
SQL> select name,open_mode,con_id from v$pdbs;
NAME OPEN_MODE CON_ID
------------------------------ ---------- ----------
PDB$SEED READ ONLY 2
PDB1 READ WRITE 3
PDB2 READ WRITE 4
PDB3 READ WRITE 5
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ----------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SYSDG FALSE FALSE FALSE FALSE TRUE FALSE 1
SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE 1
SYSKM FALSE FALSE FALSE FALSE FALSE TRUE 1
At first, I create C##_SYS and grant SYSDBA as a common privilege to that new user:
SQL> create user c##_sys identified by oracle container=all;
User created.
SQL> grant sysdba to c##_sys container=all;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ----------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SYSDG FALSE FALSE FALSE FALSE TRUE FALSE 1
SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE 1
SYSKM FALSE FALSE FALSE FALSE FALSE TRUE 1
C##_SYS TRUE FALSE FALSE FALSE FALSE FALSE 0
C##_SYS can now do anything to any PDB:
SQL> connect c##_sys/oracle@edd2r6p0/pdb1 as sysdba
Connected.
SQL> shutdown immediate
Pluggable Database closed.
SQL> connect / as sysdba
Connected.
SQL> select name,open_mode,con_id from v$pdbs;
NAME OPEN_MODE CON_ID
------------------------------ ---------- ----------
PDB$SEED READ ONLY 2
PDB1 MOUNTED 3
PDB2 READ WRITE 4
PDB3 READ WRITE 5
SQL> connect c##_sys/oracle@edd2r6p0/pdb1 as sysdba
Connected.
SQL> startup
Pluggable Database opened.
SQL> connect / as sysdba
Connected.
SQL> select name,open_mode,con_id from v$pdbs;
NAME OPEN_MODE CON_ID
------------------------------ ---------- ----------
PDB$SEED READ ONLY 2
PDB1 READ WRITE 3
PDB2 READ WRITE 4
PDB3 READ WRITE 5
Notice that there is a subtle difference in granting SYSDBA of the container database (CDB) as local or common privilege:
SQL> revoke sysdba from c##_sys container=all;
Revoke succeeded.
SQL> grant sysdba to c##_sys;
Grant succeeded.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ----------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SYSDG FALSE FALSE FALSE FALSE TRUE FALSE 1
SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE 1
SYSKM FALSE FALSE FALSE FALSE FALSE TRUE 1
C##_SYS TRUE FALSE FALSE FALSE FALSE FALSE 1
SQL> connect c##_sys/oracle@edd2r6p0/pdb1 as sysdba
ERROR:
ORA-01031: insufficient privileges
Warning: You are no longer connected to ORACLE.
C##_SYS has SYSDBA of the CDB “only”, therefore the error. Although:
SQL> connect c##_sys/oracle as sysdba
Connected.
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> alter session set container=pdb1;
Session altered.
SQL> shutdown immediate
Pluggable Database closed.
SQL> show con_name
CON_NAME
------------------------------
PDB1
SQL> startup
Pluggable Database opened.
SQL> connect c##_sys/oracle as sysdba
Connected.
SQL> select name,open_mode,con_id from v$pdbs;
NAME OPEN_MODE CON_ID
------------------------------ ---------- ----------
PDB$SEED READ ONLY 2
PDB1 READ WRITE 3
PDB2 READ WRITE 4
PDB3 READ WRITE 5
However, the proper way is probably granting it as a common privilege:
SQL> revoke sysdba from c##_sys;
Revoke succeeded.
SQL> grant sysdba to c##_sys container=all;
Grant succeeded.
Now to the implementation of C##_ADMIN1 and C##_ADMIN2. The point is here, that SYSDBA can be granted as a local privilege for certain PDBs only, to the effect that different superusers can be responsible for different groups of PDBs:
SQL> create user c##_admin1 identified by oracle container=all;
User created.
SQL> alter session set container=pdb1;
Session altered.
SQL> grant sysdba to c##_admin1 container=current;
Grant succeeded.
SQL> connect / as sysdba
Connected.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ----------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SYSDG FALSE FALSE FALSE FALSE TRUE FALSE 1
SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE 1
SYSKM FALSE FALSE FALSE FALSE FALSE TRUE 1
C##_SYS TRUE FALSE FALSE FALSE FALSE FALSE 0
C##_ADMIN1 TRUE FALSE FALSE FALSE FALSE FALSE 3
6 rows selected.
For now, C##_ADMIN1 can only connect to PDB1:
SQL> connect c##_admin1/oracle@edd2r6p0/pdb1 as sysdba
Connected.
SQL> select count(*) from session_privs;
COUNT(*)
----------
233
SQL> connect c##_admin1/oracle@edd2r6p0/pdb2 as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
The completed implementation of the picture above:
SQL> connect / as sysdba
Connected.
SQL> alter session set container=pdb2;
Session altered.
SQL> grant sysdba to c##_admin1 container=current;
Grant succeeded.
SQL> connect / as sysdba
Connected.
SQL> create user c##_admin2 identified by oracle;
User created.
SQL> alter session set container=pdb3;
Session altered.
SQL> grant sysdba to c##_admin2 container=current;
Grant succeeded.
SQL> connect / as sysdba
Connected.
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM CON_ID
------------------------------ ----- ----- ----- ----- ----- ----- ----------
SYS TRUE TRUE FALSE FALSE FALSE FALSE 0
SYSDG FALSE FALSE FALSE FALSE TRUE FALSE 1
SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE 1
SYSKM FALSE FALSE FALSE FALSE FALSE TRUE 1
C##_SYS TRUE FALSE FALSE FALSE FALSE FALSE 0
C##_ADMIN1 TRUE FALSE FALSE FALSE FALSE FALSE 3
C##_ADMIN1 TRUE FALSE FALSE FALSE FALSE FALSE 4
C##_ADMIN2 TRUE FALSE FALSE FALSE FALSE FALSE 5
8 rows selected.
Friday, July 16, 2021
Database Slowness Check
Slowness and Report to check whats happening in the database
@dbreport_check.sql
OUTPUT
Security- PROFILE CHECK in ORACLE DATABASE
PROFILE CHECK in ORACLE DATABASE
Thursday, July 15, 2021
How to find password of a User in Oracle Apps R12?
How to find password of a User in Oracle Apps R12?
In r12.2. Oracle seeded Procedure fnd_web_sec.get_guest_username_pwd which will help us to find out user password.
To achieve this you need to create a small package and run a query
--Package Specification
CREATE OR REPLACE PACKAGE get_pwd
AS
FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2)
RETURN VARCHAR2;
END get_pwd;
/
--Package Body
CREATE OR REPLACE PACKAGE BODY get_pwd AS FUNCTION decrypt (KEY IN VARCHAR2, VALUE IN VARCHAR2) RETURN VARCHAR2 AS LANGUAGE JAVA NAME 'oracle.apps.fnd.security.WebSessionManagerProc.decrypt(java.lang.String,java.lang.String) return java.lang.String'; END get_pwd; /
--Query to execute
SELECT usr.user_name, get_pwd.decrypt ((SELECT (SELECT get_pwd.decrypt (fnd_web_sec.get_guest_username_pwd, usertable.encrypted_foundation_password ) FROM DUAL) AS apps_password FROM fnd_user usertable WHERE usertable.user_name = (SELECT SUBSTR (fnd_web_sec.get_guest_username_pwd, 1, INSTR (fnd_web_sec.get_guest_username_pwd, '/' ) - 1 ) FROM DUAL)), usr.encrypted_user_password ) PASSWORD FROM fnd_user usr WHERE usr.user_name = ':USER_NAME';
Error Notifications Received From IGS_PE_WF_GEN Workflows
Error Notifications Received From IGS_PE_WF_GEN Workflow
We are frequently receiving error notifications like the ones mentioned below:
1. An Error occurred in the following Workflow.
Item Type = IGSPE002
Item Key = oracle.apps.ar.hz.PartySite.update29282
User Key =
Error Name = -6550
Error Message = ORA-06550: line 1, column 7:
PLS-00201: identifier 'IGS_PE_WF_GEN.ADDRESS_UPDATE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Error Stack =
Wf_Engine_Util.Function_Call(igs_pe_wf_gen.address_update, IGSPE002, oracle.apps.ar.hz.PartySite.update29282, 167520, RUN)
Activity Id = 167520
Activity Label = ADDR_UPDATE:ADDR_UPDATE_FUN
Result Code = #EXCEPTION
Notification Id =
Assigned User =
2. Wf_Engine_Util.Function_Call(igs_pe_wf_gen.address_create, IGSPE002, oracle.apps.ar.hz.PartySite.create22168, 167512, RUN)
ORA-06550: line 1, column 7:
PLS-00201: identifier 'IGS_PE_WF_GEN.ADDRESS_CREATE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Not using the IGS module so what is causing the errors?
CAUSE
The IGS product (Oracle Student System) was deprecated and not included in APPS R12.
SOLUTION
Please disable the IGS Workflows.
To disable this Workflow:
Navigation: Workflow Administrator Web Applications > Business Events >
- query the Event named oracle.apps.ar.hz.PartySite.create
- click on the Update pencil icon and change the Status to Disabled
- click Apply, then Yes
- query the Event named oracle.apps.ar.hz.PartySite.create
- click on the Subscription icon
- for the Function named "WF_RULE.Default_Rule" click to pencil icon
- select Disabled from the List of Values
- click Apply button, then Yes
- Repeat these steps for the Event named "oracle.apps.ar.hz.PartySite.update"
To clean up the workflows:
1. To clean them up, the Workflows for them should be canceled.
2. When the Purge Obsolete Workflow Runtime Data request is run, it will purge the records once they are eligible to be purged.
For information on deleting the WF errors please read Doc ID 804622.1 - How to Purge WFERROR (System: Error) Workflow Items?
Architectural changes in Seed Data Tables with AD/TXK Delta 8
Architectural changes in Seed Data Tables with AD/TXK Delta 8
What are the architectural changes in Seed Data Tables introduced with
AD/TXK Delta 8
1) Starting with AD & TXK Delta 8, a new feature "Enhanced Seed Data Management" is introduced that greatly increases the speed and efficiency with which seed data is synchronized as part of an online patching cycle.
2) This is the Dual Row Set Seed Data Synchronization model.
3) With this change, the ZD_EDITION_NAME column for the Seed Data Tables will replaced by "SET1" or "SET2"
4) No additional storage is required, and seed data tables are upgraded on demand to the new architecture.
5) How are the SET1 & SET 2 created:
a) When a Seed Data Table is prepared during the apply phase of adop, SET1 is created and "V_YYYYMMDD_HHMM" is replaced.
b) When the same Seed Table is prepared in the next apply phase, SET2 is created.
6) Once you see SET1 & SET2 for Seed Tables, it indicates that the table is now fully migrated to dual row set model and only the delta (difference in rows) between SET1 & SET2 are synchronized in subsequent prepares of the table.
7) Useful query to identify the same:
select zd_edition_name, count(1) from <owner_name>.table_name group by zd_edition_name;
8) Once the table is converted to the Dual Row Set mode, a new column is seen "ZD_SYNC". This column indicates if the seed data sync was done successfully.
Doc id - 2283796.1