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

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

  • Delete/Remove Adhoc Roles

    Hi All,
    I am creating an adhoc role in my workflow for a notification and i want the Adhoc role to be removed/deleted when ever the notification is responded.
    Is there any API for removing/deleting the Adhoc roles?
    If so could you please explain me it?
    Thanks & Regards
    Santhosh

    Hi,
    You need to call WF_PURGE.Directory to remove them. Have a look in the API reference guide.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • 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.

  • Deleting variables and queries

    Apart from RSZDELETE what is the best alternative to delete variables and/or queries? Thanks

    Hi Niten,
    I am not sure about Tcode to delete variables....But you can delete all unnecessary variables from Query designer itself...But before deleting variables make sure you don't need them anymore and these varaibles are not being used in any other Queries...
    If you try to delete a variable which is being used in other Query,it will display a message 'Variable being still used...etc....if you click on details...it will show you where it is being used....
    To delete variables:
    Open any Query-->expand Characteristic->expand charactristi value variables->right click->delete.
    hope this helps

  • How do I delete old Bex queries not used within 13 months?

    Hello all,
    I have a large number of Bex queries that are no longer used (3000 - three thousand).  I'd like to delete any query that has not been used in 13 months.
    Can someone provide some guidance?
    Also, is there anyway to archive old reports?
    Thank you.
    JIm

    Murali,
    The RSZCOMPDIR table contains this information - thank you.
    The only remaining challenges are:
    1) how do I interpret or convert the values in the LASTUSED field?  The numbers are of the magnitude of 20,060,601,210,130.
    2) Once I determine which queries were not used within the last 13 months, how do I delete them?  Is it as simple as writing a SQL statement against this table?
    Thanks you.

  • 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

  • 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

  • Delete Power Query queries' custom XML data using VBA

    I have Power Query queries in an Excel 2010 file and would like to delete these queries using VBA. so far I can achieve that manually with the following steps:
    unload Power Query addin
    run Document Inspector and click to delete Custom XML data
    The Macro recorder record the following code for step 2.
    Sub Makro1()
    ' Makro1 Makro
    ActiveWorkbook.RemoveDocumentInformation (xlRDIPrinterPath)
    ActiveWorkbook.RemoveDocumentInformation (xlRDIDocumentProperties)
    ActiveWorkbook.RemoveDocumentInformation (xlRDIInactiveDataConnections)
    End Sub
    However, using this macro I do not achieve the same result (=PQ query code gone from the workbook).
    Any ideas on how to achieve the PQ query codes to be removed using VBA?

    On some cases Macro Recording is not complete, and misses to record the full set of VBA to automate the actions you record. This is probably such a case.
    We are looking into future ways to allow you automate Power Query cleanup.
    For the time being, please see if the
    Document Inspector interface can clean the custom XML data (which holds the Power Query data structures).
    thx, Gil.

  • 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).

  • 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

  • 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

  • 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.

  • Deleting and or moving multiple adhoc/SAP queries in one go.

    Hi,
    I am wondering whether anyone knows of a method to deleting multiple SAP queries in a single go.  I would also like to be able to bulk move queries from one user group to another.  We are having a wholesale clear-up of queries and the thought of having to do each one individually is scary!
    Many thanks in advance

    To delete queries belonged to a user group, you can use SQ02 -  GoTo - Query Directory, then key in the desired user group and execute. From the output list of this, you can select all queries and click on 'Delete Select Queries' .

  • Deleting queries from POV Manager in SmartView Word

    Hi,
    I am unable to delete the unused queries from POV Manager in SmartView Word. The delete option is grayed out. I am using SmartView 11.1.2.1.00.
    How can I delete the queries/connections? Please let me know.
    Any help would be appreciated.
    Thanks,
    AK

    Hi
    I am not sure whether this feature is availble on the latest release 102. But you can see many powerpoint related smart view issues are fixed on this version. If you can reproduce the same in "Oracle® Hyperion Smart View for Office, Fusion Edition- Release 11.1.2.0.000 Patch Set 1 (PS1): 11.1.2.1.102", open a service ticket to oracle support for further assistance.
    thank you
    Regards,
    Mahe

Maybe you are looking for

  • SOLARIS9 internet setup

    I have following setup and ethernet card. But can't setup my internet. sooooo diffcult to do for so simple thing compare to WINDOWS. 1. ethernet card:d-link, compatible to realtek rtl8139 H/W assistant show DMA 1186,1400 installed driver/alias and re

  • Net price

    Hi all Its urgent My client wants to change the net price in contract ME32k for an item. But tht field is grayed out in item details and in item over view also I can set deletion for tht line item and create new line item, but he dont want tht approa

  • Locating failed wireless login attempts and which access point they're hitting

    We have a cisco 5508 WLC with about 190 access points.  They use Cisco Secure ACS to authenticate Microsoft Active Directory logins.  We sometimes get non-normal accounts attempting to login to our wireless but are unable to figure out which access p

  • Checking of parent item

    Experts, If I fetch items from OITM table, how to check if the item is having a parent item or not in BOM? Then again tht parent item is having parent or not...etc

  • Slideshow Export to USB

    I apologize in advance, I'm not familiar with this process so you'll have to walk me through the steps. I have created a slideshow on my macbook Pro and I need to export it on to a USB so I'm able to play it on a plasma TV. Is this possible and how d