Solved

Simulate Spawning Multiple Processes

Posted on 2013-11-01
2
263 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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Oracle 12c 10 100
Oracle SQL Char delimited error 5 30
What is the version of ojdbc6.jar 2 24
Clone Oracle 12c Database 5 28
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now