Simulate Spawning Multiple Processes

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.
xoxomosAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
slightwv (䄆 Netminder)Connect With a Mentor Commented:
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
 
MikeOM_DBAConnect With a Mentor Commented:
Use DBMS_JOB package to submit many concurrent jobs.
:p
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.