You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dbParallel is a Database Task Parallel Foundation that provides database developers an application level support for parallel programming. Being distinct from Oracle 11g R2's DBMS_PARALLEL_EXECUTE parallelism within a query by chunks, dbParallel works more
4
+
like a .NET Task Parallel Library implemented on database side, it handles the partitioning of the asynchronous job, the scheduling of tasks, state management, and other low-level details in a lightweight implementation.</p>
<spanstyle="color:#c0c0c0">XYZ.</span><spanstyle="color:#808080">TPW_CALL.</span>ADD_CALLBACK_FOR_SUCCESS(tPJob_ID, tSQL, 180, <spanstyle="color:#a31515">'Sleep for 15s if all success.'</span>);
<spanstyle="color:#c0c0c0">XYZ.</span><spanstyle="color:#808080">TPW_CALL.</span>ADD_CALLBACK_FOR_FAIL(tPJob_ID, tSQL, 180, <spanstyle="color:#a31515">'Sleep for 25s if fail.'</span>);
Each of the above sample processing units are called a PJob. PJob represents an asynchronous operation. This method returns a pJob Id for below methods (2, 3, 4, 5, 6).
This is a optional method. Since a pJob is asynchronous, the callback Task is called to execute a continuation when all the parallel Tasks successfully completed.
This is a optional method. Similar but opposite to previous callback for success, the callback Task for fail is called to execute a continuation when all the parallel Tasks completed but any of them throw out database exception(s).
Starts the pJob, scheduling it for execution. </li><li><spanstyle="color:#c0c0c0">XYZ.</span><spanstyle="color:#808080">TPW_CALL.</span>TRY_CANCEL_PJOB<br>
55
+
Try to cancel a scheduled pJob if it hasn't begin to execute. </li><li><spanstyle="color:#c0c0c0">XYZ.</span><spanstyle="color:#808080">TPW_CALL.</span>START_NEW_SINGLE_TASK<br>
56
+
This method encapsulates a series of steps for conveniently creating and starting single task and callback task.
Waits for all provided Tasks (parallel subtasks and callback task) of a pJob to complete execution.<br>
59
+
To support this method, Oracle version utilizes the signaling mechanism come from SYS.DBMS_ALERT package; SQL Serverv version imitates it by a polling loop at present.
60
+
</li></ol>
61
+
<p>(XYZ is the schema name, it should be replaced by your schema name)</p>
62
+
<p>Open the source code of Oracle package TPW_CALL <em>(or SQL Server stored procedures with prefix TPW_CALL_)</em> for detail parameters.</p>
Just current state. <em>(VIEW_TPW_WK_LOG provides historical state transitions)</em><br>
71
+
Each pJob is born as CREATED state, and dies as ARCHIVED state. The real time state is visible during pJob's lifetime. Every pJob, irrespective of high or low ... the final state is equal -
<pstyle="padding-left:30px">The dispatcher executes each of the provided tasks, possibly in parallel. No guarantees are made about the order in which the tasks execute or how many degree of parallelism. All tuning settings are located in TPW_PUMP_CONFIG table.<br>
97
+
Each Task of a pJob is actually executed in the database through its separate connection. In other words, each Task runs in a different database session. Temporary table and transaction can not be expected to cross Tasks.</p>
<divstyle="padding-left:30px">A Pump Service always starts up in Standby Mode. Multiple Standby Services can keep running for the same database, one of them will switch to Primary Mode when none Primary Service is active.</div>
The user must have EXECUTE privilege on the package TPW_CALL - for Oracle version;<br>
105
+
<em>(Underlying stored procedures with prefix of "TPW_CALL_" for SQL Server version)</em>
106
+
</li><li>To execute Task's SQL:<br>
107
+
As a ultimate executor, the security account of Pump Service must have privileges to execute Tasks' SQL.
108
+
</li></ul>
109
+
<p><strong>Applicability</strong></p>
110
+
<pstyle="padding-left:30px">The original intention of dbParallel is designed for time consuming database processing with one or more independent tasks can run concurrently. Not all processing is suitable for parallelization; for example, if a batch job performs
111
+
only a small amount of work on each subtask, or it doesn't run for more than one second, then the overhead of parallelization can cause the processing to run more slowly. Besides, some special attention (e.g. locks, deadlocks, and race conditions) can not
112
+
be ignored.</p>
113
+
<p><strong>System Requirements</strong></p>
114
+
<ul>
115
+
<li>Supported Databases:
116
+
<ul>
117
+
<li>Oracle <spanstyle="color:#808080">(dev and test on version 11g R1 and R2, hasn't try on earlier version)</span>;
118
+
</li><li>SQL Server 2005 or later version; </li></ul>
119
+
</li><li>Windows Service:
120
+
<ul>
121
+
<li>.NET Framework 4.0 Client Profile or higher versions </li></ul>
<li>Visual Studio 2010<atitle="Microsoft Visual Studio 2010 Service Pack 1" href="http://www.microsoft.com/en-us/download/details.aspx?id=23691" target="_blank">SP1</a> or later versions
136
+
</li><li><atitle="Microsoft SQL Server Data Tools" href="http://msdn.microsoft.com/en-us/data/hh297027" target="_blank">SQL Server Data Tools (SSDT)</a>
0 commit comments