OBIEE direct DB request query sql statement cannot be edited after saved
I have created direct DB request with long complex query, validated sql and Results appears ok. After I save this request and go back to edit the SQL statement, the original statement is only partially visible. Basically I can not do edit.
Is there any Query related buffer or other configuration parms I have to set up?
I'm not sure what the deal is between Flex/AIR and Visusal Studios, but i descided to publish my webservices and point the wsdl there instead of using the visual studio generated one.
AND BEHOLD
I't worked and worked much much faster than i was anticipating.
So i'll just chalk it up to poor communication between FLEX and VS. But if anybody knows a more complete answer I would still love to hear it.
Similar Messages
-
How to set Query SQL Statement parameter dynamically in Sender JDBCAdpter
Hi All,
I have one scenario in which we are using JDBC Sender Adapter.
Now in this case,we need to set Query SQL Statement with a SELECT statement based on some fields.
This SQL statement is not constant, it would need to be changed.
Means sometimes receiver will want to execute SQL statement with these fields and sometimes they will want to execute it with different fields.
We can create separate channels for each SQL statement but again that is not an optimum solution.
So ,I am looking out for a way to set these parameters dynamically or set SQL statement at Runtime.
Can you all please help me to get this?Shweta ,
<i>Sometimes receiver will want to execute SQL statement dynamically</i>....
How you will get the query dynamically? Ok Let me assume, consider they are sending the query through file, then its definitely possible. But u need BPM and also not sender JDBC receiver adapter instead, receiver JDBC adapter.
SQL Query File ->BPM>Synchronous send [Fetch data from DB]--->Response -
>...............
Do u think the above design will suit's ur case!!!!
Best regards,
raj. -
Xi JDBC Adapter - Query SQL Statement & Update SQL Statement
Hi!
I configure the JDBC adapter sender (XI) to take data from Oracle database.
I set the Query and Update SQL Statement in the Processing parameters of the communication channel in this way:
Query SQL Statement :
SELECT * FROM XI_TABLE WHERE STATUS = 'WAIT' ORDER BY ROW_NUM
Update SQL Statement :
UPDATE XI_TABLE SET STATUS = 'DONE', DATE = SYSDATE WHERE STATUS = 'WAIT'
My question is :
If a new record with the field STATUS = 'WAIT' is added to the table (xi_table) during the time between the execution of the query statement and the start of the update statement, what will happen to that record during the update?
There is a way to avoid the update of that record? or to pass to the update statement only the record selected in the query statement?
Please, may you give me some example?
Thanks,
Francescohi,
did you check "Isolation Level for Transaction"
for the sender jdbc adapter?
http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
Regards,
michal -
Query SQL Statement & Update SQL Statement
Hi!
I configure the JDBC adapter sender (XI) to take data from MSSQL database.
I have to run select like this:
SELECT
tblMilestone.Site,
tblMilestone.Revision,
tblMilestone.MilestoneNameID,
tblMilestone.ApprovedDate,
tblMilestoneName.MilestoneName
FROM
tblMilestoneName
INNER JOIN tblMilestone ON tblMilestoneName.MilestoneNameID = tblMilestone.MilestoneNameID
WHERE tblMilestone.StatusCode = 1;
My question is what "Update SQL Statement" I should use in communication channel definition? I only need to update tblMilestone or this two tables?
Maybe you give me some example.Check this from SAP help...
Update SQL Statement
You have the following options:
● Enter a valid SQL statement that is to be applied to the database once the data (determined from the Query SQL Statement) has been successfully sent to the Integration Server/PCK.
It must be an INSERT, UPDATE, or DELETE statement.
● In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement. -
Subsequent SQL statements cannot be processed. SQLSTATE=58005 row=1
Hi,
I am getting below error, in db13 online backup error.
09.06.2014
00:00:58
Job started
09.06.2014
00:00:58
Step 001 started (program RSDBAJOB, variant &0000000002712, user ID BASISADMIN)
09.06.2014
00:00:58
Backup_Dev:Database Backup to Device
09.06.2014
00:00:58
Backup_Dev:started by CL_DB6_JOB_BACKUP_DEVICE on server bgprd
09.06.2014
00:00:58
Backup_Dev:Parameter TESTMODE has not been set
09.06.2014
00:00:58
Backup_Dev:Parameter RUNTIME has not been set
09.06.2014
00:00:58
Backup_Dev:Parameter BACKUP_MODE has been set to "ONLINE"
09.06.2014
00:00:58
Backup_Dev:Parameter PARTITION has not been set
09.06.2014
00:00:58
Backup_Dev:Parameter BACKUP_TYPE has been set to ""
09.06.2014
00:00:58
Backup_Dev:Parameter COMPRESS has been set to ""
09.06.2014
00:00:58
Backup_Dev:Parameter INCLUDE LOGS has been set to "INCLUDE LOGS"
09.06.2014
00:00:58
Backup_Dev:Parameter NUMBER_BUFFERS has been set to " 0"
09.06.2014
00:00:58
Backup_Dev:Parameter BUFFER_SIZE has been set to " 0"
09.06.2014
00:00:58
Backup_Dev:Parameter PARALLELISM has been set to " 0"
09.06.2014
00:00:58
Backup_Dev:Parameter UTIL_IMPACT_PRIORITY has not been set
09.06.2014
00:00:58
Backup_Dev:Parameter FILE_PATH has been set to "/dev/rmt/0mn"
09.06.2014
00:01:04
Backup_Dev:Command ' 'failed
09.06.2014
00:01:04
Exception CX_DB6_CON in program CL_DB6_JOB_BACKUP=============CP / CL_DB6_JOB_BACKUP=============CM002 at line ADBC error with r
09.06.2014
00:01:04
Backup_Dev:Exception CX_DBA_JOB in class CL_DB6_JOB_BACKUP
09.06.2014
00:01:04
Backup_Dev: Kernel Error ID:
09.06.2014
00:01:04
Backup_Dev:SYSID:
09.06.2014
00:01:04
Backup_Dev: SY-SUBRC: 1208
09.06.2014
00:01:04
Backup_Dev: SY-TABIX: 0
09.06.2014
00:01:04
Backup_Dev: Message: ADBC error
09.06.2014
00:01:04
Backup_Dev: Database:
09.06.2014
00:01:04
Backup_Dev:caused by
09.06.2014
00:01:04
Backup_Dev:Exception CX_DB6_ADMINCMD in class CL_DB6_ADMIN_CMD method EXECUTE_CM
09.06.2014
00:01:04
Backup_Dev: D line 43
09.06.2014
00:01:04
Backup_Dev: Kernel Error ID:
09.06.2014
00:01:04
Backup_Dev: SYSID: PRD
09.06.2014
00:01:04
Backup_Dev: SY-SUBRC: 1208
09.06.2014
00:01:04
Backup_Dev: Message: ADBC error
09.06.2014
00:01:04
Backup_Dev: Command: BACKUP DATABASE PRD ON DBPARTITIONNUM ( 0 ) ONLINE TO"/dev/
09.06.2014
00:01:04
Backup_Dev: rmt/0mn" INCLUDE LOGS
09.06.2014
00:01:04
Backup_Dev: Database:
09.06.2014
00:01:04
Backup_Dev:caused by
09.06.2014
00:01:04
Backup_Dev:Exception CX_SQL_EXCEPTION in class CL_SQL_STATEMENT
09.06.2014
00:01:04
Backup_Dev: Kernel Error ID:
09.06.2014
00:01:04
Backup_Dev: DB Error: Yes
09.06.2014
00:01:04
Backup_Dev: SQL Code: 902-
09.06.2014
00:01:04
Backup_Dev: SQL Message: SQL0902C A system error (reason code = "
09.06.2014
00:01:04
Backup_Dev: ") occurred.
09.06.2014
00:01:04
Backup_Dev: Subsequent SQL statements cannot be processed. SQLSTATE=58005 row=1
09.06.2014
00:01:04
Backup_Dev: DB Object Exists: No
09.06.2014
00:01:04
Backup_Dev: Duplicated Key: No
09.06.2014
00:01:04
Backup_Dev: Internal Error: 1
09.06.2014
00:01:04
Backup_Dev: Invalid Cursor: No
09.06.2014
00:01:04
Backup_Dev: Unknown Connection: No
09.06.2014
00:01:04
Backup_Dev: Connection Closed: No
09.06.2014
00:01:04
Exception CX_DBA_JOB in class CL_DB6_JOB_BACKUP method line 40
09.06.2014
00:01:04
Backup_Dev:terminated with error
09.06.2014
00:01:04
REASON=ADBC error
09.06.2014
00:01:04
Job finishedHi,
Please Check the note no 610408.
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=610408.
And check for detail error in diag.log file.
Thanks & Regards,
Balaji.S -
Using Weblogic Platform 7.0 (installed from platform700_win32.exe),
Running a BPM Doamin(WLIDomain with BPM only).
When I try to access my entity bean(CMP), the following exception is getting thrown.
I have seen a similar post in here, but the answer to that post, which says to
provide ACL. does not apply quite well my scenario.
To do this, I right clicked on the connection pool and selected define Ploicy..
It shows two options
RealmAdapterAuthorizer and DefaultAuthorizer; On DefaultAuthroizer i specified
role accessing the resource would be "everyone". - restarted the server - but
still the same error.
Please suggest a solution if any. Do i have to get some service pack for this?
TIA
Ranjith.We have never seen a case yet where this was not a permissions problem.
Do you have a fileRealm.properties file as part of your configuration?
"Ranjith" <[email protected]> wrote in message
news:3f0fdeb3$[email protected]..
>
java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
= Access not allowed
java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
= Access not allowed
atweblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:701)
atweblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:623)
atweblogic.jdbc.jts.Connection.prepareStatement(Connection.java:133)
atweblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.ja
va:139)
atweblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:81
atservice.samplemgt.v1_0.ejb.entity.BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDB
MS.ej
bFindAll(BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDBMS.java:873)
at java.lang.reflect.Method.invoke(Native Method)
atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersi
stenceManager
java:300)
atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
java:715)
atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
java:688)
atweblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:47
6)
at ... -
Using a string variable as a query SQL statement
I want to construct a custom SQL statement in a string var, then use that var in the cfquery statement. What is the proper syntax? Here is my feeble attempt:
<cffunction ...>
<cfset var sql_txt="">
<cfquery name="qSBJs" datasource="cfBAA_odbc">
"#sql_txt#"
</cfquery>
<cfreturn qSBJs>
I've tried using no " or # or just # or just " but nothing works.
what about:
<cfquery name="qSBJs" datasource="cfBAA_odbc" sql="#sql_txt#">
</cfquery>
nope. I wish there was a sql property I could fill *before* the execution of the query. Any suggestions?Hi Adam, and/or anyone who may have a few minutes to check this... I got the following code to work. It calls the getSBJs function from Flash Builder 4. I get the correct result set back. Long table names are replaced with short abreviations. Note that some local vars are declared but not used in the following example. I will use them in the future versions of this same code. Since I will in the future, like a donkey, mindlessly use this same method for all my queries, it would be much appreciated if I could get a guru to check this code for:
-Pure idiocy
-Mild insanity
-SQL injection vulnerability
-Memory leakage
-Scope dangers
(ignore emoticons, see the underlying text)
<cffunction name="AbrvTblNms" output="false" returntype="string" >
<cfargument name="txt" type="string" required="true" />
<cfset var qAbrvs="">
<cfset var output_str="#ARGUMENTS.txt#">
<cfquery name="qAbrvs" datasource="cfBAA_odbc" result="rsltAbrvs">
SELECT TBL_NM, ABRV FROM BAA_TBL_ABRV ORDER BY 1
</cfquery>
<cfloop query="qAbrvs">
<cfset output_str = Replace(output_str, '[' & qAbrvs.TBL_NM & ']', qAbrvs.ABRV, "ALL")>
</cfloop>
<cfreturn output_str>
</cffunction>
<!--- Fetch a list photo subjects whose records contain the given search word(s) --->
<cffunction name="getSBJs" output="false" access="remote" returntype="any" >
<cfargument name="srch_val" type="string" required="true" />
<cfset var qSBJs="">
<cfset var sql_txt="">
<cfset var whr="">
<cfset var b=False>
<cfset var in_txt="">
<cfset var fm_dt="">
<cfset var to_dt="">
<cfset var on_dt="">
<cfset var pht="">
<cfset var srch_str="">
<cfset var srch_trm="">
<!--- Transfer the srch_val to a local variable for further manipulation --->
<cfset srch_str = "#ARGUMENTS.srch_val#">
<!---
An empty search term argument is handled by the BAA FlashBuilder front end. We test for it again here,
and substitute a dummy value, in case this function is called by something other than the intended
FlashBuilder front end, and that front end doesn't protect us from an empty search term argument.
Remember that we must still "hand back" a valid query structure to avoid causing a data type error
in the calling function, so we search for a dummy value that will allow the query to proceed but is
guaranteed to return an empty result set. If the srch_val argument is not empty, transfer the value of
the srch_str local variable to the srch_trm local variable.
--->
<cfif Not (Len(srch_str))>
<cfset srch_str = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
</cfif>
<cfset srch_trm = "#srch_str#">
<cfset sql_txt =
"SELECT DISTINCT
[BAA_SBJ].SRC_SYS_NM, [BAA_SBJ].SRC_SYS_GUID, [BAA_SBJ].OBJ_GUID, [BAA_SBJ].SBJ_NM, [BAA_SBJ].SBJ_DOB, [BAA_SBJ].SBJ_ID, [BAA_SBJ].NOTE, [BAA_SBJ].CDT, [BAA_SBJ].CTM, [BAA_SBJ].CBY, [BAA_SBJ].MDT, [BAA_SBJ].MTM, [BAA_SBJ].MBY
FROM
BAA_SBJ [BAA_SBJ]
LEFT JOIN BAA_SES [BAA_SES] ON [BAA_SES].PAR_GUID = [BAA_SBJ].OBJ_GUID
LEFT JOIN BAA_IMG [BAA_IMG] ON [BAA_IMG].PAR_GUID = [BAA_SES].OBJ_GUID
WHERE [WHERE_CLAUSE] ORDER BY [BAA_SBJ].SBJ_NM">
<cfset whr = "([BAA_SBJ].SBJ_NM CONTAINING TRIM( rm_srch_trm1 ) OR " &
"[BAA_SBJ].NOTE CONTAINING TRIM(:prm_srch_trm2 ) OR " &
"[BAA_SBJ].SBJ_DOB CONTAINING TRIM(:prm_srch_trm3 ) OR " &
"[BAA_SES].SES_TYP CONTAINING TRIM(:prm_srch_trm4 ) OR " &
"[BAA_SES].NOTE CONTAINING TRIM(:prm_srch_trm5 ) OR " &
"[BAA_IMG].NOTE CONTAINING TRIM(:prm_srch_trm6 ))">
<cfset sql_txt = Replace(sql_txt,"[WHERE_CLAUSE]", "#whr#", "ALL")>
<cfset sql_txt = AbrvTblNms(sql_txt)>
<!--- Through experimentation, I learned that each occurance of a param must be uniquely named.
It would be very handy, if the param value was applied to *all* occurances of the param.
That way, I could get away with using one .addParam line instead of 6 --->
<cfscript>
queryService = new query();
queryService.setDatasource("cfBAA_odbc");
queryService.setName("qSBJs");
queryService.setAttributes(sql="#sql_txt#");
queryService.addParam(name="prm_srch_trm1", value="#srch_trm#", cfsqltype="VARCHAR");
queryService.addParam(name="prm_srch_trm2", value="#srch_trm#", cfsqltype="VARCHAR");
queryService.addParam(name="prm_srch_trm3", value="#srch_trm#", cfsqltype="VARCHAR");
queryService.addParam(name="prm_srch_trm4", value="#srch_trm#", cfsqltype="VARCHAR");
queryService.addParam(name="prm_srch_trm5", value="#srch_trm#", cfsqltype="VARCHAR");
queryService.addParam(name="prm_srch_trm6", value="#srch_trm#", cfsqltype="VARCHAR");
result = queryService.execute();
qSBJs = result.getResult();
</cfscript>
<!--- <cfquery name="qSBJs" datasource="cfBAA_odbc">
</cffunction>
</cfquery> --->
<cfreturn qSBJs>
</cffunction>
THANKS TO ADAM AND DAN FOR HELPIMG ME GET THIS FAR! Now, don't let me embarass you by doing something dum and giving you "credit", if you see me doing something dum above. Thanks! -
I Cant find Sql Server 2014 express edition after installing it. How do I start the program
Hello,
I have Installed Sql Server 2014 Express edition and downloaded the AdventureWorks 2014 database and Back up files.
I cannot find an Icon for the Sql Server on my Desktop to start the Sql program. There is only an icon for the Server Installation Center.
How do I start the Sql server. I tried opening the AdventureWorks Database but I cant open it.
Thank youThanks Shanky
When I installed Sql I chose Windows Login. After Installing I logged into Sql server using windows account. Should I have chosen an Sql account instead.
Hi,
Its is Ok if you have chosen windows Login. But it should be part of local administrator. I assume you know how to check
Is it not a security risk having to run Sql server as an administrator when using windows account or sql account.
Yes it is but at this point where I guess only you would be using and to get around with problem which you are facing. its recommended to run SQL server service with least privileged domain account. If you wan to read more see
this link
How do I make sure the account with which SQL Server service is running has full permission on folder where adventure works mdf and ldf files are located.
Please make a habit to search on net it is filled with lot of information.
This link would help.
Locate the folder on drive where AD mdf and ldf file reside. Right click on folder select properties and then select security tab. Click on add and then type account name and search and add it
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
Cannot open/edit previously saved forms
I just upgraded my reader and now I cannot open/edit any of my forms previously saved. I work in a law office so I can't re do all my forms. How do I open and edit forms I previously saved?
Error" this document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document."
I don't want the orignial I want my form already filled out and ready for new edits. I have maybe 50+ of these documents.. -
Permissions cannot be edited after time machine backup
Issue: Permissions cannot be edited on backups stored on an external drive after time machine restore and reinitializing my computer.
Mac Book Pro
Processor: 2.2 GHz Intel Core i7
Memory 8 GB 1333 MHz DDR3
Graphics AMD Radeon HD 6750M 512 MB
software: Mac OS X Lion 10.7.5 (11G63)
external hard drive:
format: Mac OS extended (Journaled)
capacity: 2 TB
Available: 1.59 TB
used: 405,332,070,400 bytes (405.33 GB on disk)
external hard drive:
System "Read & Write"
admin "Read & Write"
everyone "Read & Write"
Folder permissions on external hard drive issue:
I have entered my password, selected a "Read & Write" and an "-" still appears on the folders and no permissions granted even though it looks as if the change was accepted
Then I tried "Read Only" same thing.
Also, weird Name like, "wheel" is displayed in the left column of the folder Information dialog box.
typical display in the left column of the folder Information dialog box:
Fetching... "Read & Write"
everyone "No Access"So, is this "feature" new? I was able to complete backups this way just a few weeks ago (prior to an upgrade).
Prior to the initial release of the 1G AEBSn, Apple hinted that support for Time Machine with AirPort Disks was going to be implemented, but it never came about even with the latest generation (5G) of these models.
If one wants to use Time Machine via wireless, must I use Time Capsule?
Basically, yes. However, the are other TM backup destinations that are supported that can be used besides the TC. A number of NAS manufacturers provide TM backup support with their products. -
Dear everyone,
I have been creating a fairly large LabVIEW application with v8.2.1 over the last 2 months.
Now when I save my top level vi, it cannot be re-opened. LabVIEW starts loading and displays the title bar and then hangs without displaying the front panel.
I reverted to a previous version of my top level vi and found that it could be opened and closed multiple times without problem. However I then found that even without making any changes to the front panel or diagram I could only save it 3 times before it too would no longer load with exactly the same symptoms.
Sometimes when I make a change and then flick to another Windows application and then back to the front panel, a section of the front panel will be missing and t's vertical scroll bar is often in a different place.
This is a really serious problem for me on a critical project. Any advice would be greatly appreciated.
AaronHi Aaron,
what do you mean by "large application"?
Labview tends to corrupt (very) large vis especially when lots of DAQ/dll/CIN are used.
So to workaround this problem you should split your vi into smaller parts ending with a main and some subvis. This way you also have a chance to locate the problem more exactly by finding the part which is corrupting your vi...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
New video cannot be found after saving
I wanted to make a 1080p video into a 720p video so I opened it up into quicktime x and went save as and 720p HD, I put it in its own folder on the desktop so I wouldn't lose it but 4 hours later after converting nothing was there. It has taken HDD space so is obviously somewhere but I have searched for what it is called but cannot find it anywhere.
I have searched for what it is called but cannot find it anywhere.
Did you manually search as well as use Spotlight? Search inside the Movie as well as the Documents folder.
Try Fast File or FastFind to locate movie. Both can be found at Versiontracker and Macupdate. -
Cannot delete pages after saving a PDF in X Pro
I am on Windows 7 and Adobe Acrobat XPro. Every time I try to delete pages in any PDF after saving I get the error message "one or more pages are in use and could not be deleted". the work around is to close the file and then reopen. Then you can delete the pages. It is annoying to have to shut and reopen the file everytime after making a change. Is there a fix to this?
Have you tried Help > Check for updates (in Acrobat)?
That very annoying problem is fixed in XI. I seem to recall it could be fixed by updating X, but I could be mistaken. Please report back. -
Saving a distributed form from FormsCentral - cannot edit after saving
I created a form in FormsCentral and distributed it as a submitable pdf. I then opened it in Adobe Reader to test what end users would see, made some changes and went to File --> Save and then closed the pdf. When I reopened it I got the following error window and was no longer able to fill out the form. Am I doing something wrong?
Thanks,
ColeI think I figured out the error window. I have a drop down selection that includes an "Other" option, when the drop down field is completed it removes the text box that is on the PDF for the "Other" option causing the document to be changed. I redistributed the form without "other" being included as an option on the drop down and it now saves perfectly fine. Any idea if "other" should work or is this one of the features that does not translate over (I did not see it listed).
-
HOW TO: Post a SQL statement tuning request - template posting
This post is not a question, but similar to Rob van Wijk's "When your query takes too long ..." post should help to improve the quality of the requests for SQL statement tuning here on OTN.
On the OTN forum very often tuning requests about single SQL statements are posted, but the information provided is rather limited, and therefore it's not that simple to provide a meaningful advice. Instead of writing the same requests for additional information over and over again I thought I put together a post that describes how a "useful" post for such a request should look like and what information it should cover.
I've also prepared very detailed step-by-step instructions how to obtain that information on my blog, which can be used to easily gather the required information. It also covers again the details how to post the information properly here, in particular how to use the \ tag to preserve formatting and get a fixed font output:
http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
So again: This post here describes how a "useful" post should look like and what information it ideally covers. The blog post explains in detail how to obtain that information.
In the future, rather than requesting the same additional information and explaining how to obtain it, I'll simply refer to this HOW TO post and the corresponding blog post which describes in detail how to get that information.
*Very important:*
Use the \ tag to enclose any output that should have its formatting preserved as shown below.
So if you want to use fixed font formatting that preserves the spaces etc., do the following:
\ This preserves formatting
\And it will look like this:
This preserves formatting
. . .Your post should cover the following information:
1. The SQL and a short description of its purpose
2. The version of your database with 4-digits (e.g. 10.2.0.4)
3. Optimizer related parameters
4. The TIMING and AUTOTRACE output
5. The EXPLAIN PLAN output
6. The TKPROF output snippet that corresponds to your statement
7. If you're on 10g or later, the DBMS_XPLAN.DISPLAY_CURSOR output
The above mentioned blog post describes in detail how to obtain that information.
Your post should have a meaningful subject, e.g. "SQL statement tuning request", and the message body should look similar to the following:
*-- Start of template body --*
The following SQL statement has been identified to perform poorly. It currently takes up to 10 seconds to execute, but it's supposed to take a second at most.
This is the statement:
select
from
t_demo
where
type = 'VIEW'
order by
id;It should return data from a table in a specific order.
The version of the database is 11.1.0.7.
These are the parameters relevant to the optimizer:
SQL>
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.1.0.7
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL>
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL>
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL>
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL>
SQL> select
2 sname
3 , pname
4 , pval1
5 , pval2
6 from
7 sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 01-30-2009 16:25
SYSSTATS_INFO DSTOP 01-30-2009 16:25
SYSSTATS_INFO FLAGS 0
SYSSTATS_MAIN CPUSPEEDNW 494,397
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.Here is the output of EXPLAIN PLAN:
SQL> explain plan for
2 -- put your statement here
3 select
4 *
5 from
6 t_demo
7 where
8 type = 'VIEW'
9 order by
10 id;
Explained.
Elapsed: 00:00:00.01
SQL>
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
14 rows selected.Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> rem Set the ARRAYSIZE according to your application
SQL> set autotrace traceonly arraysize 100
SQL> select
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
Execution Plan
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
Statistics
0 recursive calls
0 db block gets
149101 consistent gets
800 physical reads
196 redo size
1077830 bytes sent via SQL*Net to client
16905 bytes received via SQL*Net from client
1501 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
149938 rows processed
SQL>
SQL> disconnect
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThe TKPROF output for this statement looks like the following:
TKPROF: Release 11.1.0.7.0 - Production on Mo Feb 23 10:23:08 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: orcl11_ora_3376_mytrace1.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
select
from
t_demo
where
type = 'VIEW'
order by
id
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1501 0.53 1.36 800 149101 0 149938
total 1503 0.53 1.36 800 149101 0 149938
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88
Rows Row Source Operation
149938 TABLE ACCESS BY INDEX ROWID T_DEMO (cr=149101 pr=800 pw=0 time=60042 us cost=0 size=60 card=1)
149938 INDEX RANGE SCAN IDX_DEMO (cr=1881 pr=1 pw=0 time=0 us cost=0 size=0 card=1)(object id 74895)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1501 0.00 0.00
db file sequential read 800 0.05 0.80
SQL*Net message from client 1501 0.00 0.69
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> -- put your statement here
SQL> -- use the GATHER_PLAN_STATISTICS hint
SQL> -- if you're not using STATISTICS_LEVEL = ALL
SQL> select /*+ gather_plan_statistics */
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
SQL>
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID d4k5acu783vu8, child number 0
select /*+ gather_plan_statistics */ * from t_demo
where type = 'VIEW' order by id
Plan hash value: 1390505571
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads |
| 0 | SELECT STATEMENT | | 1 | | 149K|00:00:00.02 | 149K| 1183 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 1 | 149K|00:00:00.02 | 149K| 1183 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | 1 | 149K|00:00:00.02 | 1880 | 383 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
20 rows selected.I'm looking forward for suggestions how to improve the performance of this statement.
*-- End of template body --*
I'm sure that if you follow these instructions and obtain the information described, post them using a proper formatting (don't forget about the \ tag) you'll receive meaningful advice very soon.
So, just to make sure you didn't miss this point:Use proper formatting!
If you think I missed something important in this sample post let me know so that I can improve it.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/Alex Nuijten wrote:
...you missed the proper formatting of the Autotrace section ;-)Alex,
can't reproduce, does it still look unformatted? Or are you simply kidding? :-)
Randolf
PS: Just noticed that it actually sometimes doesn't show the proper formatting although the code tags are there. Changing to the \ tag helped in this case, but it seems to be odd.
Edited by: Randolf Geist on Feb 23, 2009 11:28 AM
Odd behaviour of forum software
Maybe you are looking for
-
What does this message mean? "Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired" I get this when I try to repair permissions in disk utility.
-
9.1 blank error prevents all net-PDF viewing
Hey there! When I try to view PDFs over a web browser (IE 8.0.7000.0, Firefox 3.0.10) I get a blank error message (http://i11.photobucket.com/albums/a192/PropaneMilo/PDFblankerror.jpg) which seems to stop the PDF from loading. More, when I save the
-
Cursor disappeared on PDF files
Hello, Am facing problem with an attached PDF files when recieved in BB 9000. The PDF file contains HREF links.... the user cant open HREF in that PDF cause the hand wheel disappeared !!!. Any solution for that ??
-
my bluetooth is off and I have a wireless mouse- i have turned mac off and disconnected all usb and then turn back on but wireless wont come on so how do I turn it back on (have no idea how it got turned off) without a wired mouse???
-
Web-services.xml handler chain
Hi All, My question is this. I use servicegen ant task to generate the web-services.xml file, then I open the .ear file using winzip and edit the web-services.xml file to include the handler-chain information. I have included the following informatio