Solved

Simulate Spawning Multiple Processes

Posted on 2013-11-01
2
265 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
levels for reporting 5 75
Oracle SQL 6 57
Select and Insert Query running slow 4 35
pl/sql - query very slow 26 60
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
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 shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

770 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