Actual Query Plan not running

I am using SQL Server 2012 (11.0.5058.0) and I am trying to learn Execution Plan Basics.  One of the tasks is to run the "Actual Query Plan" by CTRL+M.  When I try this nothing happens.  I can do the "Display Estimated
Query Plan" and it works.  Why can't I do the Actual Query Plan?

Hi,
To display Actual Query Plan, you have to execute the query. CTRL+M merely toggles to display Actual Query Plan or not.
See:
Display an Actual Execution Plan
Hope this helps,
~ J.

Similar Messages

  • Have a month number but QaaWs query will not run

    If I type in the parameters for the query it runs with no problem, but when I use the MONTH function that returns the month number the query will not run.
    I think the date serial number is what is being passed even though I see a number being display.  Does anyone know how to conver this MONTH() function to a true number?  This is a converted 4.5 model that works just fine, but looks like they tightened things up in 2008.
    Thanks...
    Tom Nather

    Here is how its setup.  I have a QaaWs query that returns the max date, then Excel functions that calculate the date back 13 months.  One of the functions is MONTH() that returns the month number based on a date stored in a cell, not really a true number.
    I added a vlookup that takes the month from a date field (05/31/2008) and looks up the appropriate NUMBER of the month =VLOOKUP(MONTH(K47),M54:M65,1). Find 5 (which is defined as a number.
    This then is applied to the input side for the Qaaws (Month Number = double) using a Paste Link function from the CONTROLS sheet in excel, and the query then works.
    Anything that is a date always seems to be built off of the date serial number so this was the easiest way to get this to work. 
    I think standards have been tightened up using the Flex language vs. what 4.5 was written in, this works in 4.5 without the necessary conversion.

  • Query is not running after one table exceeds certain records, any limit?

    I have a production database and a reporting database. Production is on version 9.2.0.5 where as Reporting is on 9.2.0.3. I had a query which uses Gl table which grows every month. The query use to take almost same time both in Production as well as Reporting. After the table grew in last couple of months. I observed the query just hangs up in production where as it continues to run in Reporting. Is it the orcale version which makes any difference for the query not to run in prodcution when Gl table had 27 million rows as against 25 million rows a couple of months of ago? Any help is appreciated.

    user5846372 wrote:
    If I use the gl table which was populated until two months ago having less than say 25.2 million rows, the query runs in 2 minutes. If I use the current gl table having current data (total of say 27 million rows) then the query does not even run. From the current gl table if I delete about 2 million records making it 25 illkion rows then the query runs. So I was wondering whether it is the oracle version which makes this difference.Explain your logic that says that after the queries run successfully on different versions, the version difference is now somehow causing the problem - and not the fact that what did change since the last successful run was the the data volumes....
    As for "+the query does not even run+" - it does. Simply that you do not have a clue what it is doing and thus no means to diagnose the problem. And then jump to the conclusion that the version difference is somehow to blame.
    WHAT is that query doing when it seems to "hang"? (it very likely does not hang at all, and is simply very busy with I/O or being blocked from accessing a resource it needs)
    Have you looked at the events and wait states of the query? Have you looked, as Daniel already suggested, at the execution plan?
    You cannot and should not attempt to diagnose a problem, without understanding the problem. If you have no idea what the problem is, how can you simply jump to the conclusion that "+oh, it must be the version difference+"!?
    You can only solve a problem by understanding it. It is that simple. So first understand what the query is doing and why it seems to hang BEFORE you attempt to diagnose and solve it.

  • FOR ALL ENTRIES stmnt. in SELECT query is not running properly

    Hello experts,
              In my report program, I write one query on table BSIS.
             Internal table declaration -             
           DATA : BEGIN OF DLC_BSIS OCCURS 0,
                            BUKRS LIKE BSIS-BUKRS,
                            GJAHR LIKE BSIS-GJAHR,
                            BELNR LIKE BSIS-BELNR,  
                            SHKZG LIKE BSIS-SHKZG,
                            BSCHL LIKE BSIS-BSCHL,
                            AUFNR LIKE BSIS-AUFNR,
                            HKONT LIKE BSIS-HKONT,
                            QSSKZ LIKE BSIS-QSSKZ,
                            DMBTR LIKE BSIS-DMBTR,
                       END OF DLC_BSIS.                                                                               
    Query as follows --
             SELECT BUKRS
                           GJAHR
                           BELNR
                           AHKZG
                           BSCHL
                           AUFNR
                           HKONT
                           QSSKZ
                            DMBTR FROM BSIS
                                      INTO TABLE DLC_BSIS
                                     FOR ALL ENTRIES IN IT_BKPF2
                                     WHERE BELNR = IT_BKPF2-BELNR
                                                  AND BUKRS = IT_BKPF2-BUKRS
                                                  AND GJAHR = IT_BKPF2-GJAHR.
    IT_BKPF2 internal table having -- BUKRS - LT01
                                                         BELNR - 6400000061
                                                         GJAHR - 2009.
    And in BSIS database  table  -- 3 entries are there for the above documnet.
    But, in my internal only one entry has come for the same above document.
    I think For all entries stmnt. is not running properly. But Why it's not running properly.??
    What would be the reason..??
    Thanks in advance....!!
    Regards,
    Poonam.

    >
    Poonam Patil wrote:
    > Hello experts,
    >           In my report program, I write one query on table BSIS.
    >
    >          Internal table declaration -             
    >                                            
    >        DATA : BEGIN OF DLC_BSIS OCCURS 0,
    >                         BUKRS LIKE BSIS-BUKRS,
    >                         GJAHR LIKE BSIS-GJAHR,
    >                         BELNR LIKE BSIS-BELNR,  
    >                         SHKZG LIKE BSIS-SHKZG,
    >                         BSCHL LIKE BSIS-BSCHL,
    >                         AUFNR LIKE BSIS-AUFNR,
    >                         HKONT LIKE BSIS-HKONT,
    >                         QSSKZ LIKE BSIS-QSSKZ,
    >                         DMBTR LIKE BSIS-DMBTR,
    >                    END OF DLC_BSIS.                                                                               
    >                           
    >          Query as follows --
    >
    >          SELECT BUKRS
    >                        GJAHR
    >                        BELNR
    >                        AHKZG
    >                        BSCHL
    >                        AUFNR
    >                        HKONT
    >                        QSSKZ
    >                         DMBTR FROM BSIS
    >                                   INTO TABLE DLC_BSIS
    >                                  FOR ALL ENTRIES IN IT_BKPF2
    >                                  WHERE BELNR = IT_BKPF2-BELNR
    >                                               AND BUKRS = IT_BKPF2-BUKRS
    >                                               AND GJAHR = IT_BKPF2-GJAHR.
    >
    > IT_BKPF2 internal table having -- BUKRS - LT01
    >                                                      BELNR - 6400000061
    >                                                      GJAHR - 2009.
    >
    > And in BSIS database  table  -- 3 entries are there for the above documnet.
    >
    > But, in my internal only one entry has come for the same above document.
    >
    > I think For all entries stmnt. is not running properly. But Why it's not running properly.??
    > What would be the reason..??
    >
    >
    > Thanks in advance....!!
    >
    > Regards,
    > Poonam.
    include the buzei field in selection criteria i have faced the same situation earlier.
    always select all the key fields.
    varun

  • Why select query is not running on 10.2.0.2.0  but running on 10.2.0.1.0

    Hi Friends,
    The below given select statement is executing successfully in version
    select * from v$version;
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    but NOT in version
    select * from v$version;
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
    PL/SQL Release 10.2.0.2.0 - Production
    "CORE     10.2.0.2.0     Production"
    TNS for Solaris: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production
    the error message is :
    ORA-00904:"SSRP"."RESOURCE_ID" invalid identifier
    Error at Line 12 : Column 40
    SELECT SR.RESOURCE_NAME,
    SRG.RESOURCE_GROUP_NAME,
    MAX(NVL((SELECT NVL(CHECKED, UNCHECKED)
    FROM
    (SELECT 2 AS UNCHECKED,
    (SELECT 1
    FROM S_USAGE_RESOURCE_PERMISSIONS SURP
    WHERE SURP.USAGE_PROFILE_ID = 1
    AND SURP.RESOURCE_PERMISSION_ID = SRP.RESOURCE_PERMISSION_ID) AS CHECKED
    FROM S_RESOURCE_PERMISSIONS SRP
    WHERE SRP.RESOURCE_PERMISSION_ID = SSRP.RESOURCE_PERMISSION_ID
    AND SRP.RESOURCE_ID = SSRP.RESOURCE_ID
    AND SRP.RESOURCE_PERMISSION_VAL = 4 )),0)) AS ALL_PERMISSION
    FROM
    S_RESOURCE_PERMISSIONS SSRP
    INNER JOIN
    S_RESOURCE SR ON SR.RESOURCE_ID = SSRP.RESOURCE_ID
    INNER JOIN
    S_RESOURCE_GROUP SRG ON SRG.RESOURCE_GROUP_ID = SR.RESOURCE_GROUP_ID
    GROUP BY SR.RESOURCE_NAME, SRG.RESOURCE_GROUP_NAME;
    Given SCHEMA is similar in all respects at both the databases.
    can someone suggest me what could be the problem?

    Sorry, didn't look close enough, here a corrected query you can try to run.
    If you still have problems, try to post a ddl scripts and small sample of data - this may do it easier for other to help you. When you post sql scripts, try as well to enclose them between [ pre ] [ pre ] or [ code ] [ code ] tags to increase readability.
    WITH t AS (
    SELECT NVL(CHECKED, UNCHECKED) NVL_CHECKED,
           RESOURCE_ID,
           RESOURCE_PERMISSION_ID
      FROM (SELECT 2 AS UNCHECKED,
                   (SELECT 1
                      FROM S_USAGE_RESOURCE_PERMISSIONS SURP
                     WHERE SURP.USAGE_PROFILE_ID = 1
                       AND SURP.RESOURCE_PERMISSION_ID =
                           SRP.RESOURCE_PERMISSION_ID) AS CHECKED,
                   SRP.RESOURCE_ID,RESOURCE_PERMISSION_ID
              FROM S_RESOURCE_PERMISSIONS SRP
             WHERE SRP.RESOURCE_PERMISSION_VAL = 4))
    SELECT SR.RESOURCE_NAME,
           SRG.RESOURCE_GROUP_NAME,
           MAX(NVL_CHECKED) AS ALL_PERMISSION
      FROM S_RESOURCE_PERMISSIONS SSRP INNER_JOIN T ON (T.RESOURCE_ID =
                                                       SSRP.RESOURCE_ID AND
                                                       T.RESOURCE_PERMISSION_ID =
                                                       SSRP.RESOURCE_PERMISSION_ID)
    INNER JOIN S_RESOURCE SR ON SR.RESOURCE_ID = SSRP.RESOURCE_ID
    INNER JOIN S_RESOURCE_GROUP SRG ON SRG.RESOURCE_GROUP_ID =
                                        SR.RESOURCE_GROUP_ID
    GROUP BY SR.RESOURCE_NAME, SRG.RESOURCE_GROUP_NAME;Best regards
    Maxim

  • JPQL query tool not running

    Hello people, I want to use console for JPQL I found
    https://jpaquerytool.dev.java.net/how-to.html
    and install it, but then I added my-app.jar and persistence unit name, after run I have one warning -
    "could not load persistance unit
    check your database classpath"....
    and
    Message Stack:
    No Persistence provider for EntityManager named TestPU: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory:
    javax.persistence.PersistenceException
    javax.persistence.PersistenceException: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:252)
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
    at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
    at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at org.hibernate.ejb.packaging.PersistenceXmlLoader.loadURL(PersistenceXmlLoader.java:70)
    at org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(PersistenceXmlLoader.java:79)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:212)
    ... 12 more
    Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
    oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Local Exception Stack:
    Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
    Internal Exception: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
    Internal Exception:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
    at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
    at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
    Internal Exception:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:134)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:161)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:99)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:89)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:236)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155)
    ... 11 more
    Caused by:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    at oracle.toplink.essentials.internal.ejb.cmp3.xml.parser.XMLExceptionHandler.error(XMLExceptionHandler.java:52)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:151)
    ... 16 more
    Provider named oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider threw unexpected exception at create EntityManagerFactory:
    oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Local Exception Stack:
    Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@11b86e7
    Internal Exception: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
    Internal Exception:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:143)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:169)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
    at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
    at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: Exception [TOPLINK-30004] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while processing persistence.xml from URL: file:/E:/projects/wn/wn-ejb/dist/wn-ejb.jar
    Internal Exception:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionProcessingPersistenceXML(PersistenceUnitLoadingException.java:134)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:161)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:99)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:89)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:236)
    at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:255)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:155)
    ... 11 more
    Caused by:
    (1. cvc-complex-type.2.4.a: Invalid content was found starting with element 'persistence'. One of '{"http://java.sun.com/xml/ns/persistence" ersistence-unit}' is expected.)
    (2. XML document structures must start and end within the same entity.)
    All this for all my persistance units!
    If you know cause of this problem please help me, or
    provide other JPQL or JPA query tool.
    More Thanks

    I changed my unit to
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="wn-ejbPU">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:/MySQL</jta-data-source>
    <properties>
    <property name="hibernate.archive.autodetection" value="class, hbm"/>
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
    <property name="hibernate.connection.password" value="root"/>
    <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/wet"/>
    <property name="hibernate.connection.username" value="root"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
    <property name="hibernate.c3p0.min_size" value="5"/>
    <property name="hibernate.c3p0.max_size" value="20"/>
    <property name="hibernate.c3p0.timeout" value="300"/>
    <property name="hibernate.c3p0.max_statements" value="50"/>
    <property name="hibernate.c3p0.idle_test_period" value="3000"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
    <property name="hibernate.hbm2ddl.auto" value="none"/>
    </properties>
    </persistence-unit>
    </persistence>
    but now I have
    Message Stack:
    No Persistence provider for EntityManager named wn-ejbPU: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory:
    javax.persistence.PersistenceException
    javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not find datasource
         at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
         at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
         at org.morgade.jpaquerytool.core.EntityFinder.<init>(EntityFinder.java:33)
         at org.morgade.jpaquerytool.gui.tasks.CreateEntityFinderTask.doInBackground(CreateEntityFinderTask.java:47)
         at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.HibernateException: Could not find datasource
         at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
         at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
         at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
         at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
         ... 12 more
    Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
         ... 18 more

  • BW QUERY IS NOT RUNNING IN PORTAL

    Hi  Experts,
    I am having BW Netweaver 7.0 (ABAPJAVA) which is installed on Windowsoracle.
    I am trying to design BW queries in WAD and try to execute them in the Internet explorer. But Its not supporting.
    Is there any separate Post mannual settings to be done to execute BW queries on browser.if yes kindly give the links to documents to peform the settings.
    Thanks for the solutions
    Best Regards
    Naredra

    Hi Venu ,
    Can you please check the logs for details -  http(s):<host>:<port>/nwa . This may be a permissions issue . Check if the iview has read permission for everyone group and then test . Also post the error details here .
    Regards
    Mayank

  • How to setup a query plan in effective at any time for SP or SQL query?

    I have a SP which include a group by SQL statement. It retrieve data from a couple of tables which are over 1G size,
    When I run this SP at first time, it take more than 5 minutes to get the result. then I run it again and again, Finally, it become very quick, I can get the result within second.
    Not sure why. I guess it is because of query plan.
    How to make it running at first time to get result within second? How to force a better best query plan in effective at first time to run the query?
    If the engine has better plan in memory, could it be lost at some point? because I have the complain from end user said some times it is fast, sometime it is very slow.
    How to resolve this problem?

    thanks, kevin. Here is the pesudo query( I modify table name as business rule from my company). you are right, mytab3 is a lookup table.
    Select d.stock,i.description,c.categoryname,
    Round(IsNull(Sum(d.qty),0),2) AS qty,
    From mytab1 d,mytab2 s,invent i,mytab3 c       
    Where
    d.stock != 'param1'
    And d.id1 = s.id1    --id1: univarchar(11)        
    And i.code = c.code   --code:univarchar(2)         
    And d.stock = i.stock  --stock: univarchar(12)           
    And i.code2 = d.code2  --code2: univarchar(2)
    And d.code2 = 'param2'
    And s.id2 = 'param3'   --id2: univarchar(6)
    Group By  c.categoryname,d.stock,i.description
    Order By d.stock
    here is the query plan when run this query:
    The command completed with no results returned
    QUERY PLAN FOR STATEMENT 1 (at line 1).
    Executed in parallel by coordinating process and 4 worker processes.
        STEP 1
            The type of query is SELECT (into Worktable1).
            GROUP BY
            Evaluate Grouped SUM OR AVERAGE AGGREGATE.
            Evaluate Grouped SUM OR AVERAGE AGGREGATE.
            Evaluate Grouped SUM OR AVERAGE AGGREGATE.
            Executed in parallel by coordinating process and 4 worker processes.
            FROM TABLE
                mytab2
                s
            Nested iteration.
            Index : ind_mytab2 _id2
            Forward scan.
            Positioning by key.
            Keys are:
                id2  ASC
            Executed in parallel with a 4-way hash scan.
            Using I/O Size 16 Kbytes for index leaf pages.
            With LRU Buffer Replacement Strategy for index leaf pages.
            Using I/O Size 16 Kbytes for data pages.
            With LRU Buffer Replacement Strategy for data pages.
            FROM TABLE
                mytab1
                d
            Nested iteration.
            Index : ind_det_inv
            Forward scan.
            Positioning by key.
            Keys are:
                id1  ASC
            Using I/O Size 16 Kbytes for index leaf pages.
            With LRU Buffer Replacement Strategy for index leaf pages.
            Using I/O Size 16 Kbytes for data pages.
            With LRU Buffer Replacement Strategy for data pages.
            FROM TABLE
                invent
                i
            Nested iteration.
            Using Clustered Index.
            Index : invent_pk
            Forward scan.
            Positioning by key.
            Keys are:
                stock  ASC
                code2  ASC
            Using I/O Size 2 Kbytes for data pages.
            With LRU Buffer Replacement Strategy for data pages.
            FROM TABLE
                mytab3
                c
            Nested iteration.
            Table Scan.
            Forward scan.
            Positioning at start of table.
            Using I/O Size 2 Kbytes for data pages.
            With LRU Buffer Replacement Strategy for data pages.
            TO TABLE
                Worktable1.
            Parallel work table merge.
        STEP 2
            The type of query is INSERT.
            The update mode is direct.
            Executed by coordinating process.
            Worktable2 created, in allpages locking mode, for ORDER BY.
            FROM TABLE
                Worktable1.
            Nested iteration.
            Table Scan.
            Forward scan.
            Positioning at start of table.
            Using I/O Size 8 Kbytes for data pages.
            With MRU Buffer Replacement Strategy for data pages.
            TO TABLE
                Worktable2.
        STEP 3
            The type of query is SELECT.
            Executed by coordinating process.
            This step involves sorting.
            FROM TABLE
                Worktable2.
            Using GETSORTED
            Table Scan.
            Forward scan.
            Positioning at start of table.
            Using I/O Size 8 Kbytes for data pages.
            With MRU Buffer Replacement Strategy for data pages.
    Total estimated I/O cost for statement 1 (at line 1): 1409882.
    The sort for Worktable2 is done in Serial

  • Joining Actuals and Planned Work from Project Server

    Hi,
    I have an SQL based query which returns Actuals and Planned work from Project Server; however a number of records (generally generic resources based on the ResourceIsGeneric column) are excluded. I believe this is because my Actuals query does not return
    generic resources as we are joining both sides of the query on ResourceUID. I have included a snippet below - is there a way to join Actuals and Planned work so I can return all Resource data?
    Thanks
    SELECT tl.ResourceUID
    ,tl.ProjectUID
    ,tl.ResourceName AS [ResourceName]
    ,CASE
    WHEN tl.ProjectName = 'Administrative'
    THEN tl.TaskName
    ELSE tl.ProjectName
    END ProjectName
    ,ruv.RBS AS [RBS]
    ,Sum(ta.ActualWorkBillable) ActualWorkBillable
    ,Sum(ta.ActualWorkNonBillable) ActualWorkNonBillable
    ,Sum(ta.ActualOvertimeWorkBillable) ActualOvertimeWorkBillable
    ,Sum(ta.ActualOvertimeWorkNonBillable) ActualOvertimeWorkNonBillable
    ,CASE
    WHEN Sum(ta.ActualOvertimeWorkBillable) > 0
    THEN Sum(ta.ActualOvertimeWorkBillable)
    END [HOURS]
    ,DATEPART(year, ta.TimeByDay) AS [Year]
    ,DATEPART(month, ta.TimeByDay) AS [Month]
    ,DATENAME(month, DATEADD(month, DATEPART(month, ta.TimeByDay), - 1)) AS [MonthName]
    ,puv.[Project Status] AS [ProjectStatus]
    ,ruv.[Primary Role] AS [PrimaryRole]
    ,ruv.[Resource Department] AS [Department]
    ,ruv.ResourceIsGeneric
    ,ruv.[Cost Category] AS [ResourceType]
    ,puv.[SAP Project Code] AS [SAPProjectCode]
    ,CASE
    WHEN tl.ProjectName <> 'Administrative'
    THEN NULL
    ELSE tl.TaskName
    END TaskName
    ,puv.[Project Plan Type] AS [ProjectPlanType]
    ,puv.[GEM Project Manager] AS [GemPM]
    ,ruv.[Rate Code] AS [RateCode]
    ,ruv.[Cost Centre] AS [CostCentre]
    ,ept.EnterpriseProjectTypeName AS [EPT]
    ,puv.[I DO Phase]
    ,puv.ProjectOwnerName AS [ProjectOwner]
    FROM dbo.MSP_TimesheetActual_OlapView ta
    INNER JOIN dbo.MSP_TimesheetLine_UserView tl
    ON ta.TimesheetLineUID = tl.TimesheetLineUID
    INNER JOIN dbo.MSP_EpmResource_UserView ruv
    ON ruv.ResourceUID = tl.ResourceUID
    LEFT JOIN dbo.MSP_EpmProject_UserView puv
    ON puv.ProjectUID = tl.ProjectUID
    LEFT JOIN dbo.MSP_EpmEnterpriseProjectType ept
    ON ept.EnterpriseProjectTypeUID = puv.EnterpriseProjectTypeUID
    WHERE ta.TimeByDay >= @xDate1
    AND ta.TimeByDay < @xDate2
    AND tl.TimesheetStatus IN (
    SELECT ParamValues
    FROM @ParamTable
    AND ta.ActualWorkBillable > 0
    GROUP BY ...
    ) TimesheetActual
    FULL JOIN (
    SELECT ruv.ResourceUID
    ,puv.ProjectUID
    ,ruv.ResourceName
    ,puv.projectname AS ProjectName
    ,ruv.RBS AS [RBS]
    ,Sum(abduv.AssignmentWork) AS [PlannedWork]
    ,DATEPART(year, abduv.TimeByDay) AS [Year]
    ,DATEPART(month, abduv.TimeByDay) AS [Month]
    ,DATENAME(month, DATEADD(month, DATEPART(month, abduv.TimeByDay), - 1)) AS [MonthName]
    ,ruv.ResourceIsGeneric
    ,puv.[Project Status] AS [ProjectStatus]
    FROM dbo.MSP_EpmResource_UserView ruv
    INNER JOIN dbo.MSP_EpmAssignment_UserView auv
    INNER JOIN dbo.MSP_EpmAssignmentByDay_UserView abduv
    ON auv.AssignmentUID = abduv.AssignmentUID
    AND auv.ProjectUID = abduv.ProjectUID
    ON ruv.ResourceUID = auv.ResourceUID INNER JOIN dbo.MSP_EpmProject_UserView puv
    ON auv.ProjectUID = puv.ProjectUID
    AND abduv.ProjectUID = puv.ProjectUID INNER JOIN dbo.MSP_TimeByDay_OlapView tbdov
    ON abduv.TimeByDay = tbdov.TimeByDay WHERE abduv.TimeByDay >= @xDate1
    AND abduv.TimeByDay < @xDate2
    AND ruv.ResourceName <> 'Unassigned Resource'
    AND ruv.ResourceName IS NOT NULL
    AND abduv.AssignmentWork > 0
    GROUP BY ruv.ResourceUID
    ,puv.ProjectUID
    ,ruv.ResourceName
    ,puv.projectname
    ,ruv.RBS
    ,DATEPART(year, abduv.TimeByDay)
    ,DATEPART(month, abduv.TimeByDay)
    ,ruv.ResourceIsGeneric
    ,puv.[Project Status]
    ) TimesheetPlanned
    ON TimesheetActual.ResourceUID = TimesheetPlanned.ResourceUID
    AND TimesheetActual.[Year] = TimesheetPlanned.[Year]
    AND TimesheetActual.[MonthName] = TimesheetPlanned.[MonthName]

    Hi,
    you pasted just part of your query, e.g. is declaration of @ParamTable missing. Without complete query, it is difficult to see, what you are trying to do.
    Could you please provide complete query?
    Barbara
    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find
    an appropriate solution faster. Thanks for your support!

  • 9iAS Portal R1 does not run on P-3/4 or Xeon Machine - I need help

    I installed 9iAS 1.0.2 on P-3, P-4 & Xeon machines, but the HTTP Server does not work. W2k shows that it is running, but actually it is not running.
    But, I have been successfully using it on AMD machines. Now, I need to run on Intel. Does anybody know the solution?
    With regards,
    Mamunur Rahman.

    ok guys get ready for this one!
    there where a couple of issues. yes it did help that i exported the project to the debug folder instead of  deploy folder we set up. but it still wasnt 100% right. so, one issue is that our asset swc was huge. we had everything under the sun in there. so, it would not compile correctly. how did i find this out you ask? i tried to run it in just the flash ide and it would compile so i knew something was super wrong. second, at some point somehow some of our text fields in the asset swc where converted to one of those new fangled tlf type text fields. we never added that swc to the compile path. somehow flash builder just ignored that and still built the swf but it mustve been corrupted to begin with.
    so the morale of the story keep an eye on your assets!!

  • MS Query will not return results after modification

    Using an ORACLE OBDC link, a msquery will work fine when first set up, but will fail to work when modified.  The query can be reset up with the modified criteria and work fine, however, all links have to be changed to the new table.  Other queries
    will work fine with multiple modifications.  We link to the BANNER database system tables. (when you try to query now, it is as if the query does not run any longer. Results which normally take up to 3 minutes to return, are returned immediately as no
    information)

    Hi,
    Do you get the error message when you Microsoft query fail to work? Which Excel and Oracle version are you using?
    Please try the below workaround to check if it is helpful:
    1. Update the Oracle ODBC drive
    2. Turn Off the Enable Background Refresh Setting
    http://support.microsoft.com/kb/168702/en-us
    Then, we also may be try to use OLEBD instand of the ODBC?
    http://blog.mclaughlinsoftware.com/microsoft-excel/how-to-query-oracle-from-excel-2007/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support

  • SQL 2005 v9.0.2047 (SP1) - The query processor could not produce a query plan

    Hi Everyone:
    *Before* I actually call up Microsoft SQL Customer Support Services and ask them, I wanted to ping other people to see if you have ever ran into this exact error
    "Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services."
    I would have searched the forums myself, but at this moment in time, search is broken :(
    If anyone has run into this error before, what conditions would exist that this could happen?  That is, if I can sniff this out with suggestions from the community, I would be happy to do so. 
    It is an oddity because if I alter a couple subqueries in the where clause [ i.e., where tab.Col = (select val from tab2 where id='122') ]to not have subqueries [hand coded values], then the t-sql result is fine.  It's not as if subqueries are oddities... I've used them when appropriate.
    fwiw - Not a newbie t-sql guy.  ISV working almost daily with t-sql since MS SQL 2000.  I have never seen this message before...at least I don't recall ever seeing it.
    Thanks in advance for other suggested examination paths.

    This code also produces the error... the text is from an incident a while ago that I reported to microsoft.
    --I just found a way to break the query engine. Looks like the SQL Server team missed something. I was generating phony data for test cases, by the way.
    --Bad code:
    DECLARE @t_Asset TABLE
    (Asset_Id INT)
    INSERT INTO @t_Asset (Asset_Id) VALUES (1)
    INSERT INTO @t_Asset (Asset_Id) VALUES (2)
    INSERT INTO @t_Asset (Asset_Id) VALUES (3)
    DECLARE @Record_id INT
    ,@File_id NVARCHAR(MAX)
    ,@SKP_Cust_id NVARCHAR(MAX)
    ,@Unique_Barcode NVARCHAR(MAX)
    SELECT @Record_Id = (SELECT TOP 1 Asset_Id FROM @t_Asset)
    , @file_id = (SELECT LEFT(REPLACE(CAST(NEWID() AS NVARCHAR(50)), '-', ''), 10))
    ,@Unique_Barcode=(SELECT LEFT(REPLACE(CAST(NEWID() AS NVARCHAR(50)), '-', ''), 15))
    go
    --Msg 8624, Level 16, State 116, Line 12
    --Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.
    --Code that doesn’t fry the optimizing engine:
    DECLARE @t_Asset TABLE
    (Asset_Id INT)
    INSERT INTO @t_Asset (Asset_Id) VALUES (1)
    INSERT INTO @t_Asset (Asset_Id) VALUES (2)
    INSERT INTO @t_Asset (Asset_Id) VALUES (3)
    DECLARE @Record_id INT
    ,@File_id NVARCHAR(MAX)
    ,@SKP_Cust_id NVARCHAR(MAX)
    ,@Unique_Barcode NVARCHAR(MAX)
    SELECT @Record_Id = (SELECT TOP 1 Asset_Id FROM @t_Asset)
    SELECT @file_id = (SELECT LEFT(REPLACE(CAST(NEWID() AS NVARCHAR(50)), '-', ''), 10))
    SELECT @Unique_Barcode=(SELECT LEFT(REPLACE(CAST(NEWID() AS NVARCHAR(50)), '-', ''), 15))

  • Actual values & Plan Values Entry in the same Input Ready Query

    Hi Gurus,
    I have a problem about preparing input ready queries with combination of actual data and plan data together. Forexample :
    I want to plan my sales quantity for estimate months ( 9,10,11,12 ). But in same query, i want to show sales quantities in actual months (1.....8 ) .  I have one key figure : Sales Quantity and two versions : Actual and Plan. And restrictions are like below :
    Actual Sales :
    Key figure : Sales Quantity
    Version : Actual
    Fiscal Periods : 9,10,11,12
    Fiscal year : 2008
    (values cannot be changed)
    Plan Sales :
    Key figure : Sales quantity
    Version : Plan
    Fiscal Periods : 1.....8
    Fiscal Year : 2008
    (values can be changed by inputs or planning functions)
    I did those restrictions to key figures in ''columns''  area in BEX Query Designer. And i also added 0FISCPER3 to ''columns'' area in order to see periods in query.
    I expect to see a 12 months period, which has 8 months actual and 4 months open for planning.
    But when i execute the query, it shows me two 12 months periods. Like, Actual Sales 1......12 and following Plan Sales 1.....12 side by side.  But i want to combine those two 12 months periods in one year.
    Where do i make mistake? or is it how system works?
    I would really appreciate for your answers.
    Thanks,
    Fatih...

    Hi,
    Actions in details:
    1. Run BEx Analyzer, connect to the system;
    2. Open the workbook;
    3. Workbook is opened, press the button "Design Mode";
    4. ALT+F11 for opening VB Editor;
    5. Insert new module "Module1" in project of my workbook (not in BExAnalyzer.xla);
    6. Write the code of macros "ON_BEX_REFRESH";
    7. Close the VB Editor window;
    8. BEx Analyzer window is still in design mode, press the button "Workbook Settings";
    9. In "General" tab mark the checkbox "Refresh Workbook on Open";
    10. In "Exits" tab mark the radiobutton "Invoke macro on refresh" and write "ON_BEX_REFRESH" in the textbox;
    11. Press the button "Attach Macros", appears the message "VBA Macros have been succesfully Attached to the Workbook", press OK for accepting the message;
    12. Press "OK" to close the Workbook Settings window;
    13. Press the button "Exit Design Mode";
    14. Click on right mouse button on table (on inserted query), choose "Transfer Values";
    15. If macros is working, press "Save Workbook".
    I'm using BEx Support Package 16. Therefore it is possible, if I remember correctly, that in older versions of BEx the names of some tabs in workbook settings are different.
    If you are using older version of BEx and these 14 steps don't help you, then try to do the following in next steps:
    15. Press the button "Design Mode";
    16. Open Analysis Grid Properties (select table, click on right mouse button, properties);
    17. In 'General' tab do so that none checkbox is marked;
    18. Press OK;
    19. Press the button "Exit Design Mode";
    20. Click on right mouse button on table (on inserted query), choose "Transfer Values";
    If now macros is working then you can start to find out which checkboxes you can mark and which have to be unmarked in Analysis Grid Properties.
    In my case 3 checkboxes is marked: "Apply Formatting"; "Allow Navigation"; "Display Hierarchy Icons". As I mentioned above it is in BEx SP16, if you have older version then you have to find out the checkboxes which you can use, which not.
    Regards,
    Ainars

  • SQL 2012 SP1 - How to determine a query that causes Error 8623 in SQL Log: The query processor ran out of internal resources and could not produce a query plan. This is a rare event...

    We are getting multiple 8623 Errors in SQL Log while running Vendor's software.
    How can you catch which Query causes the error?
    I tried to catch it using SQL Profiler Trace but it doesn't show which Query/Sp is the one causing an error. 
    I also tried to use Extended Event session to catch it, but it doesn't create any output either.
    Error:
    The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that
    reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
    Extended Event Session that I used;
    CREATE EVENT SESSION
        overly_complex_queries
    ON SERVER
    ADD EVENT sqlserver.error_reported
        ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
        WHERE ([severity] = 16
    AND [error_number] = 8623)
    ADD TARGET package0.asynchronous_file_target
    (SET filename = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xel' ,
        metadatafile = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xem',
        max_file_size = 10,
        max_rollover_files = 5)
    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
    GO
    -- Start the session
    ALTER EVENT SESSION overly_complex_queries
        ON SERVER STATE = START
    GO
    It creates only .xel file, but not .xem
    Any help/advice is greatly appreciated

    Hi VK_DBA,
    According to your error message, about which query statement may fail with error message 8623, as other post, you can use trace flag 4102 & 4118 for overcoming this error. Another way is looking for queries with very long IN lists, a large number of
    UNIONs, or a large number of nested sub-queries. These are the most common causes of this particular error message.
    The error 8623 occurs when attempting to select records through a query with a large number of entries in the "IN" clause (> 10,000). For avoiding this error, I suggest that you could apply the latest Cumulative Updates media for SQL Server 2012 Service
    Pack 1, then simplify the query. You may try divide and conquer approach to get part of the query working (as temp table) and then add extra joins / conditions. Or You could try to run the query using the hint option (force order), option (hash join), option
    (merge join) with a plan guide.
    For more information about error 8623, you can review the following article.
    http://blogs.technet.com/b/mdegre/archive/2012/03/13/8623-the-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Use Plan data if actual data is not available(By month)

    Hello All,
    We have a cube which stores the actual and plan data by month. There will be plan data for all the months of the year in the cube whereas the actual data is only populated for that month at the end of the month. So, there will not be any data for the rest of the months of the year.
    QUESTION : Is it possible to create a bex query to show data by month with one key figure which should be Actual data if available in the cube or else the Plan data. I would be able to provide the last month where the data is available to the query in a form of a variable.
    Example
    Data In the Cube
    Month    Type     Sales
    JAN       Actual   1000
    JAN       Plan       750
    FEB       Actual   1500 
    FEB       Actual   2000
    MAR      Plan      1200
    Query Output
    Month    Type     Sales
    JAN       Actual   1000
    FEB       Actual   1500 
    MAR      Plan      1200
    Thanks in Advance!
    -Vinod Swarnapuri
    SAP EPM/BW/BI

    Hi,
    in the row you put the month.
    in column you have three keyfigures:
    - restricted keyfigure r1 : amount with selection actual
    - restricted keyfigure r2: amount with selection plan
    - calculated keyfigure c1: (r1 ne 0) * r1 +  (r1 eq 0) * r2
    please test it. It's should be work.
    Sven
    Edited by: Sven Mader on Mar 5, 2010 10:51 AM

Maybe you are looking for

  • Printing times in ical

    How can I get iCal to NOT print the time of an event? I entered the event as an all-day event and it prints it with a time in front (eg. "11:00AM Meeting"). I want it to just print "Meeting." Please help!

  • Links in a column

    When you are doing links in a column, and there is not much room so you want them to sit one on top another, if you use <p>  </p> they are to far apart and take up to much room, so what mark up do you use. can any one help please.

  • Why java is called java2

    why java is called java2 and another thing that i would like to know is why it was renamed to java from its previous name OAK Thanx Manish

  • How to use 'help view'uFF1FHELP

    Dear guys:   I want to use 'help view' to connect tables with 'OUTER JOIN'. For example:With primary table 'SPFLI' and secondary 'SCARR',with each has different airline code of 10 and 18.  I want show all the 18 airlines even if they do not have any

  • After transferring applications and documents to my new mac, the applications won't open?

    I transferred pages, keynote and photoshop from my old white macbook to my new macbook pro through the use of a hardrive. At first the applications came up as question marks on the dock and clicking on them had no response. I then tried transferring