Running in parallel DML not forced
Hello
I work with an Oracle RDBMS 12cR1,
I amcurrently how can I influence parallel experimentation DML and parallel DDL (for example edit.
For example, I have the following settings:
parallel_degree_level = 100
parallel_degree_limit = CPU
parallel_degree_policy = MANUAL
These are the default values.
At this point, that means I should be able to influence the optimier through tips.
There is no statistics on the table I want to insert data.
I started with:
ALTER session force parallel dml parallel 4;
Then I have an insert of type:
insert into table (list of aliases for column using the dbms_random package)
Select (column list) of the double
connect by level < = 100000;
When I followed the execution using EM, I don't see the parallel expected excution.
The execution plan looks like this:
CREATE statement
load in select
the gathering optimizer statistics
connect to without filtering
double quick
This isn't a 'great' table and select to insert is not "big".
If because I have such a '' big, '' set that Oracle chooses not to use parallel DML had?
How can I force parallel DML execution?
Thanks and greetings
Laury wrote:
Yes, after some further tests, I discovered that connection by does not allow for parallel processing.
Yet, I do not observe the same kind of results as you.
Think about how a connect works by, and it must be clear that it would be very difficult to implement a parallel connection by - especially when the driving table has only one row. But you don't really want to use a simple connect by to generate a large amount of data because of the impact this can have on memory.
Once you've worked out why you do not get the parallelism you should be found - your parallel functions ARE enabled? Your parallel_max_servers is not null (you keep do not answer the question on parallel settings)-you can introduce the strategy who joined a small "connect by" result set to itself and you give the complete end parallelism you need:
Insert / * + parallel (second_emp, 6) * / into second_emp
(
EmpNo,
Ename,
employment,
Bishop.
HireDate,
SAL,
Comm,
DEPTNO
)
with generator as)
Select
rownum id
Of
Double
connect
level<=>=>
)
Select
round (dbms_random.value (1: 500000)) like empno,
dbms_random. String name ('U', 10),
random_job as job,
random_mgr as Bishop,
trunc ((sysdate-1000) + dbms_random.value (0.366)) as hiredate.
round (dbms_random.value (800, 300)) as sal,
-decode (rounds (dbms_random.value (0, 1401)), 1401, null, rounds (dbms_random.value (0, 1401))) as comm
(
case
When ((dbms_random.value (0, 1401)) round between 1000 and 1401)
then null
another round (dbms_random.value (0, 1401))
end
) as Comm.,
TO_NUMBER ((substr (round (dbms_random.value (10, 30)), 1, 1) |)) '0')) as deptno
Of
(select 1 n2 of the generator where id)<= 100) ="">=>
(select 1 n2 of the generator where id)<= 1000) ="">=>
;
Note in particular the subquery WITH which will generate a small TWG internally; then the join between two copies of this table - and this join does not use the rownum or operator LEVEL. This gives you a merge join parallel that generates a large amount of data and allows the PX servers make all calls to dbms_random.
----------------------------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | TQ | IN-OUT | PQ Distrib.
----------------------------------------------------------------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT. | | | 7 (100) | | | | |
| 1. TRANSFORMATION OF THE TEMPORARY TABLE. | | | | | | | |
| 2. LOAD SELECT ACE | | | | | | | | |
| 3. COUNT | | | | | | | | |
| 4. CONNECT TO WITHOUT FILTERING. | | | | | | | |
| 5. QUICK DOUBLE | | 1. | 2 (0) | 00:00:01 | | | |
| 6. COORDINATOR OF PX | | | | | | | | |
| 7. PX SEND QC (RANDOM). : TQ10001 | 1. 26. 5 (0) | 00:00:01 | Q1, 01 | P-> S | QC (RAND) |
| 8. LOAD SELECT ACE (HYBRID TSM/HWMB) | | | | | | Q1, 01 | SVCP | |
| 9. OPTIMIZER STATISTICS COLLECTION | | 1. 26. 5 (0) | 00:00:01 | Q1, 01 | SVCP | |
| 10. THE CARTESIAN MERGE JOIN. | 1. 26. 5 (0) | 00:00:01 | Q1, 01 | SVCP | |
| 11. RECEIVE PX | | 1. 13. 2 (0) | 00:00:01 | Q1, 01 | SVCP | |
| 12. PX SEND BROADCAST | : TQ10000 | 1. 13. 2 (0) | 00:00:01 | Q1 00 | P-> P | BROADCAST |
| * 13 | VIEW | | 1. 13. 2 (0) | 00:00:01 | Q1 00 | SVCP | |
| 14. ITERATOR BLOCK PX | | 1. 13. 2 (0) | 00:00:01 | Q1 00 | ISSUE | |
| * 15 | TABLE ACCESS FULL | SYS_TEMP_0FD9D66BC_3BA6C3 | 1. 13. 2 (0) | 00:00:01 | Q1 00 | SVCP | |
| 16. KIND OF BUFFER. | 1. 13. 5 (0) | 00:00:01 | Q1, 01 | SVCP | |
| * 17. VIEW | | 1. 13. | | Q1, 01 | SVCP | |
| 18. ITERATOR BLOCK PX | | 1. 13. 2 (0) | 00:00:01 | Q1, 01 | ISSUE | |
| * 19. TABLE ACCESS FULL | SYS_TEMP_0FD9D66BC_3BA6C3 | 1. 13. 2 (0) | 00:00:01 | Q1, 01 | SVCP | |
----------------------------------------------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
13 - filter ("ID"<>
15 - access(:Z>=:Z AND:Z)<>
17 - filter ("ID"<>
19 - access(:Z>=:Z AND:Z)<>
Concerning
Jonathan Lewis
Tags: Database
Similar Questions
-
Oracle 11.2 - perform parallel DML on a table that is not partitioned with LOB column
Hello
Since I wanted to demonstrate the new enhancements of Oracle 12 c on SECUREFICHIERS, I tried to use PDML declarations on a table that is not partitioned with LOB column, in Oracle 11 g and Oracle 12 c releases. The Oracle 11.2 SECUREFICHIERS and large objects Developer Guide January 2013 said clearly:
Parallel execution of the following DML operations on tables with LOB columns is supported. These operations performed in parallel run only mode when it is run on a partitioned table. The DML statements on tables not partitioned with LOB columns continue to run in serial execution mode.
- INSERT SELECT AS
- CREATE TABLE AS SELECT
- DELETE
- UPDATE
- MERGE (conditionally UPDATE and INSERT)
- Multi-table INSERT
So, I created and filled a simple table with a BLOB column:
SQL> CREATE TABLE T1 (A BLOB); Table created.
Then, I tried to see the execution of a parallel ABOLITION plan:
SQL> EXPLAIN PLAN FOR 2 delete /*+parallel (t1,8) */ from t1; Explained.
SQL> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Plan hash value: 3718066193 ------------------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib | ------------------------------------------------------------------------------------------------------- | 0 | DELETE STATEMENT | | 2048 | 2 (0)| 00:00:01 | | | | | 1 | DELETE | T1 | | | | | | | | 2 | PX COORDINATOR | | | | | | | | | 3 | PX SEND QC (RANDOM)| :TQ10000 | 2048 | 2 (0)| 00:00:01 | Q1,00 | P->S | QC (RAND) | | 4 | PX BLOCK ITERATOR | | 2048 | 2 (0)| 00:00:01 | Q1,00 | PCWC | | | 5 | TABLE ACCESS FULL| T1 | 2048 | 2 (0)| 00:00:01 | Q1,00 | PCWP | | PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- Note ----- - dynamic sampling used for this statement (level=2)
And I ended up executing the statement.
SQL> commit; Commit complete. SQL> alter session enable parallel dml; Session altered. SQL> delete /*+parallel (t1,8) */ from t1; 2048 rows deleted.
As we can see, the statement was executed in parallel:
SQL> select * from v$pq_sesstat; STATISTIC LAST_QUERY SESSION_TOTAL ------------------------------ ---------- ------------- Queries Parallelized 1 1 DML Parallelized 0 0 DDL Parallelized 0 0 DFO Trees 1 1 Server Threads 5 0 Allocation Height 5 0 Allocation Width 1 0 Local Msgs Sent 55 55 Distr Msgs Sent 0 0 Local Msgs Recv'd 55 55 Distr Msgs Recv'd 0 0 11 rows selected.
Is this normal? It is not supposed to be supported on Oracle 11 g with no partitioned table containing the LOB column...
Thank you for your help.
Michael
Hello
The explain plan shows that only the query is run in parallel but not delete it.
Concerning
Maurice
-
Why this parallel DML statement is not run as fast as DBMS_PARALLEL_EXECUTE?
Hello
I'm on the database Oracle Enterprise Edition, Linux RH 11.2.0.3. I have a pl/sql function that accepts a sdo_geometry (essentially an object with a few varrays), round each number in one of the varrays and retransmits the object. Here is a version of the function, simplified slightly for brevity:
create or replace round_coordinates (p_geometry in sdo_geometry, p_round_factor in numbers)
return sdo_geometry parallel_enable
is
sdo_geometry v_geometry: = p_geometry;
v_ordinates sdo_ordinate_array;
Start
v_ordinates: = p_geometry.sdo_ordinates;
for me in v_ordinates.first... loop of v_ordinates. Last
v_ordinates (i): = round (v_ordinates (i), p_round_factor);
end loop;
Return sdo_geometry (v_geometry.sdo_gtype, v_geometry.sdo_srid, v_geometry.sdo_point, v_geometry.sdo_elem_info, v_ordinates);
end round_coordinates;
/
I need to perform this function as an update DML on hundreds of millions of sdo_geometry objects and according to my estimates it will take weeks. So, I want to run in parallel.
The data is in a bunch of tables, some with lines of k ~ 100 more with millions of people. My preference is to browse the tables and run an update such as:
Update < table > set geometry = round_coordinates (geometry);
But I would like to operate in parallel, so I thought that I would allow the DML parallel to the session with
ALTER session enable parallel dml.
ALTER table < table > parallel;
, and then run the update by: Update / * + parallel * / < table > set geometry = round_coordinates (geometry);
When I do that, I can see a v$ px_session 16 parallel slaves are bent and the plan of the explanation is the following:
------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | TQ | IN-OUT | PQ Distrib.
------------------------------------------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT. | 10000 | 468K | 43 (0) | 00:00:01 | | | |
| 1. UPDATE | SMALL_10000 | | | | | | | |
| 2. COORDINATOR OF PX | | | | | | | | |
| 3. PX SEND QC (RANDOM). : TQ10000 | 10000 | 468K | 43 (0) | 00:00:01 | Q1 00 | P > S | QC (RAND) |
| 4. ITERATOR BLOCK PX | | 10000 | 468K | 43 (0) | 00:00:01 | Q1 00 | ISSUE | |
| 5. TABLE ACCESS FULL | SMALL_10000 | 10000 | 468K | 43 (0) | 00:00:01 | Q1 00 | SVCP | |
------------------------------------------------------------------------------------------------------------------
But the update statement on my test data set does not any more quickly - it takes a few seconds more series that suggests General fresh extra expectations for the management of parallel slaves that's happened, but they did not have the query run faster.
I tried to use the dbms_parallel_execute with the create_chunks_by_rowid option package and parallel_level = 16 With that I get at the end just over 1/16th of the time that it takes to run in series!That's fine, so I have the option dbms_parallel_execute, but I would like to understand why the query with the parallel flag does not expedite things.
Any ideas?
Thank you
John
It may be that the call to the PL/SQL function slows down things. Did you think to do in pure SQL?
Here is an example:
update test_sdo tsd set tsd.geometry.sdo_ordinates = (select cast(collect(round(t2.column_value)) as sdo_ordinate_array) from test_sdo t1 ,table(t1.geometry.sdo_ordinates) t2 where t1.id = tsd.id)
Post edited by: PaulHorth
BTW: You can parallelize the query part of the SQL but not updating, it's documentation:
"Parallel DML can be done on tables with columns object provided that the columns of the object are not accessible."
-
Have Windows 7 running on Parallels Desktop with a Mac. Get "setup.exe is not a valid Win32 application" when trying to download a program with Windows Explorer. I can download from these sites with Vista and XP with other computers. Now, I can't download the programs that are supposed to solve the problem! including FoxFire
Try to download from this site:
- Firefox 8.0.x: http://www.mozilla.com/en-US/firefox/all.html
-
Concurrent program is not running in parallel
Hello
There is a simultaneous custom program that must be run in order, sometimes and sometimes it should be able to run in parallel. The program was defined initially to be incompatible with itself and it is used to run only in sequence, as planned, but when the incompatibility with the self has been deleted or disabled can still, he runs in the order but does not run in parallel. What could be the reason?
As a temporary solution, I tried to remove the simultaneous program and recreate and defined without any inconsistency and it works in parallel. But it won't help the incompatibility could be switched on/off often enough and recreate the simultaneous program every time is not a good idea.
Thanks in advance.
Kind regards
RAMThere is a simultaneous custom program that must be run in order, sometimes and sometimes it should be able to run in parallel. The program was defined initially to be incompatible with itself and it is used to run only in sequence, as planned, but when the incompatibility with the self has been deleted or disabled can still, he runs in the order but does not run in parallel. What could be the reason?
The CM has been revived after doing the above?
As a temporary solution, I tried to remove the simultaneous program and recreate and defined without any inconsistency and it works in parallel. But it won't help the incompatibility could be switched on/off often enough and recreate the simultaneous program every time is not a good idea.
Whenever you toggle incompatibilities, please make sure that you bounce the CM.
Establish rules of incompatibility for Custom Reports [107224.1 ID]
Thank you
Hussein -
Parallel DML may be downgraded to the DML series?
Oracle Database Enterprise Edition 11.2.0.3.0
When you run a parallel query (e.g. SELECT * FROM parallel_table WHERE a <?), the optimizer may choose a parallel or series, the selectivity of the predicate function plan and availability different access roads - usually a scan interval series index for highly selective queries (a small number of return lines), and a parallel table full scan for less selective queries (returning a large number of lines).
However, with parallel DML enabled, no such optimization seems to happen. There may be a very effective for a query as series plan "DELETE FROM parallel_table WHERE a <? ', but once parallel DML is activated, the optimizer based on CSSTidy always seems to choose a parallel plan.
Is there a way to allow the optimizer to choose between series and parallel DML according to predicates in the query? I wish I could enable parallel DML, but knowing that, in the case of a very selective, query optimizer will not parallel DML use but will use a series DML.
Note that I'm allowing to the DML, not no force in parallel it (although it seems more to do with the fact that a table series is considered parallel, without having to refer to the query).
Here is an example of this behavior, deleted 18 m rows in a table of rows of 300 m:
First, the cost of a DML series operation is 59,000, using an index to access the lines:
COMMIT;
ALTER SESSION DISABLE PARALLEL DML.
DELETE
OF parallel_table
WHERE the DATETIME_a < sysdate - 650;
---------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
---------------------------------------------------------------------------------------------
| 0 | DELETE STATEMENT. | 18 M | 2037M | 58723 (1) | 00:11:45 |
| 1. REMOVE | PARALLEL_TABLE | | | | |
|* 2 | INDEX RANGE SCAN | IDX_PT_DATETIME_A | 18 M | 2037M | 58723 (1) | 00:11:45 |
---------------------------------------------------------------------------------------------
Now, by allowing parallel DML, the optimizer chooses a parallel full table much more expensive for the same request, cost 926 000 scan. Why he won't come back in terms of the series?
COMMIT;
ALTER SESSION ENABLE PARALLEL DML.
DELETE
OF parallel_table
WHERE the DATETIME_a < sysdate - 650;
----------------------------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time | TQ | IN-OUT | PQ Distrib.
----------------------------------------------------------------------------------------------------------------------------
| 0 | DELETE STATEMENT. | 18 M | 2037M | 926K (1) | 03:05:22 | | | |
| 1. COORDINATOR OF PX | | | | | | | | |
| 2. PX SEND QC (RANDOM). : TQ10001 | 18 M | 2037M | 926K (1) | 03:05:22 | Q1, 01 | P > S | QC (RAND) |
| 3. INDEX MAINTENANCE | PARALLEL_TABLE | | | | | Q1, 01 | SVCP | |
| 4. RECEIVE PX | | 18 M | 2037M | 926K (1) | 03:05:22 | Q1, 01 | SVCP | |
| 5. RANGE OF SEND PX | : TQ10000 | 18 M | 2037M | 926K (1) | 03:05:22 | Q1 00 | P > P | RANGE |
| 6. REMOVE | PARALLEL_TABLE | | | | | Q1 00 | SVCP | |
| 7. ITERATOR BLOCK PX | | 18 M | 2037M | 926K (1) | 03:05:22 | Q1 00 | ISSUE | |
|* 8 | TABLE ACCESS FULL | PARALLEL_TABLE | 18 M | 2037M | 926K (1) | 03:05:22 | Q1 00 | SVCP | |
----------------------------------------------------------------------------------------------------------------------------
Dan.Jan wrote:
So in summary, by adding a second index to the table, the optimizer computes a much higher estimate of the costs for the use of a scan of the index systematic range. As a result, he opts for the full table scan, which is not necessarily the most efficient plan. I am inclined to think that it is a bug with optimizer, as much as it manifests itself only in the line superior (0) plan.
It's a pretty good reason to be suspicious - and I think you are right that it is a bug.
The cost of a removal is the cost of the selection the ROWID of the lines to remove, which is in this very simple case: ' selectivity * leaf_blocks ' for the index. However, when you create the second FINAL cost index seems to change to "selectivity * (leaf_blocks + clustering_factor) ' (I ran your test case, tried a few simple variations and looked 10053 files trace - so my conclusion is not a complete analysis of the question.)
Since you have a test case, raise a SR with Oracle.
Concerning
Jonathan Lewis
(Update: added missing 'leaf_blocks' to the 2nd expression)
-
Question about parallel hint and 'alter table enable parallel DML'
Hi all
I have a DML as follows:
Insert / * + append * / into table1
Select *.
of COMPLEX_VIEW;
Here complex_view contains a very complicated SQL, in which there is some heavy tables joins, subqueries, and aggregations.
Question 1:
Let's assume that the underlying tables have no attribute "parallel." Where should I add "parallel index" to force it to be run in parallel and can get better performance?
Some members think that what follows is good.
Insert / * + append * / into table1
Select / * + parallel (a 4) * / *.
of COMPLEX_VIEW;
But I think that indicators must be put in the defintion of the complex view where they should be and do not put advice to the main insert DML, like this:
Insert / * + append * / into table1
Select *.
of COMPLEX_VIEW; -I added the indicators in the COMPLEX_VIEW.
What is your opinion?
Quesion2:
Without ' alter session enable parallel DML ", I can see the parallel session in v$ px_session thus." And the execution time has been shortened. This proves without this statement, the DML is also run in parallel.
So, what is the effect of this statement?
Best regards
LeonI prefer the suspicion out of the COMPLEX_VIEW. This way, only this application forces the suspicion. If you put the indicator in the COMPLEX_VIEW, any other query on COMPLEX_VIEW (or Assembly of COMPLEX_VIEW to another view or a table) would also "encode" indicator in its execution. You don't then isolation parallel query to only where it is needed.
If you put the parallel indicator in SELECT it (or view), the query is parallelized. This does not necessarily mean that the INSERT is parallelized. What you see v$ px_session are only slaves to PQ to SELECT.
You must ALTER SESSION ACTIVATE PARALLEL DML and add the PARALLEL indicator in the INSERT.Hemant K Collette
-
Council in parallel and enable parallel dml
Hi team,
I found the following code in our development. And I did not understand why must be given
ALTER TABLE < tnm > ACTIVATE PARALLEL DML and also
Suspicion of parallel in the DML.
The statement above with Alter command and parallel Hint improve the performance of DML.EXECUTE IMMEDIATE ('alter session enable parallel dml') ; DELETE /*+parallel(a,4) */ FROM Temp a ;
Please suggest me.
Thank youIf we want to execute DML instructions in parallel, that we must allow the parallel DML for the session.
The statement above with Alter command and parallel Hint improve the performance of DML.
Yes. N ° maybe. Sometimes.
If parallelization (dread Word) makes things run faster depends on many things. The number of cores has your server. How many other processes use the system at the same time. If there is a reasonable plan to organize the parallel threads. Into the INITRANS of the table settings.
Parallel SQL is an important area that has a lot to understand. The best place to start is with Doug Burns paper on the subject. [url http://oracledoug.com/px_slaves.pdf] Find it here (attention: PDF)
Cheers, APC
-
You need to pass arguments to the Sub - VI which runs in parallel to the main vi.
Please help me.
I can pass arguments to a subvi using "call-by-reference-node" but the sub - vi will not work in parallel. I can also run my sub - vi in parallel using "invoke the node", but then cannot pass arguments. I can't understand how to merge these two concepts.
When I open the reference VI, I specify the strict type, using call-by-reference-node. When I use call node, I don't specify the type. It seems that specifying the type strict guard screw run in parallel, but also seems necessary to pass arguments.
I apologize for my absence of a deeper understanding of this and appreciate any help you can give me.
Chris
You must invoke 'Ctrl Val.Set' node.
-
Prerequisites for reentrant SubVIs to run in parallel
Hello!
In my VI, two clones préallouées of a Subvi, I thought I would go in a separate thread of each. Just this sub - VI contains a reference to a double and it increments. The two clones ran in parallel, but not in separate threads. For comparison, I did a Subvi, which does not have a reference - these clones run each in own thread.
I noticed this watching the CPU usage: in the first case, has been used as a single core in the second respectively two sons were used.
(1) I wonder what are the prerequisites for a Subvi to run effectively not only in parallel, but in fact in separate threads?
(2) is there a way to discover during compilation which (Tufts) parts of a VI run in parallel, and SubVIs get making their own thread of execution?
For reference: the execution is slow. If I understand correctly, the GUI is running in its own thread, so no interfering only not with the SubVIs that multiply references. I think that there is also no locking a reference readings and writings to a reference should be very fast. Is this correct? If so, why is this slow running?
Thanks for your replies
Marco
(The test computer has a Quad-Core with Hyperthreading, using LabVIEW 2012SP1)
One thing I know is if you have any manipulation of the UI elements.
In the case you use a reference to a UI element user and properbly using the property node to insert data.
This limits LabVIEW for your sub vi of in the UI thread.If you have transferred the values on the queue to a vi that manages all the user interface controls, then only that vi will be in the UI thread.
Who is?
-
I am trying to install a mousecam video Magnifier. The installation disk is for windows XP. My PC runs on windows 7 and will not recognize the .we installation. How can I get windows 7 to recognize the disc
You can not force the incompatible software to install or work, to visit that manufacturers of equipment/program support site and checks if there is a version compatible win7
-
Can't run in parallel Invoke VMScript
Hi all!
I create script that convert model VM, and then run VMs converted, then Invoke VMScript. After that my script restart, stop this VMs and VMs convert to patterns.
All operations of this I have run in parallel mode of powershell.
But when my script tries to run Invoke-VMScript in parallel mode , my script freezes on this operation. I see only - 'Inline Script runniung'
But if I open one of the virtual machines, I see my local script on the VM run command and it's done.
In VM events, I see the same, command done VMScript Invoke.
How to solve this problem? What I've done wrong?
Thanks in advance!
My script:
function Load-PowerCLI
{
Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.VimAutomation.Vds
}
Load-PowerCLI
# Connect to Vcenter
$vcenter = "vcenter.domain.local"
function Connect to Vcenter
{
SE connect-VIServer-Server $vcenter
}
SE connect Vcenter
function Unload-PowerCLI
{
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
Remove-PSSnapin VMware.VimAutomation.Vds - ErrorAction SilentlyContinue
}
# Download the list template
Function Get-FolderFromPath
{
(param
[String] $Path
)
$chunks = $Path.Split('\')
$root = get-View - VIObject (Get-file-name $chunks [0])
If (-$pas?) {return}
$chunks [1.. $chunks. Count] | % {
$chunk = $_
$child = $root. ChildEntity |? {$_. Type - eq "File"} |? {(Get-Folder-id ("{0}-{1}»-f ($_.)"))} Type $_. (Value))). Name - eq $chunk}
If ($child - eq $null) {throw "File '$chunk' not found"}
$root = get-View - VIObject (Get-Folder-Id ("{0}-{1}" f ($child. ")) Type, $child. Value)))
If (-$pas?) {return}
}
return (Get-Folder-Id ("{0}-{1}" f ($root. ")) MoRef.Type, $root. MoRef.Value)))
}
$Templateslist = (get-FolderFromPath-path 'DC\Templates\Windows' |) Get-model? ({$_.name - eq 'TEST'}). name
$Templateslist
# Convert templates of virtual machines
workflow convert-models-to-vm {}
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $user,.
[string] $pass
)
for each-parallel ($template in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Entire-Template - Template $Using: model ToVM.
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
Convert-models-to-vm - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret
# PowerOn VMs
workflow poweron-vms {}
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $user,.
[string] $pass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Start-VM - VM $Using: vm | Waiting-Tools
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
PowerOn-vms-models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret
# Wait 1 minute
sleep of the 1960s
# Run the command update Script
{of workflow run-update
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $script,
[string] $guestuser,
[string] $guestpass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
$script = "c:\update.ps1".
$guestuser = "administrator."
$guestpass = "myPASS".
Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script
# Restart virtual machines
workflow restart-vms {}
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $user,.
[string] $pass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Restart-VMGuest - VM $Using: vm | Waiting-Tools
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
restart vms models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret
stop # VMs
workflow stop-vms {}
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $user,.
[string] $pass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Stop-VMGuest - VM "$Using: vm '-confirm: $false
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
stop-vms-models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret
sleep 120
# Convert models of virtual machines
{to convert vm-to-model of workflow
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $user,.
[string] $pass
)
for each-parallel ($template in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Set-VM - VM "$Using: model"-ToTemplate-confirm: $false
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
Convert-vm-to-models - models $Templateslist - vcenter $vcenter - session $global: DefaultVIServer.SessionSecret
Unload PowerCLI
The problem in this part:
{of workflow run-update
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $script,
[string] $guestuser,
[string] $guestpass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
$script = "c:\update.ps1".
$guestuser = "administrator."
$guestpass = "myPASS".
Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script
I found the solution!
I just add this string - $WarningPreference = "SilentlyContinue" in an inline script
Like this:
{of workflow run-update
(param
[string []] models of $,.
[string] $vcenter,
[string] $session,
[string] $script,
[string] $guestuser,
[string] $guestpass
)
for each-parallel ($vm in $templates)
{
$run = {InlineScript
$WarningPreference = "SilentlyContinue".
Add-PSSnapin VMware.VimAutomation.Core
SE connect-VIServer-Server $Using: vcenter-Session $Using: session
Invoke VMScript - ScriptText ' $Using: script "-VM" $Using: vm "-Server" $Using: vcenter '-GuestUser ' $Using: guestuser '-GuestPassword ' $Using: guestpass»
Remove-PSSnapin VMware.VimAutomation.Core - ErrorAction SilentlyContinue
}
$run
}
}
$script = "c:\update.ps1".
$guestuser = "administrator."
$guestpass = "myPASS".
Run-update - $Templateslist - vcenter $vcenter models - session $global: DefaultVIServer.SessionSecret - $script - $guestuser guestuser - guestpass $guestpass script
-
With the help of DAC for running no BIApps infa jobs n 2 EP running in parallel
Hello
We already have configuration BI Apps prod environment using DAC, Informatica and OBIEE 11 g for one of our customers.
Now, we want to check the possibility of using the DAC for the execution of BIApps no informatica related jobs.
(That we had only a week of the execution plan of DAC weekend and Informatica and DAC are inactive most of the time during the week)
Customer wants a separate new small datamart be configured which meet the requirements of statement for different departments and has no links of kinship or any link with existing BI Data Warehouse applications.
I just wanted to check if it will violate the license terms (if we use CAD to workflows not BI Apps and run another EP)?
In addition, the DAC Build 10.1.3.4.1 is capable of running two parallel execution plans?
We have heard long back that two parallel feature EP will be lunched in the version 11g CAD. Pointers or new in this space?
Thanks in advance,From what I remember, you cannot load a 'distinct' DB instance that is NO OLIVIER. If you create a small custom datamart on the INSIDE of the OLIVIER exitsing schema, then it is acceptable. However, if you use DAC (no matter if its plan one or two plans) to load a NON-OBIA target, this may violate the license agreement. You need a self-contained separate license for Informatica and use the planner of Informatica tool. If you want to use DAC, ensure that your target is inside the DW OBIA.
Pls correct brand...
-
Parallelism is not available in standard edition?
Version of the operating system: Solaris SPARC 5.10SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.4.0 - Production PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production
Parallel DML function (as option in DEC in PARALLEL, for example) is not available in Standard edition? I couldn't find the info on this from the link below, so ask
http://www.Oracle.com/us/products/database/options/index.htmlParallel execution is not available in itself: see section "VLDB, data warehousing, Business Intelligence," to http://download.oracle.com/docs/cd/B19306_01/license.102/b14199/editions.htm#BABJFHED
-
Hello
I use DBMS_FILE_TRANSFER. PUT_FILE as part of my portable from tablesspace shell script
my intermediate dwh instance to my instance of dwh report.
The problem is that I face the data files after one.
There are about 20 files of data, and each of them is 10 gigabytes in size.
I would like to copy the files in parallel and not after one.
I thought to create dynamically 20 jobs/Scheduler (based on the number of data files) and all run togther.
This way I could actually run in parallel.
Bellows is part of my TTS shell script.
The for loop generates the list of data files that I need to copy.
the DBMS_FILE_TRANSFER. PUT_FILE copy one after one.
Can you suggest how can I changed the plsql block below to create
and present in parallel a job for each data file?
Thank you.
sqlplus -s "sys/${SourceSysPass}@${SOURCE_ORACLE_SID} as sysdba" << EOF whenever sqlerror exit 1 declare v_link varchar2(30); begin select db_link into v_link from dba_db_links where db_link like '%TTS%'; for x in ( select fname, ltrim(rtrim(substr(fname,1,instr(fname,'.')-1)))||'_'||rownum nf_name from (select substr(file_name,instr(file_name,'/',-1)+1) fname from dba_data_files where tablespace_name in ('${TableSpacesList}') order by file_id) ) loop DBMS_FILE_TRANSFER.PUT_FILE('source_tts', x.fname, 'target_tts', x.nf_name, v_link); end loop; exception when others then raise; end; / EOF
Hello
I'm happy that it worked. Don't worry, in this case, this setting is not necessary
Kind regards
Christian Balz
Maybe you are looking for
-
Download pictures from a url, and then rename the images
Hey guys,. I just discovered the power of Applescript, which is pretty amazing to see what you could do with it. I have, I learn a lot, but still need your help. I need an applescript script that upload photos from a url and rename them with a new n
-
all google search results link same "scraper" web site and random content
In my google for a topic search results, links to many of the results (not wikipedia, but most of the other sites 'reliable') lead to the same redirect URL: Search - milk .net, which then redirects to all kinds of content, random and other unwanted w
-
Baterry PA3780U-1BRS for Satellite T110-11U
HelloI'm looking for batteries for my T110-11U, but in the Toshiba store and other shops is not available.The number of PA3780U-1BRS battery.Can I use another battery for my laptop?If yes which? Sorry for my English. Thank youBest regards
-
How can I get that back?
-
Remove the Slider component framework
Hello I have a digital Slider component on my application as a progress bar. All goes well until he arrives at the end (of load) and a red box appears around the component. No idea how to get rid of this? Probably a simple solution, but can't seem to