Fnd_stats.gather_schema_statistics
hi, Does anybody know when running fnd_stats.gather_schema_statistics for schema level stats would impact overall database performance during the running time..
I know it improves the performance after it finish.. but never recognized such impact while running it... I just need a confirmation if any had such issue/case during peak hrs while running/gathering stats for high contention schema..
Thanks,
Pl post EBS related question in the EBS forums at http://forums.oracle.com/forums/category.jspa?categoryID=3
It is recommended that FND_STATS (the Gather Schema Stats concurrent program) be run when the database is experiencing little to no load.
Troubleshooting Oracle Applications Performance Issues (Doc ID 169935.1)
How Often Should Gather Schema Statistics Program be Run? (Doc ID 168136.1)
HTH
Srini
Similar Messages
-
FND_stats.gather_schema_stats error
I follow ORACLE document and tried to run FND_STATS.XXX, but i got error.
sqlplus apps/apps
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Apr 23 14:27:45 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exec fnd_stats.gather_schema_stats('ALL');
BEGIN fnd_stats.gather_schema_stats('ALL'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GATHER_SCHEMA_STATS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any ideal?
ThanksHi,
SQLL> exec fnd_stats.gather_schema_stats('ALL');Try this ..
SQL> exec fnd_stats.gather_schema_statistics('ALL') Note: 419728.1 - How To Gather Statistics On Oracle Applications 11.5.10(and above) - Concurrent Process,Temp Tables, Manually
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=419728.1
Regards,
Hussein -
1.Lock a table statistics
2. Run fnd_stats.gather_table_stats
3.It fails with statistics are locked
4.Run fnd_stats.gather_schema_statistics for the schema containing the table
5.It completes excepting that table alone
I am running pl/sql script for a group of schema for which statistics needs to be gathered. I use fnd_stats.gather_schema_statistics.I could not catch hold of the exception if i run fnd_stats.gather_schema as it is not throwing any messages when it faces a table with locked stats where as fnd_stats.gather_table does.
Is it the default behaviour of these packages or anyways to get the exception ?Hi,
When running the gather schema statistics for Schema you can get the respective messages in the concurrent log file. But if you are running via the command line, then the following link will be of help to you:
Gather Statistics for a Schema
HTH!
Thanks &
Best Regards, -
Error while running sql queries..
Hi there,
We are suppose to run gather schema stats..
but while running the procedure we are getting following error..
gather_schema.sql:
exec fnd_stats.gather_schema_statistics('CMWCONN');
exec fnd_stats.gather_schema_statistics('CMW');
exec fnd_stats.gather_schema_statistics('ALL');
SQL> @gather_schema.sql;
BEGIN fnd_stats.gather_schema_statistics('CMWCONN'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FND_STATS.GATHER_SCHEMA_STATISTICS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
BEGIN fnd_stats.gather_schema_statistics('CMW'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FND_STATS.GATHER_SCHEMA_STATISTICS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
BEGIN fnd_stats.gather_schema_statistics('ALL'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FND_STATS.GATHER_SCHEMA_STATISTICS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Could you give me the correct pl/sql procedure to run the query.
Thanks,.
Balu.Actually the script was working fine last week..we are using the following script
SQL> exec fnd_stats.gather_schema_statistics('ALL');
but it throws me the following error
BEGIN fnd_stats.gather_schema_statistics('ALL'); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'FND_STATS.GATHER_SCHEMA_STATISTICS' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored -
Error encountered while applying 6435000
Hi Guys!
Does anyone encountered this error while applying this patch 6435000?
Below is the error;
ERROR at line 1:
ORA-20000: ORA-20000: Unable to analyze TABLE "APPS"."TMP_NEWTARIFF",
insufficient privileges or does not exist Error while executing
FND_STATS.GATHER_SCHEMA_STATISTICS package.
ORA-06512: at line 120
Thanks in advance...Hi,
Check if the following note helps you:
FDPSTP failed due to ORA-20000: Unable to analyze TABLE FND_STATS (Doc ID 879660.1)
Thanks &
Best Regards, -
Apps Tables for fnd_stats
Hi Gurus ,
I am on 12.0.4 & Database 10.2.0.5.0 - 64bi.
It is a two node architecture with db running on one node and CP,FORMS,admin , web on the other node.
I also have
Oracle Application Server SOA Suite 10.1.3.1.0
Oracle BPEL Process Manager 10.1.3.1.0
I request your help in determining on which schemas need to be used FND_STATS and gather_stats as most of the schemas are Oracle.
Regards,
DBAPpsHi,
You may use FND_STAT in order to collect statistics or you may submit the 'Gather Schema Statistics' concurrent program from the front end. You may run this program to collect statistics on the products/users (eg GL, AP, AR and etc) which you have installed in your EBS or simply run it on all schemas to update the statistics for all users.
Please refer notes:
FNDNLINS.SQL: Performance Issue Running Script. (Doc ID 788008.1)
OM-PERF: Performance Tuning - FAQ (Doc ID 113573.1)
Also refer links:
Run gather statistics for Oracle Applications database schemas and tables.
http://appsdba.info/docs/oracle_apps/R12/Gather_Schema_Statistics_%20Using_FND_stats.pdf
Hope this helps!
Thanks &
Best Regards, -
Percent Gathering Statistics with FND_STATS
Hi,
We gather statistics for the schemas and tables in our database using the FND_STATS package. Now we are running it with an 80% sample. Once we run it at 30 % and we had a lot of performance issues.
How can we determine the optimal value for percentage?
What percentage is usually used for E-Business suite?
Thanks in advance for your help.
CarlosHow Often Should Gather Schema Statistics Program be Run?
There is no set schedule for gathering schema statistics. On some systems the program should be run weekly. On other systems once per month will be often enough. The schedule will vary greatly depending on the amount and nature of the data and how often the data changes.
It will be necessary to try different schedules over time and monitor performance to determine the most effective schedule.
As a general rule, run Gather Schema Statistics under the following circumstances:
1. After there has been a significant change in data in either content or volume
2. After importing data
3. Any time end-users notice a deterioration in performance in routine day-to-day business transactions or when running concurrent programs -
Apps.fnd_stats.GATHER_INDEX_STATS
Hi all,
Is there any problem if I run apps.fnd_stats.GATHER_INDEX_STATS as sysdba instead of apps ?
Kind regardsHi,
The procedure GATHER_INDEX_STATS in EBS system is exactly the same as the procedure GATHER_INDEX_STATS specified in the SYS schema in a typical Database.
The procedure GATHER_INDEX_STATS in EBS system is merely wrapped in the fnd_stats package owned by apps schema in order to execute it as a concurrent program...
Oracle suggests on EBS systems to run this procedure with APPS credentials using concurrent program...
Do you have any problem to execute it with this manner...???
Greetings,
Sim -
FND_STATS.PURGE_STAT_HISTORY
HI
i want to know the complete command to run this to purge the fnd_stats_hist
FND_STATS.PURGE_STAT_HISTORY
Thied runnning it from front end but the date parameter is not properly understood.
Regardsseen that form your post in other thread
even gave then the same metalink note id for refrence but still they ask me to run this.
some thing like this
WebIV SEARCH
Bug.6654910 PURGE FND_STATS HISTORY RECORDS,PURGE SIGNON AUDIT DATA ARE NOT PURGING
ENTRIES
Bug.5520911 ABILITY TO DELETE DATA FROM FND_STATS_HIST
Bug.6264433 ORA-1 ERRORS ARE REPORTED FOR APPLSYS.FND_STATS_HIST_U1 DURING GATHERING
STATS
Bug.5520911 ABILITY TO DELETE DATA FROM FND_STATS_HIST
Also, SR 6638759.992 is similar.
please review Note 732713.1 Purging Strategy for eBusiness Suite 11i
You need to run the "Purge Fnd_stats History Records" concurent program
You can also clean manualy all history found in FND_STATS_HIST table be executing (FND_STATS.PURGE_STAT_HISTORY)
Regards -
Patch 6241631 fails on "APPS.FND_STATS" has errors
Good day,
While applying the patch I got this error
sqlplus -s APPS/***** @/ora/oracle/prodappl/fnd/11.5.0/patch/115/sql/afffvst1.sql &un_fnd &pw_fnd
DECLARE
ERROR at line 1:
ORA-04063: package body "APPS.FND_STATS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "APPS.FND_STATS"
ORA-06512: at line 21
I tried to manually compile the APPS.FND_STATS package as the apps user and was met with this error
PACKAGE BODY APPS.FND_STATS
On line: 906
PL/SQL: ORA-00942: table or view does not exist
This is the header file of the package
/* $Header: AFSTATSB.pls 115.97 2008/11/24 10:53:40 appldev ship $ */
Any help would be greatly appreciated.
Thank you.Thank You
Patch 6678700 Fails On Afffvst1.Sql And Asostats.Sql ORA-04063: package body "APPS.FND_STATS" has errors (Doc ID 1371276.1) did the trick.
Regards,
Shridath. -
Hello,
I am getting this error when i am trying to execute a PL/SQL script using an Oracle API
We are using Oracle 10g release 2 database. I am getting this error only on some instances. This script is running fine in Development instances.
Script:
SET VERIFY OFF;
SET serveroutput on size 100000;
SET linesize 300;
EXEC FND_STATS.GATHER_COLUMN_STATS ('AR', 'HZ_LOCATIONS', 'COUNTRY');
SELECT
hl.location_id,hl.state, hl.country,
hcasa.org_id
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
--PROMPT Dropping Table pmr13286_temptable
DROP TABLE pmr13286_temptable;
CREATE TABLE pmr13286_temptable AS (SELECT
hp.attribute_category , hl.address_lines_phonetic,
hps.party_site_number,hca.cust_account_id,
hcsua.site_use_code, hcsua.primary_flag, hcsua.status,
hl.address1, hl.address2, hl.address3, hl.address4,
hl.city, hl.state, hl.postal_code, hl.country,
hl.county, hl.province, hcasa.org_id,
hl.creation_date
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%');
DECLARE
l_location_rec hz_location_v2pub.location_rec_type;
l_object_version_number hz_locations.object_version_number%TYPE;
p_status_code NUMBER;
l_api_status VARCHAR2 (2000);
l_msg_count NUMBER (15);
l_msg_data VARCHAR2 (2000);
v_total_count NUMBER (15);
v_prvi_count NUMBER (15);
v_countr_count NUMBER (15);
v_null_count NUMBER (15);
v_rem_recs NUMBER (15);
v_status_code VARCHAR2 (2000);
l_sql_errmsg VARCHAR2 (500);
CURSOR c_cust_addr
IS
SELECT
hl.*
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
BEGIN
v_total_count := 0;
v_prvi_count := 0;
v_countr_count := 0;
v_null_count := 0;
dbms_output.put_line('Total Count'||v_total_count );
dbms_output.put_line('PR/VI Conversion Count'||v_prvi_count );
dbms_output.put_line('PR/VI to US Conversion Count'||v_countr_count );
dbms_output.put_line('Non US/CA State Null Count'||v_null_count );
FOR i IN c_cust_addr
LOOP
l_location_rec := NULL;
v_total_count := v_total_count + 1;
l_location_rec.location_id := i.location_id;
l_location_rec.state := i.state;
l_location_rec.country := i.country;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
BEGIN
SELECT hl.object_version_number
INTO l_object_version_number
FROM hz_locations hl
WHERE hl.location_id = l_location_rec.location_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
raise_application_error (
-20059,
'object_version_number not found for location = '
|| TO_CHAR (l_location_rec.location_id)
END;
Update 1 - Update Addresses of 3 records that have wrong country names
BEGIN
IF (l_location_rec.location_id IN (1436720,119456,604649)) THEN
dbms_output.put_line(' 3 records Location_id '||l_location_rec.location_id);
IF ( l_location_rec.location_id = 1436720) THEN
l_location_rec.state := 'OH';
l_location_rec.country := 'US';
ELSIF ( l_location_rec.location_id = 119456) THEN
l_location_rec.country := 'US';
ELSIF ( l_location_rec.location_id = 604649) THEN
l_location_rec.country := 'PK';
END IF;
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
END IF;
END;
Update 2 - Update state to 'VI','PR' where country is in 'VI','PR'
BEGIN
IF (i.country = 'PR' AND (i.state <> 'PR' OR i.state IS NULL))
OR (i.country = 'VI' AND (i.state <> 'VI'OR i.state IS NULL)) THEN
v_prvi_count := v_prvi_count + 1;
dbms_output.put_line(' State to PR/VI Location_id '||l_location_rec.location_id);
SELECT DECODE (i.country,'PR','PR','VI', 'VI') INTO l_location_rec.state
FROM apps.hz_locations WHERE
location_id = l_location_rec.location_id;
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END;
Update 3 - Update Country code to 'US' where state code is either 'PR' or 'VI'
BEGIN
IF l_location_rec.state = 'PR' OR l_location_rec.state = 'VI'
THEN l_location_rec.country := 'US';
v_countr_count := v_countr_count + 1;
dbms_output.put_line('PR/VI country to US Location_id '||l_location_rec.location_id);
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END;
Update 4 - Update state code to NULL where state code is NOT NULL and country code is not in US or CA
IF l_location_rec.country NOT IN ('US','CA') AND l_location_rec.state IS NOT null
THEN l_location_rec.state := FND_API.G_NULL_CHAR;
v_null_count := v_null_count + 1;
dbms_output.put_line('Non US/CA to Null Location_id '||l_location_rec.location_id);
hz_location_v2pub.update_location (
fnd_api.g_true,
l_location_rec,
l_object_version_number,
l_api_status,
l_msg_count,
l_msg_data
IF l_api_status <> fnd_api.g_ret_sts_success
THEN
dbms_output.put_line(' Error In API with status of '||l_api_status);
IF l_msg_count > 1
THEN
FOR s IN 1 .. l_msg_count
LOOP
l_sql_errmsg :=
SUBSTR (
RTRIM (l_sql_errmsg)
|| ' , '
|| RTRIM (
fnd_msg_pub.get (p_encoded => fnd_api.g_false)
1,
500
END LOOP;
ELSE
l_sql_errmsg := SUBSTR (l_msg_data, 1, 500);
END IF;
dbms_output.put_line(' Error Message '||l_sql_errmsg);
ROLLBACK;
RETURN;
END IF;
dbms_output.put_line('Location_id '||l_location_rec.location_id||' '||'State '||l_location_rec.state||' '||'Country '||l_location_rec.country);
END IF;
END LOOP;
v_countr_count := v_countr_count +2;
dbms_output.put_line('Total Count'||v_total_count );
dbms_output.put_line('PR/VI Conversion Count'||v_prvi_count );
dbms_output.put_line('PR/VI to US Conversion Count'||v_countr_count );
dbms_output.put_line('Non US/CA State Null Count'||v_null_count );
BEGIN
SELECT
count(*) into v_rem_recs
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';
dbms_output.put_line('remaining count '||v_rem_recs );
END;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error in Program: ' ||' Error Message ' || SQLERRM);
ROLLBACK;
END;
SELECT
hl.location_id,hl.state, hl.country,
hcasa.org_id
FROM hz_cust_site_uses_all hcsua,
hz_cust_acct_sites_all hcasa,
hz_party_sites hps, apps.hz_locations hl,
hz_parties hp,
hz_cust_accounts hca
WHERE hcsua.cust_acct_site_id = hcasa.cust_acct_site_id
AND hcasa.party_site_id = hps.party_site_id
AND hps.location_id = hl.location_id
AND hp.party_id = hps.party_id
AND hca.cust_account_id = hcasa.cust_account_id
AND hca.party_id = hp.party_id
AND hl.country NOT IN ('US','CA')
AND hps.party_site_number NOT LIKE 'M%';You may want to zero in on the part of the code that throws this error.
(i)
Try executing a small part of your code, while commenting out the rest. If that is successful, execute a slightly bigger part of the code, and so on successively. Once you know, where exactly the code is failing, it should be easier to create a small testcase against your data and investigate the problem.
(ii)
Check those local variables and the values that get assigned to them. It is a good practice to anchor local variables to database columns. That way, there will be less surprises when the table structures are altered.
(iii)
The script as such does not show any glaring error, but you may want to check those procedure calls e.g. -
hz_Location_v2Pub.Update_Location(fnd_aPi.g_True,l_Location_rec,l_Object_Version_Number,
l_aPi_Status,l_msg_Count,l_msg_Data);It's quite possible that the procedure is assigning a value to an output parameter that is too small to store that.
Note that, given such a huge script and not knowing your database, we are not particularly inclined to debug it. The only person who can make things easier for himself/herself is you.
HTH,
isotope -
Require help in understanding exporting and importing statistics.
Hi all,
I am bit new to this statistics.
Can anyone please explain me in detail about these commands.
1) exec DBMS_STATS.GATHER_TABLE_STATS (ownname => 'MRP' , tabname => 'MRP_ATP_DETAILS_TEMP', estimate_percent => 100 ,cascade => TRUE);
2) exec DBMS_STATS.CREATE_STAT_TABLE ( ownname => 'MRP', stattab => 'MRP_ATP_3');
3) exec DBMS_STATS.EXPORT_TABLE_STATS ( ownname => 'MRP', stattab => 'MRP_ATP_3', tabname => 'MRP_ATP_DETAILS_TEMP',statid => 'MRP27jan14');
4) exec DBMS_STATS.IMPORT_TABLE_STATS ( ownname => 'MRP', stattab => 'MRP_ATP_3', tabname => 'MRP_ATP_DETAILS_TEMP');
I understand that these commands are used to export and import table statistics.
But please anyone help me in understanding this indetail.
Thanks in advance.
Regards,
Shiva.Shiva,
Please post the details of the application release, database version and OS.
Please see (FAQ: Statistics Gathering Frequently Asked Questions (Doc ID 1501712.1) -- What is the difference between DBMS_STATS and FND_STATS).
For exporting/importing statistics summary of FND_STATS Subprograms can be found in (Doc ID 122371.1)
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_details?c_name=FND_STATS&c_owner=APPS&c_type=PACKAGE&c_detail_type=source
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_details?c_name=FND_STATS&c_owner=APPS&c_type=PACKAGE%20BODY&c_detail_type=source
Thanks,
Hussein -
Gather shema stats for all objects in DB taking too much time
Dear ,
we schedule concurrent request " Gather Schema Statistics" to gather ALL schema on DB weekly . it takes on Test 4.5 hours to complete and 5 hours on Production system . we have only HR in Production and very soon it will start supply chain and Financial so I'm afraid from this time to increase in the near future . how could we reduce this time ? i tried to gather stats only with changed objects using " GATHER AUTO " option instead of " GATHER " but it gave me the following error
Cause: FDPSTP failed due to ORA-20001: NEW TABLE is an invalid identifier
ORA-06512: at "APPS.FND_STATS", line 799
ORA-06512: at line 1
The SQL statement being executed at the time of the error was: SELECT R.Conc_Login_Id,
Start of log messages from FND_FILE
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 8 internal_flag= NOBACKUP
ORA-20001: NEW TABLE is an invalid identifier
End of log messages from FND_FILE
please if anyone knows how to reduce time for Gather stats or know how to solve this error he'll be much appreciatedHi,
i tried to gather stats only with changed objects using " GATHER AUTO " option instead of " GATHERYoudo not have to change this parameter, just schedule the concurrent program for HR (as suggested above), and you can schedule it for other schemas on regular basis (at the weeke ends) when there is no activity on the system -- Please see (Note: 168136.1 - How Often Should Gather Schema Statistics Program be Run?).
Regards,
Hussein -
Gather Schema Statistics Report taking more than 13 hours to complete is it normal?
I have run Gather Schema Statistics Report at 9 pm and it completed on 11am next morning. It almost took more than 13 hours, is this behavior normal.
I have used the following parameter.
Schema name: ALL
Estimate percent:50
Backup Flag :NOBACKUP
History Mode :LASTRUN
Gather Option:GATHER
Invalidate Dependent Cursor : Y
My database size is about 250 GB.
Please replyGather schema stastics is erroring out when i'm using the GATHER_AUTO option with 10%.
Here is the log file
+---------------------------------------------------------------------------+
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 13-AUG-2013 10:42:12
+---------------------------------------------------------------------------+
**Starts**13-AUG-2013 10:42:12
ORACLE error 20001 in FDPSTP
Cause: FDPSTP failed due to ORA-20001: SYS_NTGNSVL1S+OCZGRAAHKD9MYG== is an invalid identifier
ORA-06512: at "APPS.FND_STATS", line 774
ORA-06512: at line 1
The SQL statement being executed at the time of the error was: SE
+---------------------------------------------------------------------------+
Start of log messages from FND_FILE
+---------------------------------------------------------------------------+
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 8 internal_flag= NOBACKUP
ORA-20001: SYS_NTGNSVL1S+OCZGRAAHKD9MYG== is an invalid identifier
+---------------------------------------------------------------------------+
End of log messages from FND_FILE
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
Executing request completion options...
Finished executing request completion options.
+---------------------------------------------------------------------------+
Concurrent request completed
Current system time is 13-AUG-2013 10:43:29
+---------------------------------------------------------------------------+
I have used the following parameters
Schema name: ALL
Estimate percent:10
Backup Flag :NOBACKUP
History Mode :LASTRUN
Gather Option:GATHER_AUTO
Invalidate Dependent Cursor : Y -
Testing Process for Gathering Single Object stats.
Hello Oracle Experts,
I work a critical system and due to some high stakes all and every change is very heavily scrutinized here whatever the level is. And one of such changes which is currently under scrutiny is gathering object stats for single objects. Just to give you a background its an Oracle eBusiness site so fnd_stats is used instead of usual dbms_stats and we've an inhouse job that depending on the staleness of the objects gather stats on them using FND_STATS. (RDBMS : 10.2.0.4 Apps Release 12i).
Now, we've seen that occasionally it leaves some of the objects that should ideally be gathered so they need to be gathered individually and our senior technical management wants a process around it - for gathering this single object stats (I know!). I think I need to explicitly mention here that this need to gather stale object stats has emerged becs one of the plans has gone pretty poor (from 2 ms to 90 mins) and sql tuning task states that stats are stale and in our PROD copy env (where the issue exists) gathering stats reverts to original good plan! So we are not gathering just because they are stale but instead because that staleness is actually causing a realtime problem!
Anyway, my point is that it has been gathered multiple times in the past on that object and also it might get gathered anytime by that automatic job (run nightly). There arguments are:
i. There may be several hundred sql plans depending on that object and we never know how many, and to what, those plan change and it can change for worse causing unexpected issues in the service!
ii. There may be related objects whose objects have gone stale as well (for example sales and inventory tables both see related amount of changes on column stock_level) and if we gather stats only on one of them and since those 2 cud be highly related (in queries etc.) that may mess up the join cardinality etc. messing up the plans etc.
Now, you see they know Oracle as well !
My Oracle (and optimizer knowledge) clearly suggests me that these arguments are baseless BUT want to keep an open mind. So my questions are :
i. Do the risks highlighted above stand any ground or what probably do you think is there of happening any of the above?
ii. Any other point that I can make to convince the management.
iii. Or if those guys are right, Do you guys use or recommend any testing strategy/process that you can suggest to us pls?
Another interesting point is that, they are not even very clear at this stage how they are gonna 'test' this whole thing as the 'cost' option like RAT (Real Application Testing) is out of question and developing an inhouse testing tool still need analyzing in terms of efforts, worth and reliability.
In the end, Can I request top experts from the 'Oak Table' network to make a comment so that I can take their backings!? Well I am hoping here they'll back me up but that may not necessarily the case and I obviously want an honest expert assessment of the situation and not merely my backing.
Thanks so much in advance!>
I work a critical system and due to some high stakes all and every change is very heavily scrutinized here whatever the level is.
Another interesting point is that, they are not even very clear at this stage how they are gonna 'test' this whole thing as the 'cost' option like RAT (Real Application Testing) is out of question and developing an inhouse testing tool still need analyzing in terms of efforts, worth and reliability.Unfortunately your management's opinion of their system as expressed in the first paragraph is not consistent with the opinion expressed in the second paragraph.
Getting a stable strategy for statistics is not easy, requires careful analysis, and takes a lot of effort for complex systems.
>
In the end, Can I request top experts from the 'Oak Table' network to make a comment so that I can take their backings!? Well I am hoping here they'll back me up but that may not necessarily the case and I obviously want an honest expert assessment of the situation and not merely my backing.
The ideal with stats collection is to do something simple to start with, and then build on the complex bits that are needed - something along the lines suggested by Dan Morgan works: a table driven approach to deal with the special cases which are usually: the extreme indexes, the flag columns, the time-based/sequential columns, the occasional histogram, and new partitions. Unfortunately you can't get from where you are to where you need to be without some risk (after all, you don't know which bits of your current strategy are causing problems).
You may have to progress by letting mistakes happen - in other words, when some very bad plans show up, work out WHY they were bad (missing histogram, excess histogram, out of date high values) to work out the minimum necessary fix. Put a defensive measure in place (add it to the table of special cases) and run with it.
As a direction to aim at - I avoid histograms unless really necessary, I like introducing function-based indexes where possible, and I'm perfectly happy to write small programs to fix columns stats (low/high/distinct) or index stats (clustering_factor/blevel/distinct_keys) and create static histograms.
Remember that Oracle saves old statistics when you create new ones, so any new stats that cause problems can be reversed out very promptly.
Regards
Jonathan Lewis
Maybe you are looking for
-
How do I read this "standard" table in my Function Module?
I have a remote-enable Function Module (RFC). I am receiving two tables as part of the parameters. Table "A" is header information, and Table "B" is detail information. So for every 1 "A" header record, I may have 1 to many "B" detail records. I
-
How do I merge 2 icloud accounts?
how do I merge 2 icloud accounts?
-
Logging in to the account failed because an error occurred
I've been looking after Mac's in an ophthalmologist's office for about 6 years. We initially used Panther server with networked home directories. With the large images, slow computers, and slow network we moved about 4 years ago to local accounts a
-
Stored Procedure for restrict to close documents
Hi, I want to create a Stored Procedure for restrict to close sales orders for some users, because in Standard Authorizations you have one option to restrict to close, but I need that some users can close quotations and also this users can´t close sa
-
How can I get a trial version of Captivate 5.5?
I very much need access to a trial version of Captivate 5.5. Every time I think I have found one, I am eventually offered Captivate 7. I really need 5.5.