9 Replies Latest reply: Feb 7, 2014 2:18 PM by Paul Good RSS

    Initial Load Replicat and Parameter EXTTRAIL in OGG 12c

    Paul Good

      Hi,

       

      In the a previous version of OGG (11.1.1.0.0) we could configure the initial replicat as follows to process a trail created by an initial extract:

       

      REPLICAT R_LD_I

      SPECIALRUN

      SETENV (NLS_LANG = 'AMERICAN_AMERICA.AL32UTF8')

      USERID ***, PASSWORD ***

      SOURCEDEFS  ./dirdef/E_LD_C.def

      EXTTRAIL    ./dirdat/E_LD_op/LD_I

      DISCARDFILE ./dirout/R_LD_I.dsc

      INSERTAPPEND

      BATCHSQL

       

      The replicat when started would then process the following files in the directory dirdat/E_LD_op:

       

      LD_I000000

      LD_I000001

      ...

       

      However in OGG 12c (12.1.2.0.0) I receive the error message when starting the replicat:

       

      ERROR   OGG-00045  Trails cannot be used with SPECIALRUN.

       

      The solution appears to be to use the parameter EXTFILE and specify each individual file. However, as we promote code between different environments the amount of data will differ and thus number of files will change. The replicat process abends if a file is missing so it is not just a matter of specifying a potential maximum number of files.

       

      Any ideas how I can get around this problem will be gratefully received.

       

      Thanks,

       

      Paul

        • 1. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
          Partha Sarathy S

          EXTTRAIL is for CHANGE SYNCHRONIZATION, whereas SPECIALRUN is for INITIAL LOAD. How you could use them together?. I think what you are talking should be EXTFILE?

          • 2. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
            Paul Good

            We were able to use SPECIALRUN and EXTTRAIL together in an inital replicat in an older version (11.1.1.0.0) but not in the latest version (12.1.2.0.0). Maybe it was an undocumented feature which no longer can be used.

             

            Thanks,

             

            Paul

            • 3. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
              Partha Sarathy S

              Might be. But I haven't used in such way. I would use RMTFILE in extract and EXTFILE in REPLICAT

              • 4. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                Paul Good

                Actually, I've just looked through the documentation. For OGG 11.1.1.1 in the Administrator's Guide on page 220 in Table 30 "Initial-load Replicat parameters for loading data from file to Replicat" it states EXTTRAIL can be used. This feature must be deprecated in more recent versions.

                 

                Thanks,

                 

                Paul

                • 5. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                  Partha Sarathy S

                  Possible. Because Trail files should be used only in Change sync and not in INITIAL Load unlike extract files

                  • 6. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                    MikeN

                    In the a previous version of OGG (11.1.1.0.0) we could configure the initial replicat as follows to process a trail created by an initial extract:

                       REPLICAT R_LD_I

                       SPECIALRUN

                       ...

                       EXTTRAIL    ./dirdat/E_LD_op/LD_I

                    The replicat when started would then process the following files in the directory dirdat/E_LD_op:

                       LD_I000000

                       LD_I000001  ...

                    However in OGG 12c (12.1.2.0.0) I receive the error message when starting the replicat:  ERROR   OGG-00045  Trails cannot be used with SPECIALRUN.

                    The solution appears to be to use the parameter EXTFILE and specify each individual file. However, as we promote code between different environments the amount of data will differ and thus number of files will change. The replicat process abends if a file is missing so it is not just a matter of specifying a potential maximum number of files.

                    Any ideas how I can get around this problem will be gratefully received.

                     

                    Not sure if this meets the requirements of your use-case or not... but you can use "ExtFile dirdat/E_LD_op/LD_I  MaxFiles 9999  [MegaBytes 2048]" which in effect creates a series of files just like trails [1].  The "MaxFiles" isn't used in this case to limit the number of files created, but rather to force multiple numbered files to be created, so just pick an arbitrarily high number -- and make "megabytes" sufficiently large.

                     

                    Cheers,

                    -Mike

                     

                    [1] EXTFILE - 12c (12.1.2)

                     

                    Message was edited by: MikeN -- Fixed "ExtTrail" => "ExtFile"

                    • 7. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                      Paul Good

                      Thanks Mike. Unfortunately the parameters MAXFILES and MEGABYTES are only valid for the extract process and I will need to reference explicitly each file that the extract produces in the replicat parameter file.

                      • 8. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                        MikeN

                        Thanks Mike. Unfortunately the parameters MAXFILES and MEGABYTES are only valid for the extract process and I will need to reference explicitly each file that the extract produces in the replicat parameter file.

                         

                        You're right, that's not going to help...  Sorry, I completely glossed over that you were using "extTrail"/"extFile" in a replicat parameter file, and not a pump (extract).  In one last attempt to be useful (though, I haven't tried any of these, since I haven't done a "SpecialRun" since GG v9.5), you could use a variable in the prm file, so that you can script your replicat runs; e.g.,

                         


                        r_ld_i.prm file:

                           REPLICAT R_LD_I

                           SPECIALRUN

                             ...

                           ExtFile ?myfile  

                           ...

                         

                        That is literally "?" followed by any variable placeholder, e.g,. "myfile".  So then, when you run:

                         

                        bash$ export myfile=path/to/file000001

                        bash$ ./replicat paramfile dirprm/r_ld_i.prm reportfile dirrpt/out.rpt

                         

                        The variable "?myfile" should be replaced by the env var $myfile... (That's how it works for normal replicat's & extract's, anyway.)  Even better,

                         

                        bash$ for f in path/to/file*

                        do

                           export myfile=$f     # just being explicit here; could simply do "for myfile in ..."

                          ./replicat  pf dirprm/r_ld_i.prm  rf dirrpt/$(basename $myfile).rpt

                        done

                         

                        One one last idea (also not attempted!) is to see if you can go ahead and run "add replicat...extFile path/to/file" in ggsci, and then "start" it in ggsci, instead of running replicat from the shell and also remove the extFile parameter in the prm file. I'm not sure if that will work or not (I kind of recall that being an option at one point, but like I said, I haven't done something like this in a really long time.)

                         

                        Good luck,

                        -Mike

                         

                        Message was edited by: MikeN

                         

                        Message was edited by: MikeN

                        • 9. Re: Initial Load Replicat and Parameter EXTTRAIL in OGG 12c
                          Paul Good

                          Thanks Mike. I'll give it ago.