Export to JPG format several times with different resolution

Hello world

I want to export my document of jpg files in different resolutions - an overview and a thumbnail image. I use this code, I found here in the forum for export:


function exportPages (_dpi, _destFilename) {}

try {}

app.jpegExportPreferences.exportResolution = _dpi;

app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.LOW;

app.jpegExportPreferences.jpegExportRange = ExportRangeOrAllPages.EXPORT_ALL;

app.scriptPreferences.version = "7.0".

app.jpegExportPreferences.jpegColorSpace = JpegColorSpaceEnum.RGB;

app.scriptPreferences.version = "6.0".

app.activeDocument.sections.everyItem () .includeSectionPrefix = false;

var f = file (_destFilename);

app.activeDocument.exportFile (ExportFormat.jpg, f);

} catch (err) {}

Alert (err.message);

}

}


and I call you


exportPages (96, "~ / jdExport.jpg");

exportPages (30, "~ / jdExportThumbnail.jpg");


This should create images with 96 DPI and dpi 30. But after the first call the app.jpegExportPreferences.exportResolution is not defined. I can swap function calls - first works, second fails.


No idea why I can't export twice?


Thank you

Klaus


He finds myself - there the

app.scriptPreferences.version = "6.0".

I shouldn't use copy & paste the code from the forum without understanding

Tags: InDesign

Similar Questions

  • Make the same comp several times with different text

    Hello!

    I'm looking for a way to make my 100 + times with a different text in two layers. I thought batch replicate this model and then batch change text layers, but I've been Googling autour and found no solutions.

    I need is ready solution, just a direction on an approach I take to perform this task. Told me on another forum to ask here and there are a few scripts that are just what I need assistance excellent file as data. You could point me to them?

    Thank you!

    This is an old thread from Creative Cow that deals with a way to do what you want using a file text and Expressions:

    CreativeCOW

    There are also some commercial script tools that automate the process very well:

    CompsFromSpreadsheet 5 - aescripts + aeplugins - aescripts.com

    Templater - aescripts + aeplugins - Rig aescripts.com

  • I have several screens with different resolutions, how can I make work stations match from the bottom rather than the top?

    I have 2 screens at 1920 x 1200 pixels and one in the middle with 2560 x 1600.  When I move the cursor from one screen to the other, the cursor jumps (of course), but in this case, the vertices of the monitors are (it moves from the top of a monitor to the top of the other) and I would like the background to match (to the top of the Middle monitor space with no corresponding areas on the other two).

    As the two side monitors are physically smaller and shorter that the Middle it's jarring to see the cursor jumps 3 inches upward when I switch from one to the other.

    Is it possible to adjust the display settings so that they justify bottom instead of the top?

    To be clear: I want to be able to move my cursor along the bottom one down the next and having the high bit to space rather than being able to move the cursor along the top with the bottom being the extra space.

    Thank you
    Trish

    In the window display settings, where it shows the monitors, click and drag them to the bottom of all monitors line up horizontally. Boulder computer Maven
    Most Microsoft Valuable Professional

  • How to extract the same song, several times using different bit rates or formats and store all the digital music files in WMP 12 default on the same HDD music library

    Using Windows Media Player 12 (w/under Windows 7), "can I ripping the same song, several times, using different bitrates & and/or formats and store all the digital music files in the music library by default WMP - 12, on the same hard drive?

    1.) #1 goal: tear up the same song repeatedly, w / "different rates" as a WMA file.

    2.) #2 goal: tear up the same song repeatedly, w / "different rates" as an mp3 file.

    3.) #3 objective: NOT to each subsequent copy (version) of the song, deleted & and/or replaced by the previous version of the song [even].

    4.) question Bottom Line Up Front--> is Windows Media Player 12 (included with the Windows 7 operating system) are able to achieve '#1 objectives; #2; & #3 above?

    5.) details/example: I want to tear the piece "Maria Maria by Carlos Santana" to my laptop as a Windows Media Audio [WMA] file.  In addition, I would like to rip the song 'Maria Maria' three several times with 3 different bitrates in format WMA; and, as an MP3 file.  Therefore, my final result wished (after the extraction process), will take place the four 4 audio files split up as follows: (a) 'Maria Maria by Carlos Santana'--> Format: file WMA; Ripped @128 Kbps bitrate.  (b) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped to the "Variable bit rate; (c) ' Maria Maria by Carlos Santana'--> Format: file WMA; Ripped commissioning "Lossless." and (d). 'Maria Maria by Carlos Santana'--> Format: MP3 file. Ripped @256 Kbps bitrate.

    6.) my preference: I do NOT want to rename the file (s). {for example, 'Maria Maria by Carlos Santana' renamed/changed for--> "Maria_Maria_by_Carlos_Santana_128kbps.wma",...} 'Maria_Maria_by_Carlos_Santana_256kbps.mp3 '; etc.}.  In addition, I am not concerned about the additional disk space that will be consumed after multiple copies of the same song with different speeds of transmission and different formats.

    7.) my experience w / Windows Media Player 10 (w / the operating system of Windows XP): using WMP - 10, my goal (s) described above is not a problem at all.  Simply insert the CD purchased by Carlos Santana, containing the song "Maria Maria"... Select the desired Format (WMA; WMA VBR; WMA Lossless; or mp3)... Select the desired flow rate (WMA... 128/160/192kbps_mp3: 128/192/256/320 kbit / s; etc.) ; and click on the "RIP" button to start the copy process on the hard disk of of Carlos Santana's "Maria Maria".  This process (w / WMP-10) would result in having the same song, copied on the hard disk, with levels of quality different "audio" (via the different bit rate settings); regardless of the format (MP3/WMA) which was chosen.

    8.) my experience w / Windows Media Player 11 (w / the operating system of Windows XP): using WMP 11, to described above of my objective (s) could not be reached e-a-s-i-l-y.  The problem with WMP - 11 - in short - which was after the desired selection "Rip settings" tab 'Options' of WMP - 11 (i.e., Format & Bit Rate) and heart-wrenching piece wanted to {'Maria Maria by Carlos Santana'} a moment later/second, WMP11 remove / would crush the previous version of the song [even].  Therefore, the program would NOT allow the user to have multiple copies of the same song on the hard drive of the PC; which obviously restricts a user to have the freedom to choose what level of quality digital audio, they prefer to listen to.

    9.) the ability to have multiple copies [at my descretion] of the same song (on my hard drive) with different bitrates and formats in my music library, is important for me because it has a direct impact on "how I enjoy MY music ', and in what form (audio quality), I choose to listen to my music.  {For example, when I exercise and listening to my camera, digital audio player (Zune), a song ('Maria Maria by Carlos Santana'), will usually be torn off at a lower rate due to the unit of capacity reduction of storage - compared to the storage capacity of notebook PCs/desktop/external hard drives PC.}  However, when I listen to my music through my home cinema or entertainment system (which contains a hard disk dedicated with a large storage capacity), I prefer to load the entertainment system with digital music files that have been ripped to WMA... with the bit being rate-setting is for the: settings "WMA Variable Bit Rate" or "WMA Lossless.

    10.) there you have it.  This is my first post in this forum.  I hope that [detailed] explanations, will be sufficient to encourage these "with knowledge & the hands on experience" using Windows Media Player 12 (as well as with WMP-10/WMP-11 respectively), by providing a [step] "How-to"... "solution to my situation.  It would be highly appreciated.  I'm looking forward-'the solution' - and relevant suggestions & and/or community feedback regarding my request for assistance.

    * Thank 'All' (that would) in advance... For your time & Assistance *.

    Certainly, you can, but I would say that they be in different folders, for your convenience as well as Windows.  You can create one for each debit/format, then you will know who is who.

    In Windows Media Player, on the toolbar, select Tools, Options, Rip, and then select the flow you want first, rip music, then change the folder (higher on the same tab) and rip again... and so on and so forth.

    When you are at home on your home theater, you can use the 320 bitrate folder, when you transfer to the Zune, you can use one of the lower bitrate files (although I personally tear it up to 320 and let the Zune reduce as he wants, even with the iPhone via iTunes, hard drive space is not really a problem here) my server has several hard drives, and I can always add more if and when space is low!

  • I've uninstalled and reinstalled the drive several times with the same result, my problem is when I download the drive icons for my browsers and above all my desktop icons change adobe logo, so when I click on them Adobe tries to open them.

    I've uninstalled and reinstalled the drive several times with the same result, my problem is when I download the drive icons for my browsers and changing most of my the desktop icons for the adobe logo, so when I click on them Adobe tries to open them, of course, he does not format because it's not an adobe application , so I tried to restore the computer to an earlier date and it wont let me as long as Adobe reader is installed, so I need to uninstall and now I have nothing to open files and downloads of Adobe, someone had this problem and if so, did you get it resolved? Thank you Tommy...

    This may help: Application, file icons change in Acrobat/Reader icon

  • "One-click" How do I export an image to a set of files with different resolutions .png?

    Hello

    How far is 'one-click' export an image to a set of files with different resolutions .png? (I need for a set of iOS app icons).

    For example: export a file MyAppIcon.psd in the following:

    MyAppIcon_29x29.png

    MyAppIcon_57x57.png

    MyAppIcon_114x114.png

    MyAppIcon_512x512.png

    MyAppIcon_48x48.png

    MyAppIcon_72x72.png

    I almost managed to do with the Actions of Photoshop, but does not know how the names of files to include the name of the original image file. In other words, the NewApp.psd file should export to NewApp_29x29.png, not MyAppIcon_29x29.png.

    Thank you!

    No problem, please try this...

    #target photoshop
    app.bringToFront();
    main();
    function main(){
    if(!documents.length) return;
    var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
    try{
       var Path = activeDocument.path;
        }catch(e){
            alert("Please save this file then re-run the script!");
            return;
            }
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    snapShot();
    var saveFile = File(Path + "/" + Name + "_512x512.png");
    activeDocument.resizeImage(512, 512, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_114x114.png");
    activeDocument.resizeImage(114, 114, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_72x72.png");
    activeDocument.resizeImage(72, 72, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_57x57.png");
    activeDocument.resizeImage(57, 57, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_48x48.png");
    activeDocument.resizeImage(48, 48, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    revertToLastSnapshot();
    var saveFile = File(Path + "/" + Name + "_29x29.png");
    activeDocument.resizeImage(29,29, undefined, ResampleMethod.BICUBICSHARPER);
    SavePNG(saveFile);
    app.preferences.rulerUnits = strtRulerUnits;
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    }
    function SavePNG(saveFile){
    var pngOpts = new ExportOptionsSaveForWeb;
    pngOpts.format = SaveDocumentType.PNG;
    pngOpts.PNG8 = false;
    pngOpts.transparency = true;
    pngOpts.interlaced = false;
    pngOpts.quality = 100;
    activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
    }
    function snapShot() {
        var desc9 = new ActionDescriptor();
            var ref5 = new ActionReference();
            ref5.putClass( charIDToTypeID('SnpS') );
        desc9.putReference( charIDToTypeID('null'), ref5 );
            var ref6 = new ActionReference();
            ref6.putProperty( charIDToTypeID('HstS'), charIDToTypeID('CrnH') );
        desc9.putReference( charIDToTypeID('From'), ref6 );
        desc9.putEnumerated( charIDToTypeID('Usng'), charIDToTypeID('HstS'), charIDToTypeID('FllD') );
        executeAction( charIDToTypeID('Mk  '), desc9, DialogModes.NO );
    };
    function revertToLastSnapshot() {
       var doc = app.activeDocument;
       var hsObj = doc.historyStates;
       var hsLength = hsObj.length;
       for (var i=hsLength - 1;i>-1;i--) {
         if (hsObj[i].snapshot) {
           doc.activeHistoryState = doc.historyStates.getByName('Snapshot ' + i);
           break;
         }
       }
    };
    
  • I used to reload a page that several times with just a long wait on the F5 key, but now it hard to do 2 refills with even a prolonged pressure on F5?

    In the past, I used to reload a page several times with just one press the F5 key, with pressing long it charge more often, now long or short by pressing the F5 key is sufficient to reload a page or two times

    OK guys, I found the problem, it was because I had MCAFEE Advisor which limited my refreshes, but when I disabled it, everything is back to normal, loool

  • Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) failed to install several times with an error Code: 0xD59.

    I have a Dell Vostro 420 - Windows XP. Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332) failed to install several times with an error Code: 0xD59.  Please help me understand this and get this installed!

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for SQL server support. Please post your question in the Sub forum.

    Link: http://social.msdn.microsoft.com/Forums/en/sqlsetupandupgrade/threads

    For reference: how to solve the packets missing MSI or MSP during SQL Server Service Packs, hotfixes or cumulative updates: http://support.microsoft.com/kb/2015100

  • How many user take RDP at the same time with different user login ID in Server R2 2012

    How many user take RDP at the same time with different user login ID in Server R2 2012?

    How many user take RDP at the same time with different user login ID in Server 2008 R2?

    How many user take RDP at the same time with different user login ID in Server 2012 starndard?

    How many user take RDP at the same time with different user login ID in Server 2008 standard?

    This issue is beyond the scope of this site (for consumers) and to make sure you get the best answer, we need to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Everything was fine until my Windows 10, lost the start feature, if I ever go back to Windows 7, in this process, I lost my Adobe Reader software, I tried about ten times with different versions and different locations, all with the same download error

    Please forgive me for not knowing how to use this forum, I am an old man and not good at computers, I called Adobe, they said it was my only hope!

    Sorry to repeat

    Everything was fine until my Windows 10, lost the start feature, so I had to go back to Windows 7, in this process, I lost my Adobe Reader software, I tried about ten times with different versions and different locations, all with the same error message that is download "the feature you are trying to use is on an unavailable network resource"... are looking for It seems that it does not find when I search there, and I no longer seem to have the AcroRead.msi... the most difficult file, I try, I get deeper and deeper into things I don't know... I am looking for a simple solution!

    When it gets to this point, it is probably better to start from scratch.

    First of all, download, install and run Adobe Reader cleaning tool to get rid of all remains little. Here is a link to the tool: Download Adobe Reader and Acrobat tool - Adobe Labs

    Then go to the following link to download the full installer for the reader.

    https://get.Adobe.com/reader/Enterprise/

  • layout with different resolutions

    Hello and Hello!

    Once more I need some advice:

    I have a program that is running on different machines with different resolutions.

    Is it possible to avoid, that the provision is paning all around?

    Best regards

    Hilby

    Hi Hilby,

    No.... This is currently a limitation of the layout, where we try to adapt to each screen, but objects and the page layout is not appropriate in different proportions with a different number of pixels.

    The aspect ratio is the most important, followed by the total of the resolution of the screen.

    Additional information about elongation are below.

    In summary, DASYLab is unable to completely adapt the layout "Screen" for the size of each screen and resolution. If you want to have a fixed provision which is not completely in some monitors, then consider using a size fixed, such as A4 or A3.

    If you do something on a large monitor, 1600 x 1200, for example, and move it to a screen wide monitor, 1600 x 900.

    Of my friends on Wikipedia

    With computer screens, wider than 4:3 aspect ratios are also known as widescreen. Computer monitors widescreen previously generally 16:10 aspect ratio, now they are moving in 16:9.

    Until the about 2003, most computer monitors had a 4:3 aspect ratio and some had 5:4. Between 2003 and 2006, monitors with 16:9 and especially 16:10 aspect ratios (8:5) became commonly available

  • My Firefox opens on a completely white screen with no menu bar or whatever it is. I uninstalled and reinstalled several times with the same problem. Help!

    I opened this morning with no problems, went to my g-mail account, pulled upwards an e-mail, click on answer, typed my respons, but when I hit send, everything went completely empty.

    I have not compressed, without... menu bars anything other than firefox upper-left logo and reduce it, full-screen/small screen and close / x buttons in the upper left corner... it's she.

    I uninstalled and reinstalled several times, but nothing works.

    What now?

    COR - el,

    Wow... that was well above my head... at least tonight. Laughing out loud

    After my last post, I did a little research and figured out how to import my favorites in IE8... so I uninstalled firefox again... but this time I had checked the "delete my personal Firefox and customizations" in the wizard, who did remove two addons (Ghosery and Ad Block Plus)... the relocation was different this time and the first time you start firefox He asked if I wanted to import my IE Favorites, which I did... I now added Ghosery and Ad Block... and if so far everything goes well... seems I got this back up and running.

    The mention of the malware in a madperson add-on has been helpful to my solve my problem.

    Thanks for the help...

  • Interrupted SQL statement and start several times with several SQL_EXEC_ID

    Hi all

    We meet a strange phenomenon, maybe someone can help.

    We see that sometimes, when our client runs a single statement, implemented Oracle to process the statement with a special SQL_EXEC_ID, but after a while stops and starts processing the statement along with different SQL_EXEC_ID. Then, after a while, it happens again - stop Oracle processes the statement and start from the beginning with the new SQL_EXEC_ID. This happens again and again until we kill all of the other sessions on the database (then it ends).

    What we see exactly: Client executes the statement (sql_id = "2tp7pz6yv87qp"). Monitor us v $ SQL_MONITOR and get this:

    SELECT Sql_id, sql_exec_id, to_char (SQL_EXEC_START, "HH24:MI:SS MON-DD-YYYY) SQL_EXEC_START, status OF V$ SQL_MONITOR where sql_id = '2tp7pz6yv87qp' ORDER BY SQL_EXEC_START DESC;

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 the EXECUTION

    After a while check us again and see this:

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 the EXECUTION

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    After a while, we see this:

    2tp7pz6yv87qp 16777219 28 may 2015 08:09:58 the EXECUTION

    2tp7pz6yv87qp 16777218 28 may 2015 07:53:37 FACT

    2tp7pz6yv87qp 16777217 28 may 2015 07:36:17 FACT

    2tp7pz6yv87qp 16777216 28 may 2015 07:19:14 FACT

    and so on — will happen again and again until we kill all of the other sessions in the database.

    When comparing the follow-up of the different SQL_EXEC_IDs SQL reports, we see that each of them did exactly the same job: used the same execution plan, beginning treatment she even read/wrote the same amount of e/s and each of them stopped at the same point during execution. You can see that for each SQL_EXEC_ID execution 'stops' in the middle and never reach the end of the plan. She always stops in the JOIN by HASH and never continue to the next steps in the implementation plan.

    When you look more deeply, we see in V$ ACTIVE_SESSION_HISTORY always last thing that happens for every SQL_EXEC_ID is HASH JOIN RIGHT OUTER (SQL_PLAN_OPERATION = HASH and SQL_PLAN_OPTIONS = RIGHT OUTER JOIN). Then comes the new SQL_EXEC_ID and it starts to do the same thing as the previous SQL_EXEC_ID did when it was launched.

    Kill all other sessions, run finally ends. We see that the final (successful) SQL_EXEC_ID work and completes his plan to run to completion.

    When executing the same single statement (when it comes to the single session in the database), it ends with a single SQL_EXEC_ID. Its SQL monitoring report looks like the final execution when the phenomenon occurs after killing all other sessions.

    -We checked that the customer executing the query only once. AWR also only shows simple execution of the query.

    -We have reproduced in many different clients (plus SQL, JDBC thin client OIC and DBMS_SCHEDULER job).

    -It has no PARALLEL in the query or table.

    -In this case for different statements (different INSERT-SELECT and MERGE instructions).

    -Version: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Does anyone have an idea?

    Finally found the root cause of the problem.

    This phenomenon occurs when the cursor of the active query being invalidated. This can occur in several scenarios, in our case, what happens when we work on a single partition (read or write) and perform DDL operations on different partitions of the same or the tables.

    Steps to reproduce:

    1 launch long command DML that affect the single partition

    2. in the course of executing this SQL, do one of the following values in a session different all 1 minute:

    2.1 do the indexes to a different partition unusable: ALTER TABLE X EDIT PARTITION Y UNUSABLE LOCAL INDEX

    2.2 rebuild the unusable index of different partition: ALTER TABLE X EDIT PARTITION Y REBUILD UNUSABLE LOCAL INDEX

    2.3 a partition different truncate

    Support of Oracle we were told that this problem is known and there are several requests for bugs and improvements thereon, for example this one:

    Bug 12905327 : TRUNCATE to an INVALID PARTITION TABLE UNNECESSARILY IMMEDIATELY all THE SLIDERS

    In our case (ETL process), we used to perform all these operations DDL and DML operations long (we work on different partitions in parallel). In order to solve, we have separated these operations to the different phases in our process and don't be DDL and DML operations at the same time more. This solved the problem for us.

  • Several channels with different frequencies

    Hello

    I use card NI USB-6221.

    The C API using, I need to generate 6 digital output channels, with frequencies of diffrenet and Heavy duty.

    To be more precise, the 2 are totally identical, but I need them to be reversed, and the other 4 are similar to another, but should be shifted in time (I.e. There is a delay between each of the channels).

    I used the 2 channels of CO that the USB-6221 takes charge for the first two signals, and it works very well (the two signals are synchronized and are reversed).

    Now I need an additional 4 channels for the other vague square.

    I saw an articale NOR by JohnP web site with the title:

    Generate multiple channels of digital output with different frequencies and Heavy Duty

    The following example shows how to create and generate a digital with the non-regeneration wave form so that you can change the frequency and the duty cycle on the fly with the M Series DAQ hardware X.  The example uses output digital rather than counters to achieve this, so if you need more output than the available counters, it would be a good option (Note: on the materials of the M series an external sample clock must be provided, this may be caused by one of the counters if you want).

    that seems to be exactly what I need, but the examples are for LabView which I did not.

    Can someone explain how to do this with the C functions?

    Best regards

    Danny.

    Hey Danny,

    The important thing to note is that you can clock of arbitrary digital waveform (up to 1 MHz on the 6221).  The real data acquisition programming is pretty easy once you have the waveform.  My Example LV used LabVIEW Base generating function VIand then converted to a digital waveform to generate the signal from each channel.

    The functions of LV helped tremendously with to achieve the waveforms to be updated on the fly (the basic function generator keeps track of phase for you).

    If you do not need to be updated on the fly, then the construction of the waveform in C should not be too bad.  For example:

    P0.0 [1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0] * 1

    P0.1 [0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0] * 2

    P0.2 [0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1] * 4

    P0.3 [1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1] * 8

    [9 9 9 9 9 3 3 3 3 3 6 6 6 6 6 12 12 12 12 12]

    The table above U8 would give you 4 output waveform of 50% duty cycle at Fs/20, shifted 90 degrees to eachother.  The lines would be p0.0 by p0.3 (the bit rate of the U8 corresponds to what line goes high).

    Best regards

Maybe you are looking for