Solution steps.
SQL> show user;
USER is "APPS"
SQL>GRANT execute ON APPS.FND_FILE TO cust_schema;
SQL> show user;
USER is "cust_schema"
SQL>
SQL> CREATE OR REPLACE SYNONYM FND_FILE FOR APPS.FND_FILE;
Synonym created.
Solution steps.
SQL> show user;
USER is "APPS"
SQL>GRANT execute ON APPS.FND_FILE TO cust_schema;
SQL> show user;
USER is "cust_schema"
SQL>
SQL> CREATE OR REPLACE SYNONYM FND_FILE FOR APPS.FND_FILE;
Synonym created.
This issue has occurred when we do applying the patches on the Apps_Tier.
The cause of this is auto patch previous sessions are still exists in the server and failing the ad workers
with the following error.
Error
11 workers have quit. Waiting for 9 more.
12 workers have quit. Waiting for 8 more.
All workers have quit.
Completed: file apgtxlat.sql on worker 1 for product ap username AP.
Error running SQL and EXEC commands in parallel
You should check the file
AutoPatch error:
Error running SQL and EXEC commands in parallel
Cause:
1. adpatch or adop process was killed from OS level while patch is being applied
2. Database shutdown or terminated
Solution:
Kill the ad patch sessions and try to apply the patch again.
1. [applmgr@oracle log]$ ps -eaf | grep adpatch
appluat 14552 14525 0 08:15 pts/4 00:00:00 grep adpatch
OR
[applmgr@oracle log]$ ps -efa | grep adworker
2.[applmgr@oracle log]$ Mydb>kill -9 <pid>
ADJRIINITPASSWD.sql Fails With An ORA-01031 Error:
Error: Unable to execute statement <
Begin
ad_jar.get_jripasswords(:l_storepass, :l_keypass);
End;
> len = 63
AD Administration error:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 94
ORA-06512: at "APPS.AD_JAR", line 17
ORA-06512: at line 3
AD Administration error:
Unable to get passwords from Vault
Solution
Connect with apps schema.
[applmgr@oracle ~]$ sqlplus apps/******
SQL> create or replace context AD_JAR using AD_JAR;
Context created.
SQL> GRANT select on DBA_USERS_WITH_DEFPWD to SYSTEM with grant option;
Grant succeeded.
SQL> conn system/******
Connected.
SQL> GRANT select on DBA_USERS_WITH_DEFPWD to em_oam_monitor_role;
Grant succeeded.
Re-test issue.
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE size 3072M;
ALTER TABLESPACE TEMP ADD TEMPFILE size 3072M
*
ERROR at line 1:
ORA-01119: error in creating database file '+DATA'
ORA-17502: ksfdcre:4 Failed to create file +DATA
ORA-15041: diskgroup "DATA" space exhausted
solution :-
[oracle@dba ~]$ sqlplus sys/***@QA as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Dec 1 06:10:22 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c EE High Perf Release 12.2.0.1.0 - 64bit Production
SQL> truncate table AUD$;
Table truncated.
SQL> commit;
Commit complete.
Oracle database connection issue happen when number of processes exceeded.
Please find below for more detail in alert.log file.
ORA-00020: maximum number of processes (1000) exceeded
ORA-20 errors will not be written to the alert log for
the next minute. Please look at trace files to see all
the ORA-20 errors.
2020-02-04T04:48:11.688221-05:00
Process m000 submission failed with error = 20
Process m000 submission failed with error = 20
Process m000 submission failed with error = 20
2020-02-04T04:49:06.528563-05:00
ORA-00020: maximum number of processes (1000) exceeded
--------------------------------------------------------------------------
The ORA-00020 is a serious production error because a user cannot connect.
The ORA-00020 is caused by two things:
To fix this, use the
SQL > ALTER SYSTEM KILL command.
Execute following script in the Database.
alter system kill session '957,37560';
You may also need to kill session at the OS level with the KILL -9
[oracle@ora ~]$ kill -9
you can execute following script on Linux server.
kill -9 41158
kill -9 41563
Too few process buckets: Oracle limits the number of connected processes with the processes parameter, and you may get the ORA-00020 error as the natural result in growth of system usage.
Cause:
All process state objects are in use.
Action:
Increase the value of the PROCESSES initialization parameter.
Check Current Setting of Parameters.
Execute following script in the Database.
sql> show parameter sessions
sql> show parameter processes
sql> show parameter transactions
sql> alter system set processes=1500 scope=spfile;
sql> alter system set sessions=1555 scope=spfile;
sql> alter system set transactions=1610 scope=spfile;
Restart database after this operation as follows.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 534462464 bytes
Fixed Size 2230072 bytes
Variable Size 339740872 bytes
Database Buffers 184549376 bytes
Redo Buffers 7942144 bytes
Database mounted.
Database opened.
SQL>
you can configure ADDM reports for Pluggable database(PDBs).
By default it is disabled. You need to enable it manually by executing following commands:
Note:
Default value of AWR_PDB_AUTOFLUSH_ENABLED is false
In Oracle 12c, By default ADDM report is enabled at Container level.
It work same in Oracle 19c as its work in Oracle 12c.
Enable ADDM reports in PDB databases
1. Login in the PDB database.
[oracle@ora admin]$ sqlplus system/manager@PDB
SQL*Plus: Release 12.2.0.1.0 Production on Tue Dec 15 11:41:32 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Last Successful login time: Tue Dec 15 2020 11:36:12 -05:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
2. Set the value of the following parameter.
SQL> ALTER SYSTEM SET AWR_PDB_AUTOFLUSH_ENABLED=TRUE;
SQL> show parameter AWR_PDB_AUTOFLUSH_ENABLED
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
awr_pdb_autoflush_enabled boolean TRUE
3. Set the AWR snapshot interval greater than 0 in the PDB.
SQL> EXEC dbms_workload_repository.modify_snapshot_settings(interval=>120);
Disable the ADDM reports in PDB
1. Login in the PDB database.
2. Set the value of the following parameter.
SQL> ALTER SYSTEM SET AWR_PDB_AUTOFLUSH_ENABLED=FALSE;
SQL> show parameter AWR_PDB_AUTOFLUSH_ENABLED
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
awr_pdb_autoflush_enabled boolean FALSE
3. Set the AWR snapshot interval greater than 0 in the PDB.
EXEC dbms_workload_repository.modify_snapshot_settings(interval=>0);
How to Run ADDM report on PDB
ADDM must be run from the Root Container database ( CDB )
Running ADDM from CDB will analyze the data of the PDB also and a sample ADDM looks like below.
[oracle@ora ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Dec 15 11:58:12 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show con_name;
CON_NAME
------------------------------
CDB$ROOT
SQL>
SQL> @/u01/app/oracle/product/12.2.0.1/dbhome_1/rdbms/admin/addmrpt.sql
*****************************END****************************************
Description
The Idle Time Resource Usage setting limits the maximum idle time allowed in a session.
Idle time is a continuous inactive period during a session, expressed in minutes.
Long-running queries and other operations are not subject to this limit.
Setting an Idle Time Resource Usage limit helps prevent users from leaving
applications open when they are away from their desks.
On my system:
SQL > select * from DBA_PROFILES where resource_name = 'IDLE_TIME';
PROFILE RESOURCE_NAME RESOURCE_TYPE LIMIT COMMON
-------------------- --------------- --------------- --------------- ------
DEFAULT IDLE_TIME KERNEL UNLIMITED NO
ORA_STIG_PROFILE IDLE_TIME KERNEL 15 NO
2 rows selected.
SELECT * FROM DBA_PROFILES WHERE PROFILE='DEFAULT' AND RESOURCE_NAME IN ('IDLE_TIME','CONNECT_TIME');
======================================================
select * from user_resource_limits where resource_name='IDLE_TIME';
Modify profiles to meet the idle time requirement.
alter profile default limit idle_time 15;
Question:
How the idle_time parameter works. I want to disconnect sessions after the idle_time has expired.
Answer:
The idle_time parameter is used within a SQL*Plus profile. Oracle has several ways to disconnect idle sessions, both from within SQL*Plus via resources profiles (connect_time, idle_time), and with the SQL*net expire time parameter.
IMPORTANT NOTE:
You must set resource_limit=TRUE to automatically terminate Oracle connections.
SQL > alter system set resource_limit=true scope=both;
You can use profiles to set the connect time and idle time with "alter profile" statements. Note that idle_time is expressed in minutes and you can express idle_time for 15 minutes by setting idle_time to 15:
SQL > alter profile senior_claim_analyst limit connect_time 100 sessions_per_user 20 idle_time 15;
This MySQL error — ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%' — means that MySQL cannot find the user ...