Solved

Simulate Spawning Multiple Processes

Posted on 2013-11-01
2
267 Views
Last Modified: 2013-11-07
I'm looking for some SQL code that will just keep spawning processes for purposes of testing.
I've a processes parameter of 2500 now and i want to generate over 2500 processes.
0
Comment
Question by:xoxomos
2 Comments
 
LVL 29

Assisted Solution

by:MikeOM_DBA
MikeOM_DBA earned 200 total points
ID: 39617480
Use DBMS_JOB package to submit many concurrent jobs.
:p
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 300 total points
ID: 39617496
I was just getting ready to suggest the same thing but with dbms_scheduler.

Here's a sample that submits 10 concurrent jobs that each sleep for 5 seconds.

begin

	for i in 1..10 loop
		dbms_scheduler.create_job (  
     		job_name            => 'IMMEDIATE_JOB' || to_char(i),  
     		job_type            => 'PLSQL_BLOCK',  
     		job_action          => 'begin dbms_lock.sleep(5); rollback; end; ',  
     		number_of_arguments => 0,  
     		enabled             => TRUE,  
     		auto_drop           => TRUE,  
     		comments            => 'Immediate, one-time run');
	end loop;
end;
/


select count(*) from v$process;

Open in new window

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL query question 8 106
best datatype for oracle table email creation 8 73
oracle DR - data guard failover. 18 56
Oracle programming for starter 14 23
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question