Monday, April 17, 2017

Gathering Schema Stats ORA-20000: Index "FA"."FA_RX_LOV_U1"


Hai, this article will explain how to fix “ORA-20000: for Gather Schema Statistic Request for Single User

Because of slow performance in Fixed Assests Module, I have run the GCC request for FA user, and it completed with the following error. later I ran "GCC for ALL users", that also completed with same errors. For more information, read the below note it will provide more detail explanation


Gathering Schema Stats ORA-20000: Index "FA"."FA_RX_LOV_U1" or Partition of Such Index Is Unusable (Doc ID 2013352.1)


Log file for GSS request
================================================================================================================
oratest@RUH-ERPAT01 ~]$ cd /u01/PTEST/inst/apps/PTEST_ruh-erpat01/logs/appl/conc/log/
[oratest@RUH-ERPAT01 log]$ ls *538023*
l538023.req
[oratest@RUH-ERPAT01 log]$ cat l538023.req
+---------------------------------------------------------------------------+
Application Object Library: Version : 12.0.0

Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.

FNDGSCST module: Gather Schema Statistics
+---------------------------------------------------------------------------+

Current system time is 21-MAR-2016 12:44:23

+---------------------------------------------------------------------------+

**Starts**21-MAR-2016 12:44:23
**Ends**21-MAR-2016 12:44:53
ORA-0000: normal, successful completion
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
In GATHER_SCHEMA_STATS , schema_name= FA percent= 10 degree = 8 internal_flag= NOBACKUP
Error #1: ERROR: While GATHER_TABLE_STATS:
object_name=FA.FA_RX_LOV***ORA-20000: index "FA"."FA_RX_LOV_U1"  or partition of such index is in unusable state***
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+


+---------------------------------------------------------------------------+
No completion options were requested.

Output file size:
0

+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 21-MAR-2016 12:44:53

+---------------------------------------------------------------------------+
================================================================================================================



SOLUTION:                                                                                                                                          

Rebuild the index using the following command.

SQL> alter index fa.FA_RX_LOV_U1 rebuild online;

Index altered.

And then re-run GSS for FA User and retest.


After altered index and retested the issue, and i found that index changed from "fa.FA_RX_LOV_U1" to "fa.FA_RX_LOV_U2"



Rebuild the index using the following command.
SQL> alter index fa.FA_RX_LOV_U2 rebuild online;

Index altered.

And then re-run GSS for FA User and retested the issue


             
This article helps those who face issue with “Gather Schema Statistics”
Thanks for Reading.

Regards,
Mohammed Areefuddin.


Undo_retention Causes Space Problems


Hai, this article will explain how to fix UNDO_TABLESPACE issue for Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit.

Here in following example the Undo_TS is not getting free even after defined retention time. Whereas Undo_TS is designed to be reused; just like TEMP space.

Please read the below note it will provide more detail explanation
Full UNDO Tablespace In 10gR2 and above (Doc ID 413732.1)

SQL> show user
USER is "SYS"
SQL>
SQL>
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE    11.1.0.7.0      Production
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production

SQL>


Check the usage of “UNDO_TABLESPACE”
SQL>
select a.tablespace_name, SIZEMB, USAGEMB, (SIZEMB - USAGEMB) FREEMB
from (select sum(bytes) / 1024 / 1024 SIZEMB, b.tablespace_name
from dba_data_files a, dba_tablespaces b
where a.tablespace_name = b.tablespace_name
and b.contents = 'UNDO'
group by b.tablespace_name) a,
(select c.tablespace_name, sum(bytes) / 1024 / 1024 USAGEMB
from DBA_UNDO_EXTENTS c
where status <> 'EXPIRED'
group by c.tablespace_name) b
where a.tablespace_name = b.tablespace_name;


TABLESPACE_NAME                    SIZEMB    USAGEMB     FREEMB
------------------------------ ---------- ---------- ----------
APPS_UNDOTS1                         1730  1729.0625   0.9375

SQL>


Check the value of max(tuned_undoretention)
SQL>
SQL> select max(maxquerylen),max(tuned_undoretention) from dba_hist_undostat;

MAX(MAXQUERYLEN) MAX(TUNED_UNDORETENTION)
---------------- ------------------------
            8338                   859634
SQL>


The value for tuned_undoretention is high. So, check parameter _smu_debu_mode is set or not
SQL>
SQL> show parameter _smu_debug_mode
SQL>



SOLUTION:                                                                                                                                          

As observed , you have large value for TUNED_UNDORETENTION, this can be caused by two reasons :

1. Using non-autoextensible UNDO data files which can be resolved by one of the following :

- Set _smu_debug_mode=33554432 (recommended) <<<<<<<<<<<<<<<<<<<

With this setting, TUNED_UNDORETENTION is not calculated based on a percentage of the fixed size undo tablespace.
instead v$undostat.tuned_undoretention is set to the maximum of (maxquerylen secs + 300) undo_retention specified in init.ora file.

Please set this parameter and monitor the undo tablespace.


Please read the below note it will provide more detail explanation

Automatic Tuning of Undo_retention Causes Space Problems ( Doc ID 420525.1 )


             
This article helps those who face issue with “UNDO_TABLESPACE”
Thanks for Reading.

Regards,
Mohammed Areefuddin.

Sunday, April 9, 2017

RC-40000: Unable to start up the database.


Error RC-40000 will occur when you gave wrong password for adpreclone  

[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$ adpreclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.2

Enter the APPS User Password: (gave wrong password for apps)
Running:
perl /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/bin/adclone.pl java=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/jre mode=stage stage=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ruh-erpdb01.xml showProgress
APPS Password :

Beginning database tier Stage - Sat Apr  8 10:05:53 2017

/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/u02/oracle/PROD/db/tech_st/11.1.0/oui -classpath /u02/oracle/PROD/db/tech_st/11.1.0/lib/xmlparserv2.jar:/u02/oracle/PROD/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/java:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/OraInstaller.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/ewt3.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/share.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/srvm.jar:/u02/oracle/PROD/db/tech_st/11.1.0/jlib/ojmisc.jar   oracle.apps.ad.clone.StageDBTier -e /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ruh-erpdb01.xml -stage /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/clone -tmp /tmp -method CUSTOM    -showProgress
APPS Password :
Log file located at /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_ruh-erpdb01/StageDBTier_04081005.log

AutoClone needs to start the database up to generate cloning information
  -     50% completed       RC-40000: Fatal: Unable to start up the database

ERROR while running Stage...
Sat Apr  8 10:06:19 2017

ERROR while running perl /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/bin/adclone.pl java=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/jre mode=stage stage=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ruh-erpdb01.xml showProgress ...
Sat Apr  8 10:06:19 2017
[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$


================================================================================================================

adpreclone log file message


    Connection could not be obtained; returning null

-------------------ADX Database Utility Finished---------------

RC-40000: Unable to start up the database
Raised by oracle.apps.ad.clone.StageDatabase
RC-40000: Unable to start up the database
Raised by oracle.apps.ad.clone.StageDatabase


================================================================================================================

Because of wrong credentials, apps user account has locked. You cannot connect apps until you have unlocked apps user account.


[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Apr 8 10:14:50 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> connect apps/apps
ERROR:
ORA-28000: the account is locked


Warning: You are no longer connected to ORACLE.
SQL> exit

[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.7.0 - Production on Sat Apr 8 10:15:33 2017

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> select username, account_status from dba_users where username like 'APPS';

USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
APPS                           LOCKED(TIMED)

SQL> alter user apps account unlock;

User altered.

SQL> select username, account_status from dba_users where username like 'APPS';

USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
APPS                           OPEN

SQL> exit

[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$ adpreclone.pl dbTier

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle Applications Rapid Clone

                                 Version 12.0.0

                      adpreclone Version 120.20.12010000.2

Enter the APPS User Password: (gave correct password for apps)
Running:
perl /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/bin/adclone.pl java=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/jre mode=stage stage=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/clone component=dbTier method=CUSTOM dbctx=/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ruh-erpdb01.xml showProgress
APPS Password :

Beginning database tier Stage - Sat Apr  8 10:21:14 2017

/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/u02/oracle/PROD/db/tech_st/11.1.0/oui -classpath /u02/oracle/PROD/db/tech_st/11.1.0/lib/xmlparserv2.jar:/u02/oracle/PROD/db/tech_st/11.1.0/jdbc/lib/ojdbc6.jar:/u02/oracle/PROD/db/tech_st/11.1.0/appsutil/java:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/OraInstaller.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/ewt3.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/share.jar:/u02/oracle/PROD/db/tech_st/11.1.0/oui/jlib/srvm.jar:/u02/oracle/PROD/db/tech_st/11.1.0/jlib/ojmisc.jar   oracle.apps.ad.clone.StageDBTier -e /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/PROD_ruh-erpdb01.xml -stage /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/clone -tmp /tmp -method CUSTOM    -showProgress
APPS Password :
Log file located at /u02/oracle/PROD/db/tech_st/11.1.0/appsutil/log/PROD_ruh-erpdb01/StageDBTier_04081021.log

  |      0% completed

Completed Stage...
Sat Apr  8 10:21:26 2017
[oraprod@RUH-ERPDB01 PROD_ruh-erpdb01]$




Thanks for Reading...!!

Regards,
Mohammed Areefuddin.