HTML Client: post process a preprocess query?

I am trying to set up a method for quoting jobs and keeping track of parts for the quote. Many quotes can have many parts, so I have a many to many relationship between Quotes and Parts via a table called QuoteParts.
I am trying to design an Add Edit Quote screen with two tabs: one has the quote details and a list of parts for this quote. The other tab has a list of parts available to go on the quote. I have it set so when you tap the item in the list not added to the
quote, it adds the QuotePart and the part moves from the list of available parts to the quote. 
I am filtering the two lists using two preprocess queries. They both work fine when opening the screen, however when I add a new part, the part shows up in both lists. I'm assuming it's because the preprocess query didn't preprocess, since the data was added
to the screen and has not been saved yet. If I save and reopen the screen, all shows up fine. 
So on to my question: Is there any way to POST process a preprocess query?
I got the idea of how to work with this via http://blogs.msdn.com/b/lightswitch/archive/2013/04/10/many-to-how-many-html-edition-heinrich-wendel.aspx

Close, try this:
myapp.BrowseParts.AddPart_execute = function (screen) {
myapp.showAddEditPart(null, {
beforeShown: function (newScreen) {
var newPart = new myapp.Part();
newPart.Hardware = screen.Hardware;
newScreen.Part = newPart;
}, afterClosed: function (newScreen, navigationAction) {
if (navigationAction === msls.NavigateBackAction.commit) {
// Save all changes to parts
return myapp.activeDataWorkspace.ApplicationData.saveChanges().then(function () {
// Refresh the Parts that other code does not reach
screen.UsedParts.refresh();
screen.UnusedParts.refresh();
Be careful about creating global scope functions like you did: RefreshPartsLists.
Cheers
Dave
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

Similar Messages

  • Local Client Copy Error in Post-Processing

    Hello All,
    We are facing issues in local client copy on SRM 5.5 system Basis 700 SP19 with Oracle Db. I have ran the same twice. Also performed the update statistics on db.
    All the tables are getting copied but the error or warning is occuring in "Post-Processing" phase.
    Table Name                  Component       Package
    /SAPCND/CC_GROUP_WS_NG      AP-PRC-CON      Post-Processing Required
    Following entires in the file logs are displayed:
    Begin of GEN_STATUS Update
    Generation of working set structure /1CN/WS_ID_200MOM_TAX started.
    No fields in structure /1CN/WS_ID_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_IS_200MOM_TAX started.
    No fields in structure /1CN/WS_IS_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_ED_200MOM_TAX started.
    No fields in structure /1CN/WS_ED_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_ES_200MOM_TAX started.
    No fields in structure /1CN/WS_ES_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_UI_200MOM_TAX started.
    No fields in structure /1CN/WS_UI_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Begin of GEN_STATUS Update
    Its help says "Postprocessing necessary when upgrade has been completed. For a more detailed description, see the previous message /SAPCND/GENERATOR381.Message no. PU139"
    Can anyone guide me the best way forward.
    Thanks,
    Antarpreet

    Hello Gagan,
    I am facing the errors in table /SAPCND/CC_GROUP_WS_NG belonging to component AP-PRC-CON. It says post processing required.
    The oss note says about component FINB-TR-DERIVATION.
    I am not sure whether it is good to run the steps as mentioned in oss note 1235955.
    Thanks for your response and look forward to further help.
    Regards,
    Antarpreet

  • Local Client Copy error in post processing phase

    Hello All,
    We are facing issues in local client copy on SRM 5.5 system Basis 700 SP19 with Oracle Db. I have ran the same twice.
    All the tables are getting copied but the error or warning is occuring in "Post-Processing" phase.
    Table Name                  Component       Package
    /SAPCND/CC_GROUP_WS_NG      AP-PRC-CON      Post-Processing Required
    Following entires in the file logs are displayed:
    Begin of GEN_STATUS Update
    Generation of working set structure /1CN/WS_ID_200MOM_TAX started.
    No fields in structure /1CN/WS_ID_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_IS_200MOM_TAX started.
    No fields in structure /1CN/WS_IS_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_ED_200MOM_TAX started.
    No fields in structure /1CN/WS_ED_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_ES_200MOM_TAX started.
    No fields in structure /1CN/WS_ES_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Generation of working set structure /1CN/WS_UI_200MOM_TAX started.
    No fields in structure /1CN/WS_UI_200MOM_TAX
    Postprocessing necessary when upgrade has been completed
    Begin of GEN_STATUS Update
    Its help says "Postprocessing necessary when upgrade has been completed. For a more detailed description, see the previous message /SAPCND/GENERATOR381.Message no. PU139"
    Can anyone guide me the best way forward.
    Thanks,
    Antarpreet

    Hi,
    You need not worry at all as this is not a warning (although marked
    so in message), and its just an information so you are better able to run
    the job RGUGBR00 in SE38 with all the options mentioned in message above
    marked.
    Regards,
    Aidan

  • Error in Post processing of Client Copy

    Hi,
    While doing a Client copy, i am facing an error in Post Processing step.
    Its getting hanged saying:
    "Client copy is completed with status "Post-Processing Required". There is an error in log for object FINB-TR-DERIVATION"
    Please help me out of this error.
    Regards,
    Twinkle

    Hi Twinkle,
    I got the same error while doing client copy.
    During processing of client copy there was huge workload into your system. But due to workload into the system, these tables weren't created as fast as needed by Client Copy process.
    This is the reason it failed in post processing step.
    You can go thru the note 1235955.
    Hope this will solve your problem.
    Regards,
    Habeeb

  • Query on long running client import process

    Hi Gurus,
    I have few queries regarding the parameter PHYS_MEMSIZE. Let me brief about the SAP server configuration before I get into the actual problem.
    We are running on ECC 6.0 on windows 2003, SP2 - 64 bit and DB is SQL 2005 with 16GB RAM and page file configured 22 GB.
    As per the Zero Administration Memory management I have learnt as a rule of thumb, use SAP/DB = 70/30 and set the parameter PHYS_MEMSIZE to approximately 70% of the installed main memory. Please suggest should I change the parameter as described in zero administration memory guide? If so what are the precautions we should take care for changing memory parameters. Are there any major dependencies and known issues associated to this parameter?
    Current PHYS_MEMSIZE parameter set to 512 MB.
    Few days ago we had to perform the client copy using EXPORT / IMPORT method. Export process was normal and went well However the import process took almost 15 HRs to complete. Any clues what could be the possible reasons for long running client copy activity in SQL environment. I am suspecting the parameter PHY_MEMSIZE was configured to 512 MB which appears to be very low.
    Please share your ideas and suggestions on this incase if anyone have ever experienced this sort of issue because we are going to perform a client copy again in next 10 days so i really need your inputs on this.
    Thanks & Regards,
    Vinod
    Edited by: vinod kumar on Dec 5, 2009 9:24 AM

    Hi Nagendra,
    Thanks for your quick response.
    Our production environment is running on ACtive/Active clustering like One central Instance and Dialog Instance. Database size is 116 GB with 1 data file and log file is 4.5 Gb which are shared in cluster.
    As suggested by you if I need to modify the PHYS_MEMSIZE to 11 or 12 GB(70% of physical RAM). What are the precautions should I consider and I see there are many dependencies associated with this parameter as per the documentation of this parameter.
    The standard values of the following parameters are calculated
    According to PHYS_MEMSIZE
    em/initial_size_MB = PHYS_MEMSIZE (extension by PHYS_MEMSIZE / 2)
    rdisp/ROLL_SHM
    rdisp/ROLL_MAXFS
    rdisp/PG_SHM
    rdisp/PG_MAXFS
    Should I make the changes to both Central and dialog instance as well. Please clarify me,. Also are there any other parameters should i enhance or adjust to speedup the client copy process.
    Many Thanks...
    Thanks & Regards,
    Vinod

  • Error during PDF post processing in HtmlToPDF

    Hi,
    I am using Web services interface to convert Html document to PDF. Works fine for simple html documents stored locally. However when using a remote html document (for example the one in the quickstart--http://www.adobe.com--I am getting an exception:
    ALC-PDG-16003-16003-000: com.adobe.livecycle.generatedpdf.client.ConversionException: ALC-PDG-016-003-An unknown/unexpected error occurred during PDF post-processing.
    I get the same error when trying this conversion from the Administration Console. I am using JBoss/turnkey. I do not have Adobe Acrobat running on the server computer.
    Thanks,
    Jesse

    Hello Ramya,
    I am not finished checking but I did make some progress. Testing from html file located on the server machine, I use the url for file. For example if the file is named foo.html and it is located in directory c:\adata then the file url is
    file:///c:/adata/foo.html
    That works for me using adminui, and from calling the web service.
    The example in the quickstart ( converting the default page at
    http://www.adobe.com ) does not work for me just yet. Still get the post pdf processing error.
    If not doing so already, check the server log to see if any additional debug information is provided.
    Regards,
    Jesse

  • How can I wait till data is loaded and get the latest entities in HTML CLient

    This is my first try using a JavaScript component. I found a nice timeline-Scheduler on github:
    Timeline Javascript Scheduler
    I made an nearly empt new Screen and I am using LS only to get the data and to switch to the next date.
    This works fine for the first date I set in the created.
    But if I change to the next day, there are still the just loaded records. When I switch again to the following date I get the records from the day before...
    myapp.dispo.divcontainer_render = function (element, contentItem) {
    // We need this div for the timeline
    $(element).append('<div class="calendar"></div><div class="realtime-info"></div>');
    //Bind to the date
    contentItem.dataBind("screen.suchDispodat", function (value) {
    var querydat = value;
    var items = [];
    var sections = [];
    //The querydat is set to the right date but the records I get are from the last executed query.
    contentItem.screen.getQuerydispobydatfahrerorderfahrer(querydat).then(function (result) {
    var dispos = result.data;
    dispos.forEach(function (dispo) {
    How can I bind the refresh to something like data loaded?
    Helmut

    From:
    http://blogs.msdn.com/b/lightswitch/archive/2012/12/19/enhancing-lightswitch-controls-with-jquery-mobile-michael-zlatkovsky.aspx
    "You could use setTimeout (which is sometimes necessary – see Joe’s Custom Controls post
    for an example)"
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • HTML Client Progress Bar

    Within my HTML Client application the user will trigger a longer running process server side...
      msls.showProgress(msls.promiseOperation(function 
    (operation)
            $.post("../api/Command/DoStuff",
    ReqParam:
    "SomeParameter",
              .done(function()
                  operation.complete("DONEZO!!!");
                  screen.ReportstoRecords.refresh();
    This process may act on 50,100,1000 records and I would like to show the "total progress" to the user (possibly replacing the default "ShowProgress" overlay w/ a real-time process bar.
    Could someone nudge me in the right direction?  Seem like a simple thing to wire up, but I just can't seem to find any examples...
    Thanks in advance!!!!!

    Here are code snippet to use ShowProgress in Lightswitch application
    msls.showProgress(msls.promiseOperation(function (operation) {
            $.getJSON(url,
    function (data) {
                operation.complete(data);
    //Operation completed successfully
            }).error(function (args) {
                operation.error(args);
    //Operation completed with error.
        }) .then(function (result) {
            msls.showMessageBox(result);

  • How to reduce Post-Processing time in oracle applications R12?

    Hi All,
    I ran a XMLP concurrent program at 16-APR-2015 11:23:52 . It's completed at 16-APR-2015 11:30:41. So it took 6 minute 49 seconds. I check the query in sql developer, it's executing less than two minutes. When I check the log file of that program shows the following info...
    Beginning post-processing of request 22226009 on node DEV at 16-APR-2015 11:24:43.
    Post-processing of request 22226009 completed at 16-APR-2015 11:30:41.
    So what is the reason?, and how to reduce the time?

    HTML is a simple format (Text).
    Excel is more complicated and requires more time to generate. The same applies for Word and PDF output.
    Maybe the processing power and memory of the server are not high and this does not help generate the output faster.
    I have a workaround for you, generate an XML file (which should finish faster) and open it in Excel.

  • One or more post-processing actions failed. Consult the OPP service log for details.

    hi expert plz help me i can't understand here what can i do to resove this error.
    here is the logfile details of output post processor
    ebs- 11i (11.5.10.2)
    os - rhel 4
    [9/2/13 4:54:48 PM] [main] Starting GSF service with concurrent process id = 2984174.
    [9/2/13 4:54:48 PM] [main] Initialization Parameters: oracle.apps.fnd.cp.opp.OPPServiceThread:2:0:max_threads=5
    [9/2/13 4:54:48 PM] [Thread-14] Service thread starting up.
    [9/2/13 4:54:48 PM] [Thread-15] Service thread starting up.
    [9/2/13 4:59:34 PM] [OPPServiceThread0] Post-processing request 21672063.
    [9/2/13 4:59:35 PM] [2984174:RT21672063] Executing post-processing actions for request 21672063.
    [9/2/13 4:59:35 PM] [2984174:RT21672063] Starting XML Publisher post-processing action.
    [9/2/13 4:59:35 PM] [2984174:RT21672063]
    Template code: PURCHASE_REGISTER_ITEMWISE
    Template app:  CONA
    Language:      en
    Territory:     00
    Output type:   PDF
    [090213_045936406][][EXCEPTION] [DEBUG] ------- Preferences defined PreferenceStore -------
    [090213_045936407][][EXCEPTION] [DEBUG] ------- Environment variables stored in EnvironmentStore -------
    [090213_045936408][][EXCEPTION] [DEBUG]  [FND_JDBC_IDLE_THRESHOLD.LOW]:[-1]
    [090213_045936408][][EXCEPTION] [DEBUG]  [SECURITY_GROUP_ID]:[0]
    [090213_045936408][][EXCEPTION] [DEBUG] [FND_JDBC_BUFFER_DECAY_INTERVAL]:[300]
    [090213_045936408][][EXCEPTION] [DEBUG]  [NLS_CHARACTERSET]:[US7ASCII]
    [090213_045936408][][EXCEPTION] [DEBUG]  [RESP_APPL_ID]:[-1]
    [090213_045936408][][EXCEPTION] [DEBUG]  [NLS_LANGUAGE]:[AMERICAN]
    [090213_045936408][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MIN]:[1]
    [090213_045936409][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MAX]:[2]
    [090213_045936409][][EXCEPTION] [DEBUG]  [NLS_NUMERIC_CHARACTERS]:[.,]
    [090213_045936409][][EXCEPTION] [DEBUG] [APPS_JDBC_URL]:[jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=demo.oriplast.com)(PORT=1526)))(CONNECT_DATA=(SID=ORIDEMO)))]
    [090213_045936409][][EXCEPTION] [DEBUG]  [RESP_ID]:[-1]
    [090213_045936409][][EXCEPTION] [DEBUG]  [FND_MAX_JDBC_CONNECTIONS]:[500]
    [090213_045936410][][EXCEPTION] [DEBUG]  [FND_JDBC_USABLE_CHECK]:[false]
    [090213_045936410][][EXCEPTION] [DEBUG]  [USER_ID]:[-1]
    [090213_045936410][][EXCEPTION] [DEBUG]  [NLS_TERRITORY]:[AMERICA]
    [090213_045936410][][EXCEPTION] [DEBUG]  [FND_JDBC_PLSQL_RESET]:[false]
    [090213_045936410][][EXCEPTION] [DEBUG]  [FND_JDBC_CONTEXT_CHECK]:[true]
    [090213_045936418][][EXCEPTION] [DEBUG]  [NLS_DATE_FORMAT]:[DD-MON-RR]
    [090213_045936418][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_DECAY_SIZE]:[5]
    [090213_045936418][][EXCEPTION] [DEBUG] [FND_JDBC_IDLE_THRESHOLD.HIGH]:[-1]
    [090213_045936418][][EXCEPTION] [DEBUG]  [NLS_SORT]:[BINARY]
    [090213_045936418][][EXCEPTION] [DEBUG]  [NLS_DATE_LANGUAGE]:[AMERICAN]
    [090213_045936419][][EXCEPTION] [DEBUG]  [LOGIN_ID]:[-1]
    [090213_045936419][][EXCEPTION] [DEBUG] ------- Properties stored in Java System Properties -------
    [090213_045936419][][EXCEPTION] [DEBUG] [APPLTMP]:[/u03/ORIDEMO/LIVE_APPL/livecomn/temp]
    [090213_045936419][][EXCEPTION] [DEBUG]  [java.runtime.name]:[Java(TM) 2 Runtime Environment, Standard Edition]
    [090213_045936419][][EXCEPTION] [DEBUG]  [sun.boot.library.path]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/i386]
    [090213_045936419][][EXCEPTION] [DEBUG]  [java.vm.version]:[1.4.2_04-b05]
    [090213_045936419][][EXCEPTION] [DEBUG]  [OVERRIDE_DBC]:[true]
    [090213_045936419][][EXCEPTION] [DEBUG] [dbcfile]:[/u03/ORIDEMO/LIVE_APPL/liveappl/fnd/11.5.0/secure/ORIDEMO_demo/oridemo.dbc]
    [090213_045936419][][EXCEPTION] [DEBUG]  [java.vm.vendor]:[Sun Microsystems Inc.]
    [090213_045936420][][EXCEPTION] [DEBUG]  [java.vendor.url]:[http://java.sun.com/]
    [090213_045936420][][EXCEPTION] [DEBUG]  [path.separator]:[:]
    [090213_045936420][][EXCEPTION] [DEBUG] [APPLCSF]:[/u03/ORIDEMO/LIVE_APPL/livecomn/admin]
    [090213_045936420][][EXCEPTION] [DEBUG]  [java.vm.name]:[Java HotSpot(TM) Client VM]
    [090213_045936420][][EXCEPTION] [DEBUG]  [file.encoding.pkg]:[sun.io]
    [090213_045936420][][EXCEPTION] [DEBUG]  [user.country]:[US]
    [090213_045936420][][EXCEPTION] [DEBUG]  [sun.os.patch.level]:[unknown]
    [090213_045936420][][EXCEPTION] [DEBUG] [java.vm.specification.name]:[Java Virtual Machine Specification]
    [090213_045936421][][EXCEPTION] [DEBUG] [user.dir]:[/u03/ORIDEMO/LIVE_APPL/livecomn/admin/log/ORIDEMO_demo]
    [090213_045936421][][EXCEPTION] [DEBUG] [java.runtime.version]:[1.4.2_04-b05]
    [090213_045936421][][EXCEPTION] [DEBUG] [java.awt.graphicsenv]:[sun.awt.X11GraphicsEnvironment]
    [090213_045936421][][EXCEPTION] [DEBUG] [java.endorsed.dirs]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/endorsed]
    [090213_045936421][][EXCEPTION] [DEBUG]  [os.arch]:[i386]
    [090213_045936421][][EXCEPTION] [DEBUG] [JTFDBCFILE]:[/u03/ORIDEMO/LIVE_APPL/liveappl/fnd/11.5.0/secure/ORIDEMO_demo/oridemo.dbc]
    [090213_045936421][][EXCEPTION] [DEBUG]  [java.io.tmpdir]:[/tmp]
    [090213_045936422][][EXCEPTION] [DEBUG]  [line.separator]:[
    [090213_045936422][][EXCEPTION] [DEBUG] [java.vm.specification.vendor]:[Sun Microsystems Inc.]
    [090213_045936422][][EXCEPTION] [DEBUG]  [os.name]:[Linux]
    [090213_045936422][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MIN]:[1]
    [090213_045936422][][EXCEPTION] [DEBUG]  [cpid]:[2984174]
    [090213_045936422][][EXCEPTION] [DEBUG]  [sun.java2d.fontpath]:[]
    [090213_045936423][][EXCEPTION] [DEBUG] [java.library.path]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/i386/client:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/i386:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/../lib/i386:/u03/ORIDEMO/LIVE_APPL/liveora/iAS/lib:/u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/network/jre11/lib/i686/native_threads:/u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/network/jre11/lib/linux/native_threads:/u03/ORIDEMO/LIVE_APPL/liveappl/cz/11.5.0/bin:/u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/lib:/usr/X11R6/lib:/usr/openwin/lib]
    [090213_045936423][][EXCEPTION] [DEBUG]  [java.specification.name]:[Java Platform API Specification]
    [090213_045936423][][EXCEPTION] [DEBUG]  [java.class.version]:[48.0]
    [090213_045936423][][EXCEPTION] [DEBUG] [java.util.prefs.PreferencesFactory]:[java.util.prefs.FileSystemPreferencesFactory]
    [090213_045936423][][EXCEPTION] [DEBUG]  [os.version]:[2.6.9-82.ELsmp]
    [090213_045936424][][EXCEPTION] [DEBUG]  [LONG_RUNNING_JVM]:[true]
    [090213_045936424][][EXCEPTION] [DEBUG]  [user.home]:[/home/appdemo]
    [090213_045936424][][EXCEPTION] [DEBUG]  [user.timezone]:[GMT+05:30]
    [090213_045936424][][EXCEPTION] [DEBUG] [java.awt.printerjob]:[sun.print.PSPrinterJob]
    [090213_045936424][][EXCEPTION] [DEBUG]  [file.encoding]:[ANSI_X3.4-1968]
    [090213_045936424][][EXCEPTION] [DEBUG]  [java.specification.version]:[1.4]
    [090213_045936424][][EXCEPTION] [DEBUG]  [CACHEMODE]:[DISTRIBUTED]
    [090213_045936424][][EXCEPTION] [DEBUG] [java.class.path]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/java/appsborg2.zip:/u03/ORIDEMO/LIVE_APPL/livecomn/java/apps.zip:/u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/forms60/java:/u03/ORIDEMO/LIVE_APPL/livecomn/java]
    [090213_045936424][][EXCEPTION] [DEBUG]  [user.name]:[appdemo]
    [090213_045936424][][EXCEPTION] [DEBUG] [DBCFILE]:[/u03/ORIDEMO/LIVE_APPL/liveappl/fnd/11.5.0/secure/ORIDEMO_demo/oridemo.dbc]
    [090213_045936425][][EXCEPTION] [DEBUG] [java.vm.specification.version]:[1.0]
    [090213_045936425][][EXCEPTION] [DEBUG] [java.home]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre]
    [090213_045936425][][EXCEPTION] [DEBUG]  [sun.arch.data.model]:[32]
    [090213_045936425][][EXCEPTION] [DEBUG]  [user.language]:[en]
    [090213_045936425][][EXCEPTION] [DEBUG]  [java.specification.vendor]:[Sun Microsystems Inc.]
    [090213_045936425][][EXCEPTION] [DEBUG]  [java.vm.info]:[mixed mode]
    [090213_045936425][][EXCEPTION] [DEBUG] [logfile]:[/u03/ORIDEMO/LIVE_APPL/livecomn/admin/log/ORIDEMO_demo/FNDOPP2984174.txt]
    [090213_045936425][][EXCEPTION] [DEBUG]  [java.version]:[1.4.2_04]
    [090213_045936425][][EXCEPTION] [DEBUG] [java.ext.dirs]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/ext]
    [090213_045936426][][EXCEPTION] [DEBUG] [sun.boot.class.path]:[/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/i18n.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/sunrsasign.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/jsse.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/jce.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u03/ORIDEMO/LIVE_APPL/livecomn/util/java/1.4/j2sdk1.4.2_04/jre/classes]
    [090213_045936426][][EXCEPTION] [DEBUG]  [java.vendor]:[Sun Microsystems Inc.]
    [090213_045936426][][EXCEPTION] [DEBUG]  [FND_JDBC_BUFFER_MAX]:[2]
    [090213_045936426][][EXCEPTION] [DEBUG]  [file.separator]:[/]
    [090213_045936426][][EXCEPTION] [DEBUG] [java.vendor.url.bug]:[http://java.sun.com/cgi-bin/bugreport.cgi]
    [090213_045936426][][EXCEPTION] [DEBUG] [sun.io.unicode.encoding]:[UnicodeLittle]
    [090213_045936426][][EXCEPTION] [DEBUG]  [sun.cpu.endian]:[little]
    [090213_045936426][][EXCEPTION] [DEBUG]  [APPLOUT]:[out/ORIDEMO_demo]
    [090213_045936427][][EXCEPTION] [DEBUG]  [sun.cpu.isalist]:[]
    [9/2/13 4:59:40 PM] [UNEXPECTED] [2984174:RT21672063] java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:517)
            at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:224)
            at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:177)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
            at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1657)
            at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5888)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
            at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:247)
            at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:153)
    Caused by: java.io.UnsupportedEncodingException: &Encoding
            at sun.io.Converters.getConverterClass(Converters.java:215)
            at sun.io.Converters.newConverter(Converters.java:248)
            at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:64)
            at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:223)
            at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:209)
            at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:76)
            at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
            at oracle.xdo.parser.v2.XMLReader.setEncoding(XMLReader.java:848)
            at oracle.xdo.parser.v2.XMLReader.checkXMLDecl(XMLReader.java:2718)
            at oracle.xdo.parser.v2.XMLReader.pushXMLReader(XMLReader.java:471)
            at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:263)
            ... 17 more
    [9/2/13 4:59:40 PM] [2984174:RT21672063] Completed post-processing actions for request 21672063.
    [9/2/13 5:10:51 PM] [OPPServiceThread1] Post-processing request 21672114.
    [9/2/13 5:10:51 PM] [2984174:RT21672114] Executing post-processing actions for request 21672114.
    [9/2/13 5:10:51 PM] [2984174:RT21672114] Starting XML Publisher post-processing action.
    [9/2/13 5:10:51 PM] [2984174:RT21672114]
    Template code: PURCHASE_REGISTER_ITEMWISE
    Template app:  CONA
    Language:      en
    Territory:     00
    Output type:   PDF
    [9/2/13 5:10:51 PM] [UNEXPECTED] [2984174:RT21672114] java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:517)
            at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:224)
            at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:177)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
            at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
            at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1657)
            at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:967)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5888)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3438)
            at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3527)
            at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:247)
            at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:153)
    Caused by: java.io.UnsupportedEncodingException: &Encoding
            at sun.io.Converters.getConverterClass(Converters.java:215)
            at sun.io.Converters.newConverter(Converters.java:248)
            at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:64)
            at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:223)
            at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:209)
            at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:76)
            at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
            at oracle.xdo.parser.v2.XMLReader.setEncoding(XMLReader.java:848)
            at oracle.xdo.parser.v2.XMLReader.checkXMLDecl(XMLReader.java:2718)
            at oracle.xdo.parser.v2.XMLReader.pushXMLReader(XMLReader.java:471)
            at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:263)
            ... 17 more
    [9/2/13 5:10:51 PM] [2984174:RT21672114] Completed post-processing actions for request 21672114.
    thaks
    pritesh

    hi experts
    thanks for ur replay,
    this issue is occured with only the particular request and this is custom report. i try some step
    down the manager run the cmclean.sql, increease the  processes of output postprocessor but not get the any type of effect on issue...
    and also follow the step that describe in the below doc:
    Output Post Processor (OPP) Log Contains Error "oracle.xdo.parser.v2.XMLParseException: Unexpected EOF" (Doc ID 1273272.1)
    To Bottom
    request log file details below:
    +---------------------------------------------------------------------------+
    CONA Custom: Version : UNKNOWN - Development
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    PURCHASE_REGISTER_ITEMWISE module: Ori - Purchase Register - Item wise (15x12)
    +---------------------------------------------------------------------------+
    Current system time is 02-SEP-2013 17:10:29
    +---------------------------------------------------------------------------+
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    P_SEGM='02'
    P_CHART_OF_ACCOUNTS_ID='50268'
    p_from_date='2012/04/01 00:00:00'
    p_to_date='2012/04/05 00:00:00'
    P_YES_NO='No'
    XML_REPORTS_XENVIRONMENT is :
    /u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /u03/ORIDEMO/LIVE_APPL/liveora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    _AMERICA.UTF8
    Report Builder: Release 6.0.8.25.0 - Production on Mon Sep 2 17:10:29 2013
    (c) Copyright 1999 Oracle Corporation.  All rights reserved.
    Enter Username:
    +---------------------------------------------------------------------------+
    Start of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    +---------------------------------------------------------------------------+
    End of log messages from FND_FILE
    +---------------------------------------------------------------------------+
    +---------------------------------------------------------------------------+
    Executing request completion options...
    +------------- 1) PUBLISH -------------+
    Beginning post-processing of request 21672114 on node DEMO at 02-SEP-2013 17:10:51.
    Post-processing of request 21672114 failed at 02-SEP-2013 17:10:51 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    +--------------------------------------+
    +------------- 2) PRINT   -------------+
    +--------------------------------------+
    Finished executing request completion options.
    +---------------------------------------------------------------------------+
    Concurrent request completed
    Current system time is 02-SEP-2013 17:10:52
    +---------------------------------------------------------------------------+
    i check the document that u all suggest above after that i update u as soon as possible..
    thanks & regards
    pritesh ranjan

  • XML Publisher post-processing error 'java.io.FileNotFoundException'

    Hi,
    We are getting following XML Publisher post-processing error while running XML Publisher report.
    It was working earlier but suddenly its erroring out.
    [9/07/10 9:00:17 PM] [OPPServiceThread1] Post-processing request 559655.
    [9/07/10 9:00:18 PM] [39177:RT559655] Executing post-processing actions for request 559655.
    [9/07/10 9:00:18 PM] [39177:RT559655] Starting XML Publisher post-processing action.
    [9/07/10 9:00:18 PM] [39177:RT559655]
    Template code: XXHPOXPRRFLR
    Template app: XXH
    Language: en
    Territory: 00
    Output type: PDF
    [9/07/10 9:00:18 PM] [UNEXPECTED] [39177:RT559655] java.io.FileNotFoundException: /apps/oracle/DEV/inst/apps/DEV_hlt439erplap001/logs/appl/conc/out/o559655.out (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:274)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:173)
    [9/07/10 9:00:18 PM] [39177:RT559655] Completed post-processing actions for request 559655.
    Please help me out to resolve this issue.
    Thanks & Regards,
    Sagarika

    Hi,
    java.io.FileNotFoundException: /apps/oracle/DEV/inst/apps/DEV_hlt439erplap001/logs/appl/conc/out/o559655.out (No such file or directory)Most probably this file is not created (since no changes have been done recently, so definitely it is not a permission issue), and if there are any log files generate at the client side it should help in investigating the issue.
    Thanks,
    Hussein

  • Sql upgrade 2000 to 2005 post processing error

    Dear People,
    I have successfully upgraded sql from 2000 to 2005 and im doing the post processing steps for upgrade using the sql tool and im getting error at the step " creare sap stored procedure" .im pasting the error messages below.
    <b>dev_w0</b>
    RROR: schema user dcb has administrator fixed server role (user_name() is 'dbo').
    C         This is not allowed.  Please check the Server Roles of user dcb.
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1426]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10283]

    sapinst_dev.log<b></b>
    ERROR      2007-12-04 10:54:48.62 [iaxxgenimp.cpp:731]
               showDialog()
    FCO-00011  The step ExeProcs with step key |SAPMSSTOOLS|ind|ind|ind|ind|0|0|MssSysCopy|ind|ind|ind|ind|4|0|MssProcs|ind|ind|ind|ind|4|0|ExeProcs was executed with status ERROR .
    ERROR      2007-12-04 10:54:48.62
               lib=iamodmssql module=CIaNtMssDmo
    MDB-05053  Errors when executing sql command: [Microsoft][ODBC SQL Server Driver][SQL Server]SELECT permission denied on object 'MSSSOURCE', database 'DCB', schema 'dcb'.
    <p> SOLUTION: If this message is displayed as a warning, you can ignore it. If this is an error, contact SAP support.</p>
    regards
    raj

    hi siddesh,
    i also get the following errors in sql,this could be the main reason
    1.Msg 15157, Level 16, State 1, Line 1
    Setuser failed because of one of the following reasons: the database principal 'dcb' does not exist, its corresponding server principal does not have server access, this type of database principal cannot be impersonated, or you do not have permission.
    Msg 229, Level 14, State 5, Procedure sap_droproc, Line 56
    SELECT permission denied on object 'sysobjects', database 'mssqlsystemresource', schema 'sys'.
    Msg 229, Level 14, State 5, Procedure sap_droproc, Line 60
    SELECT permission denied on object 'sysobjects', database 'mssqlsystemresource', schema 'sys'.
    Msg 208, Level 16, State 0, Procedure sap_droproc, Line 65
    Invalid object name '#allnames
    trc file: "dev_disp", trc level: 1, release: "700"
    sysno      00
    sid        DCB
    systemid   560 (PC with Windows NT)
    relno      7000
    patchlevel 0
    patchno    111
    intno      20050900
    make:      multithreaded, ASCII, optimized
    pid        3236
    Wed Dec 05 12:07:00 2007
    kernel runs with dp version 229(ext=109) (@(#) DPLIB-INT-VERSION-229)
    length of sys_adm_ext is 364 bytes
    SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 3236) [dpxxdisp.c   1239]
         shared lib "dw_xml.dll" version 111 successfully loaded
         shared lib "dw_xtc.dll" version 111 successfully loaded
         shared lib "dw_stl.dll" version 111 successfully loaded
         shared lib "dw_gui.dll" version 111 successfully loaded
         shared lib "dw_mdm.dll" version 111 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Wed Dec 05 12:07:04 2007
    WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 4 seconds
    ***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  5361]
    MtxInit: 30000 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
    DpIPCInit2: start server >voyager_DCB_00                          <
    DpShMCreate: sizeof(wp_adm)          11808     (908)
    DpShMCreate: sizeof(tm_adm)          3605136     (17936)
    DpShMCreate: sizeof(wp_ca_adm)          18000     (60)
    DpShMCreate: sizeof(appc_ca_adm)     6000     (60)
    DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528040/528048
    DpShMCreate: sizeof(comm_adm)          528048     (1048)
    DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    DpShMCreate: sizeof(slock_adm)          0     (96)
    DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    DpShMCreate: sizeof(file_adm)          0     (72)
    DpShMCreate: sizeof(vmc_adm)          0     (1296)
    DpShMCreate: sizeof(wall_adm)          (22440/34344/56/100)
    DpShMCreate: sizeof(gw_adm)     48
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 05CB0040, size: 4232896)
    DpShMCreate: allocated sys_adm at 05CB0040
    DpShMCreate: allocated wp_adm at 05CB1B30
    DpShMCreate: allocated tm_adm_list at 05CB4950
    DpShMCreate: allocated tm_adm at 05CB4980
    DpShMCreate: allocated wp_ca_adm at 06024C10
    DpShMCreate: allocated appc_ca_adm at 06029260
    DpShMCreate: allocated comm_adm at 0602A9D0
    DpShMCreate: system runs without slock table
    DpShMCreate: system runs without file table
    DpShMCreate: allocated vmc_adm_list at 060AB880
    DpShMCreate: allocated gw_adm at 060AB8C0
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated ca_info at 060AB8F0
    DpShMCreate: allocated wall_adm at 060AB8F8
    Wed Dec 05 12:07:05 2007
    MBUF state OFF
    DpCommInitTable: init table for 500 entries
    EmInit: MmSetImplementation( 2 ).
    MM global diagnostic options set: 0
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation view
    <EsNT> Using memory model view.
    <EsNT> Memory Reset disabled as NT default
    <ES> 511 blocks reserved for free list.
    ES initialized.
    rdisp/http_min_wait_dia_wp : 1 -> 1
    ***LOG Q0K=> DpMsAttach, mscon ( voyager) [dpxxdisp.c   11753]
    DpStartStopMsg: send start message (myname is >voyager_DCB_00                          <)
    DpStartStopMsg: start msg sent
    CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    CCMS: Initalizing shared memory of size 40000000 for monitoring segment.
    CCMS: start to initalize 3.X shared alert area (first segment).
    DpMsgAdmin: Set release to 7000, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   1050]
    DpMsgAdmin: Set patchno for this platform to 111
    Release check o.K.
    Wed Dec 05 12:07:45 2007
    ERROR => W0 (pid 2840) died [dpxxdisp.c   14441]
    ERROR => W1 (pid 2844) died [dpxxdisp.c   14441]
    ERROR => W2 (pid 1904) died [dpxxdisp.c   14441]
    ERROR => W3 (pid 3308) died [dpxxdisp.c   14441]
    ERROR => W4 (pid 4056) died [dpxxdisp.c   14441]
    ERROR => W5 (pid 4088) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xbf --> 0xbe
    ERROR => W6 (pid 1244) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xbe --> 0xbc
    ERROR => W7 (pid 2888) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xbc --> 0xb8
    ERROR => W8 (pid 2932) died [dpxxdisp.c   14441]
    ERROR => W9 (pid 2892) died [dpxxdisp.c   14441]
    ERROR => W10 (pid 3116) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xb8 --> 0xb0
    ERROR => W11 (pid 2096) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xb0 --> 0xa0
    ERROR => W12 (pid 2480) died [dpxxdisp.c   14441]
    my types changed after wp death/restart 0xa0 --> 0x80
    DP_FATAL_ERROR => DpWPCheck: no more work processes
    DISPATCHER EMERGENCY SHUTDOWN ***
    increase tracelevel of WPs
    NiWait: sleep (10000ms) ...
    NiISelect: timeout 10000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:07:55 2007
    NiISelect: TIMEOUT occured (10000ms)
    dump system status
    Workprocess Table (long)               Wed Dec 05 12:07:55 2007
    ========================
    No Ty. Pid      Status  Cause Start Err Sem CPU    Time  Program          Cl  User         Action                    Table
    0 DIA     2840 Ended         no      1   0        0                                                                         
    1 DIA     2844 Ended         no      1   0        0                                                                         
    2 DIA     1904 Ended         no      1   0        0                                                                         
    3 DIA     3308 Ended         no      1   0        0                                                                         
    4 DIA     4056 Ended         no      1   0        0                                                                         
    5 DIA     4088 Ended         no      1   0        0                                                                         
    6 UPD     1244 Ended         no      1   0        0                                                                         
    7 ENQ     2888 Ended         no      1   0        0                                                                         
    8 BTC     2932 Ended         no      1   0        0                                                                         
    9 BTC     2892 Ended         no      1   0        0                                                                         
    10 BTC     3116 Ended         no      1   0        0                                                                         
    11 SPO     2096 Ended         no      1   0        0                                                                         
    12 UP2     2480 Ended         no      1   0        0                                                                         
    Dispatcher Queue Statistics               Wed Dec 05 12:07:55 2007
    ===========================
    --------++++--
    +
    Typ
    now
    high
    max
    writes
    reads
    --------++++--
    +
    NOWP
    0
    2
    2000
    6
    6
    --------++++--
    +
    DIA
    5
    5
    2000
    5
    0
    --------++++--
    +
    UPD
    0
    0
    2000
    0
    0
    --------++++--
    +
    ENQ
    0
    0
    2000
    0
    0
    --------++++--
    +
    BTC
    0
    0
    2000
    0
    0
    --------++++--
    +
    SPO
    0
    0
    2000
    0
    0
    --------++++--
    +
    UP2
    0
    0
    2000
    0
    0
    --------++++--
    +
    max_rq_id          12
    wake_evt_udp_now     0
    wake events           total     8,  udp     7 ( 87%),  shm     1 ( 12%)
    since last update     total     8,  udp     7 ( 87%),  shm     1 ( 12%)
    Dump of tm_adm structure:               Wed Dec 05 12:07:55 2007
    =========================
    Term    uid  man user    term   lastop  mod wp  ta   a/i (modes)
    Workprocess Comm. Area Blocks               Wed Dec 05 12:07:55 2007
    =============================
    Slots: 300, Used: 1, Max: 0
    --------++--
    +
    id
    owner
    pid
    eyecatcher
    --------++--
    +
    0
    DISPATCHER
    -1
    WPCAAD000
    NiWait: sleep (5000ms) ...
    NiISelect: timeout 5000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:00 2007
    NiISelect: TIMEOUT occured (5000ms)
    DpHalt: shutdown server >voyager_DCB_00                          < (normal)
    DpJ2eeDisableRestart
    DpModState: buffer in state MBUF_PREPARED
    NiBufSend starting
    NiIWrite: hdl 2 sent data (wrt=110,pac=1,MESG_IO)
    MsINiWrite: sent 110 bytes
    MsIModState: change state to SHUTDOWN
    DpModState: change server state from STARTING to SHUTDOWN
    Switch off Shared memory profiling
    ShmProtect( 57, 3 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RW
    ShmProtect( 57, 1 )
    ShmProtect(SHM_PROFILE, SHM_PROT_RD
    DpWakeUpWps: wake up all wp's
    Stop work processes
    Stop gateway
    killing process (1680) (SOFT_KILL)
    Stop icman
    killing process (2612) (SOFT_KILL)
    Terminate gui connections
    wait for end of work processes
    wait for end of gateway
    [DpProcDied] Process lives  (PID:1680  HANDLE:1608)
    waiting for termination of gateway ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:01 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process died  (PID:1680  HANDLE:1608)
    wait for end of icman
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:02 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:03 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:04 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:05 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:06 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:07 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:08 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:09 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:10 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:11 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process lives  (PID:2612  HANDLE:1612)
    waiting for termination of icman ...
    NiWait: sleep (1000ms) ...
    NiISelect: timeout 1000ms
    NiISelect: maximum fd=1637
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Wed Dec 05 12:08:12 2007
    NiISelect: TIMEOUT occured (1000ms)
    [DpProcDied] Process died  (PID:2612  HANDLE:1612)
    DpStartStopMsg: send stop message (myname is >voyager_DCB_00                          <)
    NiIMyHostName: hostname = 'voyager'
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 4 (AD_STARTSTOP), ser 0, ex 0, errno 0
    DpConvertRequest: net size = 189 bytes
    NiBufSend starting
    NiIWrite: hdl 2 sent data (wrt=562,pac=1,MESG_IO)
    MsINiWrite: sent 562 bytes
    send msg (len 110+452) to name                    -, type 4, key -
    DpStartStopMsg: stop msg sent
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 received data (rcd=274,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=274
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 274 bytes
    MSG received, len 110+164, flag 1, from MSG_SERVER          , typ 0, key -
    DpHalt: received 164 bytes from message server
    NiIRead: hdl 2 recv would block (errno=EAGAIN)
    NiIRead: read for hdl 2 timed out (0ms)
    DpHalt: no more messages from the message server
    DpHalt: send keepalive to synchronize with the message server
    NiBufSend starting
    NiIWrite: hdl 2 sent data (wrt=114,pac=1,MESG_IO)
    MsINiWrite: sent 114 bytes
    send msg (len 110+4) to name           MSG_SERVER, type 0, key -
    MsSndName: MS_NOOP ok
    Send 4 bytes to MSG_SERVER
    NiIRead: hdl 2 received data (rcd=114,pac=1,MESG_IO)
    NiBufIIn: NIBUF len=114
    NiBufIIn: packet complete for hdl 2
    NiBufReceive starting
    MsINiRead: received 114 bytes
    MSG received, len 110+4, flag 3, from MSG_SERVER          , typ 0, key -
    Received 4 bytes from MSG_SERVER                             
    Received opcode MS_NOOP from msg_server, reply MSOP_OK
    MsOpReceive: ok
    MsSendKeepalive : keepalive sent to message server
    NiIRead: hdl 2 recv would block (errno=EAGAIN)
    Wed Dec 05 12:08:13 2007
    NiIPeek: peek for hdl 2 timed out (r; 1000ms)
    NiIRead: read for hdl 2 timed out (1000ms)
    DpHalt: no more messages from the message server
    DpHalt: sync with message server o.k.
    detach from message server
    ***LOG Q0M=> DpMsDetach, ms_detach () [dpxxdisp.c   12099]
    NiBufSend starting
    NiIWrite: hdl 2 sent data (wrt=110,pac=1,MESG_IO)
    MsINiWrite: sent 110 bytes
    MsIDetach: send logout to msg_server
    MsIDetach: call exit function
    DpMsShutdownHook called
    NiBufISelUpdate: new MODE -- (r-) for hdl 2 in set0
    SiSelNSet: set events of sock 1548 to: ---
    NiBufISelRemove: remove hdl 2 from set0
    SiSelNRemove: removed sock 1548 (pos=2)
    SiSelNRemove: removed sock 1548
    NiSelIRemove: removed hdl 2
    MBUF state OFF
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    blks_in_queue/wp_ca_blk_no/wp_max_no = 1/300/13
    LOCK WP ca_blk 1
    make DISP owner of wp_ca_blk 1
    DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 15)
    MBUF component DOWN
    NiICloseHandle: shutdown and close hdl 2 / sock 1548
    NiBufIClose: clear extension for hdl 2
    MsIDetach: detach MS-system
    cleanup EM
    EsCleanup ....
    EmCleanup() -> 0
    Es2Cleanup: Cleanup ES2
    ***LOG Q05=> DpHalt, DPStop ( 3236) [dpxxdisp.c   10371]
    Good Bye .....

  • Bug in sqlserver 2014 long processing time in query optimizer for complex query. With compatibility set to 2012, everything is quick.

    Believe the bug to be related to the new cardinality estimator. In my case joining 7 tables it took 4 seconds to see the query execution plan, with 8 tables it took 1 minute and with 9 tables 15
    minutes! the actual processing of the query plan was sub second. (each table has only two records...)
    It looks as if there is a workload in the cardinality estimator that escalates as the number of tables and join columns increases.
    We have a number of these queries in our application and the bug is a showstopper for our customers. They will have to set compatibility level to 110 (sqlserver 2012) to run the app. Then they should
    probably not upgrade from 2012...
    Is this a known bug? What is the bug number? How can I follow the bug to see when it is fixed?
      Here is my testcase: (first building tables and data, and then the query with some comments. A version spending 15 minutes in the optimizer, takes 0 seconds to complete with the hint "option (QUERYTRACEON 9481) ".  we can't use this
    hint in the application because no dba will allow an application like ours to run as sysadmin...
    SCRIPT:
    -- Example has one table containing 25 rows. another containing 2 rows. 
    -- The one with two rows is joined in several times. 
    -- In the original query each of these joins were to separate tables. 
    -- I use this simplification because it makes it easier to build the testcase.
    ------------  CREATE TEST CASE   ----------
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[oleclient](
    [acc_f_agio] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_f_dag] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_notes_ap] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_notes_ar] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_per_cost] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_per_inc] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_reverse] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_undec_ap] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_undec_ar] [varchar](25) NOT NULL DEFAULT (' '),
    [acc_vat_pay] [varchar](25) NOT NULL DEFAULT (' '),
    [attr_id_balance] [varchar](4) NOT NULL DEFAULT (' '),
    [bal_acc_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [bal_acc_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [balance_acc] [varchar](25) NOT NULL DEFAULT (' '),
    [bank_fee_acc] [varchar](25) NOT NULL DEFAULT (' '),
    [bflag] [int] NOT NULL DEFAULT ((0)),
    [client] [varchar](25) NOT NULL DEFAULT (' '),
    [client_name] [varchar](255) NOT NULL DEFAULT (' '),
    [comp_reg_no] [varchar](25) NOT NULL DEFAULT (' '),
    [compress_flag] [tinyint] NOT NULL DEFAULT ((0)),
    [country] [varchar](255) NOT NULL DEFAULT (' '),
    [country_code] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_client] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_item] [tinyint] NOT NULL DEFAULT ((0)),
    [cur_type] [varchar](25) NOT NULL DEFAULT (' '),
    [cur_type_tri] [varchar](25) NOT NULL DEFAULT (' '),
    [curr_period] [int] NOT NULL DEFAULT ((0)),
    [currency] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_tri] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [currency_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_acc_v2] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_acc_v3] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_account] [varchar](25) NOT NULL DEFAULT (' '),
    [diff_chk_v2] [tinyint] NOT NULL DEFAULT ((0)),
    [diff_chk_v3] [tinyint] NOT NULL DEFAULT ((0)),
    [dim_v2_type] [varchar](25) NOT NULL DEFAULT (' '),
    [dim_v3_type] [varchar](25) NOT NULL DEFAULT (' '),
    [employer_id] [varchar](12) NOT NULL DEFAULT (' '),
    [header] [varchar](30) NOT NULL DEFAULT (' '),
    [header2] [varchar](30) NOT NULL DEFAULT (' '),
    [headquarter] [varchar](25) NOT NULL DEFAULT (' '),
    [language] [varchar](2) NOT NULL DEFAULT (' '),
    [last_update] [datetime] NOT NULL DEFAULT (CONVERT([datetime],'19000101 00:00:00:000',(9))),
    [leg_act_cli] [varchar](25) NOT NULL DEFAULT (' '),
    [max_inv_diff] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_inv_diff_v2] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_inv_diff_v3] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff_v2] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [max_pay_diff_v3] [decimal](28, 3) NOT NULL DEFAULT ((0.0)),
    [municipal] [varchar](25) NOT NULL DEFAULT (' '),
    [overrun_pct] [decimal](28, 8) NOT NULL DEFAULT ((0.0)),
    [pay_client] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_diff_acc_g] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_diff_acc_l] [varchar](25) NOT NULL DEFAULT (' '),
    [pay_ref] [varchar](25) NOT NULL DEFAULT (' '),
    [period_no] [smallint] NOT NULL DEFAULT ((0)),
    [remind_ref] [varchar](20) NOT NULL DEFAULT (' '),
    [rev_vat_disc_ap] [tinyint] NOT NULL DEFAULT ((0)),
    [rev_vat_disc_ar] [tinyint] NOT NULL DEFAULT ((0)),
    [sys_setup_code] [varchar](2) NOT NULL DEFAULT (' '),
    [tax_office_no] [varchar](50) NOT NULL DEFAULT (' '),
    [tax_office_ref] [varchar](20) NOT NULL DEFAULT (' '),
    [tax_system] [varchar](25) NOT NULL DEFAULT (' '),
    [user_id] [varchar](25) NOT NULL DEFAULT (' '),
    [vat_reg_no] [varchar](25) NOT NULL DEFAULT (' '),
    [agrtid] [bigint] IDENTITY(1,1) NOT NULL,
    UNIQUE NONCLUSTERED 
    [agrtid] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
      ('8081','8181',' ',' ','2442','1481','9998',' ',' ','1320',' ','9998',' ',' ','8110','0','UK','Agresso Demo UK','987654321012','0','United Kingdom','GB','UK','1','1','EU','200409','GBP','EUR','EUR','USD','9998','9998','9998','1','0','EU','$',' ','Agresso
    demo','Corporate Office','NO','EN','2004-09-27 12:39:00.000','UK',0.020,0.000,0.000,0.100,0.000,0.000,'0301',0.00000000,'UK','9998','9998','Jim Smith','12','Mike Anderson','0','0','EN','Bristol Brunel','V123/123',' ','JOSUTTON','123456789101');
    insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
       ('8060','8160',' ',' ','2960','1480','1490',' ',' ',' ',' ',' ',' ',' ','7770','0','N1','N1 - Énklient','971332421','0','Norway','NO','N1','0','1',' ','200701','NOK',' ','EUR',' ',' ',' ','9999','0','0','E',' ','971332421','Agresso Demo Norge (NO)','Agresso
    Demo Norge (NO)','NO','NO','2007-01-26 08:31:00.000','N1',0.050,0.000,0.000,0.500,0.000,0.000,'0301',5.00000000,'N1','9999','9999',' ','12',' ','0','0','NO',' ',' ',' ','SYSNO','971332421');
    insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
     ('900000','900000',' ',' ',' ',' ','900100',' ',' ',' ',' ',' ',' ',' ','470000','0','BE','DEMO Belgie',' ','0','Belgium','BE','BE','0','1',' ','200208','EUR',' ','USD','GBP',' ',' ','900100','0','0','2','3',' ',' ','Agresso Business World','BE','EN','2005-11-18
    17:07:00.000','BE',0.050,0.000,0.000,0.050,0.000,0.000,'2018',0.00000000,'BE','900100','900100',' ','12',' ','0','0','BT',' ',' ',' ','SYSBE','BE461149381');
      insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8030','8040',' ',' ','1250','2450','9998',' ',' ',' ',' ',' ',' ',' ','8060','0','A99','Seneca N.V. - Reporting / Intellagent',' ','0',' ','NL','A99','0','1',' ','201105','EUR',' ','USD',' ',' ',' ','9998','0','0','2',' ',' ','Seneca N.V. - Report / Intell','Seneca
    N.V. - Report / Intell','A01','EN','2011-05-19 12:19:59.000','A99',0.010,0.000,0.000,5.000,0.000,0.000,' ',0.00000000,'A99','9998','9998',' ','12',' ','0','0','EN',' ',' ',' ','SYSTEM',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('766000','666000','445860','445870','486000','487000',' ','445806','445807','445806',' ',' ','DEVISES',' ',' ','3','FR','Agresso Demo France',' ','0','France','FR','FR','1','1','1','200509','EUR','EUR',' ','FRF',' ','DEVISES','471000','0','1',' ','1',' ','Agresso
    demo France','Agresso demo France','FR','FR','2005-08-30 09:27:00.000','FR',0.100,0.000,0.500,10.000,0.000,0.000,'92',0.00000000,'FR',' ',' ',' ','12',' ','0','0','FR',' ',' ',' ','SYSFR','FR12345678');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ','9999',' ',' ',' ',' ',' ',' ',' ',' ','0','AU','Agresso Australia','123456789','0','Australia','AU','AU','0','1',' ','200708','AUD',' ',' ',' ',' ',' ','9999','0','0',' ',' ',' ','Agresso demo Australia','Corporate Office','AU','AU','2007-04-19
    12:40:00.000','AU',0.000,0.000,0.000,0.000,0.000,0.000,' ',0.00000000,'AU','9999','9999',' ','12',' ','0','0','AU',' ',' ',' ','SYSAU','123456789')
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8060','8160',' ',' ','2960','1480','1490',' ',' ',' ',' ',' ',' ',' ','7770','0','NO','Agresso Demo Norge (NO)','971332425','0','Norway','NO','NO','0','1',' ','201401','NOK',' ','EUR',' ',' ',' ','9999','0','0','E',' ','971332425','Agresso Demo Norge (NO)','Agresso
    Demo Norge (NO)','NO','NO','2014-01-11 12:34:54.000','NO',0.050,0.000,0.000,0.500,0.000,0.000,'0301',5.00000000,'NO','9999','9999',' ','12',' ','0','0','NO',' ',' ',' ','SYSNO','971332425');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('9999','9999',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','9999','0','SF','Agresso Demo SF',' ','0','Finland','SF','SF','0',' ',' ','0','FIM',' ',' ',' ',' ',' ','9999','0','0',' ',' ',' ','Agresso Demo','Hovedkontoret','SF','SE','1996-01-18 03:25:00.000','SF',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'SF','9999','9999',' ','12',' ','0','0','SF',' ',' ',' ','SYSTEM',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','US','Agresso Demo Corp.',' ','0',' ','US','US','1',' ',' ','199702','USD',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ','Agresso Demo Corp.','Headquarter','US','US','1997-01-21 02:45:00.000','US',0.020,0.000,0.000,5.000,0.000,0.000,'
    ',0.00000000,'US',' ',' ','John Smith','12','Elsa Beskow','0','0','EN',' ',' ',' ','SYSNO',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8081','8181',' ',' ','2442','1481','9998',' ',' ','1320',' ','9998',' ',' ','8110','0','EN','Agresso Demo','987654321012','0','United Kingdom','GB','EN','1','1','EU','201401','GBP','EUR','EUR','USD','9998','9998','9998','1','0','EU','$',' ','Agresso demo','Corporate
    Office','NO','EN','2014-01-06 10:20:58.000','EN',0.020,0.010,0.000,0.100,0.000,0.000,'0301',0.00000000,'EN','9998','9998','Jim Smith','12','Mike Anderson','0','0','EN',' ',' ',' ','SYSEN','123456789101');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','10','Test company 10 (for multiclient)',' ','0',' ','GB','EN','0','1',' ','200801','GBP',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ','Test company 10 (multiclient)','Test company 10 (multiclient)','EN','EN','2008-05-07
    10:57:51.000','EN',0.010,0.000,0.000,1.000,0.000,0.000,' ',0.00000000,'EN',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('4840','6880',' ',' ','1900','3900',' ','1410','3810','3810',' ','9998','9998',' ',' ','1','DE','D3 Demo Fibu/Projekt/Logistik','1277777001','0',' ','DE','DE','1','1','1','200204','EUR','EUR','USD','DEM','9998','9998','9998','1','1','2','1',' ','Agresso Demo
    Fibu/Pr/Log','Agresso Demo Fibu/Pr/Log','DE','DE','2002-04-03 17:28:00.000','DE',0.050,0.000,0.000,5.000,0.000,0.000,' ',0.00000000,'DE','4720','4720',' ','12',' ','0','0','DE','Finanzamt München II',' ',' ','SYSDE','DE888999777');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','PF','Performance test company',' ','0',' ','GB','PF','0','1',' ','200910','GBP',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','PF','EN','2009-10-14 15:49:10.000','PF',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'PF',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','01','RD Reporting Team - Test Client 01',' ','0',' ','NO','01','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:29:46.000','01',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'01',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','02','RD Reporting Team - Test Client 02',' ','0',' ','NO','02','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:30:11.000','02',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'02',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','03','RD Reporting Team - Test Client 03',' ','0',' ','NO','03','0',' ',' ','201101',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','01','EN','2013-10-22 13:30:47.000','03',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'01',' ',' ',' ','12','Vidar Bjørnson','0','0','EN',' ',' ',' ','REPDEV',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','9998',' ',' ',' ','0','FP','FIN PROC Test Project','321456987','0',' ','NO','FP','0','1','1','201206','EUR','EUR','USD','USD','9998','9998',' ','1','1','2','2',' ','FIN PROC Test Project','FIN PROC Test Project','FP','EN','2012-09-24
    10:43:27.000','FP',0.000,0.000,0.000,0.000,0.000,0.000,' ',0.00000000,'FP',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','FRODE','321456987MVA');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    (' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','DM','Agresso Deployment Manager',' ','0',' ','NO','DM','0',' ',' ','201301',' ',' ',' ',' ',' ',' ',' ','0','0',' ',' ',' ',' ',' ','DM','EN','2013-11-06 13:55:17.000','DM',0.000,0.000,0.000,0.000,0.000,0.000,'
    ',0.00000000,'DM',' ',' ',' ','12',' ','0','0','EN',' ',' ',' ','SYSEN',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ',' ',' ',' ','6570','0','S1','Agresso Demo Client S1','556558-7893','0','Sweden','SE','S1','1','1',' ','200401','SEK',' ','NOK','EUR','8322','8321','3740','1','1','3','6','5565587893',' ','Utbildningsföretaget
    AB','SE','SE','2005-02-10 22:04:00.000','S1',0.500,0.000,0.000,0.500,0.000,0.000,' ',0.00000000,'S1','3740','3740','Anna Kronstam','12','Thomas Jelf','0','0','SE',' ',' ',' ','SYSEN','SE556558789301');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ',' ',' ',' ','6570','0','S2','Agresso Demo Client S2','556558-7893','0','Sweden','SE','S2','1','1',' ','200202','SEK',' ','NOK','EUR','8322','8321','3740','1','1','3','6','5565587893',' ','Utbildningsföretaget
    AB','SE','SE','2005-01-17 13:20:00.000','S2',0.500,0.000,0.000,0.500,0.000,0.000,' ',0.00000000,'S2','3740','3740','Anna Kronstam','12','Thomas Jelf','0','0','SE',' ',' ',' ','SYSSE','SE556558789301');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('910156','910166',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','0','NL','DEMO Nederland','KVK9937465','0','Holland','NL','NL','0','1',' ','200708','EUR',' ',' ',' ',' ',' ','999999','0','0',' ',' ',' ','Global Trada N.V.','Global Trada N.V.','NL','NL','2007-08-15
    13:41:00.000','NL',50000.000,0.000,0.000,50000.000,0.000,0.000,'3994 DB',0.00000000,'NL','470720','470720',' ','12',' ','0','0','NL',' ',' ',' ','ROB','NL009404296B01');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('4664','4730',' ',' ','4755',' ',' ',' ',' ',' ',' ',' ',' ',' ','4755','0','DK','Agresso Demo Denmark',' ','0','Denmark','DK','DK','0','1',' ','0','DKK',' ',' ',' ',' ',' ',' ','0','0',' ',' ','0123456789','Agresso Denmark','Agresso Denmark','DK','DK','2005-10-14
    08:40:00.000','DK',0.100,0.000,0.000,0.100,0.000,0.000,' ',0.00000000,'DK',' ',' ',' ','12',' ','0','0','DK',' ',' ',' ','SYSDK',' ');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('76800','66800',' ',' ','48000','48500','99999','47201','47701',' ',' ',' ',' ',' ','66910','1','SP','Agresso Spain',' ','0','Spain','ES','SP','0','1','1','200804','EUR','EUR','GBP',' ',' ',' ','99999','0','0','2',' ',' ','Agresso DEMO S.A','Agresso DEMO S.A','SP','ES','2008-04-07
    14:01:38.000','SP',0.010,0.000,0.000,0.010,0.000,0.000,' ',0.50000000,'SP','99999','99999','Dpto.Aministración','12','Dpto.Riesgos','0','0','ES','00007307','18ru0456',' ','SYSES','B18389742');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('3960','7960',' ',' ','1790','2990','2991',' ',' ',' ',' ','8439',' ',' ','6570','0','SE','UTBILDNINGSFÖRETAGET AB','2021001235','0',' ','SE','SE','0','1',' ','200707','SEK',' ','EUR',' ','8439',' ','3740','1','0','2',' ',' ','Masterföretaget AB','Masterföretaget
    AB','SE','SE','2008-06-09 12:38:43.000','SE',0.500,0.000,0.000,0.500,0.000,0.000,'STLM',0.05000000,'SE','3740','3740',' ','12',' ','0','0','SE',' ','Stockholm',' ','SYSEN','SE202100123501');
     insert into oleclient (
     acc_f_agio, acc_f_dag, acc_notes_ap, acc_notes_ar, acc_per_cost, acc_per_inc, acc_reverse, acc_undec_ap, acc_undec_ar, acc_vat_pay, attr_id_balance, bal_acc_v2, bal_acc_v3, balance_acc,
     bank_fee_acc, bflag, client, client_name, comp_reg_no, compress_flag, country, country_code,  cur_client, cur_item, cur_type, cur_type_tri, curr_period, currency, currency_tri,
     currency_v2, currency_v3, diff_acc_v2, diff_acc_v3, diff_account, diff_chk_v2, diff_chk_v3, dim_v2_type, dim_v3_type, employer_id, header, header2, headquarter, language,
     last_update, leg_act_cli, max_inv_diff, max_inv_diff_v2, max_inv_diff_v3, max_pay_diff, max_pay_diff_v2, max_pay_diff_v3, municipal, overrun_pct, pay_client, pay_diff_acc_g,
     pay_diff_acc_l, pay_ref, period_no, remind_ref, rev_vat_disc_ap, rev_vat_disc_ar, sys_setup_code, tax_office_no, tax_office_ref, tax_system, user_id, vat_reg_no )
     values
    ('8081','8181',' ',' ','2442','1481','9998','1301','1307','1320',' ','9998',' ',' ','8110','1','IT','IT - Client',' ','0','Italy','IT','IT','1','EU','EU','200601','EUR','EUR','EUR','USD','9998','9998','9998','1','0','EU','$','CODE SIA','Agresso demo Italia','Corporate
    Office','IT','IT','2006-09-28 08:46:00.000','IT',0.020,0.000,0.000,0.100,0.000,0.000,'0301',0.00000000,'IT','9998','9998','Jim Smith','12','Mike Anderson','0','0','IT','Tax authority province','Auto-no011299',' ','SYSEN','11465420153');
    go
    CREATE UNIQUE NONCLUSTERED INDEX [aioleclient1] ON [dbo].[oleclient]
    [client] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
    GO
    CREATE TABLE [dbo].[Htable1](
    [amount] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [cur_amount] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [value_2] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [value_3] [decimal](28, 3) NOT NULL DEFAULT ((0)),
    [currency] [varchar](25) NOT NULL DEFAULT (' '),
    [client] [varchar](25) NOT NULL DEFAULT (' '),
    [asset_id] [varchar](25) NOT NULL DEFAULT (' '),
    [depr_book_id] [varchar](25) NOT NULL DEFAULT (' '),
    [input_id] [bigint] NOT NULL DEFAULT ((0)),
    [amount_type] [char](25) NOT NULL DEFAULT (' '),
    [reval_year] [int] NOT NULL DEFAULT ((0)),
    [trans_seq] [int] NOT NULL DEFAULT ((0)),
    [sequence_no] [int] NOT NULL DEFAULT ((0)),
    [at_trans_date] [datetime] NOT NULL DEFAULT (CONVERT([datetime],'19000101',(112))),
    [agrtid] [bigint] IDENTITY(1,1) NOT NULL,
    UNIQUE NONCLUSTERED 
    [agrtid] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    INSERT INTO Htable1 (at_trans_date,amount,amount_type,asset_id,client,cur_amount,currency,depr_book_id,input_id,reval_year,sequence_no,trans_seq,value_2,value_3) 
     VALUES ('20140603' ,0.00000000,'GLN','BM','EN',0.00000000,'GBP','BUSINESS',563,0,29,0,0.00000000,0.00000000 ) 
    GO
    INSERT INTO Htable1 (at_trans_date,amount,amount_type,asset_id,client,cur_amount,currency,depr_book_id,input_id,reval_year,sequence_no,trans_seq,value_2,value_3) 
     VALUES ('20140603' ,0.00000000,'GLN','BM','EN',0.00000000,'GBP','BUSINESS',563,0,30,0,0.00000000,0.00000000 ) 
    GO
    --=================================================================================
    -- The following query takes 15 minutes on my computer to give an execution plan. Fetching the data takes no additional time.
    -- removing one table (CACHED88) from the query brings the time down to 59 seconds.
    -- removing one more (CACHED87) brings it down to 4 seconds.
    -- adding the hint "option (QUERYTRACEON 9481)" to the first case, brings it down from 15 minutes to less than one second!
    SELECT 
           CACHED83.amount - ( CACHED76.amount + CACHED75.amount + CACHED85.amount + CACHED86.amount + CACHED87.amount + CACHED88.amount) AS amount, 
           CACHED83.amount - ( CACHED76.amount + CACHED75.amount + CACHED85.amount + CACHED86.amount + CACHED87.amount + CACHED88.amount) AS cur_amount, 
           c.currency    
    FROM 
           Htable1   tab1 , 
           Htable1   CACHED83 , 
           Htable1   CACHED76 ,
           Htable1   CACHED75 ,
           Htable1   CACHED85 ,
           Htable1   CACHED86 ,
           Htable1   CACHED87 ,
           Htable1   CACHED88 ,
           oleclient c  
    WHERE 
           tab1.client = c.client AND
           tab1.amount_type = 'GLN' AND 
           tab1.asset_id     = CACHED83.asset_id AND 
           tab1.depr_book_id = CACHED83.depr_book_id AND        
           tab1.client       = CACHED83.client AND 
           tab1.input_id     = CACHED83.input_id AND 
           tab1.reval_year   = CACHED83.reval_year AND     
           tab1.trans_seq    = CACHED83.trans_seq AND 
           tab1.sequence_no  = CACHED83.sequence_no AND 
           tab1.asset_id     = CACHED76.asset_id AND  
           tab1.depr_book_id = CACHED76.depr_book_id AND 
           tab1.client       = CACHED76.client AND 
           tab1.input_id     = CACHED76.input_id AND  
           tab1.reval_year   = CACHED76.reval_year AND 
           tab1.trans_seq    = CACHED76.trans_seq AND 
           tab1.sequence_no  = CACHED76.sequence_no AND 
           tab1.asset_id     = CACHED75.asset_id AND 
           tab1.depr_book_id = CACHED75.depr_book_id AND 
           tab1.client       = CACHED75.client AND      
           tab1.input_id     = CACHED75.input_id AND 
           tab1.reval_year   = CACHED75.reval_year AND 
           tab1.trans_seq    = CACHED75.trans_seq AND       
           tab1.sequence_no  = CACHED75.sequence_no AND 
           tab1.asset_id     = CACHED85.asset_id AND 
           tab1.depr_book_id = CACHED85.depr_book_id AND        
           tab1.client       = CACHED85.client AND 
           tab1.input_id     = CACHED85.input_id AND 
           tab1.reval_year   = CACHED85.reval_year AND     
           tab1.trans_seq    = CACHED85.trans_seq AND 
           tab1.sequence_no  = CACHED85.sequence_no AND 
           tab1.asset_id     = CACHED86.asset_id AND 
           tab1.depr_book_id = CACHED86.depr_book_id AND 
           tab1.client       = CACHED86.client AND 
           tab1.input_id     = CACHED86.input_id AND  
           tab1.reval_year   = CACHED86.reval_year AND 
           tab1.trans_seq    = CACHED86.trans_seq AND 
           tab1.sequence_no  = CACHED86.sequence_no AND  
           tab1.asset_id     = CACHED87.asset_id AND 
           tab1.depr_book_id = CACHED87.depr_book_id AND 
           tab1.client       = CACHED87.client AND      
           tab1.input_id     = CACHED87.input_id AND 
           tab1.reval_year   = CACHED87.reval_year AND 
           tab1.trans_seq    = CACHED87.trans_seq AND       
           tab1.sequence_no  = CACHED87.sequence_no  AND  
           tab1.asset_id     = CACHED88.asset_id AND 
           tab1.depr_book_id = CACHED88.depr_book_id AND 
           tab1.client       = CACHED88.client AND      
           tab1.input_id     = CACHED88.input_id AND 
           tab1.reval_year   = CACHED88.reval_year AND 
           tab1.trans_seq    = CACHED88.trans_seq AND       
           tab1.sequence_no  = CACHED88.sequence_no  
    --  option (QUERYTRACEON 9481)         

    Reading "What's new in Sql Server 2014" (http://msdn.microsoft.com/en-us/library/bb510411.aspx#CE). I see that  it says:
    New Design for Cardinality Estimation
    The cardinality estimation logic, called the cardinality estimator, is re-designed in SQL Server 2014 to improve the quality of query plans, and therefore to improve query performance. The new cardinality estimator incorporates assumptions and algorithms
    that work well on modern OLTP and data warehousing workloads. It is based on in-depth cardinality estimation research on modern workloads, and our learnings over the past 15 years of improving the SQL Server cardinality estimator. Feedback from customers shows
    that while most queries will benefit from the change or remain unchanged, a small number might show regressions compared to the previous cardinality estimator. For performance tuning and testing recommendations, seeCardinality
    Estimation (SQL Server).
    I states that a "small number of queries might show regressions". To mee the regression is a showstopper and seems to have to do with complexity. I found one query reported by Juha Salo (bug 893758) that possibly could have to do with the same thing.
    It is a query with many joins. Simplifying the query by removing one of the joins, makes it work fine. The query documented in his report does not need any setup as it is a query on system tables as sys.indexes and sys.index_columns.
    I quote:
    There is a huge difference in performance for the following query between compatibility level 120 and the lower levels:
    dbcc dropcleanbuffers
    SELECT i.NAME
    FROM sys.indexes i
    INNER JOIN sys.index_columns k ON i.object_id = k.object_id
    AND i.index_id = k.index_id
    INNER JOIN sys.objects o ON i.object_id = o.object_id
    AND k.object_id = o.object_id
    INNER JOIN sys.index_columns k1 ON i.object_id = k1.object_id
    AND i.index_id = k1.index_id
    AND k1.key_ordinal = 1
    INNER JOIN sys.index_columns k2 ON i.object_id = k2.object_id
    AND i.index_id = k2.index_id
    AND k2.key_ordinal = 2
    INNER JOIN sys.index_columns k3 ON i.object_id = k3.object_id
    AND i.index_id = k3.index_id
    AND k3.key_ordinal = 3
    INNER JOIN sys.index_columns k4 ON i.object_id = k4.object_id
    AND i.index_id = k4.index_id
    AND k4.key_ordinal = 4
    INNER JOIN sys.index_columns k5 ON i.object_id = k5.object_id
    AND i.index_id = k5.index_id
    AND k5.key_ordinal = 5
    INNER JOIN sys.index_columns k6 ON i.object_id = k6.object_id
    AND i.index_id = k6.index_id
    AND k6.key_ordinal = 6
    INNER JOIN sys.index_columns k7 ON i.object_id = k7.object_id
    AND i.index_id = k7.index_id
    AND k7.key_ordinal = 7
    INNER JOIN sys.columns c1 ON o.object_id = c1.object_id
    AND k1.column_id = c1.column_id
    INNER JOIN sys.columns c2 ON o.object_id = c2.object_id
    AND k2.column_id = c2.column_id
    INNER JOIN sys.columns c3 ON o.object_id = c3.object_id
    AND k3.column_id = c3.column_id
    INNER JOIN sys.columns c4 ON o.object_id = c4.object_id
    AND k4.column_id = c4.column_id
    INNER JOIN sys.columns c5 ON o.object_id = c5.object_id
    AND k5.column_id = c5.column_id
    INNER JOIN sys.columns c6 ON o.object_id = c6.object_id
    AND k6.column_id = c6.column_id
    INNER JOIN sys.columns c7 ON o.object_id = c7.object_id
    AND k7.column_id = c7.column_id
    Can be run in any database. In our case we have a legacy database with almost 10 000 (ten thousand) tables. In that kind of database the query just freezes fully utilizing a single cpu core.
    If compatibility level is switched to 110 then query performs as it should.

  • HTML Client: How to get the content/value of a custom control?

    I made two Custom Controls named, "CustomControl_1" and "CustomControl_2". 
    In the render function of "CustomControl_1", how to access the value of "CustomControl_2"?
    For example,
    myapp.BrowseOrders.CustomControl_2_render = function (element, contentItem) {
    $(element).text("Some Value");
    myapp.BrowseOrders.CustomControl_1_render = function (element, contentItem) {
    $(element).text( Value of CustomControl_2 ? );

    I would recommend creating screen properties and binding the controls to those screen properties. Then you can easily get a reference to any value. See this article for an example of the process using custom controls:
    Using The Clippy Agent in the Visual
    Studio LightSwitch HTML Client
    Unleash the Power - Get the LightSwitch 2013 HTML Client / SharePoint 2013 book
    http://LightSwitchHelpWebsite.com

  • Preflight keeps saying  "Unable to save the PDF File after post processing"

    I'm at a loss how to overcome this. Spent almost a whole day, together with another person, trying to fix it with no success!
    I use Adobe pro CC on a PC
    I usually receive pdf files from this one client who edits and formats a book in Mac Pages. Up until a few days ago I had no problems converting the client's pdfs into pdf/x3, but the last three versions of the latest file have stumped me.
    Just to test, I first just tried to convert the file (33MB), unchanged, to pdf/x3 using the save as other option - message reads  "the document has been saved, however, it could not be converted according to the selected standard profile: convert to PDF/X. Please use preflight with the profile "Convert to PDF/X" in order to identify those properties of the document which prevent it from being compliant to this profile"
    if I then choose under Profiles - convert to PDF/X3 - it says no problems found, and appears to have saved the file. If I try to save again as a pdf/x3, just to make sure, it then tells me it's not pdf/x3 compliant
    OK - so then I go back to preflight - and choose the standards function - then pdf/x3, then continue with the default colour profile. About halfway through the conversion, at the point of saving the file,  I get the message "unable to save the pdf file after post processing"
    So far I've had no luck figuring out what this is.
    I then choose the option of "verify compliance of ppdf/x3" - message reads "pdf/x3 version key (GTS_PDFXVersion) missing", and "Trapped key not true or false"
    Help!! How can I be sure the file converted / or not?
    kim

    Yes I was/am aware of Preflight's inability to play nicely over cloud technologies in certain cases, especially wrt Standards technologies, this will be partially addressed in an upcoming version of Preflight without saying too much.  But the same thing could theoretically have happened if the file was also located on another local network client or server.  Leaving aside the argument that this may violate the Acrobat User Agreement - since purchasing the software, the user agrees to employ its functionality on a single host system and precludes host-client-based scenarios - this simply is not a supported use, meaning the user may not have expectations that it will work at all, if the applications requirements are not observed.  There do exist server-solutions for Preflight files within networks, but Acrobat and by extension Acrobat Preflight is not one of those solutions, and (still) belongs in the single host-based desktop environment.
    However most (99.9%) functions within Acrobat <-> acrobat.com file exchange are supported, file syncing across multiple devices will soon be supported, but Standards compliance is still admittedly a problem at this point.  Some testing has been done using 3rd party cloud technologies starting with enterprise-based solutions, such as Office 365, and this will continue to ramp up to include other 3rd party products.
    As for the second point, Preflight will usually change the PDF version to be complaint, are you saying that it was unable to do so in this case?  It seems that this error should have popped up during the normal Preflight conversion attempt.  Personally I think solving a workflow problem using the print path is a little bit of a heavy-handed approach, but if helped and the results are acceptable, then that is good.  Since that path is non-existent on a Mac, as one needs to Save as Adobe PDF from the Print dialog's PDF drop-down menu, I am assuming your workflow involved file creation on a Mac, then further processing on Windows using the PDF printer.  I am wondering if a simple resave/Save As... to PDF with overwrite on a Mac, or Preflighting the file using a PDF version compatibility profile before the PDF/X conversion would have helped.  Since there are such a multitude of methods that a PDF can be created, there are also many ways within Acrobat that a user can shape the file to be compatible with the expected workflow, ie, 'many ways to skin a cat', without being morbid.

Maybe you are looking for

  • Cannot open attachment in mail

    Once I've replied to an email with an attachment in it I can no longer return and open the attachment.  I'm given the opportunity for a "quick look" when the mail first comes in but that's it.  And once I reply i cannot return to the original message

  • One BW system for several landscapes ??????

    Guys I would really apprciate some advice.  In the past I have set up BW systems for a landscape consisting of APO, ECC, SRM and of course the BW system to support these. I am now working for a company that has several ECC production systems live and

  • Mapping InDesign style names to PDF tags

    I've mapped style sheet names to tags in InDesign, and they display correctly in the InDesign structure panel, but when I export a PDF, it is my style sheet names that persist in the PDF tag window. Any ideas how to fix this?

  • Unreadable photos when trying to import old photos to new updated iPhoto??

    After updating to Yosemite and updating iPhoto to 9.6, when trying to import all my old photos, it says they are all unreadable.  How do I update the file format of the photos to import them?

  • 3.6 wasupdated today and my home page comes up blank and i can't get on any site

    3.6 was updated today. i can't access my home page or any internet site == This happened == Every time Firefox opened == 3.6 was updated automatically today. == == User Agent == Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; G