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?
Thanks
Hi,
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
Similar Messages
-
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. -
Gather Schema Statistics - GATHER AUTO option failing to gather stats
Hi ,
We recently upgraded to 10g DB and 11.5.10 version of Oracle EBS. I want to employ GATHER AUTO option while running Gather Schema Statistics.
To test the working, I created a test table with 1 million rows. Then, stats were gathered for this table alone by using Gather Table Stats. Now, I deleted ~12% of rows & issued commit. The table all_tab_statistics shows that the table has stale statistics (stale stats column = YES). After that I ran Gather Schema Stats for that particular schema. But the request did not pick the test table to be gathered.
What is the criterion on which Oracle chooses which all tables to be gather statistics for under Gather Auto option? I am aware of the 10% change in data, but how is this 10% calculated? Is it only based on (insert + update + delete)?
Also, what is the difference between Gather Auto and Gather Stale ?
Any help is appreciated.
Thanks,
JithinRandalf,
FYI.. this is what happens inside the concurrent progarm call.. there are a few additional parameters for output/ error msgs:
procedure GATHER_SCHEMA_STATS(errbuf out varchar2,
retcode out varchar2,
schemaname in varchar2,
estimate_percent in number,
degree in number ,
internal_flag in varchar2,
request_id in number,
hmode in varchar2 default 'LASTRUN',
options in varchar2 default 'GATHER',
modpercent in number default 10,
invalidate in varchar2 default 'Y'
is
exist_insufficient exception;
bad_input exception;
pragma exception_init(exist_insufficient,-20000);
pragma exception_init(bad_input,-20001);
l_message varchar2(1000);
Error_counter number := 0;
Errors Error_Out;
-- num_request_id number(15);
conc_request_id number(15);
degree_parallel number(2);
begin
-- Set the package body variable.
stathist := hmode;
-- check first if degree is null
if degree is null then
degree_parallel:=def_degree;
else
degree_parallel := degree;
end if;
l_message := 'In GATHER_SCHEMA_STATS , schema_name= '|| schemaname
|| ' percent= '|| to_char(estimate_percent) || ' degree = '
|| to_char(degree_parallel) || ' internal_flag= '|| internal_flag ;
FND_FILE.put_line(FND_FILE.log,l_message);
BEGIN
FND_STATS.GATHER_SCHEMA_STATS(schemaname, estimate_percent,
degree_parallel, internal_flag, Errors, request_id,stathist,
options,modpercent,invalidate);
exception
when exist_insufficient then
errbuf := sqlerrm ;
retcode := '2';
l_message := errbuf;
FND_FILE.put_line(FND_FILE.log,l_message);
raise;
when bad_input then
errbuf := sqlerrm ;
retcode := '2';
l_message := errbuf;
FND_FILE.put_line(FND_FILE.log,l_message);
raise;
when others then
errbuf := sqlerrm ;
retcode := '2';
l_message := errbuf;
FND_FILE.put_line(FND_FILE.log,l_message);
raise;
END;
FOR i in 0..MAX_ERRORS_PRINTED LOOP
exit when Errors(i) is null;
Error_counter:=i+1;
FND_FILE.put_line(FND_FILE.log,'Error #'||Error_counter||
': '||Errors(i));
-- added to send back status to concurrent program manager bug 2625022
errbuf := sqlerrm ;
retcode := '2';
END LOOP;
end; -
Need advice about coalesce and deallocate unused space
Hi experts;
Here looking for an advice about coalesce and deallocate unused space.
I got this tablespace with 87% full, one of the table in that tablespace has 1,150,325 records. I'm going to delete 500,000 records from that table, but to release the space used by those records I understand that I need to execute other procedure. I was reading about coalesce tablespace and deallocate unused space.
I found that apparently, both process can help me to free space. If you want to share with me your comments, about advantages or disadvantages about them, in order I can take the best solution?
Thanks for your comments.
AlHi
after deleted rows, the high water mark is still the same and so the size of the table. you need to bring down the water mark
here is what you need to do to bring down the high water mark. We do this monthly for performance purpose.
This is an EBS R12 system but the procedures are the same for EBS database or non EBS database.
After you purge or delete data in a table
1) alter table APPLSYS.WF_ITEM_ATTRIBUTE_VALUES move; <-- this operation will invalidate all indexes attache to the table
2)select owner, index_name, status from dba_indexes -- list all invalid object for user APPLSYS
where table_owner = upper('APPLSYS')
and
status NOT IN ('VALID','N/A');
3)spool idxrebuild.sql --generate script to rebuild indexes.
select 'alter index ' ||owner||'.'||index_name ||' rebuild online;' from dba_indexes
where table_owner = upper('APPLSYS')
and
status <> 'VALID';
4) run idxrebuild.sql -- to rebuild indexes. -- at this point if you check spaces on the table, it is still the same, you need to run #5
5)exec fnd_stats.gather_schema_stats ('APPLSYS'); --fnd_stat is for EBS system you can replace with the database equivalent command.
use this statement to count the block before and after the operation to see the different.
select DISTINCT(SEGMENT_NAME), count(blocks) "Total Block" from dba_extents
where
owner IN ('APPLSYS')
AND segment_name = 'WF_ITEM_ATTRIBUTE_VALUES'
Hope this help. -
Error while using DBMS_STATS.GATHER_schema_STATS
Hi All,
My database just got upgraded from Oracle 9i to Oracle 11g.
While everything else is working fine post upgrade Oracle, the DBMS_STATS.GATHER_schema_STATS with METHOD_OPT => 'FOR COLUMNS SIZE ALL' , which was working fine in Oracle 9i is throwing error after upgarde.
Below is the error I received:
SQL> execute DBMS_STATS.GATHER_schema_STATS ('cins_dm', METHOD_OPT => 'FOR COLUMNS SIZE AUTO');
BEGIN DBMS_STATS.GATHER_schema_STATS ('cins_dm', METHOD_OPT => 'FOR COLUMNS SIZE AUTO'); END;
ERROR at line 1:
ORA-20001: method_opt should follow the syntax "[FOR ALL [INDEXED|HIDDEN] COLUMNS [size_caluse]]" when gathering statistics on a group of tables
ORA-06512: at "SYS.DBMS_STATS", line 9641
ORA-06512: at "SYS.DBMS_STATS", line 9716
ORA-06512: at "SYS.DBMS_STATS", line 10048
ORA-06512: at "SYS.DBMS_STATS", line 18939
ORA-06512: at "SYS.DBMS_STATS", line 19132
ORA-06512: at "SYS.DBMS_STATS", line 19088
ORA-06512: at line 1
OS Details:
Has this option got obsolete in Oracle 11g?
What is the alternative to this?
OS and Databse Details*
OS:
scrbbiddkbry002:sas# uname -a
SunOS scrbbiddkbry002 5.9 Generic_122300-51 sun4u sparc SUNW,Sun-Fire-V240
Oracle Client:
SQL*Plus: Release 9.2.0.1.0 - Production
Oracle Server:
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 Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
Edited by: user13071592 on Aug 3, 2010 2:38 AMHi,
While going through the link, it seems that METHOD_OPT => 'FOR COLUMNS SIZE AUTO' is obsolete in Oracle 11g and I will have to use METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO' instead of that. But the option METHOD_OPT => 'FOR COLUMNS SIZE AUTO' used to take just 5 minutes to complete while METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO' is taking 1 hour.
I want it to take time (5-6 minutes) which the original METHOD_OPT => 'FOR COLUMNS SIZE AUTO' was taking. -
ORA-00904 error in DBMS_STATS.GATHER_SCHEMA_STATS
Oracle 9.2.0.5 on Solaris
I am trying to run weekly stat gathering on a schema, using DBMS_STAT
I am getting this error on a specific table, wehich aborts the entire process:
ORA-00904: "SEARCHKEYWORKS": invalid identifier
there is no such field. the table creator confirmed that initally he called a field SEARCHKEYWORKS, but later dropped it and created a new one with different name. maybe we did run DBMS_STATS on this table before the change.
when trying to delete stats for this table, using bms_stats.delete_table_stats(ownname=> 'yyyy', tabname=> 'xxxx') I get a ORA-20000, unable to set values for column BRIEFDESCRIPTION, an existing column
this table is referenced from many other tables, so a simple drop/recreate would be a pain. any way to fix this?
Note: I can run the old-style command ANALYZE TABLE xxx COMPUTE STATISTICS just fine; its just the DBMS_STATS package that can't be run on this table.thanks for the support.
the weekly task that first reported the error was
EXECUTE DBMS_STATS.GATHER_SCHEMA_STATS('SSSSSS',DBMS_STATS.AUTO_SAMPLE_SIZE,FALSE,'FOR ALL COLUMNS SIZE 1',NULL,'DEFAULT',TRUE);
the log file showed the error. where looking which table was last analyzed I gathered it was this table.
then I tried manually only this table, from manager console using their default, which is:
dbms_stats.gather_table_stats(ownname=> 'SSSSSS', tabname=> 'XXXXXX', partname=> NULL);
Hey,
could you post your dbms_stats complete syntax?
Jaffar -
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 -
ERROR CODE in CREATING JOB SCHEDULER
Please,
I'm having an issue with the below code, does someone can figure out what is not going on?
BEGIN
DBMS_SCHEDULER.CREATE_JOB
JOB_NAME => 'GATHER_DEV_TABLES_STATISTICS',
JOB_TYPE => 'STORED_PROCEDURE',
JOB_ACTION => 'DBMS_STATS.GATHER_SCHEMA_STATS("DEV");',
NUMBER_OF_ARGUMENTS => 0,
START_DATE => '06-JUN-2007 05:00:00 AM',
REPEAT_INTERVAL => 'FREQ=DAILY; BYHOUR=5',
ENABLED => 'TRUE',
AUTO_DROP => 'FALSE',
COMMENTS => 'GATHERING_DEV_TABLE_DAILY_AT_5AM'
* END;
when try to create the job schrdule I got the followin error, any idea will be helpful
DBMS_SCHEDULER.CREATE_JOB
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in call to 'CREATE_JOB'
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored...or the source:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm
Other than the start date, it could be the semi colon shouldn't be there for stored procedure (not like pl block), or missing begin end or that a call to set_job_argument is required. I don't have a server to test on now, so there's a certain lack of precision, sorry... :) -
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 -
Database 8i
OS wndows 2000 server
RAM 1.5 GB
SGA 1136617500 bytes
getting error ORA-04030: Out of process memory when running dbms_stats.gather_schema_stats procedure.
after reducing e size of sort_area_size from 40 M to 10 M above procedure has been successfully completed but problem is this sort_area_size is not suitable
for my normal batch processing How to decide about optimum sort_area_size?
.In the init.ora
PARALLEL_MAX_SERVERS specifies the maximum number of parallel execution processes and parallel recovery processes for an instance. As demand increases, Oracle increases the number of processes from the number created at instance startup up to this value.
If you set this parameter too low, some queries may not have a parallel execution process available to them during query processing. If you set it too high, memory resource shortages may occur during peak periods, which can degrade performance. -
Error when running DBMS_STATS package
Hi all.
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Solaris: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production
I am trying to gather schema stats using dbms_stats package and I see the following:
SQL> BEGIN DBMS_STATS.gather_schema_stats('SYSADM');
2 END;
3 /
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file G534513-1004.txt in EXT_WINDIR not found
ORA-06512: at "SYS.DBMS_STATS", line 9375
ORA-06512: at "SYS.DBMS_STATS", line 9857
ORA-06512: at "SYS.DBMS_STATS", line 10041
ORA-06512: at "SYS.DBMS_STATS", line 10095
ORA-06512: at "SYS.DBMS_STATS", line 10072
ORA-06512: at line 1
The directory exists but the file is long gone. How can I get around this error?
ThanksSee if this helps,
ERROR WITH EXTERNAL TABLE
HTH
Aman.... -
Import finished with few errors...Help understanding it!
Hi all,
Yesterday, I finished to do an import in oracle. I used the impdp command and got few errors after the import was done. Here are some bits from my log. It was very long but I shortened it with the most common errors. I would appreciate your help understanding what does each error mean, and whether there's a solution available.
Thanks!
El sql que falla es:
CREATE TABLESPACE "SYSAUX" DATAFILE SIZE 125829120 LOGGING ONLINE PERMANENT BLOCKSIZE 16384 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT AUTO
ORA-39083: Fallo de creación del tipo de objeto TABLESPACE con el error:
ORA-02236: nombre de archivo no válido
El sql que falla es:
CREATE TABLESPACE "IN_SGC_BD" DATAFILE '+DISKGROUP_BD/sgtc/datafile/rsgtc_in_sgt_bd1' SIZE 132120576 LOGGING ONLINE PERMANENT BLOCKSIZE 16384 EXTENT MANAGEMENT LOCAL AUTOALLOCATE DEFAULT NOCOMPRESS SEGMENT SPACE MANAGEMENT MANUAL
Procesando el tipo de objeto DATABASE_EXPORT/PASSWORD_VERIFY_FUNCTION
ORA-31684: El tipo de objeto PASSWORD_VERIFY_FUNCTION ya existe
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
ORA-39111: Se ha saltado el tipo de objeto dependiente OBJECT_GRANT:"SYSTEM", ya existe el tipo de objeto base SEQUENCE:"SYSTEM"."SDE_LOGFILE_LID_GEN"
ORA-39083: Fallo de creación del tipo de objeto SYNONYM con el error:
ORA-00995: falta el identificador de sinónimos o no es válido
BEGIN
dbms_resource_manager.create_consumer_group('AUTO_TASK_CONSUMER_GROUP','System maintenance task consumer group','ROUND-ROBIN');COMMIT; END;
Procesando el tipo de objeto DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
ORA-39083: Fallo de creación del tipo de objeto PROCACT_SYSTEM con el error:
ORA-29393: el usuario JAIMESP no existe o no está conectado
El sql que falla es:
BEGIN
dbms_resource_manager.create_plan_directive('PLAN_DIA','SGTC_USR','',30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,30,600,5,'SGTC_SWITCH',NULL,TRUE,NULL,10240,1800,900,1800);
dbms_resource_manager.create_plan_directive('PLAN_DIA','SGTC_EDITOR','',40,NULL,NULL,NULL,NULL,NULL,NULL,NULL,10,600,10,'SGTC_SWITCH',NULL,TRUE,NULL,512000,1800,600,3600);
dbms_r
ORA-39083: Fallo de creación del tipo de objeto PROCACT_SYSTEM con el error:
ORA-06550: línea 2, columna 72:
PLS-00103: Se ha encontrado el símbolo "CHECK" cuando se esperaba uno de los siguientes:
in like like2 like4 likec between member submultiset
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/TABLE/TABLE
ORA-39151: La tabla "OUTLN"."OL$" existe. Todos los metadados dependientes y los datos se saltarán debido table_exists_action de saltar
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
. . "SIGELEC"."SDE_BLK_37" 4.976 KB 0 filas importadas
. . "SIGELEC"."SDE_BLK_38" 4.968 KB 0 filas importadas
. . "SGC_BD"."BDE_CRECOBJE" 5.234 KB 0 filas importadas
. . "SIGELEC"."D418" 4.851 KB 0 filas importadas
. . "SYSTEM"."DBM_TOPSQL" 6.125 KB 0 filas importadas
. . "SIGELEC"."F100" 5.562 KB 0 filas importadas
. . "SIGELEC"."F101" 5.593 KB 0 filas importadas
. . "SIGELEC"."F102" 14.77 KB 11 filas importadas
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/PROCEDURE/ALTER_PROCEDURE
ORA-39082: El tipo de objeto ALTER_PROCEDURE:"SYSTEM"."GEN_ROLE_SGTC" se ha creado con advertencias de compilación
ORA-39083: Fallo de creación del tipo de objeto PACKAGE_BODY con el error:
ORA-04052: se ha producido un error al consultar el objeto remoto ENLACE.ELPQ_DATOPROY@CRE
ORA-00604: se ha producido un error a nivel 4 de SQL recursivo
ORA-12154: TNS:no se ha podido resolver el identificador de conexión especificado
ORA-39082: El tipo de objeto TRIGGER:"SIGERED"."TR_CTRL_ENERGIZA" se ha creado con advertencias de compilación
ORA-39083: Fallo de creación del tipo de objeto TRIGGER con el error:
ORA-04052: se ha producido un error al consultar el objeto remoto ENLACE.ELPQ_DATOCONS@CRE
ORA-00604: se ha producido un error a nivel 4 de SQL recursivo
ORA-12154: TNS:no se ha podido resolver el identificador de conexión especificado
El sql que falla es:
ALTER TRIGGER "SIGERED"."TR_CTRL_ENERGIZA" COMPILE PLSQL_OPTIMIZE_LEVEL= 2 PLSQL_CODE_TYPE= INTERPRETED PLSCOPE_SETTINGS= 'IDENTIFIERS:NONE'
ORA-39082: El tipo de objeto TRIGGER:"SIGERED"."TR_CTRL_CONCLUYE" se ha creado con advertencias de compilación
El sql que falla es:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 165, LUSER=> 'SYSTEM', PUSER=> 'SYSTEM', CUSER=> 'SYSTEM', NEXT_DATE=> TO_DATE('2012-05-02 01:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)+1/24', BROKEN=> FALSE, WHAT=> 'dbms_stats.gather_schema_stats(ownname => ''SIGERED'',options => ''GATHER'',estimate_percent => null,method_opt => ''FOR ALL COLUMNS SIZE 1'',cas
ORA-39083: Fallo de creación del tipo de objeto JOB con el error:
ORA-00001: restricción única (SYS.I_JOB_JOB) violada
El sql que falla es:
BEGIN SYS.DBMS_IJOB.SUBMIT( JOB=> 47, LUSER=> 'SIGERED', PUSER=> 'SIGERED', CUSER=> 'SIGERED', NEXT_DATE=> TO_DATE('2012-05-02 01:00:00', 'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)+01/24', BROKEN=> FALSE, WHAT=> 'SIGERED.RDPQ_PROYECTOS.PR_PROCESAR;', NLSENV=> 'NLS_LANGUAGE=''AMERICAN'' NLS_TERRITORY=''AMERICA'' NLS_CURRENCY=''$'' NLS_ISO_CURRENCY=''AMERI
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Procesando el tipo de objeto DATABASE_EXPORT/SCHEMA/PASSWORD_HISTORY
ORA-39083: Fallo de creación del tipo de objeto PASSWORD_HISTORY con el error:
ORA-01858: se ha encontrado un carácter no numérico donde se esperaba uno numérico
El trabajo "SYS"."SYS_IMPORT_FULL_01" ha terminado con 2249 error(es) en 17:21:02Hello people,
I just run for the second time a full import, and it said it finished correctly.
The first time I run it, there was a message which said that the import had finished with 2249 errors (I checked my log and not all of them were errors but messages). I checked each single message and only had to solve a couple of things.
I first created a user in response to an ora-29393: user string does not exist or is not logged on.
The second thing I did was to run the utlrp.sql file in response to an ORA-39082. I did this according to this blog.
I know oracle is taking precedence each time I run an import. I don’t know if what I have done is okay or perhaps not all data was imported after all. This is the thread which I posted initially when errors came out.
Any reply is a supply.
Thanks loads -
Hi
I ran gather schema Statistics
In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 4 internal_flag= NOBACKUP
the error are:
stats on table AQ$_WF_CONTROL_P is locked
stats on table FND_CP_GSM_IPC_AQTBL is locked
Error #1: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JE_FR_DAS_010***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #2: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JE_FR_DAS_010_NEW***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
Error #3: ERROR: While GATHER_TABLE_STATS:
object_name=AP.JG_ZZ_SYS_FORMATS_ALL_B***ORA-20001: invalid column name or duplicate columns/column groups/expressions in method_opt***
I ran this while ago.
anyone can help me to fix it
ThanksPlease see old threads which discuss the same issue -- http://forums.oracle.com/forums/search.jspa?threadID=&q=Gather+AND+Schema+AND+Statistics+AND+ORA-20001&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Find errors while running gather schema stats
BEGIN DBMS_STATS.gather_schema_stats (ownname => '####', cascade =>true,estimate_percent => dbms_stats.auto_sample_size); END;
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SQLDIAG" has errors
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SQLDIAG"
ORA-06512: at "SYS.DBMS_STATS", line 17964
ORA-06512: at "SYS.DBMS_STATS", line 18450
ORA-06512: at "SYS.DBMS_STATS", line 18531
ORA-06512: at "SYS.DBMS_STATS", line 18487
ORA-06512: at line 1Hi Niket,
The statement works fine for me in my environment
SQL> BEGIN DBMS_STATS.gather_schema_stats (ownname => 'SHAJI' , cascade =>true,estimate_percent => dbms_stats.auto_sample_size); END;
2 /
PL/SQL procedure successfully completed.
SQL> exec DBMS_STATS.gather_schema_stats (ownname => 'SHAJI' , cascade =>true,estimate_percent => dbms_stats.auto_sample_size);
PL/SQL procedure successfully completed.
Could you please verify the below objects are valid in your environment ?
SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where owner='SYS' and OBJECT_NAME='DBMS_SQLDIAG';
OWNER OBJECT_NAME OBJECT_TYPE STATUS
SYS DBMS_SQLDIAG PACKAGE VALID
SYS DBMS_SQLDIAG PACKAGE BODY VALID
Otherwise fix the issue by compiling it & try collecting again.
Hope it helps, -
Hi,
I was trying to collect schema stats. The system occurred with ORA-01578 error.
ORA-01110: data file 7: 'M:\ORADATA\PRODORCL\DATAMDM01.DBF'
ORA-26040: Data block was loaded using the NOLOGGING option
ORA-06512: at "SYS.DBMS_STATS", line 12887
ORA-06512: at "SYS.DBMS_STATS", line 13213
ORA-06512: at "SYS.DBMS_STATS", line 13289
ORA-06512: at "SYS.DBMS_STATS", line 13249
ORA-06512: at line 2
I was trying to do:
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') FROM DUAL;
begin
dbms_stats.gather_schema_stats(ownname=>'DBA',estimate_percent => 10,method_opt=>'FOR ALL COLUMNS SIZE 1',cascade=> true);
end;
ThanksI do understand, but I have dealt with block corruption. Can you please tell me how to fix this.
I have gone through couple of documents and tried:
set serveroutput on
declare corr_count binary_integer;
begin
corr_count := 0;
dbms_repair.CHECK_OBJECT (
schema_name => 'DBA',
object_name => 'INVENTORY',
partition_name => null,
object_type => dbms_repair.table_object,
repair_table_name => 'REPAIR_TEST',
flags => null,
relative_fno => null,
block_start => null,
block_end => null,
corrupt_count => corr_count
dbms_output.put_line(to_char(corr_count));
end;
it shows :
6226
but when I do:
set serveroutput on
declare fix_count binary_integer;
BEGIN
fix_count := 0;
dbms_repair.FIX_CORRUPT_BLOCKS (
schema_name => 'DBA',
object_name => 'INVENTORY',
partition_name => null,
object_type => dbms_repair.table_object,
repair_table_name => 'REPAIR_TEST',
flags => null,
fix_count => fix_count
dbms_output.put_line(to_char(fix_count));
END;
it shows:
0
but it should be show the same 6226.
Can you please tell or provide doc for fixing this?
Oracle 10.1.0.5 on windows 2003
Maybe you are looking for
-
Spinning beach ball woes on 27 inch iMac
We have a mid 2010 27 inch iMac (and also a late 2010 13 inch MacBook Air, from which I am writing this post). About 6 months ago it was starting to get spinning beach balls, which I attributed to not having updated the OS (then 10.7). Having upgrade
-
Issue of Material on free /Fixed rate recovery basis to contractor
Hi friends, I have one scenerios as follows: Purchasing dept. issues one contract to service provider with some conditions like some of the material willbe issued on free basis, some of the material willbe issued on fixed rate recovery basis. Is ther
-
How to open PEF (pentax raw) in Bridge CS4
Cannot open Pentax RAW files (PEF) in Bridge CS4. Any help is appreciated. Canon RAW does open.
-
Copying data to a PC...how?
What it the best way, on the fly, to copy files from Mac book pro to a relatively new xp or vista computer? I would like to do minimum configuring on either the PC or mac. It is to much data for memory stick or DVD burn, etc. I want a connection betw
-
pics from my iphone and ipad show up on photostream, but not pics downloaded from my camera. all attempts to move or share with photostream do not work.