Is it possible to start a recording from source code?

Hi everybody!
I'm currently using JProfiler in combination with JUnit tests to collect resource consumption metrics of features in our product.
A homemade JUnit runner starts and stops the JProfiler recording and parses the recorded data. It then compares the recorded values to predefined limits and fails the test if they are exceeded.
Now I want to change this to use the flight recorder instead. I found a nice article explaining how to parse .jfr files here: Using the Flight Recorder Parsers | Marcus Hirt
Unfortunately I can't figure out how to start and stop a flight recording from a JUnit runner besides using the jcmd tool.
Can anybody help me out?
Thanks a lot
Tobias

Answering myself once more since other people might stumble upon the same problem.
In the end I created a TestRule which I can add to the JUnit Test Class.
The interesting parts of the code are:
public class ProfilerTest implements TestRule {
    @Override
    public Statement apply(Statement base, Description description) {
        return new PerformanceLimitsStatement(base, description);
    class PerformanceLimitsStatement extends Statement {
        private PublicFlightRecorderRunner runner;
        private final Description description;
        private final Statement base;
        public PerformanceLimitsStatement(Statement baseParam, Description descriptionParam) {
            description = descriptionParam;
            base = baseParam;
        @Override
        public void evaluate() throws Throwable {
            runner = new FlightRecorderRunner(description.getTestClass());
          // start profiling
            runner.startupProfiling("jfr/"+description.getTestClass().getSimpleName()+"."+description.getMethodName()+".jfr", annotation.cpuRecording(), annotation.allocRecording(), annotation.methodStatsRecording(), annotation.monitorRecording(),
                    annotation.threadProfiling());
            // run a test method including its before and after methods inside a simple time measurement
            base.evaluate();
            // shutdown profiling
            final File performanceSnapshot = runner.shutdownProfiling(description);
This uses a PublicFlightRecorderRunner - code:
import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.nio.file.Files;
import java.util.List;
import javax.management.Attribute;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;
import org.junit.internal.runners.statements.InvokeMethod;
import org.junit.runner.Description;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.Statement;
* <p>
* (c) Copyright Vector Informatik GmbH. All Rights Reserved.
* </p>
* @since 1.0
@SuppressWarnings({ "restriction"})
public class PublicFlightRecorderRunner extends BlockJUnit4ClassRunner implements
        IProfilerRunner {
      private static MBeanServer ms = null;
      private File file;
      private static final String REGISTER_MBEANS_OPERATION = "registerMBeans"; //$NON-NLS-1$
      private static final String JFR_CREATE_RECORDING_OPERATION = "createRecording"; //$NON-NLS-1$
      private static final String START_RECORDING_OPERATION = "start"; //$NON-NLS-1$
      private static final String STOP_RECORDING_OPERATION = "stop"; //$NON-NLS-1$
      private static final String CLOSE_RECORDING_OPERATION = "close"; //$NON-NLS-1$
      private static final String SET_EVENT_ENABLED_OPERATION = "setEventEnabled"; //$NON-NLS-1$
      private static final String SET_STACKTRACE_ENABLED_OPERATION = "setStackTraceEnabled"; //$NON-NLS-1$
      private static final String SET_THRESHOLD_OPERATION = "setThreshold"; //$NON-NLS-1$
      private static final String SET_PERIOD_OPERATION = "setPeriod"; //$NON-NLS-1$
      private static final String MC_CLASS_NAME = "com.sun.management.MissionControl"; //$NON-NLS-1$
      private static final String MC_MBEAN_NAME = "com.sun.management:type=MissionControl"; //$NON-NLS-1$
      private static final ObjectName MC_OBJECT_NAME = createObjectName(MC_MBEAN_NAME);
      private static final String FRC_CLASS_NAME = "oracle.jrockit.jfr.FlightRecorder"; //$NON-NLS-1$
      private static final String FRC_MBEAN_NAME = "com.oracle.jrockit:type=FlightRecorder";
      private static final ObjectName FRC_OBJECT_NAME = createObjectName(FRC_MBEAN_NAME);
      private static ObjectName recordingObjectName;
      private static CompositeDataSupport recording;
      private static ObjectName createObjectName(String beanName) {
          try {
              return new ObjectName(beanName);
          } catch (MalformedObjectNameException e) {
              throw new Error("Should not be possible: Could not make a new ObjectName " + beanName); //$NON-NLS-1$
     * Constructor for FlightRecorderRunner.
     * @param klass
     * @throws InitializationError
    public PublicFlightRecorderRunner(final Class<?> klass)
            throws InitializationError {
        super(klass);
    @Override
    protected Statement methodInvoker(final FrameworkMethod method,
            final Object test) {
        return new InvokeMethod(method, test) {
            @Override
            public void evaluate() throws Throwable {
                final String targetFile = "jfr/" + method.getClass().getSimpleName()
                        + "." + method.getMethod().getName() + ".jfr";
                startupProfiling(targetFile);
                for (int i = 0; i < 10; i++) {
                    super.evaluate();
                shutdownProfiling(method, test);
    public void startupProfiling(final String targetFile) {
        file = new File(targetFile);
        try {
            createFlightRecordingClient(file.getName());
            startFlightRecording(file);
        } catch (Exception e) {
            e.printStackTrace();
    public File shutdownProfiling(final FrameworkMethod method,
            final Object test) {
        try {
            stopFlightRecording();
        } catch (Exception e) {
            e.printStackTrace();
        return file;
    public static void createFlightRecordingClient(
            final String recordingName) throws Exception  {
        // register Flight Recorder Bean
        ms = ManagementFactory.getPlatformMBeanServer();
        // Create MissonControl Bean
        if (!ms.isRegistered(MC_OBJECT_NAME)) {
            ms.createMBean(MC_CLASS_NAME, MC_OBJECT_NAME);
            ms.invoke(MC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0],    new String[0]);
        // Create FlightRecorder Bean
        try{
            if(!ms.isRegistered(FRC_OBJECT_NAME))
                ms.createMBean(FRC_CLASS_NAME, FRC_OBJECT_NAME);
                ms.invoke(FRC_OBJECT_NAME, REGISTER_MBEANS_OPERATION, new Object[0], new String[0]);
        catch (NotCompliantMBeanException e) {
            @SuppressWarnings("unused")
            boolean wedontcare = true;
        // create recording
        ms.invoke(FRC_OBJECT_NAME, JFR_CREATE_RECORDING_OPERATION, new Object[] {recordingName}, new String[] {String.class.getName()});
    public static void startFlightRecording(File file)
            throws Exception {
        // Check that only one recording exists and that it's not already running
        @SuppressWarnings("unchecked")
        List<CompositeDataSupport> recordings = (List<CompositeDataSupport>) ms.getAttribute(FRC_OBJECT_NAME, "Recordings");
        if(recordings.size() > 1) {
            throw new Error("More than one recording available");
        recording = recordings.get(0);
        if( (boolean) recording.get("running")) {
            throw new Error("Recording is already running");
        // store the recording name for later us
        recordingObjectName = (ObjectName) recording.get("objectName");
        // set duration for the recording
        final long duration = 10 * 60 * 1000; // 10 minutes in milliseconds - this number was determined by looking at the slowest test on jenkins
        final Attribute durationAttribute = new Attribute("Duration", duration);
        ms.setAttribute(recordingObjectName, durationAttribute);
        // set destination for the recording
        try {
            Files.createDirectories(file.getParentFile().toPath());
            final Attribute destinationAttribute = new Attribute("Destination", file.getAbsolutePath());
            ms.setAttribute(recordingObjectName, destinationAttribute);
        } catch (IOException e) {
            e.printStackTrace();
        // read event settings
        @SuppressWarnings("unchecked")
        List<CompositeDataSupport> eventSettings = (List<CompositeDataSupport>) ms.getAttribute(recordingObjectName, "EventSettings");
        final long period = 0;
        final long threshold = 100 * 1000 * 1000; // 100 ms - given in ns
        // enable all events, set threshold to 100ms and stacktrace to false (because we only parse this in code)
        for(CompositeData eventSetting: eventSettings) {
            final Integer eventid = (Integer) eventSetting.get("id");
            ms.invoke(recordingObjectName, SET_EVENT_ENABLED_OPERATION, new Object[] {eventid, true}, new String[] {int.class.getName(), boolean.class.getName()});
            ms.invoke(recordingObjectName, SET_STACKTRACE_ENABLED_OPERATION, new Object[] {eventid, false}, new String[] {int.class.getName(), boolean.class.getName()});
            ms.invoke(recordingObjectName, SET_PERIOD_OPERATION, new Object[] {eventid, period}, new String[] {int.class.getName(), long.class.getName()});
            ms.invoke(recordingObjectName, SET_THRESHOLD_OPERATION, new Object[] {eventid, threshold}, new String[] {int.class.getName(), long.class.getName()});
        // start the recording
        ms.invoke(recordingObjectName, START_RECORDING_OPERATION, new Object[0], new String[0]);
    public static void stopFlightRecording() throws Exception {
        // make sure the recording is stopped
        if ((boolean) ms.getAttribute(recordingObjectName, "Stopped")) {
            throw new Error("The FlightRecording has already stopped in current thread. Consider increasing the duration!");
        } else {
            ms.invoke(recordingObjectName, STOP_RECORDING_OPERATION, new Object[0], new String[0]);
        // close the recording to remove it from the flightrecorder
        ms.invoke(recordingObjectName, CLOSE_RECORDING_OPERATION, new Object[0], new String[0]);
This creates a .jfr file which can be used later.
I parse it in the TestRule to determine if the test violated memory or time limits, in which case the test is failed. (see the link in my first post for information about parsing .jfr files)
The code may not be the prettiest but so far it's working well.
Message was edited by: the_qa_guy
Changed the code to use the JFR bean

Similar Messages

  • DTP does not fetch all records from Source, fetches only records in First Data Package.

    Fellas,
    I have a scenario in my BW system, where I pull data from a source using a Direct Access DTP. (Does not extract from PSA, extracts from Source)
    The Source is a table from the Oracle DB and using a datasource and a Direct Access DTP, I pull data from this table into my BW Infocube.
    The DTP's package size has been set to 100,000 and whenever this load is triggered, a lot of data records from the source table are fetched in various Data packages. This has been working fine and works fine now as well.
    But, very rarely, the DTP fetches 100,000 records in the first data package and fails to pull the remaining data records from source.
    It ends, with this message "No more data records found" even though we have records waiting to be pulled. This DTP in the process chain does not even fail and continues to the next step with a "Green" Status.
    Have you faced a similar situation in any of your systems?  What is the cause?  How can this be fixed?
    Thanks in advance for your help.
    Cheers
    Shiva

    Hello Raman & KV,
    Thanks for your Suggestions.
    Unfortunately, I would not be able to implement any of your suggestions because, I m not allowed to change the DTP Settings.
    So, I m working on finding the root cause of this issue and came across a SAP Note - 1506944 - Only one package is always extracted during direct access , which says this is a Program Error.
    Hence, i m checking more with SAP on this and will share their insights once i hear back from them.
    Cheers
    Shiva

  • Fill in a PDF Form from source code.

    Hello:
    I have a PDF form made with LiveCycle. This form read the data from a xml file. I'm trying to fill it programatically but i don't know how. I'd like to know if there is some way to do this action, from source code or with a command line.
    Thanks a lot.

    iText is an API which has the PDF edit capabilities.
    Read this link : http://www.itextpdf.com/
    If you have Adobe LiveCycle Forms ES/ES2 solution component, you need not go for iText; Instead, you can invoke the LC APIs through C#.net and merge the XML data into the PDF.
    If you would go with option#2, let me know. I will share you my ideas.
    Nith

  • How can i call the certificate selection dialog box from source code?

    How can i call the certificate selection dialog box from source code?
    NB: Of course if i have more than one certificate in the Microsoft Keystore 'My'.
    Thank You in advance

    I found an example of the "TestStand UI Expression Control.ctl" and it works just the way I need it. (check the link)
    Proper use of "TestStand UI ExpressionEdit Control" in LabVIEW http://forums.ni.com/ni/board/message?board.id=330&requireLogin=False&thread.id=10609 
    The "Expression Browser Dialog Box Button" F(x) stays disable while editing the VI, however it become available when the VI is called from TestStand.
    Thank you,
    Hecuba
    Mfg. Test Engineer
    Certified LabVIEW Associate Developer

  • Start / stop recording from other software?

    I have a setup where three cameras are supposed to start/stop recording based on user interaction in another software. So, is it possible to trigger a recording to start and stop from another software? If so, how can this be done?

    To be honest Im not sure but I dont think so.
    If this is a securitycam setup one way to do it without having to have acces to "endles" storage space is to use one of the free services for webcasting like jtv, ustream, veetle, or livestream. I believe all of them have a privace option so you can enter a securitycode so only you can acces the videos. Its not optimal but it gets the job done. I believe some of them will erase videos after a while though if you dont highlight them for saving.

  • How to restrict number of Data Records from Source system?

    Hi,
    How can I restrict the number of Data records from R3 source system that are being loaded into BI. For example I have 1000 source data records, but only wish to transfer the first 100. How can I achieve this? Is there some option in the DataSource definition or InfoPackage definition?
    Pls help,
    SD

    Hi SD,
    You can surely restrict the number of records, best and simplest way is, check which characteristics are present in selection screen of InfoPackage and check in R3, which characteristics if given a secection could fetch you the desired number of records. Use it as selection in InfoPackage.
    Regards,
    Pankaj

  • ORA-00001:Unique Constraint while inserting 2 similar records from source

    Hi,
    in TEST1 there are records:
    10 20 ABC
    10 20 DEF
    I amt trying to insert into TEST which has CODE as Primary Key.
    declare
    type cur is ref cursor;
    cur_t cur;
    type v_t is table of TEST%rowtype;
    tab v_t;
    v_act_cnt_str VARCHAR2(4000);
    v_act_cnt NUMBER:=0;
    BEGIN
    v_act_cnt_str:=' SELECT COUNT(*) '||' FROM TEST '||' WHERE '||'('||CODE||')'||' IN '||'('||'SELECT '||CODE||' FROM TEST1'||')';
    DBMS_OUTPUT.PUT_LINE('The Actual Count String is'||v_act_cnt_str);
    EXECUTE IMMEDIATE v_act_cnt_str INTO v_act_cnt;
    open cur_t for select * from TEST1 ORDER BY ROWNUM;
    loop
    fetch cur_t bulk collect into tab limit 10000;
    if v_act_cnt=0 THEN
    forall i in 1..tab.count
    insert into TEST values tab(i);
    commit;
    ELSE
    v_merge_act_str :=
    'MERGE INTO TEST '||
    ' DEST' || ' USING TEST1 '||
    ' SRC' || ' ON (' || DEST.CODE=SRC.CODE || ')' ||
    ' WHEN MATCHED THEN ';
    first_str := 'UPDATE ' || ' SET ' ||
    'DEST.NAME=SRC.NAME,DEST.DEPT_NAME=SRC.DEPT_NAME;
    execute immediate v_merge_act_str || first_str;
    v_merge_act_str := '';
    first_str := '';
    commit;
    END IF;
    end loop;
    END;
    ITS GIVING ERROR as:
    ORA-00001: unique constraint (PK_TEST1) violated
    Any help will be needful for me
    Edited by: user598986 on Sep 22, 2009 4:20 AM
    Edited by: user598986 on Sep 22, 2009 4:22 AM

    Your code makes absolutely no sense whatsover. The whole point of MERGE is that it allows us to conditionally apply records from a source table as inserts or updates to a target table. So why have you coded two separate statements? And why are you using such horrible dynamic SQL?
    Sorry to unload on you, but you seem to have your code unnecessarily complicated, and that it turn makes it unnecessarily harder to debug. As an added "bonus" this approach will also perform considerably slower than a single MERGE statement. SQL is all about set operations. Don't do anything procedurally which can be done in a set.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Matrialized view not refreshing all records from source.

    My materialized view is not refreshing a fixed number of rows i.e 198 every time from source to target.What are the reasons for such behavior. Also what should i do to resolve this discrepancy.
    My mv is a FAST REFRESH ON DEMAND based on ROWID.
    It has a simple sql query select col1,col2,col3 from testschema.mytable@mydb;
    Thanks,
    Sandesh

    Hello Raman & KV,
    Thanks for your Suggestions.
    Unfortunately, I would not be able to implement any of your suggestions because, I m not allowed to change the DTP Settings.
    So, I m working on finding the root cause of this issue and came across a SAP Note - 1506944 - Only one package is always extracted during direct access , which says this is a Program Error.
    Hence, i m checking more with SAP on this and will share their insights once i hear back from them.
    Cheers
    Shiva

  • Is it possible to have duplicate columns from source List to target List while copying data items by Site Content and Structure Tool in SharePoint 2010

    Hi everyone,
    Recently ,I have one publishing site template that has a lot of sub sites which  contain a large amount of  content. 
    On root publishing site, I have created custom list including many custom fields 
    and saved it as  template  in order that 
    any sub sites will be able to reuse it later on .  My scenario describe as follows.
    I need to apply Site Content and Structure Tool to copy   a lot of items
     from  one list to another. Both lists were created from same template
    I  use Site Content and Structure Tool to copy data from source list 
    to target list  as figure below.
    Once copied  ,  all items are completed.
     But many columns in target list have been duplicated from source list such as  PublishDate ,NumOrder, Detail  as  
    figure below  .
    What is the huge impact from this duplication?
    User  can input data into this list successfully  
    but several values of some columns like  “Link column” 
    won't  display on “AllItems.aspx” page 
    .  despite that they show on edit item form page and view item form page.
    In addition ,user  can input data into this list  as above but 
    any newly added item  won't appear on 
    on “AllItems.aspx” page
    at all  despite that actually, these 
    item are existing on  database(I try querying by power shell).
    Please recommend how to resolve this column duplication problem.

    Hi,
    According to your description, my understanding is that it displayed many repeated columns after you copy items from one list to another list in Site Content and Structure Tool.
    I have tested in my environment and it worked fine. I created a listA and created several columns in it. Then I saved it as template and created a listB from this template. Then I copied items from listA to listB in Site Content and Structure Tool and it
    worked fine.
    Please create a new list and save it as template. Then create a list from this template and test whether this issue occurs.
    Please operate in other site collections and test whether this issue occurs.
    As a workaround, you could copy items from one list to another list by coding using SharePoint Object Model.
    More information about SharePoint Object Model:
    http://msdn.microsoft.com/en-us/library/ms473633.ASPX
    A demo about copying list items using SharePoint Object Model:
    http://www.c-sharpcorner.com/UploadFile/40e97e/sharepoint-copy-list-items-in-a-generic-way/
    Best Regards,
    Dean Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to remove css style from source code?

    Hello,
    I am working on launching a website soon and saw that I have some repetative css styles in the source code. I would like to remove them, because I want my style sheet "115209.css" to be the main controller.
    Below is my code. I just need to know what exaclty I need to remove to make that happen. I am a bit of a newbie and am not too comfortable in chopping it up myself in fear that I might lose a closing tag or something else of importance.
    Any help would be greatly appreciated!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Novato Youth Center</title>
    <link rel="stylesheet" type="text/css" href="115209.css" />
    <style type="text/css">
    <!--
    a:link {
    text-decoration: none;
    a:visited {
    text-decoration: none;
    a:hover {
    text-decoration: underline;
    a:active {
    text-decoration: none;
    -->
    </style><body>
    <div id="wrapper">
             <div id="headernav"> <a href="index.html">Home</a><br>
               <a href="overview.html">About Us</a><br>
               <a href="donate.html">Donate</a><br>
               <a href="getinvolved.html">Get Involved</a><br>
               <a href="contactus.html">Contact Us</a><br>
          Español </div>
            <div id="header"> <a href="index.html"><img src="http://www.novatoyouthcenter.org/logo.jpg" /></a>
        <div id="Title">
          <h1>Novato <br>
            Youth Center</h1>
        </div>
        <div id="Tag">
          <h2><em>Success Starts Here</em></h2>
        </div>
          <div id="socialbuttons"><a href="http://www.facebook.com/pages/Novato-Youth-Center/151677233396?v=app_2309869772#!/pages/No vato-Youth-Center/151677233396?v=wall"><img src="http://www.novatoyouthcenter.org/facebook_button_11.gif" alt="facebook" height="48" width="50" /></a><a href="https://twitter.com/#!/NovaYouthCtr"><img src="twitter-icon.jpg" alt="twitter" height="48" width="48" /></a></div>
      </div>
            <div id="navigation"><a href="6to5.html">Infants - 5 years</a> | <a href="5to14.html">5  - 14 years</a> | <a href="teens.html">Teens &amp; Young Adults</a> | <a href="adults.html">Parents &amp; Adults</a></div>
       <div id="leftcolumn">
             <h4> </h4>
             <h4>Academics...<br>
             Health...<br>
             Arts...<br>
             Athletics...<br>
             Community...<br>
             FUN!<br><br>
             Inspiring and <br>
             preparing youth<br>
             for success.
             </h4>
             <p> </p>
             <p> </p>
             <p> </p>
             <p> </p>
             <p> </p>
             <p> </p>
             <p><strong>Sign up for our</strong></p>
             <p><strong>E-newsletter!</strong></p>
             <p> </p>
             <form id="EmailSubmit" method="post" action="enewsletter.php">
               <label>
                    <input name="emailsubmit" type="text" id="emailsubmit" value="Email Address" />
                     </label>
                  <input type="submit" name="Submit" id="Submit" value="Submit" />
                  <input name="recipient" type="hidden" id="recipient" value="0" />
            </form>
             <p> </p>
       </div>
       <div id="content">
         <div id="mainphoto"><img src="indexphoto.jpg" width="656" height="386" alt="main" /></div>
       </div>
    </div>
    </body>
    </html>

    Maybe I already removed the "h1", but I still see link styles and the
    background color.
    I need to know what point to which point is safe to delete without messing
    up the coding.
    Thanks again,
    - Theresa

  • Possible to "create" new record from queries

    hi ,
    is it possible that i can get a "new" record using queries instead of thru pl/sql ?
    i have the following table :
    tbl1 :
    id time1 time2 type
    1 07-10-2006 03:00:00am 07-10-2006 04:00:00 am A
    1 07-10-2006 04:01:00am 07-10-2006 04:45:00 am B
    1 07-10-2006 04:50:00am 07-10-2006 07:00:00 am A
    tbl2
    id time type
    1 07-10-2006 05:00:01am K
    notice that tbl2 record falls between time1 & time2 of tbl1's 3rd record and i want to create a "new" record in tbl1 from tbl2
    the final results would be :
    id time1 time2 type
    1 07-10-2006 03:00:00am 07-10-2006 04:00:00 am A
    1 07-10-2006 04:01:00am 07-10-2006 04:45:00 am B
    1 07-10-2006 04:50:00am 07-10-2006 05:00:01am A
    1 07-10-2006 05:00:01am 07-10-2006 07:00:00 am K
    tks & rgds

    What happens if the time from tbl2 is not include into any interval from tbl1 ?
    Anyway, you can try something like following - with MERGE -, but it will work only in case of the time from tbl2 is include into an interval from tbl1 :
    SQL> select * from tbl1;
            ID TIME1               TIME2               T
             1 07/10/2006 03:00:00 07/10/2006 04:00:00 A
             1 07/10/2006 04:01:00 07/10/2006 04:45:00 B
             1 07/10/2006 04:50:00 07/10/2006 07:00:00 A
    SQL> select * from tbl2;
            ID TIME1               T
             1 07/10/2006 05:00:01 K
    SQL>
    SQL> merge into tbl1 a
      2  using (select b.rowid rwd, b.id, b.time1, c.time1 time2, b.type
      3         from   tbl1 b, tbl2 c
      4         where  b.id=c.id
      5         and    c.time1 > b.time1
      6         and    c.time1 < b.time2
      7         union all
      8         select null rwd, c.id, c.time1, b.time2 time2, c.type
      9         from   tbl1 b, tbl2 c
    10         where  b.id=c.id
    11         and    c.time1 > b.time1
    12         and    c.time1 < b.time2) d
    13  on (a.rowid=d.rwd)
    14  when matched then update set a.time2=d.time2
    15  when not matched then insert (a.id, a.time1, a.time2, a.type) values (d.id, d.time1, d.time2, d.type);
    2 rows merged.
    SQL>
    SQL> select * from tbl1;
            ID TIME1               TIME2               T
             1 07/10/2006 03:00:00 07/10/2006 04:00:00 A
             1 07/10/2006 04:01:00 07/10/2006 04:45:00 B
             1 07/10/2006 04:50:00 07/10/2006 05:00:01 A
             1 07/10/2006 05:00:01 07/10/2006 07:00:00 K
    SQL> Nicolas.

  • Is it possible to delete the records from LIS Table S601

    We have created some errorneous/unwanted  records in planning in table S601. Is there a way to delete these enties by Plant or material.
    Need your help urgently.. Please help.
    Thanks in Advance
    Rajesh

    Hi
    Once we created variant we can't delete it,
    Regards,
    srihari

  • Is it possible to start timeline playback from a script?

    I'm looking for a way to incorporate the timeline's "play command" (space when using keyboard shortcuts) in my script.
    If it is possible to do so I'm able to create a rudimentary flicking/flipping function to aid users in their animation process.
    (The scriptListener plugin wont leave any traces btw)
    Any help or advice is highly appreciated.
    Thanks in advance.
    Kind regards
    Patrick Deen

    It seems a work-around might be possible but I also do not know a direct approach for this.
    http://ps-scripts.com/bb/viewtopic.php?f=9&t=5923&p=27909&hilit=timeline+play&sid=84762a21 ace9fee707c80cab4b119093#p27909

  • Error Occures while loading data from Source system to Target ODS

    Hi..
    I started loading Records From source system to target ODS.while i running the job i got the following errors.
    Record 18211 :ERROR IN HOLIDAY_GET 20011114 00000000
    Record 18212 :ERROR IN HOLIDAY_GET 20011114 00000000
    sp Please help me in these following Errors..
    Thanks in advance,

    Hello
    How r u ?
    I think this problem is at the ODS level, ZCAM_O04 is ur ODS Name.
    Could u check the ODS Settings, and the Unique Data Records is Checked or Not ?
    Best Regards....
    Sankar Kumar
    +91 98403 47141

  • Java to start FMS Record

    I,m a newbie and one of my requirements is to Start the Record of the Stream as soon as the Game Starts. The Game gets the ID from JAVA and our client wants the stream record from JAVA.
    Is it possible to Call Stream.record() from JAVA?Similarly JAVA chould be Able to Stop the Record after the game Finishes.
    Any help on this is appreciated.
    Srini

    There must be java based RTMP SDK.. You should contact Adobe sales team directly..

Maybe you are looking for

  • Adobe says my internet connection isn't working when installing Photoshop CS6, yet it is perfectly fine.How do I fix this?

    I've recently purchased Photoshop CS6 for Students and Teachers for Windows, and I've gotten the Email game from Adobe with my Serial code, but after entering it it say to 'Please connect to the Internet and retry' even though my connection is fine.

  • OO ALV grid with a header line is this possible?

    Howdy! I have a requirement where I need to produce an ALV grid with the following format: <b>Text 1     Text 2  Text 3                  Text 4                           Text 6 Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9  Cell conents - Cel

  • How to use warning message

    Hello everyone! The message type of 'w' should have a yellow symbol on the status bar, right? But when I execute the code below, it produces the red symbol (X)... REPORT zmsgsamp        MESSAGE-ID s1. SELECTION-SCREEN BEGIN OF BLOCK a. PARAMETERS  : 

  • Running Monitor on Windows Box... does it run as a service?

    I've installed GW Monitor 7 on a Windows box running IIS and Tomcat 5.5. If I am logged in to the Windows server and have the Monitor Console open I am able to use the web based GW Monitor. If I log out and/or close the Console I am no longer able to

  • Dock unresponsive, folder icons do not appear

    Hello, All the following problems happened last night, the computer still works.. but it's slow, and erratic. -My dock will not appear (it's not set to hiding) -all folder icons are invisible -previously set hot corners do not work -relaunching finde