Rescue Query name

Dear all,
I need to rescue the names of every Query in my page dynamically.
I'd like to use it in every my page to check the Query ExecutionTime.
How can I rescue the query name?
thanks in advance
Best regards

Yes, but now I have another problem...
If Application.cfm is the first page that CF run... now I need to create a "footer" page that CF run every time when it's finish to load any page...
have you some idea?? :-)
thank you very much... this is my template:
<cftry>
    <cfobject action="CREATE" type="JAVA" class="coldfusion.server.ServiceFactory" name="factory">
    <cfset cfdebugger = factory.getDebuggingService()>
    <cfcatch type="Any"></cfcatch>
</cftry>
<!--- Load the debugging service's event table --->
<cfset qEvents = cfdebugger.getDebugger().getData()>
<!--- EVENT: SQL Queries --->
<cftry>
<cfquery dbType="query" name="cfdebug_queries" debug="false">
  SELECT *, (endTime - startTime) AS executionTime
  FROM qEvents
  WHERE type = 'SqlQuery'
</cfquery>
<cfscript>
  if( cfdebug_queries.recordCount eq 1 and not len(trim(cfdebug_queries.executionTime)) )
   querySetCell(cfdebug_queries, "executionTime", "0", 1);
</cfscript>
<cfcatch type="Any">
  <cfscript>
   cfdebug_queries = queryNew('ATTRIBUTES, BODY, CACHEDQUERY, CATEGORY, DATASOURCE, ENDTIME, EXECUTIONTIME, LINE, MESSAGE, NAME, PARENT, PRIORITY, RESULT, ROWCOUNT, STACKTRACE, STARTTIME, TEMPLATE, TIMESTAMP, TYPE, URL, et');
  </cfscript> 
</cfcatch>
</cftry>
<!--- loop tra le query. --->
<cfset qQueries = QueryNew("Name, Time, Records, Template, OrarioEsecuzione")>
<cfloop query="cfdebug_queries">
<!--- se più grande di 3ms, inserisco nella lista e mando e-mail. --->
<cfif Max(cfdebug_queries.executionTime, 0) GT 3000>
     <cfset QueryAddRow(qQueries)>
        <cfset QuerySetCell(qQueries, "Name", cfdebug_queries.name)>
        <cfset QuerySetCell(qQueries, "Time", Max(cfdebug_queries.executionTime, 0))>
        <cfif IsDefined("cfdebug_queries.rowcount") AND IsNumeric(cfdebug_queries.rowcount)>
         <cfset QuerySetCell(qQueries, "Records", Max(cfdebug_queries.rowcount, 0))>
        <cfelseif IsDefined("cfdebug_queries.result.recordCount")>
         <cfset QuerySetCell(qQueries, "Records", cfdebug_queries.result.recordCount)>
        </cfif>
        <cfset QuerySetCell(qQueries, "Template", cfdebug_queries.template)>
        <cfset QuerySetCell(qQueries, "OrarioEsecuzione", TimeFormat(cfdebug_queries.timestamp, "HH:mm:ss.SSS"))>
</cfif>    
</cfloop>
<cfif qQueries.recordcount GT 0>
<!--- invia mail. --->
    <cfif config EQ "PRODUZIONE">
  <cfset alert_to = mail_sviluppo>
    <cfelse>
        <cfset alert_to = mailtest>
    </cfif>
    <cfmail to="#alert_to#" from="#frommail#" password="#pwd_server#" server="#mailserver#" username="#login_server#" port="#porta_SMTP#" subject="Problemi nell'esecuzione di query" type="text" charset="iso-8859-1">
Sono stati riscontrati problemi sulle seguenti query:
<cfloop query="qQueries">
- Query: #qQueries.name# (Tempo: #qQueries.time#ms):
  n.Records: #qQueries.Records# -- Template: #qQueries.template#
</cfloop>
    </cfmail>
</cfif>

Similar Messages

  • How to find Query Name from Report Name

    I am trying to find a the query name for program AQFKSYSTQV000045ZCHECKNUMBERLU I have looked in Standard Work Area under all of the user groups but no luck. It is currently only in our Production System. Please suggest any other places I can look.
    Thanks in advance for your help!

    I apologize for not seeming like I have a clue....I did search the Forum...and maybe I wasn't clear with my question....again I apologize.....I am somewhat familiar with query and I understand that the query name is probably ZCHECKNUMBERLU. My issue is that I cannot find the user group. I have broken It is not a user group under Global Area or Standard Area. For example....We have a query named ASETAQUISITION.  The program name is AQFKAM==========ASETAQUISITION...This query is located in the AM User Group....Easy Find. However, the program in question is AQFKSYSTQV000045ZCHECKNUMBERLU. I have broken this program name apart every way I can think of and I cannot find a user group in my global or standard Area. So I guess I should ask, by looking at that program name, how do you determine what the user group name is so I can find the actual query?

  • How to  find out  Query name if i have Program generated by Query

    Hi Gurus,
    Can you please let me know the Query Name if i have the Program name.
    The program name is : AQTQP2P=========INVENTORY_SUM=
    I thought P2P is the user group and either "INVENTORY_SUM"  or  "AQTQP2P"  is the
    Query name but both doesn't exists in the system.
    Is there any way to get the correct Query name and User Group from the Program name.
    I have an FM : RSAQ_DECODE_REPORT_NAME  to get Query name and User group name
    but the reults given by them are P2P as user group and  "INVENTORY_SUM"  as Query name.
    I did not find any one of them in SQ01.
    Can you please help me out.
    Thanks,
    Vinay.

    Hi ,
    Thank for the information.
    In have both the Function modules.
    1. To get Query name from report name
    2. To get Report name from Query name
    I did all that stuff, still i did not find the User group or alteast some where near to it..
    there is no User Group that starts with letter P.
    But The report name is there
    i could execute it in both foreground and in background and able to get the Output as well.
    May be it is deleted from Development system.
    I do not have auth in QA and in PRD to check it.
    Can you please let me know
    By any chance the Query can get deleted and the corresponding program exists for that Query and
    we can work with the report even if the Query is deleted.
    Any ways i am goind to give you points (Vinod/Atish) for your help.
    Thanks,
    Vinay,

  • How to get the query name from  portal report name

    Hi Experts ,
    I am given a portal report Name and asked to do changes to the queries of that ,so how do i get the query name ,
    Thanks in Advance
    Nitya

    Hi Nithya,
    You can get the technical name by selecting the role in the portal where the report is enclosed you will generally find the report in description then identify the report you are looking then double click on that you will get a window pop-up in that you will have details tab there click on the details the your Query technical name will be displayed.
    EX : zqry_w001 Then replace W with Q and seach in analyser or Designer.
    Regards
    Amar.

  • How to find a query name from report name

    I have a report in my system with the name AQICMM==========P2============ . I believe this was created from a query. How to find the query corresponding to this report ? I need to change the logic for certain columns of the report. How to know if this was created from SQVI or SQ01 or any other transaction.
    THanks.

    Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
    Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM

  • How to change the default sql servery query name?

    Whenever we click on new query button, Sql server automatically opens a new query with default name SQLQuery1.sql.
    Can I change this default name? What I mean to say is I have to work with quite a number of databases on different servers. So I open multiple queries on different server. So I was finding a way where whenever I click on
    New Query button it inherits servername or database name (e.g If I have database name like ABCD new query name should look like ABCDquery.sql ?)
    So that I can distinguish which query belong to which Database?
    I would be very greateful if you can please answer this.
    Many thanks

    Please try with different color code option for your servers:
    Ref: http://technet.microsoft.com/en-us/library/hh213617.aspx
    Set the Status Color for a Server in Object Explorer
    To set a server status color in Object Explorer
    In Object Explorer, select the Connect button and then select Database
    Engine….
    On the Connect to Server dialog, select Options >>.
    Select the Use custom color check box.
    To select the color, select the Select… button.
    Select either a basic or custom color, then select OK.
    Fill in the rest of the connection information, and then select the Connect button.
    Note: This is to identify different server connected not for databases.

  • In ST03 , how can i see the Query name, user id,how many times executed the

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    EX:-if there is one report name X,I want to know how many users had executed X report today,weekly,monthly.
    ex:-query userid total number of execution
    sales order 0000555 5 times
    custmer 05855 2 times
    fast reply will be appreciated,

    Hi,
    Look here:
    http://help.sap.com/saphelp_nw04/helpdata/en/3b/54df4204892a78e10000000a155106/frameset.htm
    Also check these:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/b8be3befaefc75e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/25/ece73a39e74d27e10000000a114084/frameset.htm
    Hope this helps..
    Bye
    Dinesh

  • In ST03 , how can i see the Query name, user id,how many times .

    HI Experts,
    In ST03 , how can i see the Query name, user id,how many times executed the query.
    these details how do i get from the above transaction.
    Points will be awarded.
    BR
    sivs

    Hi Siva,
    Reporting statistics data is only written to the database table if BW statistics have been manually activated for the corresponding InfoProvider first. If this has not been done, it is therefore not possible to display any reporting statistics in transaction ST03.
    Therefore activate the reporting statistics for all relevant InfoProviders. To do this, set the OLAP flag in the BW Administrator Workbench (transaction RSA1) in the area Tools ® BW Statistics for InfoProvider.
                    Check here...........
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/86df4254d81e1fe10000000a155106/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    Hope this will help you shiva.........
    Regrads,
    Vijay

  • Query Name in Excel Sheet tab

    Hi Friends,
    Instead of display Sheet 1 in the Excel sheet tab(Bex), is there a way we can display Query Name in the excel sheet tab? please let me know.
    Thanks,
    KK

    Hi Kumar
    Can you please share how it was solved ?
    Ashish

  • POWL 'Query Name is already open in another session'

    Hi there,
    Our users are constantly getting the following error message when using POWL's in the Portal.
    Query <Name> is already open in another session' (POWL 016)
    The error occurs when a user tries to refresh a query and the query is locked in another session (ENQUEUE_EPOWL_QUERY_EDIT Exception foreign_lock).
    There are various root causes to why this error happens, system, application, communication etc. The one I am seeking help on occurs when the user abruptly terminates the browser session (forced or unforced) and the orphaned session is unable to close properly leaving the POWL query locked.
    We are currently informing the users to
    1.) close all windows and reload the worklist.
    and in certain circumstances
    2.) log off and log on again
    The above workaround doesnt always solve the problem. We are reluctant to give users access to SM12.
    Has anybody encountered something similar, if so were their specific settings, notes, code etc. which needed to be implemented?
    Cheers
    John P

    Try the following steps
    Please implement the note 1836401 and the prerequisites 1873487,1902580 .
    Identify the POWL Query name and set the refresh type as: 'refresh on every LIST VISIT'.
    Important: Run the report POWL_D01 and remove the result list of your POWL
    Application ID, it#s very important because the cache would still contain the old refresh type and will not recognize the new refresh type, please run the report at first for one user ant test the behaviour, if it works run it for all other user
    Pass the application parameter REFRESHA with value X to your POWL application. After that retest your issue, it should work. if not implement the note 1975395 and its prerequisites and test again
    Best regards,
    Robert.

  • How to find out query name using Elements of the query builder.

    Hi SDNers,
    how to find out query name using Elements of the query .
    thanks,
    satyaa

    Hi,
    For having a look at the relation between BEx tables,check the link below:
    http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
    -Vikram

  • Display long text of characteristic in Query name

    Hi All,
    I have implemented RRI between my sender and receiver query.
    When user will click on WBS Element in my sender query <b>the receiver query name will be the name of that WBS Element.</b>
    After execution,I am able to see the Short text associated with Characteristic WBS ELement but<b> i want to display Long text of WBS Element in Receiver query name</b>.
    I have tried to implement the same logic as suggested by Bhanu in following blog:
    <u>Variable screen in Web report</u>
    Kindly,suggest the appropriate solution for this issue.
    Thanks in advance.

    Hi All,
    I am still facing the same problem.
    Kindly suggest me the appropriate solution for displaying WBS Element's Long Text in Receiver's Query Name.
    Thanks in advance.
    Best Regards,
    Nilima Rodrigues

  • How can I get the query name/aggregationslevel in my planning function?

    Hi,
    is it possiable to get the query name/aggregationslevel in a planning fuction?
    thanks for your idea.
    hongwei

    Hi,
    The interface IF_RSPLFA_INFOPROV_DESC
    provides methods for retrieving the most important properties of an InfoProvider from the point of view of the implementation class of a planning function type.
    Methods GET_T_CHARNM and GET_T_KEYFNM return the names of the characteristics and key figures in the InfoProvider.
    You can get the properties of the InfoObjects and compound information by calling method GET_TAB_IOBJ_PRO and GET_TAB_IOBJ_CMP .
    Does this help?
    Best Regards
    Shyam

  • How to find out query name in customer exit for variables

    We use the same customer exit variable in different queries. In the customer exit we want to find out, which query has called the customer exit. With the technical query name we want to read a master data table entry.
    e.g. If we come from query ZG1_TEST1 we want to use selection sel1
    Query name  |  selection
    ZG1_TEST1   |  sel1
    ZG1_TEST2   |  sel2  
    How can we find out the query name in the customer exit for variables?
    Thanks for your help,
    Evi

    Hi Evi,
    check out the structure I_S_RKB1D in your exit. It contains the query.
    Siggi

  • Editing the Query name for all reports in PRD.

    Dear All,
    I have created 25 reports using Query Designer.We have moved all the reports to BI Production. And Clients are using these reports using the Tool Bex Analyser.
    Every time they are navigating through open Query -> Info Areas -> Data targets and Query.
    Instead of going this way, is there any other way to Open a query easily.
    And they wants to modify the Report name and the Technical name for all the reports. Can we able to edit the Query name for all reports, or do i need to go for SAVE AS for all querys.
    Pls Suggest.
    Thanks,
    Ram

    Hi Ram,
    1. For the first question; if it user specific query then ask the users to save them at the FAVORITES so that there is no need to go to the dataprovider specific.
    Or they can create the reports as favorites user menu screen of that particular user.
    2. In order to change the technical name and description of the queries goto RSZC t-code> give the source and target infoprovider as same> select queries>click on the reports>click on transfer selections-->
    Then you get a screen to change the description and technical name.
    But this is pertained to Infoprovider level.
    You can see all the reports on the infoprovider (cube/ods).
    Hope you understood.
    Regards,
    Ravi Kanth

Maybe you are looking for