Caching of adhoc queries=filesystem sometimes at 100%

WLS_PRODUCT_VERSION=10.3.6.0
OS: Red Hat Linux 5
DB: 11.2.0.2.0
OBIEE: 11.1.1.6.2
Hello.
When someone runs a silly query via OBIEE we sometimes see .TMP files that have ranged in silly sizes (up to 25GB!)
We have been caught by this as the growth is too fast for Grid monitoring to alert us on. When the filesystem hits 100% Linux wont let me remove any of those .tmp files and its all very embarrassing . . .
Is there some way that any of the front end interfaces (OEM/ WebLogic Server) can alert us to these crazy tmp files being generated?
It would be nice to be able to nip these in the bud before we gets egg on our faces.
Thanks

Hi Magnus,
Can anybody see some windows of vulnerability here? Is it for instance possible that the cache lock held by the XA-transaction is released before the database update has completed (that way a query could be performed against old data and be stored in the cache after the invalidation were performed) or is this just the kind of problems that the XA-protocol is designed to prevent?If the query is performed as you've described and your application can hold the same query key lock before updating the data and only release the lock after the transaction completes, you can be assured that a query based on stale data will not be cached after the transaction. If you want to be assured that no stale query results will be returned, remove the cached result outside the transaction just before committing the transaction.
An alternative I have been considering for how to perform the database query / caching of the result would be to let a cache store class (for the query result cache) perform the queries when no entry exists in the cache but I am not sure how I would change the locking protocol to make it work - can I even lock a cache entry from this kind or component or would that cause a deadlock?I think you can implement a CacheStore class for the query result cache that can be used to provide the appropriate locking. If implemented correctly, I don't think there is a risk of deadlock.
Regards,
Harv

Similar Messages

  • SQL 2008 R2 standard reports - question about server dashboard and what it refers to as "adhoc" queries

    So I have started looking at some of the standard reports available with SSMS and in particular, the "server dashboard".   One thing that caught my attention were the charts that referred to "adhoc" queries.  I wondered how
    those were being defined, and as I expected, they are most likely those statements not in a stored procedure.  This was answered in
    this thread.  
    On a particular server Im interested in, this % value is well over 50% and the primary applications that interact with the databases on this system are Microsoft based products such as Dynamics and another commercial application which I know uses hundreds
    of stored procedures.  Now, Im sure there are some sql statements being used, possibly "dynamic" type sql, by these applications, but would the metrics really be skewed this far?
    What these charts tell me, with the "adhoc" statement types pushing CPU and Disk I/O %  this far, is that there is a BUNCH of these statements being run against the various databases.  The disk I/O might be a bit off since I only recently
    added dozens of missing indexes, but my question is this:
    With the "adhoc" type statements taking up this much of the CPU and Disk resources, can we say that there are likely a lot of these going on ?  I suppose one way to find out is to launch profiler and listen in while there is moderate
    to heavy user activity.
    Thoughts?

    Hello,
    Adhoc queries are DML statements with not parameterization. Sometimes users use this statements, and sometimes these statements come from applications.
    Use Query #2 on the following link to identify those adhoc queries:
    http://mssqlfun.com/2013/04/08/dmv-5-queries-runing-are-adhoc-or-proc-single-or-multi-use-sys-dm_exec_cached_plans/
    Identify if those adhoc queries belong to specific users or applications.
    One of the options you have to deal with is is the following configuration option:
    sp_CONFIGURE 'show advanced options',1
    RECONFIGURE
    GO
    sp_CONFIGURE ‘optimize for ad hoc workloads’,1
    RECONFIGURE
    GO
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Deletion of adhoc queries.

    Hi All,
    we have a scnario wherein, a query catalog is created for a user. The catalog contains many adhoc queries, the user can delete or retain them. After the query is deletd or retained, a entry is generated in a Z table. Is there any FM or Prgrm which can automate this process of deleting the entry from the Z table over a period of time?.
    Thanks & Regards,
    Nikhil.S

    hi arun,
    i will make my requirement more clear.
    We want to automate the deletion of the ad hoc queries.
    We have the list of all the queries to be deleted in a Ztable and we want a program in which we can pass the values one by one and the program deletes the query from database.
    The program COMPONENT_REORG refers to FM 'RSZ_DB_COMP_REORG_AS_POPUP' which gives a pop up asking for the inputs.
    we also refered to FM 'RSZ_DB_ELT_DELETE ' which caters more to our needs as in this FM we need to pass values.
    but we are unsure about how to pass the value of a query to the FM.
    will appreciate your help.
    thanks & regards,
    nikhil.s

  • Adhoc Queries

    Hello,
    I have one requirement, wherein I have to give access to users of two SAP Adhoc Queries.
    These queries are assigned to a User Group, which are assigned to users through SQ03.
    Due to some limitations we cannot create a custom TCode for these two queries.
    So, is there any way out through which we could provide the users access to these two specific queries through SQ01 by assigning them the specific User Group through SQ03 but the users should not be having access to other queries that are present in that specific User Group.

    Hi Aditi,
    I do not see any Personalization Object Key except SAP_QUERY_USERGROUP and that assigns user group to a role.  Even then user will have access to all the queries in the Infoset assigned to that User group. If you are going to create your personalization key with say Query and User then there is a need for application development.
    Please go through the post - [Use of Personalization Tab in PFCG; where Bernhard has posted some links regarding this topic. Maybe that could help a little.
    In my opinion it would be easier to get a query created in Dev and restricting it there then the other way around. Also how are u restricting the users from creating other queries ? Are they restricted to execute SQ01 ?
    Also I am confued about the underlying programs that you mentioned. From where does program come into picture? It is just a query pulling data from Infoset. To me it seems functional guys trying not to do their job when in the first place they only need the restriction on the queries.

  • Query to find adhoc queries taking high cpu on server

    Hi,
    I want to find all the adhoc and other queries consuming high cpu on sql server. sys.dm_exec_cahched_plan will only have cached queries and not the currently running ones.

    Hi Preetha7,
    According to your description, if you want to identify the most expensive SQL Server queries based on the cumulative CPU cost, you can use the DMVs of the sys.dm_exec_sql_text , the sys.dm_exec_query_plan and sys.dm_exec_query_stats. For example, you can
    refer to the following T-SQL statement.
    SELECT TOP 20
    qs.sql_handle,
    qs.execution_count,
    qs.total_worker_time AS Total_CPU,
    total_CPU_inSeconds = --Converted from microseconds
    qs.total_worker_time/1000000,
    average_CPU_inSeconds = --Converted from microseconds
    (qs.total_worker_time/1000000) / qs.execution_count,
    qs.total_elapsed_time,
    total_elapsed_time_inSeconds = --Converted from microseconds
    qs.total_elapsed_time/1000000,
    st.text,
    qp.query_plan
    FROM
    sys.dm_exec_query_stats AS qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
    CROSS apply sys.dm_exec_query_plan (qs.plan_handle) AS qp
    ORDER BY qs.total_worker_time DESC
    Or you can run the "Performance - Top Queries By Total CPU Time" report in SSMS. In addition, you can use SQL Server Extended Events session for troubleshooting the high consumed of CPU time. For more information about finding currently session that is costing
    high CPU.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb3e29ca-f1ef-4440-8f1a-db4924a43c5c/find-currently-session-that-is-costing-high-cpu?forum=sqldatabaseengine
    http://blogs.msdn.com/b/batala/archive/2011/07/23/troubleshoot-high-cpu-issue-without-using-profile-traces.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Firefox sometimes takes 100% of one of my four CPUs under Windows (7)

    A few times a day I'll hear the CPU fan running, or my PC starts responding slowly. Sometimes it won't open (maximize) from the task bar. I usually have to Control-Alt-Delete to go to processes. When I do, Fire Fox is using 100% of of of my quad CPU's processors. I have to kill the process to fix the problem.

    I see the same problem as your client in Firefox 16 on Windows 7. To fix the problem, add clear: left to the style for leftColMain
    #leftColMain {
        clear: left;     float: left;
        padding: 30px 0 0;
        position: relative;
        width: 210px;

  • Issue with Adhoc queries

    Hi,
    Background: 3 additional fields were added to infotype 0023 to capture the position at the previous organization, Years of exp and Months of previous exp.
    The year and Month of previous exp gets populated automatically if you save the start date and end date.
    Issue: We try to populate a repot using adhoc query but it doesnot give proper data. example if 0023 has been updated for 100 employees the output would reflect only for 20 odd numbers.
    There is no authorization problem
    Can anyone suggest why we are facing this issue and if this can be resolved also is there any standard SAP reprot which can give a listing of 0023 for a list of employees
    RB

    Also, if the dates of IT23 are before hire date (as they often are), you need to set the switch for time-dependency.  You do this in "extras" -> "Code".  The syntax is shown below, and the *$ is part of the syntax
    *$HR$ [P0022,P0023]
    *$HR$ TIME_DEPENDENCE = 'INDEPENDENT'
    You still need to ask for period all, but then it should work.
    Hope this helps.
    Kirsten

  • BW Authorisation on Adhoc Queries

    Hello All
    An authorisation question on BW. We want to give BW users the the permissions to save queries (created using the Adhoc Query Designer) to a designated role. Further, users should only be limited to modifying their own queries and denied modify access to others' queries.
    If any of you have done this, is there a particular Authorisation object I should be looking to make the following restrictions:
    1. Allow users to save to a particular role.
    2. restrict modify access to be limited to the queries created by the user.
    Much appreciate any suggestions/ideas/thoughts.
    N

    Hi naveen!
            I think you can do this by seting the  Authorization object of the report owner to the follwing my give you this result RSZOWNER = "$USER" allows the user access to activities in all the components he is an owner of.
    you can have more help in help.sap.com in underthe follwing  structure
          BW 3.1 content
                      -> systemadministration tasks-> authorizations-> authorizations for working with business explorer-> and examples for reporting authorizations
    Message was edited by: ashwin gadi

  • Question S_QUERY and HR-AdHoc-Queries

    Hello,
    I've posted the following in the SAP-Solutions -> SAP-HCM forum, but got no answer yet; maybe this issue is more security related:
    We are planning to give our users access to transaction S_PH0_48000510 so they can execute queries on their own.
    The according InfoSets and UserGroups have been created and so far out tests work fine.
    What we are now aiming to, is to give our users not only execution-rights, but allow them to create/save/modify "personal" queries.
    (that is, the rights depend on the username)
    My understanding of security-object S_QUERY is, that it gives access to all queries in a given InfoSet, and that is not desirable.
    Any hints how make "personal" queries work ?
    cheers Axel

    Well, thank you in the first place for your answer, but I think I need some further clarification. Below is the SAP-Help-text from this little checkbox in SQ03:
    <quote>
    SAP Query: Authorizations
    Only the users for whom this field has been selected are authorized to change or create queries.
    Authorization object S_QUERY controls authorization to change or create queries (value 02 in field 'ACTVT').
    This check box allows you to revoke special user group authorization for users who have authorization according to authorization object S_QUERY.
    Use
    Revokes authorization to change or create queries for a specific user.
    </quote>
    So I think this checkbox is intended for revoking rights already given via S_QUERY (and not limiting them to ones's own account).

  • When I click on a link, firefox sometimes creates 100s of 'searching bookmarks and history' tabs until I cold power down.

    If I restore Firefox to save existing tabs (including the 100s of 'searching bookmarks and history' tabs), I will receive approximately 3 times a day a 'Firefox terminated unexpectedly' message. What is triggering the proliferation of tabs?

    See [[Firefox keeps opening many tabs or windows]]
    You can have infinite tabs opening if you have selected Firefox as the application to handle a file if you get an Open with download window.<br />
    Firefox should not be selected as the application to handle a file and you have to remove the action that is associated with that file type.
    See also http://kb.mozillazine.org/File_types_and_download_actions ("File handling in Firefox 3 and SeaMonkey 2" and "Reset Download Actions")
    You may need to delete the file [http://kb.mozillazine.org/mimeTypes.rdf mimeTypes.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] to reset all actions or set that action in Tools > Options > Applications to 'Always Ask'.

  • SQ01- AdHoc Queries

    Is there any way we can access data about the ad hoc reports we use.
    Specifically we would like to know author, creation date, last run date, infoset, selection items and displayed fields.
    It is possible to access this information on an individual basis by selecting Description in txn SQ01 however we want to be able to access this
    data for all reports.
    Regards
    Ranjith

    Hi Ranjith,
    You did not state the system you are in, but from 4.7 on there is a standard functionality to Log Report Starts.  To turn this on you must link the infoset to logging via transaction SQ02 --> Extras.  All queries from that infoset will then be logged whether run via Ad Hoc or SQ01.  The log will show the query area, infoset, user, date and time, selection fields and values and output fields.  It is available in  in user group /SAPQUERY/SQ report LIST_01.

  • My ipod touch 4 generation is left wondering and / or the apple and does not advance more, sometimes works 100% but is only a few minutes let me know how I can restore it.

    try to restored and tells mi that error 1602
    how can i restored mi ipod touch
    tnks.

    where on my computer am I suppose to make the individual picture files and have them to upload on my ipod touch.... I do have a photo library on my computer, but in the photo tab in itunes for the ipod touch and there is nothing checked for syncing, cause when I do check it it always says its going to replace everything i have in my photo library on my ipod touch.....  So how am i suppose to have it checked and have it NOT replace pictures on it????
    Also I cannot make more photo albums into my ipod touch, it just replaces the one album every time....
    I am very frustrated cause I have tried the manuals and the apple support help etc and nothing pertains to my exact issue.....
    Please if u could elaberate I would appreciate it alot..... 
    thank u

  • Cached Queries and Memory

    I recently learned about the cachedWithin attribute of the
    cfquery tag. I have found a few places I wish to use this
    attribute.
    I am looking at the Caching page of the ColdFusion
    Administrator and see the "Maximum number of cached queries" is set
    at 100.
    My question is, Is there anyway for me to see which query
    result sets are currently cached? I suspect we cycle through 100
    cached queries fairly quickly. Probably on average it would take
    less then 10 minutes. Therefore, even if I set the cachedWithin
    attribute to the last hour unless the query is called in the last
    10 minutes the cached results will not be used. I would like to
    figure out when the cached result set is actually used.
    In addition, I wonder if anyone has suggestions on how to
    determine the ideal value of the "Maximum number of cached
    queries". I realize the large the number the more memory which will
    be required and also it depends on the size of the result sets. We
    have 1024 mb of memory available. It appears our memory usage it
    usually around 50 mb. My thought was to slowly increase the cache
    size but if someone has a rule of thumb I would appreciate it.
    I guess I will add yet another question. On the Java and JVW
    Settings page there are 2 fields "Min JVM Heap Size" and "Max JVM
    Heap Size". We have the max set at 1024 and the min is blank. I
    think I read somewhere we should set the min and max to the same
    number. Anyone have any comments?
    Thanks, Franz

    Regarding query caching, I have two suggestions.
    1. Go with the default and cease all thought on the topic.
    2. Any query that includes user input should not be
    cached.

  • SAP BW 3.5 Query Cache - no data for queries

    Dear experts,
    we do have a problem with the SAP BW Query Cache (BW 3.5). Sometimes the
    problem arise that after the queries have been pre-calculated using web templates there are no figures available when running a web-report, or when doing a drilldown or filter navigation. A solution to solve that issue is to delete the cache for that query, however this solution is not reasonable or passable. The problem occurs non-reproducible for different queries.
    Is this a "normal" error of the SAP BW we have to live with, or are there any solutions for it? Any hints are greatly appreciated.
    Thanks in advance & kind regards,
    daniel

    HI Daniel
    Try to wirk without cache for those queries.
    Anyway, you should check how the cache option is configured for those queries .
    You can see that, in RSRV tx
    Hope this help

  • Oracle 11g result cache and TimesTen

    Oracle 11g has introduced the concept of result cache whereby the result set of frequently executed queries are stored in cache and used later when other users request the same query. This is different from caching the data blocks and exceuting the query over and over again.
    Tom Kyte calls this just-in-time materialized view whereby the results are dynamically evaluated without DBA intervention
    http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
    My point is that in view of utilities like result_cache and possible use of Solid State Disks in Oracle to speed up physical I/O etc is there any need for a product like TimesTen? It sounds to me that it may just asdd another layer of complexity?

    Oracle result cache ia a useful tool but it is distinctly different from TimesTen. My understanding of Oracle's result cache is caching results set for seldom changing data like look up tables (currencies ID/code), reference data that does not change often (list of counter parties) etc. It would be pointless for caching result set where the underlying data changes frequently.
    There is also another argument for SQL result cache in that if you are hitting high on your use of CPUs and you have enough of memory then you can cache some of the results set thus saving on your CPU cycles.
    Considering the arguments about hard wired RDBMS and Solid State Disks (SSD), we can talk about it all day but having SSD does not eliminate the optimiser consideration for physical I/O. A table scan is a table scan whether data resides on SCSI or SSD disk. SSD will be faster but we are still performing physical IOs.
    With regard to TimesTen, the product positioning is different. TimesTen is closer to middletier than Oracle. It is designed to work closely to application layer whereas Oracle has much wider purpose. For real time response and moderate volumes there is no way one can substitue TimesTen with any hard wired RDBMS. The request for result cache has been around for sometime. In areas like program trading and market data where the underlying data changes rapidly, TimesTen will come very handy as the data is real time/transient and the calculations have to be done almost realtime, with least complications from the execution engine. I fail to see how one can deploy result cache in this scenario. Because of the underlying change of data, Oracle will be forced to calculate the queries almost everytime and the result cache will be just wasted.
    Hope this helps,
    Mich

Maybe you are looking for

  • How can I report a problem with downloading?

    I purchased a rather long album and halfway through downloading it gave me the message, "We could not complete your istore request. The network connection timed out. Error 8003." The only guidance it offers is to check the network connection. Nothing

  • Sending an email attachment for xls file

    Hi all, I am executing the reports in background, i am getting spool after executing. Just i need to convert the spool to xls format and email through attachment and mail to the user.The xls file should not be saved on local system. I need your help.

  • IP Address Is Duplicate and iPhone Won't Connect

    Everything was working for last 2+ years, then my modem died yesterday. I replaced it, but can't get back to where I was. I ended up restoring network to factory settings and then doing connection. I have AT&T DSL service. When setting up the connect

  • I need help with adobe reader can someone please tell me what to do?

    I am having a problem with Adobe Reader 9.3.2  When I try to install, it begins installing, but then stops and the error messagy states "Adobe download manager is currently installing an application, Once installation is complete stop installing all

  • Log in form flash/php

    hello kirupa forum world. I've been trying to figure out how to have a log in form in flash-- All I really need is to have a username and pass, I need to pass the varibles to a php page(info.php) and this php page then does all the work, checks the d