Pa120u04.sql long running on Patch 6678700 of 1211 upgrade
Hi,
We are doing R12(12.1.1) upgrade from 11i(11.5.10.2) with database 10.2.0.4 on HP-UX 64 Bit Platform.
Now pa120u04.sql is running for a long time say more than 18 hours...
anybody experienced this problem and is there any advice to speed up this.
Thanks
Sony
Yes Hussein, We restarted. now it is showing restarted and all the other workers are on Wait.
But it is not yet showing running.
It is showing as
Setting parallel context: PARALLEL AUTOPATCH AT R120 PLSNC
Restarting job that failed and was fixed.
Time when worker restarted job: Fri Sep 24 2010 10:54:40
Start time for file is: Fri Sep 24 2010 10:54:40
US American English Base
Fix the problem then use adctrl to change the status to 'Fixed, Restart'.
Setting parallel context: PARALLEL AUTOPATCH AT R120 PLSNC
Restarting job that failed and was fixed.
Time when worker restarted job: Fri Sep 24 2010 10:54:40
Start time for file is: Fri Sep 24 2010 10:54:40
sqlplus -s APPS/***** @/u09/oracle/apps/apps_st/appl/pa/12.0.0/patch/115/sql/pa120u04.sql &un_pa &ba
tchsize 1 10
UPDATING PA_EXPENDITURE_ITEMS_ALL Table
Similar Messages
-
MSCOBJCL.sql runs for long while applying patch 6678700 for 12.1.1 upgrade
DB:11.2.0.3.0
OS: IBM AIX Power system 64 bits 6.1
Hi All,
MSCOBJCL.sql runs for long while applying patch 6678700 for 12.1.1 upgrade. We are upgrading from 11.5.10.2.0 to 12.1.1
Could anyone please share why the script takes so much of time to run?
Thanks for your time
Regards,a1_winAs per Mscobjcl.Sql Is Running Long While Applying Patch.8671960 (Doc ID 1295881.1)
The patch is already applied in the instance
BUG_NUMBER CREATION_DATE
8671960 19-SEP-10
Thanks,
a1_win -
R12.1.1 Upgrade - patch 6678700 - American English upgrade patch driver
Hi All,
I am doing an upgrade from 11.5.10.2 to R12.1.1. I am executing the patch 6678700. I have given 25 workers to execute this patch. The patch is running for almost 1 hour and now I find only 1 worker is running and all the other workers are waiting.
I do not find any error, the files are getting allocated only to Worker 1 and getting completed and another file is loaded again on Worker 1 and so on.
The remaining 24 workers are waiting. The adctrl output is follows
Control
Worker Code Context Filename Status
1 Run AutoPatch R120 pl pat148.odf Running
2 Run AutoPatch R120 pl Wait
3 Run AutoPatch R120 pl Wait
4 Run AutoPatch R120 pl Wait
5 Run AutoPatch R120 pl Wait
6 Run AutoPatch R120 pl Wait
7 Run AutoPatch R120 pl Wait
8 Run AutoPatch R120 pl Wait
9 Run AutoPatch R120 pl Wait
10 Run AutoPatch R120 pl Wait
11 Run AutoPatch R120 pl Wait
12 Run AutoPatch R120 pl Wait
13 Run AutoPatch R120 pl Wait
14 Run AutoPatch R120 pl Wait
15 Run AutoPatch R120 pl Wait
16 Run AutoPatch R120 pl Wait
17 Run AutoPatch R120 pl Wait
18 Run AutoPatch R120 pl Wait
19 Run AutoPatch R120 pl Wait
20 Run AutoPatch R120 pl Wait
21 Run AutoPatch R120 pl Wait
22 Run AutoPatch R120 pl Wait
23 Run AutoPatch R120 pl Wait
24 Run AutoPatch R120 pl Wait
25 Run AutoPatch R120 pl Wait
Is this behavior normal during this patch ? Only 1st worker is used so only 1 file is processed at a time. All the other workers are waiting.
Regards
Sridhar MHi Hussein,
Thanks for the response.
I do not find any error the database log or the worker 1 log. I had the doubt because instead of using all 25 processes, the adpatch is using only 1 worker to execute this patch and I have almost 117273 remaining and the count is getting reduced 1 by 1 because of 1 worker.
Is there any way that we can make other workers which are waiting ?
Regards
Sridhar M -
Re:How to determine the long running jobs in a patch
Hi ,
How to determine the long running jobs in a patch .
RegardsHi,
Check the below MY ORACLE SUPPORT note:
Note.252422.1 .... Check Completed Long Running Jobs In Oracle Apps.
Best regards,
Rafi -
Hi All,
I have a long running sql which I am tuning for oltp environment.
Here is the sql
explain plan for
SELECT a.* ,rownum as rnm
FROM ( SELECT /*+ FIRST_ROWS(100) STAR_TRANSFORMATION PARALLEL(PLS,2) */
/* End of Hint in Query Builder */
PLD.PRVDR_LCTN_IID AS "ProviderLocationIid", PLD.PRVDR_LCTN_DTL_SID AS "ProviderLocationDetailSid",
PLD.ENRLMNT_TYPE_CID AS "EnrollMentTypeCid", PLD.PRVDR_TYPE_CODE AS "ProviderTypeCode",
PLD.MAINECARE_ID AS "Provider Id", PLD.PRVDR_NAME AS "Provider Name",
PLD.PRVDR_TYPE_CODE || '-' || PLD.PRVDR_TYPE_NAME AS "Provider Type",
TO_CHAR(PLS.FROM_DATE,'MM/dd/yyyy') AS "Start Date",
TO_CHAR(PLS.TO_DATE,'MM/dd/yyyy') AS "End Date", PLD.COUNTY_NAME AS "County",
PLD.CITY_TOWN_NAME AS "Town", PLD.ENRLMNT_TYPE_NAME AS "Enrollment Type",
PLS.STATUS_CID AS "StatusCid", STSBS.STATUS_NAME AS "Business Status",
PLD.LCTN_PHONE_NMBR AS "Phone Number", PLD.PRVDR_TYPE_NAME AS "PrvdrTypeName",
SP.SPCLTY_CODE||'-'||SP.SPCLTY_NAME ||'/'|| SP1.SPCLTY_CODE||'-'||
SP1.SPCLTY_NAME AS "Specialty/Subspecialty",
UPPER(SP1.SPCLTY_CODE) AS "SubSpclty", UPPER(SP.SPCLTY_CODE) AS "Spclty"
FROM /*Query Builder Clause*/
STATUS STS,
STATUS STSBS,
SPECIALTY_SUBSPECIALTY SSP,
(SELECT PRVDR_LCTN_STATUS_SID, PRVDR_LCTN_IID, PRVDR_LCTN_DTL_SID, FROM_DATE, TO_DATE,
STATUS_TYPE_CID, STATUS_CID, OPRTNL_FLAG,
FN_GETANCHORDT(FROM_DATE,TO_DATE) AS ANCHOR_DATE
FROM PRVDR_LCTN_STATUS
WHERE STATUS_TYPE_CID = 1
AND OPRTNL_FLAG = 'A'
) PLS,
PRVDR_LCTN_X_SPCLTY_SUBSPCLTY PXSP,
PRVDR_LCTN_STATUS PLSBS,
PROVIDER_LOCATION_DETAIL PLD,
SPECIALTY SP1,
SPECIALTY SP
WHERE
STS.STATUS_TYPE_CID = 1
AND STS.STATUS_CID = 2
AND STSBS.STATUS_TYPE_CID = 15
AND PLSBS.OPRTNL_FLAG = 'A'
-- UPPER(UPPER(SP1.SPCLTY_CODE)) LIKE UPPER('1%')
AND SP1.SPCLTY_CODE LIKE '1%'
-- AND UPPER(UPPER(SP.SPCLTY_CODE)) LIKE UPPER('1%')
AND SP.SPCLTY_CODE LIKE '1%'
AND PLS.OPRTNL_FLAG = 'A'
AND SP1.OPRTNL_FLAG = 'A'
AND PXSP.OPRTNL_FLAG = 'A'
AND PXSP.STATUS_CID = 2
AND SSP.OPRTNL_FLAG = 'A'
AND SP.OPRTNL_FLAG = 'A'
AND PLS.ANCHOR_DATE >= PLSBS.FROM_DATE
AND PLS.ANCHOR_DATE <= PLSBS.TO_DATE
AND PLS.STATUS_TYPE_CID = STS.STATUS_TYPE_CID
AND PLS.STATUS_CID = STS.STATUS_CID
AND PLD.PRVDR_LCTN_DTL_SID = PLS.PRVDR_LCTN_DTL_SID
AND PLSBS.PRVDR_LCTN_IID = PLS.PRVDR_LCTN_IID
AND PLSBS.STATUS_TYPE_CID = STSBS.STATUS_TYPE_CID
AND PLSBS.STATUS_CID = STSBS.STATUS_CID
AND PLS.ANCHOR_DATE >= SP1.FROM_DATE
AND PLS.ANCHOR_DATE <= SP1.TO_DATE
AND PXSP.PRVDR_LCTN_IID = PLS.PRVDR_LCTN_IID
AND PXSP.SPCLTY_SUBSPCLTY_SID = SSP.SPCLTY_SUBSPCLTY_SID
AND PLS.ANCHOR_DATE >= PXSP.FROM_DATE
AND PLS.ANCHOR_DATE <= PXSP.TO_DATE
AND SSP.SPCLTY_CODE = SP.SPCLTY_CODE
-- AND SSP.SUBSPCLTY_CODE = SP1.SPCLTY_CODE
AND SSP.SUBSPCLTY_CODE = SP1.SPCLTY_CODE
AND PLS.ANCHOR_DATE >= SSP.FROM_DATE
AND PLS.ANCHOR_DATE <= SSP.TO_DATE
AND PLS.ANCHOR_DATE >= SP.FROM_DATE
AND PLS.ANCHOR_DATE <= SP.TO_DATE
ORDER BY /*Query Builder Clause*/
"Provider Id" DESC
) A
WHERE rownum < 101
Here is the Emplain plan
SQL> @c:\mohammed\tune\UTLXPLS
Plan Table
| Operation | Name | Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT | | | | | | |
| COUNT STOPKEY | | | | | | |
| VIEW | | | | | | |
| SORT ORDER BY STOPKEY | | 1 | 358 | 120 | | |
| SORT ORDER BY STOPKEY | | | | | | |
| NESTED LOOPS | | 1 | 358 | 117 | | |
| NESTED LOOPS | | 1 | 313 | 116 | | |
| NESTED LOOPS | | 1 | 268 | 115 | | |
| NESTED LOOPS | | 1 | 240 | 114 | | |
Plan Table
| NESTED LOOPS | | 1 | 209 | 112 | | |
| NESTED LOOPS | | 1 | 95 | 111 | | |
| NESTED LOOPS | | 1 | 74 | 110 | | |
| NESTED LOOPS | | 7 | 294 | 103 | | |
| INDEX UNIQUE SCAN |SYS_C00489936 | 1 | 7 | | | |
| TABLE ACCESS FULL |PRVDR_LCTN_STATUS | 1K| 53K| 102 | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_STATUS | 57K| 1M| 2 | | |
| INDEX RANGE SCAN |TUNE_PNBS2_1 | 57K| | 1 | | |
| TABLE ACCESS BY INDEX ROWID |STATUS | 5 | 105 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489936 | 5 | | | | |
| TABLE ACCESS BY INDEX ROWID |PROVIDER_LOCATION_D | 40K| 4M| 1 | | |
Plan Table
| INDEX UNIQUE SCAN |XPKPROVIDER_LOCATIO | 40K| | | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_X_SPCLTY | 1M| 39M| 3 | | |
| INDEX RANGE SCAN |TUNE_SARWAR_0503200 | 1M| | 2 | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY_SUBSPECIA | 549 | 15K| 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489888 | 549 | | | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY | 11 | 495 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489875 | 11 | | | | |
| TABLE ACCESS BY INDEX ROWID |SPECIALTY | 11 | 495 | 1 | | |
| INDEX UNIQUE SCAN |SYS_C00489875 | 11 | | | | |
32 rows selected.
I have tried with several hints and several driving tables and tires. Any help in this regard will be highly appreciated.
Thanks a lot,
Mohammed Sarwar
ocp dba
Email: [email protected]
[email protected]
Phone : 301-944-2029 w
913-484-9204 cellThis should be better. Any help on tuning the above sql statement using the following explain plan will be highly appreciated.
Plan Table
| Operation ------------------| Name -------------| Rows | Bytes| Cost | Pstart| Pstop |
| SELECT STATEMENT -----------| ------------------| -----| -------|------| | |
| COUNT STOPKEY --------------|-------------------|------|--------|------| | |
| VIEW -----------------------|-------------------|----- | -------| -----| | |
| SORT ORDER BY STOPKEY ------|------------------ |--- 1 | ---358 | 120 -| | |
| SORT ORDER BY STOPKEY ------| ------------------|----- |------- | -----| | |
| NESTED LOOPS ---------------|-------------------|--- 1 |--358 -|- 117 | | |
| NESTED LOOPS ---------------|----------------- -|--- 1 | -313 -| -116 | | |
| NESTED LOOPS ---------------|----------------- -|--- 1 | 268-- | 115 -| | |
| NESTED LOOPS--------------- |-------------------| --1- | -240 -| -114 | | |
Plan Table
| NESTED LOOPS--------------- |------------------ | ---1 |- 209 -|- 112 | | |
| NESTED LOOPS--------------- | ------------------|--- 1 |-- 95- | -111 | | |
| NESTED LOOPS ---------------|----- -------------|--- 1 |-- 74 -| -110 | | |
| NESTED LOOPS ---------------|----------------- -|--- 7 | -294- |- 103| | |
| INDEX UNIQUE SCAN ----------|SYS_C00489936------| ---1 |--- 7--|-----| | |
| TABLE ACCESS FULL ----------|PRVDR_LCTN_STATUS -| --1K | 53K-- | 102 | | |
| TABLE ACCESS BY INDEX ROWID |PRVDR_LCTN_STATUS- | 57K -|---- 1M|-- 2 | | |
| INDEX RANGE SCAN -----------|TUNE_PNBS2_1 ------| 57K- |------ |-- 1 | | |
| TABLE ACCESS BY INDEX ROWID |STATUS------------ | 5 |105----|-- 1 | | |
| INDEX UNIQUE SCAN---------- |SYS_C00489936 -----| 5--- | ------|-----| | |
| TABLE ACCESS BY INDEX ROWID-|PROVIDER_LOCATION_D| 40K | 4M----|-- 1 | | |
Plan Table
| INDEX UNIQUE SCAN ----------|XPKPROVIDER_LOCATIO| 40K |----- |----- | | |
| TABLE ACCESS BY INDEX ROWID-|PRVDR_LCTN_X_SPCLTY| 1M -|---39M|--- 3 | | |
| INDEX RANGE SCAN -----------|TUNE_SARWAR_0503200| 1M -| -----|--- 2 | | |
|TABLE ACCESS BY INDEX ROWID- |SPECIALTY_SUBSPECIA| 549 |---15K| ---1 | | |
| INDEX UNIQUE SCAN ----------|SYS_C00489888 -----| 549 |----- | -----| | |
|TABLE ACCESS BY INDEX ROWID- |SPECIALTY ---------| 11- |---495|--- 1 | | |
| INDEX UNIQUE SCAN ----------|SYS_C00489875----- | 11 -|----- |----- | | |
|TABLE ACCESS BY INDEX ROWID -|SPECIALTY ---------| 11- |---495|----1 | | |
| INDEX UNIQUE SCAN-----------|SYS_C00489875----- | 11 -|----- |----- | | |
-------------------------------------------------------------------------------- -
SQL Developer Locking up/Unable to Cancel long Running tasks
I have had the same problem with a number of versions of SQL Developer (and version 3.2.09). It occurs when trying to cancel a long-running PL-SQL Function or procedure that has been started by 'Run' in SQL Developer.
Select Terminate in Run Manager does not stop the job. Nor does trying to exit SQLDeveloper; it asks whether I want to kill the job; then doesn't kill it and doesn't exit either.
Trying to save modifications to anything the process depends on results in SQL Developer locking for ~20 minutes.
I have to resort to getting a DBA to manually kill the process at the server.
Is there any possiblity of a workaround or a way of making the PL/SQL not lock so it can be terminated please?
ThanksI have had the same problem with a number of versions of SQL Developer (and version 3.2.09). It occurs when trying to cancel a long-running PL-SQL Function or procedure that has been started by 'Run' in SQL Developer.
Select Terminate in Run Manager does not stop the job. Nor does trying to exit SQLDeveloper; it asks whether I want to kill the job; then doesn't kill it and doesn't exit either.
Trying to save modifications to anything the process depends on results in SQL Developer locking for ~20 minutes.
I have to resort to getting a DBA to manually kill the process at the server.
Is there any possiblity of a workaround or a way of making the PL/SQL not lock so it can be terminated please?
Thanks -
Long Running SQL and ORDS Spawns Multiple Database Sessions
Hi all.
We have a strange situation when accessing a long running SQL Report (a single APEX Page).
The SQL takes about 15 mins to run but when I monitor what database sessions are spawned by the APEX Listener, I see multiple sessions all executing the same SQL. It appears that after 6 minutes, the APEX Listener spawns a new database session to execute the same SQL.
Has anyone seen this before and if so, is there a key setting I am missing as I don't want this to happen. I am new to the APEX Listener and WebLogic so apologies if this is the way it's meant to work but it seems odd that after a certain amount of time (6 minutes in my case) a new database session is spawned to do the same work.
We are running:
WebLogic: 10.3.0.6
APEX_LISTENER_VERSION 2.0.0.354.17.06
Datadate: 11.2.0.3.0 Production
APEX: 4.2.1.00.08
Cheers for any help.
DuncsHi Duncan,
With all respect, you should please rethink your interface. I would never consider writing a Web application with a request that knowingly takes 15 minutes to return the results. You can consider doing this asynchronously via DBMS_SCHEDULER and then alerting the user (via email, perhaps) that their results are ready. Or if you can precompute this in advance, consider using materialized views so that the user's response time is sub-second.
In an era where the patience of the average end-user is measured in single-digit seconds, it is impractical to ever expect an end-user to wait 15 minutes for their resultant Web page.
Joel -
Is there a way to get long running SQL Agent jobs information using powershell?
Hi All,
Is there a way to get long running SQL Agent jobs information using powershell for multiple SQL servers in the environment?
Thanks in Advance.
--HuntI'm running SQL's to fetch the required details and store it in centralized table.
foreach ($svr in get-content "f:\PowerSQL\Input\LongRunningJobsPowerSQLServers.txt"){
$dt = new-object "System.Data.DataTable"
$cn = new-object System.Data.SqlClient.SqlConnection "server=$svr;database=master;Integrated Security=sspi"
$cn.Open()
$sql = $cn.CreateCommand()
$sql.CommandText = "SELECT
@@SERVERNAME servername,
j.job_id AS 'JobId',
name AS 'JobName',
max(start_execution_date) AS 'StartTime',
max(stop_execution_date)AS 'StopTime',
max(avgruntimeonsucceed),
max(DATEDIFF(s,start_execution_date,GETDATE())) AS 'CurrentRunTime',
max(CASE WHEN stop_execution_date IS NULL THEN
DATEDIFF(ss,start_execution_date,stop_execution_date) ELSE 0 END) 'ActualRunTime',
max(CASE
WHEN stop_execution_date IS NULL THEN 'JobRunning'
WHEN DATEDIFF(ss,start_execution_date,stop_execution_date)
> (AvgRunTimeOnSucceed + AvgRunTimeOnSucceed * .05) THEN 'LongRunning-History'
ELSE 'NormalRunning-History'
END) 'JobRun',
max(CASE
WHEN stop_execution_date IS NULL THEN
CASE WHEN DATEDIFF(ss,start_execution_date,GETDATE())
> (AvgRunTimeOnSucceed + AvgRunTimeOnSucceed * .05) THEN 'LongRunning-NOW'
ELSE 'NormalRunning-NOW'
END
ELSE 'JobAlreadyDone'
END)AS 'JobRunning'
FROM msdb.dbo.sysjobactivity ja
INNER JOIN msdb.dbo.sysjobs j ON ja.job_id = j.job_id
INNER JOIN (
SELECT job_id,
AVG
((run_duration/10000 * 3600) + ((run_duration%10000)/100*60) + (run_duration%10000)%100)
+
STDEV
((run_duration/10000 * 3600) + ((run_duration%10000)/100*60) + (run_duration%10000)%100) AS 'AvgRuntimeOnSucceed'
FROM msdb.dbo.sysjobhistory
WHERE step_id = 0 AND run_status = 1
GROUP BY job_id) art
ON j.job_id = art.job_id
WHERE
(stop_execution_date IS NULL and start_execution_date is NOT NULL) OR
(DATEDIFF(ss,start_execution_date,stop_execution_date) > 60 and DATEDIFF(MINUTE,start_execution_date,GETDATE())>60
AND
CAST(LEFT(start_execution_date,11) AS DATETIME) = CAST(LEFT(GETDATE(),11) AS DATETIME) )
--ORDER BY start_execution_date DESC
group by j.job_id,name
$rdr = $sql.ExecuteReader()
$dt.Load($rdr)
$cn.Close()
$dt|out-Datatable
Write-DataTable -ServerInstance 'test124' -Database "PowerSQL" -TableName "TLOG_JobLongRunning" -Data $dt}
You can refer the below link to refer out-datatable and write-dataTable function.
http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/01/use-powershell-to-collect-server-data-and-write-to-sql.aspx
Once we've the table details, I'm sending one consolidated email to automatically.
--Prashanth -
We have a customer that runs our Crystal Reports and they have complained that some of the reports cause long running sql queries and they have to kill these queries manually from SQL Management tools. We have changed the code so that we now dispose the report source and viewer objects as we call .dispose() function on them;
reportSource.dispose();
viewer.dispose();
At first this seemed work but customer later complained that the issue still occurs. Can anyone help with why some of these CR queries are still running way after report is generated (with correct set of data), and based on the customer some of them running for more than 2 hours? What else can we do to make sure that all CR related queries cease to exist once report is generated? Appreciate all the help.1. Run the report from with Crystal designer. You should see the query being sent to DB server. After the report is viewed and you close it in designer, do you see the DB connection being dropped? If not, this may not be a SDK\ API related issue.
2. Try using latest set of CRJ Jars [here|http://downloads.businessobjects.com/akdlm/crystalreportsforeclipse/2_0/crjava-runtime_12.2.213.zip] in your application. Also update the crystalreportviewers folder with the new viewer found at this link.
3. Make sure that you are calling reportClientDocument.close() at the end when user is done viewing the report.
4. When you say logn running queries are seen in DB, are you referring to a DB connection left open? or is it actually running any query and returning results? -
Hi
I am planning to use enterprise manager grid control to create a UDM for the following sql that would alert me for the sql that is running for more then a hour for all databases any ideas on how to do this
SELECT
substr(swn.sql_text,40),
||'SQL is Running on Instance ' ||s.inst_id || 'Since '|| ROUND(sl.elapsed_seconds/60) elapsed_mins,
FROM gv$session_longops sl,
gv$session s ,
gv$sql swn
WHERE s.sid = sl.sid
AND s.inst_id = sl.inst_id
AND s.serial# = sl.serial#
AND s.inst_id = swn.inst_id
AND s.sql_address = swn.address
AND s.sql_hash_value = swn.hash_value
AND sl.sofar <> sl.totalwork
AND sl.totalwork <> 0
AND round((sl.elapsed_seconds)/60,0) > 60
order by 7Edited by: user9243284 on Jun 7, 2010 3:48 AMI think you should specify:
SQL query output: two columns
Metric Type: String
and the following query:
SELECT 'NA',0
from dual
union
SELECT distinct '( ' ||i.instance_name ||','|| sl.sid ||','|| sl.serial# ||', ) ' || substr(s.sql_text,1,1000) sql, ROUND(sl.elapsed_seconds/60) mins
FROM gv$session_longops sl,
gv$sql s,
gv$instance i
WHERE sl.sofar = sl.totalwork
AND sl.totalwork = 0
AND sl.inst_id = s.inst_id (+)
AND sl.sql_address = s.address (+)
AND sl.sql_hash_value = s.hash_value (+)
AND sl.inst_id = i.inst_id
use the select from dual, to make sure your query allways returns at least one row.
BTW, you will find some examples of UDM creation on my blog.
Regards
Rob
http://oemgc.wordpress.com -
How do I continue failed patch 6678700 when it quits because of another pat
Hello EBS Gurus:
I am in the process of upgrading EBS 11.5.10.2 to 12i using document Part No. E16342-03, Note 761570.1& Note 881505.1.
On Part No. E16342-03, I am at Step 10 3:10. Run the American English upgrade patch driver (required), after attempting to resolve a "FAILED: file fem_bal_nacc_hier_l2_mv.xdf on worker 1" as per doc ID 1284055.1, and upon restarting Patch 6678700, all workers quit and adpatch exited after running for over 30 hours.
An attempt to restart "adpatch options=nocopyportion,nogenerateportion" keeps failing as adpatch keeps giving the errors (This patch cannot be applied to your current release.) I had when I ran patch 10406817.
How do I run adpatch so that it continues with patch 6678700 - where it failed? I am running out of time to start this long patch from the beginning?
How long could usually take on an averagely fast server, to install this patch?
Thanks
ChoI am in the process of upgrading EBS 11.5.10.2 to 12i using document Part No. E16342-03, Note 761570.1& Note 881505.1.
On Part No. E16342-03, I am at Step 10 3:10. Run the American English upgrade patch driver (required), after attempting to resolve a "FAILED: file fem_bal_nacc_hier_l2_mv.xdf on worker 1" as per doc ID 1284055.1, and upon restarting Patch 6678700, all workers quit and adpatch exited after running for over 30 hours.
As per the doc, you should have skipped the failed worker and continue with the upgrade patch then apply the patch in the doc.
An attempt to restart "adpatch options=nocopyportion,nogenerateportion" keeps failing as adpatch keeps giving the errors (This patch cannot be applied to your current release.) I had when I ran patch 10406817.Please make sure you source the correct env file -- Why Do Some Patches Error Reporting 11i Environment During R12 Upgrade? [ID 1276074.1]
How do I run adpatch so that it continues with patch 6678700 - where it failed? I am running out of time to start this long patch from the beginning?It is too late now to continue with the previous failed session if you have already applied the other patch mentioned in your doc.
How long could usually take on an averagely fast server, to install this patch?Depends on your hardware resources, but adpatch should be smart enough to skip all the steps/tasks/jobs which were already completed.
Thanks,
Hussein -
I'm now writing some reports that are slow running. I've tuned the sql, however because the volume of data being returned and the complexity of the report queries the reports will likely never run faster then ~30 seconds.
I'm using the ApEx advanced reporting (BIP) and ApEx version 3.0.1.
What are some thoughts on how to best implement long running reports?
Thanks,
Todd
Message was edited by:
tfaHi Dimitri,
You asked...
What happens when you run the report directly from BI
Publisher?There are several reports from one application. I've run the report queries in OEM SQL Tuning Advisor and tuned them.
I have not seen a noticeable difference in run times between submitting the reports from APEX or running them from BIP. The queries for these reports have the same run time when run through SQL Developer.
The slow run time of the report queries can be traced to poor table design. The application is a bit of legacy application with the front end now being rewritten using APEX. The poor table design issues are magnified by the volume of data. I have plans to partition one of the transaction tables.
Prior to rewriting the user interface in APEX the application was written in Oracle Forms. When written in Forms the application was a bolt-on to the Oracle applications. In that environment users could submit reports to the run in the background (via Concurrent Manger) then the report output was viewed later following the completion of the report.
I'm pursuing a similar solution as the concurrent manager in Oracle applications but available in the APEX, BIP environment. The reports do run between 30 seconds to 1 minute which is to long for the users to wait on the submitting page. Any thoughts on how it is possible to run these long running reports without tying up the user’s page?
I'll investigate dbms_scheduler and BIP APIs. I know BIP also has a scheduler available but I do not know much about it.
Thanks,
Todd -
Long running query--- included steps given by Randolf
Hi,
I have done my best to follow Randolf instruction word-by-word and hope to get solution for my
problem soon. Sometime back I have posted a thread on this problem then got busy with other
stuff and was not able to follow it. Here I am again with same issue.
here is link for my previous post
long running query in database 10gHere is backgroud of my requriemment.
I am working on Oracle forms 10g which is using package given below. We want to display client information
with order count basd on different status like Pending, Error, back Order, expedited, std shipping.
Output will look something like.
client name pending error backorder expedited std shipping
ABC 24 0 674 6789 78900
XYZ 35 673 5700 0 798274
.There are total 40 clients . The long running query are expedited and std shipping.
When i run package from Oracle Form Developer it takes 3 mintues to run but when I run same query in our application using forms
(which uses Oracle Application Server) it takes around 1 hour, which is completly unacceptable.
User wants it be done in less than 1 mintue.
I have tried combining Pending,error and backorder queries together but as far as I know it will not
work in Oracle Form as we need a place holder for each status.
Please dont think it is Forms related question, it is a Performance problem.
PACKAGE BODY ORDER_COUNT_PKG IS
PROCEDURE post_query IS
BEGIN
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.PENDING
FROM orders o
WHERE o.status = 'P'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.ERROR
FROM orders o
WHERE o.status = 'E'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.BACK_ORDER
FROM orders o
WHERE o.status = 'B'
AND (parent_order_id is null
OR (order_type='G'
AND parent_order_id=original_order_number))
AND o.client = :ORDER_STATUS.CLIENT_NUMBER;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.EXPEDITE
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND (nvl(o.priority,'1') = '2'
OR stm.surcharge_amount <> 0)
AND o.client = :ORDER_STATUS.CLIENT_NUMBER
GROUP BY o.client;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
BEGIN
SELECT count(*)
INTO :ORDER_STATUS.STD_SHIP
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :ORDER_STATUS.CLIENT_NUMBER
GROUP BY o.client;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END post_query;
END ORDER_COUNT_PKG;one of the query which is taking long time is
SELECT count(*)
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :CLIENT_NUMBER
GROUP BY o.clientThe version of the database is 10.2.1.0.2
SQL> alter session force parallel dml;These are the parameters relevant to the optimizer:
SQL> show parameter user_dump_dest
NAME TYPE VALUE
user_dump_dest string /u01/app/oracle/admin/mcgemqa/
udump
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.4
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 16
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACTHere is the output of EXPLAIN PLAN:
SQL> explain plan for
2 SELECT count(*)
3 FROM orders o,shipment_type_methods stm
4 WHERE o.status in ('A','U')
5 AND (o.parent_order_id is null
6 OR (o.order_type = 'G'
7 AND o.parent_order_id = o.original_order_number))
8 AND nvl(o.priority,'1') <> '2'
9 AND o.client = stm.client
10 AND o.shipment_class_code = stm.shipment_class_code
11 AND stm.surcharge_amount = 0
12 AND o.client = :CLIENT_NUMBER
13 GROUP BY o.client
14 /
Explained.
Elapsed: 00:00:00.12
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:00.86
SQL> rollback;
Rollback complete.
Elapsed: 00:00:00.07Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> SELECT count(*)
2 FROM orders o,shipment_type_methods stm
3 WHERE o.status in ('A','U')
4 AND (o.parent_order_id is null
5 OR (o.order_type = 'G'
6 AND o.parent_order_id = o.original_order_number))
7 AND nvl(o.priority,'1') <> '2'
8 AND o.client = stm.client
9 AND o.shipment_class_code = stm.shipment_class_code
10 AND stm.surcharge_amount = 0
11 AND o.client = :CLIENT_NUMBER
12 GROUP BY o.client
13 /
Elapsed: 00:00:03.09
Execution Plan
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
Statistics
55 recursive calls
0 db block gets
7045 consistent gets
0 physical reads
0 redo size
206 bytes sent via SQL*Net to client
238 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> The TKPROF output for this statement looks like the following:
SELECT count(*)
FROM orders o,shipment_type_methods stm
WHERE o.status in ('A','U')
AND (o.parent_order_id is null
OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number))
AND nvl(o.priority,'1') <> '2'
AND o.client = stm.client
AND o.shipment_class_code = stm.shipment_class_code
AND stm.surcharge_amount = 0
AND o.client = :CLIENT_NUMBER
GROUP BY o.client
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 0 0 0 0
Execute 1 0.04 0.04 0 0 0 0
Fetch 2 2.96 2.91 0 7039 0 1
total 4 3.01 2.95 0 7039 0 1
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 95
Rows Row Source Operation
1 SORT GROUP BY NOSORT (cr=7039 pr=0 pw=0 time=2913701 us)
91 TABLE ACCESS BY INDEX ROWID ORDERS (cr=7039 pr=0 pw=0 time=261997906 us)
93 NESTED LOOPS (cr=6976 pr=0 pw=0 time=20740 us)
1 TABLE ACCESS BY INDEX ROWID SHIPMENT_TYPE_METHODS (cr=2 pr=0 pw=0 time=208 us)
3 INDEX RANGE SCAN U_SHIPMENT_TYPE_METHODS (cr=1 pr=0 pw=0 time=88 us)(object id 81957)
91 INDEX RANGE SCAN ORDERS_ORDER_DATE (cr=6974 pr=0 pw=0 time=70 us)(object id 81547)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.02 0.02
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> variable CLIENT_NUMBER varchar2(20)
SQL> exec :CLIENT_NUMBER := '14'
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.06
SQL> SELECT /*+ gather_plan_statistics */ count(*)
2 FROM orders o,shipment_type_methods stm
3 WHERE o.status in ('A','U')
4 AND (o.parent_order_id is null
5 OR (o.order_type = 'G'
6 AND o.parent_order_id = o.original_order_number))
7 AND nvl(o.priority,'1') <> '2'
8 AND o.client = stm.client
9 AND o.shipment_class_code = stm.shipment_class_code
10 AND stm.surcharge_amount = 0
11 AND o.client = :CLIENT_NUMBER
12 GROUP BY o.client
13 /
COUNT(*)
91
Elapsed: 00:00:02.85
SQL> set termout on
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 4nfj368y8w6a3, child number 0
SELECT /*+ gather_plan_statistics */ count(*) FROM orders o,shipment_type_methods stm WHERE
o.status in ('A','U') AND (o.parent_order_id is null OR (o.order_type = 'G'
AND o.parent_order_id = o.original_order_number)) AND nvl(o.priority,'1') <> '2' AND
o.client = stm.client AND o.shipment_class_code = stm.shipment_class_code AND
stm.surcharge_amount = 0 AND o.client = :CLIENT_NUMBER GROUP BY o.client
Plan hash value: 559278019
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
| 1 | SORT GROUP BY NOSORT | | 1 | 1 | 1 |00:00:02.63 | 7039 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 1 | 175K| 91 |00:03:56.87 | 7039 |
| 3 | NESTED LOOPS | | 1 | 25300 | 93 |00:00:00.02 | 6976 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 1 | 1 |00:00:00.01 | 2 |
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 1 | 2 | 3 |00:00:00.01 | 1 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 1 | 176K| 91 |00:00:00.01 | 6974 |
Predicate Information (identified by operation id):
2 - filter((("O"."PARENT_ORDER_ID" IS NULL OR ("O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER"))) AND NVL("O"."PRIORITY",'1')<>'
"O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE"))
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter(("O"."STATUS"='A' OR "O"."STATUS"='U'))
32 rows selected.
Elapsed: 00:00:01.30
SQL> I'm looking forward for suggestions how to improve the performance of this statement.
Thanks
SandyPlease find explain plan for No hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"=:CLIENT_NUMBER)
6 - access("O"."CLIENT"=:CLIENT_NUMBER)
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:00.86Explain Plan for Parallel Hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 559278019
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46764 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46764 (3)| 00:09:22 |
|* 2 | TABLE ACCESS BY INDEX ROWID | ORDERS | 175K| 3431K| 25979 (3)| 00:05:12 |
| 3 | NESTED LOOPS | | 25300 | 864K| 46764 (3)| 00:09:22 |
|* 4 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00
|* 5 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 2371 (8)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_CODE")
4 - filter("STM"."SURCHARGE_AMOUNT"=0)
5 - access("STM"."CLIENT"='14')
6 - access("O"."CLIENT"='14')
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
24 rows selected.
Elapsed: 00:00:08.92Explain Plan for USE_Hash hint
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1465232248
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 35 | 46786 (3)| 00:09:22 |
| 1 | SORT GROUP BY NOSORT | | 1 | 35 | 46786 (3)| 00:09:22 |
|* 2 | HASH JOIN | | 25300 | 864K| 46786 (3)| 00:09:22 |
|* 3 | TABLE ACCESS BY INDEX ROWID| SHIPMENT_TYPE_METHODS | 1 | 15 | 2 (0)| 00:00:0
|* 4 | INDEX RANGE SCAN | U_SHIPMENT_TYPE_METHODS | 2 | | 1 (0)| 00:00:01 |
|* 5 | TABLE ACCESS BY INDEX ROWID| ORDERS | 175K| 3431K| 46763 (3)| 00:09:22 |
|* 6 | INDEX RANGE SCAN | ORDERS_ORDER_DATE | 176K| | 4268 (8)| 00:00:52 |
Predicate Information (identified by operation id):
2 - access("O"."CLIENT"="STM"."CLIENT" AND "O"."SHIPMENT_CLASS_CODE"="STM"."SHIPMENT_CLASS_COD
E")
3 - filter("STM"."SURCHARGE_AMOUNT"=0)
4 - access("STM"."CLIENT"='14')
5 - filter(("O"."PARENT_ORDER_ID" IS NULL OR "O"."ORDER_TYPE"='G' AND
"O"."PARENT_ORDER_ID"=TO_NUMBER("O"."ORIGINAL_ORDER_NUMBER")) AND NVL("O"."PRIORITY",'1')<>'2
6 - access("O"."CLIENT"='14')
filter("O"."STATUS"='A' OR "O"."STATUS"='U')
25 rows selected.
Elapsed: 00:00:01.09
SQL> Thanks
Sandy -
Oracle SQL Developer 1.1 Patch 2 (1.1.2.25.79) Browsing
Dear All
I download Oracle SQL Developer 1.1 Patch 2 (1.1.2.25.79) ,and install it but
it refuse to browse any schema , knowing that it accept the connection and keep the massage loading appearing all the time
Thanks
SulimanMore detailed output below (Ctrl+break and running as sqldeveloper -J-Dide.extension.log.to.console=true)
I've also only got Oracle.* files in my two extensions directories
C:\Program Files\SQLDeveloper\ide\extensions
C:\Program Files\SQLDeveloper\jdev\extensions
C:\Program Files\SQLDeveloper\sqldeveloper\bin>sqldeveloper.exe
WARNING: Unknown directive: SetSkipJ2SDKCheck
Using oracle.home=C:\Program Files\SQLDeveloper
Using ide.user.dir=null
Full thread dump Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode):
"TimerQueue" daemon prio=6 tid=0x04635270 nid=0xff4 in Object.wait() [0x04d3f000
..0x04d3fd68]
at java.lang.Object.wait(Native Method)
- waiting on <0x12879928> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:233)
- locked <0x12879928> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:595)
"AWT-EventQueue-0" prio=6 tid=0x04610e50 nid=0xf50 in Object.wait() [0x04c3f000.
.0x04c3f9e8]
at java.lang.Object.wait(Native Method)
- waiting on <0x12832040> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:474)
at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
- locked <0x12832040> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:189)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
"Image Fetcher 0" daemon prio=8 tid=0x04611160 nid=0x234 in Object.wait() [0x04b
3f000..0x04b3fa68]
at java.lang.Object.wait(Native Method)
- waiting on <0x12860f78> (a java.util.Vector)
at sun.awt.image.ImageFetcher.nextImage(ImageFetcher.java:114)
- locked <0x12860f78> (a java.util.Vector)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:167)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
"AWT-Windows" daemon prio=6 tid=0x045fbd28 nid=0xb7c runnable [0x04a2f000..0x04a
2fae8]
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:269)
at java.lang.Thread.run(Thread.java:595)
"AWT-Shutdown" prio=6 tid=0x045fb8b0 nid=0xe4c in Object.wait() [0x0492f000..0x0
492fb68]
at java.lang.Object.wait(Native Method)
- waiting on <0x128345c8> (a java.lang.Object)
at java.lang.Object.wait(Object.java:474)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0x128345c8> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:595)
"Java2D Disposer" daemon prio=6 tid=0x044de4a8 nid=0x688 in Object.wait() [0x048
2f000..0x0482fbe8]
at java.lang.Object.wait(Native Method)
- waiting on <0x12834650> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x12834650> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at sun.java2d.Disposer.run(Disposer.java:107)
at java.lang.Thread.run(Thread.java:595)
"Low Memory Detector" daemon prio=6 tid=0x01015278 nid=0x90c runnable [0x0000000
0..0x00000000]
"CompilerThread0" daemon prio=6 tid=0x01012d38 nid=0xed0 waiting on condition [0
x00000000..0x03e6fa4c]
"Signal Dispatcher" daemon prio=6 tid=0x010120b8 nid=0x7dc waiting on condition
[0x00000000..0x00000000]
"Finalizer" daemon prio=8 tid=0x01008fd0 nid=0xd28 in Object.wait() [0x03c6f000.
.0x03c6fae8]
at java.lang.Object.wait(Native Method)
- waiting on <0x1279ffa0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
- locked <0x1279ffa0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=6 tid=0x01008518 nid=0x624 in Object.wait() [0x0
3b6f000..0x03b6fa68]
at java.lang.Object.wait(Native Method)
- waiting on <0x127a0020> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:474)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <0x127a0020> (a java.lang.ref.Reference$Lock)
"main" prio=6 tid=0x00849390 nid=0xf4c runnable [0x0012d000..0x0012fb78]
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Exception.java:59)
at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:6
5)
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891)
at java.lang.ClassLoader.loadClass(ClassLoader.java:301)
- locked <0x127a2fd0> (a sun.misc.Launcher$ExtClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x127a0058> (a sun.misc.Launcher$AppClassLoader)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
- locked <0x127a0058> (a sun.misc.Launcher$AppClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at oracle.classloader.SearchPolicy$FindMain.getClass(SearchPolicy.java:3
07)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:648)
- locked <0x127af080> (a oracle.classloader.PolicyClassLoader)
at oracle.classloader.PolicyClassLoader.askParentForClass(PolicyClassLoa
der.java:1308)
at oracle.classloader.SearchPolicy$AskParent.getClass(SearchPolicy.java:
68)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoa
der.java:1693)
- locked <0x127adf48> (a oracle.classloader.PolicyClassLoader)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java
:1654)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java
:1639)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
- locked <0x127adf48> (a oracle.classloader.PolicyClassLoader)
at javax.ide.model.spi.DocumentHook.$init$(DocumentHook.java:66)
at javax.ide.model.spi.DocumentHook.<init>(DocumentHook.java:27)
at javax.ide.extension.spi.DefaultHookVisitorFactory.createDocumentHook(
DefaultHookVisitorFactory.java:157)
at javax.ide.extension.spi.DefaultHookVisitorFactory.registerStandardVis
itors(DefaultHookVisitorFactory.java:81)
at javax.ide.extension.spi.DefaultHookVisitorFactory.<init>(DefaultHookV
isitorFactory.java:53)
at oracle.ideimpl.extension.ExtensionManagerImpl$1.<init>(ExtensionManag
erImpl.java:153)
at oracle.ideimpl.extension.ExtensionManagerImpl.createHookVisitorFactor
y(ExtensionManagerImpl.java:152)
at javax.ide.extension.ExtensionRegistry.loadExtensions(ExtensionRegistr
y.java:259)
at oracle.ideimpl.extension.ExtensionManagerImpl.loadExtensions(Extensio
nManagerImpl.java:376)
at javax.ide.extension.ExtensionRegistry.loadExtensions(ExtensionRegistr
y.java:171)
at javax.ide.extension.ExtensionRegistry.initialize(ExtensionRegistry.ja
va:382)
at oracle.ideimpl.extension.ExtensionManagerImpl.initialize(ExtensionMan
agerImpl.java:875)
at javax.ide.Service.getService(Service.java:68)
at javax.ide.extension.ExtensionRegistry.getExtensionRegistry(ExtensionR
egistry.java:401)
at oracle.ide.ExtensionRegistry.getOracleRegistry(ExtensionRegistry.java
:140)
at oracle.ide.IdeCore.startupImpl(IdeCore.java:1122)
at oracle.ide.Ide.startup(Ide.java:642)
at oracle.ideimpl.DefaultIdeStarter.startIde(DefaultIdeStarter.java:35)
at oracle.ideimpl.Main.start(Main.java:90)
at oracle.ideimpl.Main.main(Main.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.ide.boot.PCLMain.callMain(PCLMain.java:45)
at oracle.ide.boot.PCLMain.main(PCLMain.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.classloader.util.MainClass.invoke(MainClass.java:89)
at oracle.ide.boot.IdeLauncher.bootClassLoadersAndMain(IdeLauncher.java:
218)
at oracle.ide.boot.IdeLauncher.launchImpl(IdeLauncher.java:90)
at oracle.ide.boot.IdeLauncher.launch(IdeLauncher.java:66)
at oracle.ide.boot.IdeLauncher.main(IdeLauncher.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.ide.boot.Launcher.invokeMain(Launcher.java:508)
at oracle.ide.boot.Launcher.launchImpl(Launcher.java:106)
at oracle.ide.boot.Launcher.launch(Launcher.java:60)
at oracle.ide.boot.Launcher.main(Launcher.java:49)
"VM Thread" prio=6 tid=0x010058e0 nid=0xde8 runnable
"VM Periodic Task Thread" prio=6 tid=0x01011ff8 nid=0xeb8 waiting on condition
Product extension oracle.sqldeveloper could not be loaded. The product cannot st
art.
Disabled extensions:
oracle.ide.xmlef: Missing dependencies: oracle.ide.daf, oracle.ide.palette2
C:\Program Files\SQLDeveloper\sqldeveloper\bin>sqldeveloper -J-Dide.extension.lo
g.to.console=true
WARNING: Unknown directive: SetSkipJ2SDKCheck
Using oracle.home=C:\Program Files\SQLDeveloper
Using ide.user.dir=null
Product extension oracle.sqldeveloper could not be loaded. The product cannot st
art.
Disabled extensions:
oracle.ide.xmlef: Missing dependencies: oracle.ide.daf, oracle.ide.palette2
C:\Program Files\SQLDeveloper\sqldeveloper\bin> -
Long running table partitioning job
Dear HANA grus,
I've just finished table partitioning jobs for CDPOS(change document item) with 4 partitions by hash with 3 columns.
Total data volumn is around 340GB and the table size was 32GB !!!!!
(migration job was done without disabling CD, so currently deleting data on the table with RSCDOK99)
Before partitioning, the data volumn of the table was around 32GB.
After partitioning, the size has changed to 25GB.
It took around One and half hour with exclusive lock as mentioned in the HANA adminitration guide.
(It is QA DB, so less complaints)
I thought that I might not can do this in the production DB.
Does anyone hava any idea for accelerating this task?? (This is the fastest DBMS HANA!!!!)
Or Do you have any plan for online table partitioning functionality??(To HANA Development team)
Any comments would be appreciate.
Cheers,
- JasonJason,
looks like we're cross talking here...
What was your rationale to partition the table in the first place?
=> To reduce deleting time of CDPOS (As I mentioned it was almost 10% quantity of whole Data volume, So I would like to save deleting time of the table from any pros of partitioning table like partitioning pruning)
Ok, I see where you're coming from, but did you ever try out if your idea would actually work?
As deletion of data is heavily related with locating the records to be deleted, creating an index would have probably be the better choice.
Thinking about it... you want to get rid of 10% of your data and in order to speed the overall process up, you decide to move 100% of the data into sets of 25% of the data - equally holding their 25% share of the 10% records to be deleted.
The deletion then should run along these 4 sets of 25% of data.
It's surely me, but where is the speedup potential here?
How many unloads happened during the re-partitioning?
=> It was fully uploaded in the memory before partitioning the table by myself.(from HANA studio)
I was actually asking about unloads _during_ the re-partitioning process. Check M_CS_UNLOADS for the time frame in question.
How do the now longer running SQL statements look like?
=> As i mentioned selecting/deleting increased almost twice.
That's not what I asked.
Post the SQL statement text that was taking longer.
What are the three columns you picked for partitioning?
=> mandant, objectclas, tabname(QA has 2 clients and each of them have nearly same rows of the table)
Why those? Because these are the primary key?
I wouldn't be surprised if the SQL statements only refer to e.g. MANDT and TABNAME in the WHERE clause.
In that case the partition pruning cannot work and all partitions have to be searched.
How did you come up with 4 partitions? Why not 13, 72 or 213?
=> I thought each partitions' size would be 8GB(32GB/4) if they are divided into same size(just simple thought), and 8GB size is almost same size like other largest top20 tables in the HANA DB.
Alright, so basically that was arbitrary.
For the last comment of your reply, most people would do partition for their existing large tables to get any benefit of partitioning(just like me). I think your comment can be applied for the newly inserting data.
Well, not sure what "most people" would do.
HASH partitioning a large existing table certainly is not an activity that is just triggered off in a production system. Adding partitions to a range partitions table however happens all the time.
- Lars
Maybe you are looking for
-
Hi abap gurus, I have developed abap report in se38 i want to take output print on 39.5 MM width and 30.5 MM height page in EPSON printer how can i take print of this. pls suggest me ....
-
Adobe Acrobat 11 shutting down
Adobe Acrobat 11 shuts down when I am cutting and pasting between 2 PDF's from a network drive. Software update and reinstall have already been performed. Windows 7 Enterprise is the OS on a networked PC.
-
Keyboard shortcuts in DreamWeaver
Hi All, I have started using dreamweaver 8 for my coldfusion development. Can anyone help me what all keyboard shortcuts are there for coldfusion development like cfdump,cfabort,cfoutput etc in dreamweaver 8. I have been using eclipse and i was
-
I think thats the topic Network: On Scan of the manual is wrong
I'm had troubles with this property (http://zone.ni.com/reference/en-XX/help/371618F-01/lvdscprop/sv_network_on_scan/) . I'm developing a system who creates all variables programmatically and i read about the properties to setup them. In the manual t
-
I reinstalled Mac OS X Snow leopard on my Intel Core Duo Mac Mini and it doesn't have sound anymore, the softwar is all up to date. any ideas on how to fix this? Thanks.