How to execute "gather schema stats" in parallel?
Hi,
I've a 11.2 Standard Edition and I need to gather stats for about 20 schemas.
It's possible to execute with a plsql (or other) dbms_stats.gather_schema_stats in parallel?
I want to execute 4 schema stats at time, and when one finish another one starts.
It's possible?
Thanks
Mr.D. wrote:
Hi,
I've a 11.2 Standard Edition and I need to gather stats for about 20 schemas.
It's possible to execute with a plsql (or other) dbms_stats.gather_schema_stats in parallel?
I want to execute 4 schema stats at time, and one finish another one starts.
It's possible?
Thanks
yes it is possible by opening 4 different sessions
which system resource will be saturated first?
Similar Messages
-
How to execute multiple sql statements in parallel ?
Hi There,
I have 10 stored procedures, each one will take approximately 5 seconds to run individually.
Now I need to combine the results of these 10 stored procedures into single result set.
So I have created one more stored procedure "proc_AllSPs" to get the single result set.
The procedure "proc_AllSPs" is taking one minute to run because all the procedures inside the "proc_AllSPs" are running
one after the other and taking 5 seconds each.
If there is any other way that all the procedures run parallelly, then the procedure "proc_AllSPs" can run in 5 seconds time.
Sorry if I am not being elaborated.
PLease get back to me if any piece of information is needed.
Any kind of help is truly thankful.
Thanks,
SequelBugCould you tell me how to execute two stored procedures or two sql statements in parallel
For eg:
First procedure name is proc_sp1 which takes 1 minute to run
Second procedure name is proc_sp2 which takes 1 minute to run
I want to accomplish the below query in 1 minute by executing statement1 and statement2 parallelly.
go
select * from openrowswt('sqloledb','server','exec proc_sp1') --statement1
union
select * from openrowset('sqloledb','server','exec proc_sp2') --statement2
go
OR
go
Select * into #Temp1 from openrowswt('sqloledb','server','exec proc_sp1') --statement1
select * into #Temp2 from openrowset('sqloledb','server','exec proc_sp2') --statement2
Select * from #Temp1
UNION ALL
Select * from #Temp2
go
Thanks,
SequelBug -
How to gather schema stats in 11.5.9
Hi,
I am trying to gather schema stats for 11.5.9. But schemaname does not have the list of schemas. can i enter ALL.
Regards
TaherHi Taher,
You can either enter a schema name or even ALL should work.
If you refer the link Helios has referred, Gather schema statistics is run on the schemas or tables on where there is a change in data frequently. So if you enter ALL then it would gather statistics for all the schemas which might not be required. Since it is run on all the schemas it might take time to complete.
It is a good practice to run gather statistics at object level where there are lot of data growth or change.
Regards,
Mithun -
ORA-12801 ORA-08103 while running gather schema stats in R12
Hi All,
We have recently upgraded from 11.5.9 to R12.1.1 on RHEL 4.8
Database version is 10.2.0.5
We are running Gather schema stats on R12.1.1 but its Errored out with below messages.
ORA-12801: error signaled in parallel query server P006
GL.GL_JE_LINES
ORA-08103 : object no longer exists
Please advice if anybdy face this issue.
Thanks
RBPlease see (GATHER SCHEMA STATISTICS COMPLETED WITH ERROR WHEN RUNNING FOR GL SCHEMA. [ID 1068541.1]).
Thanks,
Hussein -
Gather Schema Stat running long in R12
Hi:
I scheduled Gather Schema Stat (all with 10%) on two PROD instances last night. One completed about 2 hrs (this one normally has more activeties) while the other is still running since 12:00am. Please give me the steps and commands how I should troubleshoot. Is it still running? I have checked there is no block. BTW, I did one Gather Schema Stats for AP with 10% yesterday afternoon. It completed less than 2 min. They both are on 12.1.3 and 11.1.0.7 on Linux. Thank you in advance.I guess I have to do one of these. Thank you.
Another question: Why some tables dont have date under last_analyzed? When I checked the all_tables and sorted on the last_analyzed, saw 1/3 of the tables with date blank. They are from all kinds of schemas, ex, two tables below. But some AR, or AP are analyzed.
AR_SUBMISSION_CTRL_GT
AP_PERIOD_CLOSE_EXCPS_GT -
Gather schema stats not running for custom schema's in EBS 12.1.1
Hi All,
We are running Gather schema stats program periodically in our EBS system with Schama name as "ALL", but it is not generating the statistics for the custom schema. We have custom schema registered in our EBS application. Can you please let us know if there is any issue with our setup or this is standard behaviour of Gather schama stats concurrent program.
Thanks,Hi,
At how much percent ur using with Gather schema stats program like 10%,20%(in Gather schema stats program form)...I think there are no updates on the tables of that custom schema thats why the gather schema progam ignored it..can u check were there updates?
Regards -
Error while gather schema stats
Hi,
I am getting the error while gather schema stats
-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
Unable to correctly update the history table - fnd_stats_hist.
-1 - ORA-00001: unique constraint (APPLSYS.FND_STATS_HIST_U1) violated
-SagarAriz,
The FND_STATS package provides procedures for gathering statistics for Oracle Applications database objects. It also provides procedures
for storing the current statistics in a table (FND_STATTAB) and restoring them back. This package also facilitates the gathering of some statistics in parallel. This package calls the DBMS_STATS package.
The FND_STATS package also has procedures to populate the FNDSTATS_HIST_* table to record the historical information of time taken for gathering the
statistics for the different types of objects.
Famy -
How to execute a SELECT statement in java??
Hello !!
In my java program , i need to delete a record of number X, so
i accept the number X from the keyboard
Then before deleting it
i want the program to show me the name, age of the record which has the number X
How to do thishello kylas
actually i didnt get why this program example?? wats
its executing ??? Look at reply #3 in your other thread:
http://forum.java.sun.com/thread.jspa?threadID=713289&messageID=4126346
Notice the similarity? You've now asked "How to delete a record in Java" and "how to execute a select statement in java". You may have noticed that, aside from the SQL and the call to execute and executeUpdate (for delete) it's the same code. This is because you don't so much do these things in Java, you do them in SQL. The Java code simply asks the Driver to execute whatever SQL you write. So, I really hope your next post isn't "how do I execute an UPDATE statement in Java".
Good Luck
Lee -
How to execute a select statement in unix shell script
Hi,
How to execute the below statement in unix shell .
select count( ID) into v_count from tbl_data1
where ID =V_ID;
thanks
BCJThanks for the reply.
few more doubts,
the V_ID value is a user input getting inside the unix script, so how can i pass the value in to the a.sql.
also needs the v_count value inside the unix script for further process.actual requirement is like,
declare
v_count number;
begin
select count( ID) into v_count from tbl_data1
where ID =$V_ID;
if v_count>1 then
process 1;
else
process2;
end if;
end;
thanks a lot -
How to execute dynamic if statement...
Hi All,
My PL/SQL Blocks looks like this
declare
i_string :='if 3>20 then 1 else 2 end if;' varchar2(100);
begin
end;
Between begin and end i want a piece of code which executes that if statement and sends 2 as output in dbms_output.put_line since 3 is not >20 .Basically i want to know how to execute dynamic if statement.Please help
Thanks,
PreethiHi,
i agree with Cyn. Dynamic SQL is often a bad idea. Try to avoid it.
Dynamic PL/SQL is even worse. If you really must do something dynamic, at least try to cast it as SQL rather than PL/SQL.
Does this do what you want?
CREATE OR REPLACE FUNCTION eval_case
( in_txt IN VARCHAR2
RETURN NUMBER
DETERMINISTIC
IS
return_val NUMBER;
sql_txt VARCHAR2 (1000);
BEGIN
sql_txt := 'SELECT CASE '
|| in_txt
|| ' END'
|| ' FROM dual';
EXECUTE IMMEDIATE sql_txt INTO return_val;
RETURN return_val;
END eval_case;
SHOW ERRORSYou might use the function above like this:
declare
i_string varchar2(100) :='WHEN 3>20 THEN 1 ELSE 2';
begin
dbms_output.put_line ( TO_CHAR (eval_case (i_string))
|| ' = results of eval_case ('''
|| i_string
|| ''')'
end;
/ -
Many Gather Schema Stat CR on R12
Hi, gurus:
I saw today that there are many Gather Schema Stats CR completed these days. They all run "as soon as possible". Who/what fired them?
EBS: 12.1.3
OS: Linux
DB: 11.1.0.7
Thank you.Hi,
Helping without politeness will not actually be termed as Help, isn't it?
You may find the request set of a particular concurrent request/program using query:
SELECT DISTINCT user_request_set_name
FROM FND_REQUEST_SETS_TL
WHERE request_set_id IN
(SELECT request_set_id
FROM FND_REQUEST_SET_PROGRAMS
WHERE concurrent_program_id =
(SELECT CONCURRENT_PROGRAM_ID
FROM fnd_concurrent_programs_tl
WHERE upper(USER_CONCURRENT_PROGRAM_NAME) = upper( '&Enter_Prog_name')));
The above query was extracted from link:
http://orclapp.blogspot.com/2012/02/script-to-find-concurrent-programs-of.html
Hope this helps
Best Regards -
Needed Script for Gather Schema Stats
Hi
Well i need a script that monitors Gather Schema Schema stats is scheduled for coming week
In EBS this would be a con current request scheduled that i need to get the information ..
that script will run once in week and tell us that a GSS is scheduled on or else if its not scheduled it will give an alert as it is not schedule
please let me know
CheersHi Hussein,Alex
well thanks for your reply ....
but let me be more more clear what i need ...
below query
select ACTUAL_START_DATE, ACTUAL_COMPLETION_DATE,ROUND ( (ACTUAL_COMPLETION_DATE - ACTUAL_START_DATE)*1440) DURATION_MINS, REQUEST_ID, CONCURRENT_PROGRAM_ID from fnd_concurrent_requests where actual_start_date between to_date('4-Jun-12 00:00:00','dd-mon-yy hh24:mi:ss') and to_date('6-July-12 11:00:00','dd-mon-yy hh24:mi:ss')
and CONCURRENT_PROGRAM_ID in (select CONCURRENT_PROGRAM_ID from FND_CONCURRENT_PROGRAMS_TL where USER_CONCURRENT_PROGRAM_NAME LIKE 'Gather Schema Statistics') order by 5,1;
this give me output that between this date 4-june-12 to 6-July-12 is there any con current request ran for Gather Schema Stats...
this query will give me request_id,concurrent_program_id and all details...
like this i want to see that if any con current request is schedule in near future
let us for eg
this script will run on monday and it will pickup up the concurrent request telling for this week on this date GSS is schedule...
likewise i need ...
hope this give explanation what exact i need ..
Cheers........ -
Gather Schema Stats concurrent program error with lock
We are running Gather Schema Statistics from Oracle E-Business Suite 11.5.10 against a 10..2 database. When run against individual schema it completes with no error, but when run against ALL schemas it completes with the following error.
“ERROR: While GATHER_TABLE_STATS: object_name=XDP.XDP_ORDER_PROCESSOR_QTAB***ORA-20005: object statistics are locked (stattype = ALL)***”
I understand why the tables are locked and I know how to unlock the table (exec dbms_stats.unlock_schema_stats('schema_owner'); exec dbms_stats.unlock_table_stats('table_owner','table_name');
My query is this: Metalink Note [ID 433240.1] advises If the table is a queue table then the statistics should remain empty and locked so that dynamic sampling is used due to the volatility of queue tables.
If I follow the advise in the note above, and leave the tables as locked then gather Schema Statistics will continue to complete with an Error (its annoying).
I found metalink note (375351.1) which seems to say that all tables can be unlocked including queue tables.
Has anyone encountered this problem, do you recommended that I unlock this tables even though they are queue tables.Hi;
Please follow doc ORA-20005 WHEN GATHERING STATISTICS FOR APPS 11i / R12 IN 10G or 11G [ID 375351.1],i belive you can run command wihtout issue. If its prod than you can also rise SR and confirm wiht oracle support
Regard
Helios -
How to execute multiple sql statements
hi all
i am wondering if i can execute multiple sql statements in one shot with >> execute immediate command
for example:
i define the variable as X := sql statement
Y := sql statement
z := sql statement
can i do execute immediate (X,Y, Z);
if yes how ?? and if not any possible alternate
thanksStarting with Ganesh's code
DECLARE
l_statement VARCHAR2 (2000);
v_passwd VARCHAR2 (200);
v_username VARCHAR2 (200) := 'test';
v_pwd_key VARCHAR2 (200) := 'lwty23';
v_dblink_name VARCHAR2 (2000);
v_dblink_drop VARCHAR2 (2000);
v_dblink_create VARCHAR2 (2000);
v_dblink_check_connection VARCHAR2 (2000);
l_number NUMBER;
BEGIN
--<<c_instance>>
FOR c_instance IN (SELECT *
FROM v_oracle_instances
WHERE environment = 'Developement')
LOOP
SELECT encpwd_owner.display_db_encpwd (v_username,
c_instance.host_name,
c_instance.instance_name,
v_pwd_key)
INTO v_passwd
FROM DUAL;
v_dblink_name := c_instance.host_name || '_' || c_instance.instance_name;
v_dblink_create :=
' CREATE DATABASE LINK '
|| v_dblink_name
|| ' CONNECT TO '
|| v_username
|| ' '
|| 'IDENTIFIED BY '
|| v_passwd
|| ' USING'
|| ' ''(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST= '
|| c_instance.host_name
|| ')(PORT='
|| c_instance.LISTENER_PORT
|| '))(CONNECT_DATA=(SID='
|| c_instance.instance_name
|| ')))''';
v_dblink_check_connection := 'select 1 from global_name@' || v_dblink_name || '.QCM'; --- Notice this change. I am simply selecting 1. That should be enough to test the database link.
v_dblink_drop := 'drop database link ' || v_dblink_name || '.QCMTLAF';
-- l_statement := 'BEGIN ' || v_dblink_create ';' || v_dblink_check_connection ';' || v_dblink_drop '; END ;'
BEGIN
EXECUTE IMMEDIATE (v_dblink_create);
DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Created');
EXCEPTION
WHEN others THEN
dbms_output.put_line( 'Failed to create the database link ' || v_dblink_name );
dbms_output.put_line( dbms_utility.format_error_backtrace() );
INSERT INTO error_table( column_list )
VALUES( <<list of values>> );
END;
EXECUTE IMMEDIATE (v_dblink_check_connection) INTO l_number; --- Notice this.
DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Tested');
BEGIN
EXECUTE IMMEDIATE (v_dblink_drop);
DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Dropped');
EXCEPTION
WHEN others THEN
dbms_output.put_line( 'Failed to drop the database link ' || v_dblink_name );
dbms_output.put_line( dbms_utility.format_error_backtrace() );
INSERT INTO error_table( column_list )
VALUES( <<list of values>> );
END;
END LOOP;
END;But I agree with the point that others have brought up that it really doesn't make sense to create and drop a database link like this.
Justin -
How to execute multiple sql statement?
In an single transaction I want to execute two update statements. I don't know how to break those statements and send to oracle from Asp.Net to execute.
I tried go and ; .
Below is myQuery string*
update abc set One = 10 where Two = 3 ; update xyz set Three = 10 where Four = 3 ;
Additional info
I am using sql comment text in asp.net
I am using executenonquery command in asp.net.Hi,
If you want to execute multiple statements in a single transaction, you could either:
a) create a local transaction (via an OracleTransaction object), then call executenonquery multiple times within that transaction, or
b) pass them all in an anonymous block for a single round trip.. ie, begin update abc set One = 10 where Two = 3 ; update xyz set Three = 10 where Four = 3 ;end;
The database doesn't permit multiple statements passed at once (other than in a plsql block).
Hope it helps, corrections/comments welcome
Greg
PS, questions such as this would be better posted in the ODP.NET forum; this forum is for issues regarding ODT.NET (a VS plugin)
ODP.NET
Maybe you are looking for
-
Error in loop at itab in ECC 6.0
hi, in ECC 6.0, in an abap proxy class i have a loop statement as follows: LOOP AT tablename. sdfsdf sfsfsf s fsf ENDLOOP. and i get the error, At "Loop At itab" one of the additions into/assigning or transporting no fields is require
-
I used to be asked to allow or temporarily allow each site I visited. I am no longer getting these anywhere and prefer going back so I can choose which sites to allow. I also cannot get JavaScript to work--I've enabled it and also tried uninstalling
-
An alignment problem of format mask in PDF output
Hi, I'm testing iAS10g on WIN2000. Both the Reports Developer and Reports Server versions are 9.0.4.2. The database character set is UTF8, and I'm using Adobe asian font pack in the [PDF] section of the uifont.ali config file to print Chinese charact
-
I have a jar file and wanted to import the class into pl/sql I have saved the jar file in c:\ora10g\forms\java and have this path to my classpath in default.env file when i tried to import the class . I got an error Importing Class C:\ora10g\forms\ja
-
Problems completing update to IOS 5.1
I used my home WiFi to do an update to IOS 5.1. It took longer than I expected...about 1/2 hour. Then I got a box on the screen with the spinning wheel of death and the message "verifying update" The problem is that I have had that message for the