SQLEXEC on each new trail file or just on replicat start to capture current FILESEQNO?

Dear community,
I need to capture fileseqno of the trail file that replicat is processing. But I only need to capture it once without overhead of adding fileseqno column to target tables.
I clearly understand that using colmap ( usedefaults, FILESEQNO = @GETENV ("RECORD", "FILESEQNO") ) inserts fileseqno value for every record captured from logs, but what I'm trying to accomplish is to react on the event of changing fileseqno number while replicat is running.
Following application logic I actually only need to capture fileseqno of the first trail, that is processed by replicat.
What I've tried so far is using following parameters for replicat (given two tables to be replicated):
table m.EventHead,
sqlexec( id set_first_seq_no1, spname pk_replication_accounting.set_first_seq_no, params( a_fileseqno = @GETENV( "GGFILEHEADER", "FILESEQNO" ) ), afterfilter ),
filter (@coltest( set_first_seq_no1.a_fileseqno, NULL ) or @coltest( set_first_seq_no1.a_fileseqno, MISSING ) or @coltest( set_first_seq_no1.a_fileseqno, INVALID ) ),
eventactions( ignore record );
table m.EventTail,
sqlexec( id set_first_seq_no2, spname pk_replication_accounting.set_first_seq_no, params( a_fileseqno = @GETENV( "GGFILEHEADER", "FILESEQNO" ) ), afterfilter ),
filter (@coltest( set_first_seq_no2.a_fileseqno, NULL ) or @coltest( set_first_seq_no2.a_fileseqno, MISSING ) or @coltest( set_first_seq_no2.a_fileseqno, INVALID ) ),
eventactions( ignore record );
pk_replication_accounting.set_first_seq_no is defined within package as
procedure set_first_seq_no( a_fileseqno in out pls_integer );
With filter clause I've tried to instruct GG to perform SQLEXEC only for the first record captured for every table, but with no success. Stored procedure is fired multiple times upon every record in trail file.
As far as I understand standalone SQLEXEC is not capable of obtaining value of @GETENV( "GGFILEHEADER", "FILESEQNO" ), though I have not tried it yet.
Another way, that I see, is to instruct extract to add one fake record for every new trail file and then to process it within map clause with SQLEXEC. For example if SOURCEISTABLE had per table effect, then we could get our single record for every trail using dual table:
sourceistable
table dual;
Still I don't know how to achieve required behavior.
Please help, if you know some workarounds.

Managed to capture current fileseqno for every replicat start with following parameters:
ignoreupdatebefores
map m.EventHead, target gg.tmp_gg_dummy, handlecollisions, colmap ( id = @GETENV ("RECORD", "FILERBA") )
sqlexec( id set_first_seq_no1, spname pk_replication_accounting.set_first_seq_no, params(a_fileseqno = @GETENV( "GGFILEHEADER", "FILESEQNO" ) ), afterfilter ),
filter (@getenv( "STATS", "TABLE", "GG.TMP_GG_DUMMY", "DML" ) = 0), insertallrecords;
map m.EventTail, target gg.tmp_gg_dummy, handlecollisions, colmap ( id = @GETENV ("RECORD", "FILERBA") )
sqlexec( id set_first_seq_no2, spname pk_replication_accounting.set_first_seq_no, params(a_fileseqno = @GETENV( "GGFILEHEADER", "FILESEQNO" ) ), afterfilter ),
filter (@getenv( "STATS", "TABLE", "GG.TMP_GG_DUMMY", "DML" ) = 0), insertallrecords;
tmp_gg_dummy is defined as the following:
create global temporary table gg.tmp_gg_dummy ( id number( 14, 0 ) ) on commit delete rows;
alter table gg.tmp_gg_dummy add constraint tmp_gg_dummy_pk primary key ( id );
Procedure is fired only once per every replicat start and report file shows the following:
From Table m.EventHead to GG.TMP_GG_DUMMY:
  Stored procedure set_first_seq_no1:
         attempts:         0
       successful:         0
From Table m.EventTail to GG.TMP_GG_DUMMY:
       #                   inserts:         0
       #                   updates:         1
       #                   deletes:         0
       #                  discards:         0
  Stored procedure set_first_seq_no2:
         attempts:         1
       successful:         1
though original mapping from m.EventTail has
inserts:   
69
updates:   
21
befores:   
21
deletes:    
0
discards:    
0

Similar Messages

  • XI - Closing request for each new coming file

    Hi all,
    I will receive files from XI system to BW (csv files).
    I have a scenario like this; each new file that has been received by Bw system (pushed by XI) has to be exactly one request in PSA.
    That means one file will be one request in PSA.
    There shouldn't be a case where two newly received file went to the same psa request.
    As I know, we can close a request based on the row number, size or time. But i need to close this request after each file receive in BW.
    Thanks in advance.
    Regards
    Ozan

    Hi,
            You can try one thing, in your proxy method of interface class through SPROXY transaction. Read in data from XI in different packages with code as mentioned below.
    **** INSERT IMPLEMENTATION HERE **** ***
    DATA: l_text TYPE string,
            l_s_data TYPE LINE OF 'YOUR WEBSERVICE NAME'
            l_t_data TYPE 'YOUR WEBSERVICE NAME'.
    FIELD-SYMBOLS <l_line> LIKE LINE OF input-data-item.
    Divide the data and transfer it to PSA with some identifier*
      LOOP AT input-data-item ASSIGNING <l_line>.
        MOVE-CORRESPONDING <l_line> TO l_s_data. 
        APPEND l_s_data TO l_t_data.
       Append l_s_data to l_p_data.
    ENDLOOP.
    Sent it to the DataSource/PSA
      CALL FUNCTION 'Remote Function Module'
        EXPORTING
          data           = l_t_data
        EXCEPTIONS
          internal_error = 1
          OTHERS         = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO l_text.
        RAISE EXCEPTION TYPE zbudcx___BIC__CQZPI_AUS0000300
        EXPORTING text = l_text.
      ENDIF.
    I hope, this works.
    Regards,
    Harpal

  • URGENT: New JAR file NOT being pushed to web clients.

    Greetings...
    When our web app first came to market, some of our customers were still using a dial-up connection. Therefore, since one of our web pages uses an applet, it was decided to ship the necessary JAR files to clients on an installation CD, rather than burden our dialup customer with having the JAR files pushed out to them over the line. The jar files are installed in the C:\Program Files\JavaSoft\JRE\1.3\lib\ext directory on the client computers.
    Don't ask why, but we are now attempting to have our web site push out a new JAR file to just one of our clients, but the problem I'm running into is that if the OLD jar file already exists in the C:\Program Files\JavaSoft\JRE\1.3\lib\ext directory, the NEW jar file isn't pushed out by the website. My understanding was that the system would automatically detect if the JAR file on the client was older than the JAR file on the server and would then push the newer JAR file out to the client, but obviously, I'm missing something.
    Any help/suggestions you can provide would be greatly appreciated. Following is the kludgy ASP code for this...
    <%szCustomer = getCustomer();%>
    <%if (szCustomer="SccTest") {%>
    <!-- NEW CODE: Push out the NEW JAR file with the meters to feet change. -->
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="600" height="400" name="SccMapplet"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0" ID="IMSMap" VIEWASTEXT>
    <PARAM NAME="code" VALUE="com.scc.mapplet.SccMapplet">
    <param name="archive" value="SccMapplet.jar,xml.jar,iiimp.jar,jai_codec.jar,jai_core.jar,mlibwrapper_jai.jar">
    <PARAM NAME="scriptable" VALUE="true">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="WebAXL" VALUE="/EweData/<%=getCustomer()%>.axl">
    <PARAM NAME="Session" VALUE="<%=SCCSession.SessionID%>">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3" width="600" height="400"
    code="com.scc.mapplet.SccMapplet" archive="SccMapplet.jar,xml.jar,iiimp.jar,jai_codec.jar,jai_core.jar,mlibwrapper_jai.jar"
    pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
    <NOEMBED>
    </COMMENT>
    No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
    </NOEMBED></EMBED>
    </OBJECT>
    <%} else {%>
    <!-- OLD CODE: Use the JAR file already installed on C:\Program Files\JavaSoft\JRE\1.3\lib\ext -->
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width=600 height=400 ID="IMSMap" name="SccMapplet" VIEWASTEXT>
    <param NAME="code" VALUE="com/scc/mapplet/SccMapplet">
    <param NAME="name" VALUE="IMSMap">
    <param NAME="SCRIPTABLE" VALUE="TRUE">
    <param NAME="type" VALUE="application/x-java-applet;version=1.2">
    <PARAM NAME="WebAXL" VALUE="/EweData/<%=getCustomer()%>.axl">
    <PARAM NAME="Session" VALUE="<%=SCCSession.SessionID%>">
    <comment>
    <embed type="application/x-java-applet;version=1.2" width="600" height="480" code="com/esri/ae/applet/IMSMap" name="IMSMap">
    <noembed>
    </COMMENT>
    No JDK 1.2 support for APPLET!!
    </noembed></embed>
    </object>
    <%}%>

    I guess the problem is, that your local jar file's classes copied to the JRE's ext directory have higher priority. The JRE does not store your applet jar locally and so does not overwrite anything you may have installed, it only executes the jar file given by the browser which may cache it or not.
    Why don't you use the Java Webstart technolgy? It's pretty simple to use it. Customers would have to download every new jar version only once and Webstart will take care that the local version is up-to-date every time your app is started.

  • Need to update remote trail file seqno from  source

    Experts,
    i need to change the  remote trail file seqno to different no other than 0 from the source side.
    i tried delete rmtrail and add with like below
    add rmttrail /opt/app/pdfdfs/ggs/trails/rddf1dfd/rg, extract ext, seqno 4670
    seems like it is not working and trying to read from 0 itself. as i dont have access to target db i cannot alter the replicat there. please suggest

    Hi,
    I think you are trying to add the rmttrail with a different seqno than 0.
    By default when the the rmttrail is been added like below and started
    add rmttrail /opt/app/pdfdfs/ggs/trails/rddf1dfd/rg, extract ext
    In the target it will start creating files like rg000000
    In your case, you are trying to get it created with a different number.
    Let's assume that you have trail files till rg000014 and so you want the new trail file to be created as rg000015
    if so then you could use the following command
    add rmttrail /opt/app/pdfdfs/ggs/trails/rddf1dfd/rg, extract ext, seqno 15, rba 0
    This will help to create files with sequence rg000015.
    Hope this helps.
    Thanks,
    Praveen jacob

  • Codepage of .hql file in New-AzureHDInsightHiveJobDefinition -File makes a difference

    Put the following contents into a myquery.hql file:
    dfs -copyToLocal /HiveQL/myparameters.hql ;
    source myparameters.hql;
    select * from dim_date where DATE = "${hivevar:beginDate}";
    If you save that .hql file as ANSI, then then the following succeeds. If you save it as UTF8, then the following fails with an error:
    FAILED: ParseException line 1:3 cannot recognize input near 'dfs' '-' 'copyToLocal'
    Here's the PowerShell to run that .hql file.
    $hiveJobDefinition = New-AzureHDInsightHiveJobDefinition -File "/HiveQL/myquery.hql"
    $hiveJobStarted = Start-AzureHDInsightJob -Cluster $appSettings["ClusterName"] -JobDefinition $hiveJobDefinition
    $hiveJobFinished = Wait-AzureHDInsightJob -Job $hiveJobStarted -WaitTimeoutInSeconds 86400
    $stdOut = Get-AzureHDInsightJobOutput -Cluster $appSettings["ClusterName"] -JobId $hiveJobStarted.JobId -StandardOutput
    $stdErr = Get-AzureHDInsightJobOutput -Cluster $appSettings["ClusterName"] -JobId $hiveJobStarted.JobId -StandardError
    Any idea why something so simple as the codepage of the file breaks this? Is it documented anywhere? Is this a bug? Can it be fixed?
    http://artisconsulting.com/Blogs/GregGalloway

    Maheshwar-
    Using the HDInsight tools for Visual Studio 2013, when I create a new Hive Query file, it creates it as UTF8. I don't know if there's a Visual Studio setting to change that or not. Then when I upload that to blob storage (with any Azure storage management
    tool which will just preserve the codepage of the file you upload) and run it using
    New-AzureHDInsightHiveJobDefinition it fails. Changing that file to ANSI before upload will work when run via
    New-AzureHDInsightHiveJobDefinition.
    Yes, that hive query succeeds if run from the Query Console website. Since I'm pasting in the query, I don't think codepage comes into play. It also succeed if I submit it from the HDInsight tools for Visual Studio because I believe those tools convert
    it to ANSI before upload from what I've been able to trace with Fiddler.
    I confirm it's UTF8 not UTF32 or UTF16. I haven't tried those to see if they fail.
    Thanks,
    Greg
    http://artisconsulting.com/Blogs/GregGalloway

  • AME Bug: Creates new CFA file for each clip queued!

    Here is my workflow:  I have a 60 minute sequence of a dance performance of about 20 dances.  I queued in AME 20 exports to H.264 files by moving the workspace to the segment I want to export, adding it to the queue with a file name, and repeating for the next section (dance).
    For each queued export I make a copy so I have a low and high resolution export (40 in total).  Finally, the last queued export is a MPEG DVD file for Encore.
    The issue is that when I start the queue, the first thing AME does is conform the ENTIRE SEQUENCE'S AUDIO (not just the clip).  Then it starts the export.  On my computer (Core i7-2600, 24GB RAM), it takes over 15 minutes to conform a 60 minute sequence (the CFA ends being close to 2GB).  While it's conforming the CPU load never goes above 10%.  The export starts for the first clip and that takes less than 90 seconds with all 8 cores pegged at 100% and the GPU over 50%.
    Then AME startes the conforming AGAIN FOR THE ENTIRE SEQUENCE instead of re-using the CFA file it just conformed!
    Why doesn't it re-use the CFA file?  Or, why does it conform the entire sequence if all I'm exporting is a portion?
    And why isn't conforming a multi-threaded process?
    At this rate, it will take all night and consume close to 50 GB of disk space in CFA files.
    Here is what my queue looks like:

    Actually, I think it's working as designed when it conforms upon export.  See the online help HERE.
    It says, in part:
    Premiere Pro does conform audio in uncompressed clips when you use them in sequences with non-matching sample rates. However no conforming is done until you export the sequences or create audio preview files.
    The audio in my Canon MXF file is uncompressed 16-bit Linear PCM, so when I bring in the MXF files all PPr does is create PEK files.  This is really nice since I don't have to wait for conforming to begin editing.  Creating PEK files is really fast compared to conforming.  There is a caviat, though...
    The max file size from my camera is about 2GB.  Anything longer will span multiple files.  If I copy the contents of the CF card from the camera to my computer, the browse to the files using PPr, it will find all the spanned clips and interpret them as one longer video file.  Not problem, and that's how it's supposed to work.  BUT, since PPr is treating all these spanned files as one longer video clip, it WILL conform the audio.
    So to speed things up, I just bring in all the spanned files separately, then sort them and insert them into a sequence in order.  It works fine, and no conforming.
    My problem with AME is when it DOES finally conform, it's not re-using the CFA file.  In my particular case, I'm taking one long sequence and exporting different portions of it as separate exports.  I would think that AME would conform the whole sequence once, then re-use it.  But no, it sees each as a separate export, so each export gets its own identical (but different named) CFA file.
    So now my current workflow is:
    Import in all the video as separate MXF files.
    Import audio from digital recorder (house audio).
    Mark the clapper sync points on the video and audio files.
    Add video clips to a sequence in ascending order
    Add to the sequence the audio track and align the sync markers
    Balance the audio tracks with the mixer
    Create a new sequence
    Add to the new sequence the first sequence
    Render and replace audio so I can get a waveform (it helps find edit points) and conformed audio
    Add titles as needed
    Edit the timeline, transitions, add Encore chapters, etc.
    Export clips to AME queue
    Save early and save often!

  • I have just bought a new mac book, and I want to start from scratch by syncing the content of my iPhone, but each time I try it wants to delete everything on the iPhone and replace by what on the new iTunes library, i.e. nothing! can I do the reverse?

    I have just bought a new mac book, and I want to start from scratch by syncing the content of my iPhone, but each time I try it wants to delete everything on the iPhone and replace by what's on the new iTunes library, i.e. nothing! can I do the reverse, i.e. importing all my iphone's stuff on the new computer?

    You need to copy some files and your iTunes folder to the new computer. Do you have a backup of your old computer (or still have the old computer?) Was the old computer a Mac or PC?
    MacWorld - Move an iTunes library from a Windows PC to a Mac
    Back up your iTunes library by copying to an external hard drive
    iTunes- How to move your music to a new computer

  • HT204266 I erase all application of my iphone 4 with erase restore and now it's in restore mode. Now is there any way to restore my iphone without backup. Please help me. I have no need my previous file i just want my i phone ok and work smoothly as new p

    Hi,
    I erase all application of my iphone 4 with erase restore without any backup & i also lose the product serial number. Now it's in restore mode. Now is there any way to restore my iphone without backup. Please help me. I have no need my previous file I just want my iphone4 ok and work smoothly as like new ipone justlike i bought it at first time. I can't restore it. So Please help me to solv this proble.

    See Here  > without the Backup  >  http://support.apple.com/kb/HT4137

  • Need new result file for each iteration of a loop

    I am using TestStand 2010 SP1.  I have a main sequence that essentially does the following:
    Initialize the test equipment and set up the test environment [Sequence Call]
    Start Loop
    Run Tests [Sequence Call]
    End Loop
    Because testing can continue for hours, the resultant report file is enormous and difficult to evaluate. I need to create a new result file for each loop iteration.  I know that starting a new execution of “Run Tests” will create a result file for each iteration of the loop, but the new execution will not have access to the handles to the test equipment that were made during initialization.  The testing is time critical, therefore initializing the test equipment and setting up the test environment must occur outside of the loop. 
    How can I programmatically create a new result file at the beginning of the loop and close the result file at the end of the loop?  I am open to any other suggestions.  Thank you in advance for your help!

    Hi,
    You could modify your process model by making a copy of Test UUTs entry point. Then make the loop that usually tests multiple UUTs into your loop. Take the loop and init out of your sequence. You can init in PreUUTLoop or the other pre loop sequence, and maybe store your references in runstate.root.Locals and pass them to MainSequence. Then you can use Report Options to set it for separate report files.
    cc

  • The RAW files I just downloaded on new MacBook Pro are designated as JPEG in the photo info box. Why??

    The RAW files I just downloaded on new MacBook Pro are designated as JPEG in the photo info box. Why??

    How did you download? Have you been using the Import panel?
    How is the pop-up selector for the "Raw+Jpeg" set?
    If you are importing raw+jpeg pairs, and you set this to (Use Jpeg as original), then you will see a little J on the thumbnail, otherwise a R.
    Or did ou import with Jpeg only?

  • I have Lightroom 1.4.1 and I just started shooting the Nikon D700.  I cannot get Lightroom to read my new raw files, help...

    I have Lightroom 1.4.1 and I just started shooting the Nikon D700.  I cannot get Lightroom to read my new raw files, help...  Is there a plug in or update I can get?  I can't afford new software after new camera and new lense!

    Lightroom 1.4.1 does not support native (NEF) files from the D700 because the camera didn't even exist when it was released. To get support you have two options: upgrade to Lr 2.x (paid for upgrade) or convert your NEF files to DNG.
    DNG converter 5.4 can be downloaded from http://www.adobe.com/downloads/ (see right hand side of page)

  • How do you configure the iMac so separate users can access each other's files, especially iPhoto and iTunes? I need to be able to transfer media between two users and not just gain limited access using 'share'.

    How do you configure the iMac so separate users can access each other's files, especially iPhoto and iTunes? I need to be able to transfer media between two users and not just gain limited access using 'share'.

    See Terence Devlin's thorough explanation here.

  • FAQ: When I apply edits to an image using Revel, does it save a new file or just the edits?

    Q. When I apply edits to an image using Revel, does it save a new file or just the edits?
    A. Revel cloud keeps a copy of your full resolution originals. Edits in  revel are non-destructive, so your original is always preserved (unedited). When you export photo (MAC) Save to Camera Roll (iOS), that's when Revel applies your edits. On iOS the preview is used. on MAC the full resolution of the original is used to generate the new edited photo.

    Thanks kumars ,
    I have a specific drag and drop area on our website. This works fine for all earlier releases of Firefox after these security settings
    "(1) Enter "about:config" in the URL field; (2) Right click and select New->Boolean; (3) Enter "signed.applets.codebase_principal_support" (without the quotes) as a new preference name; (4) Click OK and try loading the file again."
    Bust these settings not work for me in Firefox 17.
    Yes the drag and drop functionality is java script based and i am not using any script blocker addons.

  • I just want to see my files with explorer.  Then transfer all pics to my computer. With the new update I can't.   How do I access my file with just explorer?

    I just want to see my files with explorer.  Then transfer all pics to my computer. With the new update I can't.   How do I access my file with just explorer?

        Let's bring back your file control, jpandwibble. What happens when you connect to your computer? Are you trying to use Explorer on the device or on computer? I am eager to continue troubleshooting!
    Thank you,
    YaleK_VZW
    Follow us on Twitter @VZWsupport

  • Deploying manually CC PKG file built with CC Packager. Not using any third party deployment tool. However after each 5 installations, the PKG files corrupt and cannot be use for a 6th installation. I have to build a new PKG file using CC packager.  Why ?

    Deploying manually CC PKG file built with CC Packager. Not using any third party deployment tool. However after each 5 installations, the PKG files corrupt and cannot be use for a 6th installation. I have to build a new PKG file using CC packager.  Why ?

    http://helpx.adobe.com/creative-cloud/packager.html
    http://forums.adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent

Maybe you are looking for

  • Delivery split issue with PO (STO)

    Hi All, I created 4 STO . While creating delivery it automatically creating delivery splits ( two deliveres for smultiple PO). I checked the ship to party , route,ship conditions , unloading point . every thing is same. among 4 STO only one line item

  • "Please Wait Message" Slider with cfgrid

    Some of my cfgrid type=html results are taking a long time and an impatient user will likely wander if they need to hit the submit button again. I've seen how to implement a standard "Please Wait Message" with flushing periodic results, but how do I

  • Can i watch dvds on a flash drive on a macbook pro w/o the dvd/cd drive?

    Can I watch dvd or listen to cds that are on a flash drive on a macbook pro without the dvd/cd drive?

  • Power Injector for 1310 wireless bridge

    Hello, We have a failed power injector on a 1310 series bridge. Will the "Power Injector LR" from a 1410 series bridge work on the 1310? Thank you, Matt

  • Install new adobe flash

    I have a Mac Air since 2012. Recently I get the message that I have to install/download the new Adobe Flash. When I try this a get the sreen with name and password. For some reason the combination doesn't work anymore. I have  signed in for a new nam