Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Simulate Spawning Multiple Processes

Posted on 2013-11-01
2
Medium Priority
?
273 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 800 total points
ID: 39617480
Use DBMS_JOB package to submit many concurrent jobs.
:p
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

916 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