Updating parameter files from REST

One of the most important and time consuming things to do with Oracle GoldenGate is to build parameter files for the GoldenGate processes.  In the past, this required you to access GGSCI and run commands like:

GGSCI> edit params <process group>

After which, you then had to bounce the process group for the changes to take effect.  This process has improved a good bit and can be a bit more dynamic in my opinion.  

In a previous post (here), I showed you have to build an Extract using the associated REST API end-point and JSON.  Being able to build extracts/replicats by using a REST API and JSON is a huge step forward with how administration of the Oracle GoldenGate environment is done.  In this post, I want to show you how quickly you can update your parameter files by using REST API and JSON.

Note: I’m assuming you have some basic understand of how cURL works.  If not, refer to a tutorial that can be easily found on the internet.

The first thing you need to do is fine the contents of the parameter file for the extract/replicat.  Depending on your environment, this would be found in $DEPLOYMENT_HOME/etc/conf/ogg.

paramslist.png

When you look at the above image, you can see that I have a few parameter files.  If I was to do a cat on the the IEXTTPC.prm file, you would see contents like:

extract IEXTTPC
useridalias CGGATE domain OracleGoldenGate
exttrail zz
sourcecatalog oggtst1
table tpc.categories;
table tpc.categories_descriptions;
table tpc.customers;
table tpc.customers_info;
table tpc.customers_lkup;
table tpc.next_cust;
table tpc.next_order;
table tpc.orders;
table tpc.orders_products;
table tpc.orders_status_history;
table tpc.orders_total;
table tpc.products;
table tpc.products_description;
table tpc.prodcts_to_categories;

The contents of this parameter file is quite simple.  

Let’s take the example of the requirement to add a new table to the parameter file.  This table is called blc.totals.  This table needs to be added to the bottom of the parameter file.  In the traditional process, I would have to access AdminClient and perform an edit params IEXTTPC; however, you want to do this without touching the server.  

The process to do this would be to use the Update (PATCH) cURL commands to modify the parameter file.  For more information on how to patch option, you can refer to GoldenGate REST API documentation (here).

What you nee to look at in the documentation, is the body section.  Within the body section, the config option.  This is an optional array parameter that takes text strings into the configuration.  The end result of what the contents of the parameter would look like:

{
"config":[
"extract IEXTTPC",
"useridalias CGGATE domain OracleGoldenGate",
"exttrail zz",
"sourcecatalog oggtst1",
"table tpc.categories;",
"table tpc.categories_descriptions;",
"table tpc.customers;",
"table tpc.customers_info;",
"table tpc.customers_lkup;",
"table tpc.next_cust;",
"table tpc.next_order;",
"table tpc.orders;",
"table tpc.orders_products;",
"table tpc.orders_status_history;",
"table tpc.orders_total;",
"table tpc.products;",
"table tpc.products_description;",
"table tpc.prodcts_to_categories;”,
“table blc.totals;"
]
}

Notice that we are just taking all the contents of the parameter file and adding the table that needs to be added to the bottom.  Now you can use this JSON block to update the parameter file.  The cURL command to update the parameter file would look something similar to this:

curl --request PATCH \
--url https://localhost:16001/services/v2/extracts/IEXTTPC \
--header 'authorization: Basic b2dnYWRtaW46V0VsY29tZTEyMzQ1IyM=' \
--data '{
"config":[
"extract IEXTTPC",
"useridalias CGGATE domain OracleGoldenGate",
"exttrail zz",
"sourcecatalog oggtst1",
"table tpc.categories;",
"table tpc.categories_descriptions;",
"table tpc.customers;",
"table tpc.customers_info;",
"table tpc.customers_lkup;",
"table tpc.next_cust;",
"table tpc.next_order;",
"table tpc.orders;",
"table tpc.orders_products;",
"table tpc.orders_status_history;",
"table tpc.orders_total;",
"table tpc.products;",
"table tpc.products_description;",
"table tpc.prodcts_to_categories;”,
“table blc.totals;"
]
}'

After running the above cURL command, you will see a message output that says the parameter file passed validity check:

 

{
“$schema”: “api:standardResponse”,
“links”: [
{
“rel”: “canonical”,
“href”: “https://localhost:16001/services/v2/extracts/IEXTTPC”,
“mediaType”: “application/json”
},
{
“rel”: “self”,
“href”: “https://localhost:16001/services/v2/extracts/IEXTTPC”,
“mediaType”: “application/json”
}
],
“messages”: [
{
“$schema”: “ogg:message”,
“title”: “Parameter file IEXTTPC.prm: Validity check: PASS”,
“code”: “OGG-10183”,
“severity”: “INFO”,
“issued”: “2019-12-10T16:06:36Z”,
“type”: “http://docs.oracle.com/goldengate/c1910/gg-winux/GMESG/oggus.htm#OGG-10183”
}
]
}

 

As long as you have a successful message on the validity check the parameter file has been updated.  This can be confirmed by going to and look at the parameter file by either the HTML5 web page or by reviewing the parameter file as identified earlier.

updatedparams.png

The only thing left to do after updating the parameter file is to restart the extract/replicat.  This can be done manually or automated via the REST API call as well.

You should not be able to quickly modify your parameter files on the Oracle GoldenGate Microservices Architecture.

Enjoy!!! 

Please follow and like:
Comments
  • Hello! Quick question that’s entirely off topic. Do you know how
    to make your site mobile friendly? My web site looks weird when viewing from my iphone 4.
    I’m trying to find a template or plugin that might be able to resolve
    this problem. If you have any recommendations, please share.
    Thanks!

  • I am not sure where you are getting your info,
    but good topic. I needs to spend some time learning more or understanding more.
    Thanks for great information I was looking for this information for my mission.

  • Do you mind if I quote a few of your articles as long as
    I provide credit and sources back to your weblog? My blog site is in the very same niche as yours and my visitors would truly benefit from some of the information you provide here.
    Please let me know if this okay with you. Appreciate it!

  • Somebody essentially lend a hand to make significantly posts I might state.
    This is the very first time I frequented your web page and up to now?
    I surprised with the analysis you made to create
    this actual put up incredible. Excellent activity!

  • Hello there, You’ve done a great job. I’ll certainly digg it and personally suggest to my friends.
    I am sure they will be benefited from this website.

  • What’s Taking place i’m new to this, I stumbled
    upon this I’ve discovered It absolutely helpful and it has aided me out loads.

    I am hoping to give a contribution & assist different users like its aided me.
    Good job.

  • You are so interesting! I do not suppose I’ve read through a single
    thing like this before. So nice to discover another person with some unique
    thoughts on this issue. Really.. many thanks for starting this up.
    This web site is one thing that is needed on the
    internet, someone with a little originality!

  • Hi! Someone in my Myspace group shared this site with us so I came to
    take a look. I’m definitely enjoying the information.
    I’m bookmarking and will be tweeting this to my followers!
    Wonderful blog and terrific design.

  • I loved as much as you’ll receive carried out right here.

    The sketch is attractive, your authored material
    stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following.
    unwell unquestionably come more formerly again as exactly
    the same nearly very often inside case you shield this hike.

    Also visit my web site vpn

  • 토닥이를 처음 이용하시는 분들도 걱정하지 않으셔도 됩니다.
    아래와 같은 간단한 절차로 쉽게 예약하고 이용할 수 있습니다.

  • Sweet blog! I found it while searching on Yahoo News.

    Do you have any tips on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!

    Appreciate it

  • It’s nearly impossible to find well-informed people on this subject, however,
    you seem like you know what you’re talking about! Thanks

  • You really make it seem so easy with your presentation but I find this matter to be really something which
    I think I would never understand. It seems too complicated and extremely broad for me.
    I’m looking forward for your next post, I will try to get the hang of
    it!

  • What i don’t realize is in reality how you are now not actually a lot more
    smartly-liked than you might be right now.
    You’re very intelligent. You understand therefore considerably
    in the case of this subject, made me in my opinion imagine it from a lot of various angles.
    Its like women and men don’t seem to be involved unless it’s
    something to accomplish with Woman gaga! Your own stuffs nice.
    All the time handle it up!

  • You really make it appear so easy together with your presentation however I to find this topic to be really one
    thing which I feel I’d by no means understand. It seems too
    complicated and extremely wide for me. I’m taking a look forward in your subsequent put up, I will attempt to get the cling of it!
    What does vpn do https://tinyurl.com/2ax86k6l

  • Hello to all, the contents existing at this website
    are really remarkable for people experience, well, keep up the good work fellows.

  • Woah! I’m really digging the template/theme of this blog.

    It’s simple, yet effective. A lot of times it’s
    hard to get that “perfect balance” between user friendliness and visual appeal.
    I must say you have done a awesome job with this. Also,
    the blog loads extremely quick for me on Internet
    explorer. Superb Blog!

  • Hi, i think that i saw you visited my web site so i came to “return the favor”.I’m
    trying to find things to improve my website!I suppose its ok to use a few of your
    ideas!!

  • Howdy I am so happy I found your web site, I really found you by accident, while
    I was looking on Google for something else, Regardless I am here
    now and would just like to say cheers for a fantastic post
    and a all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the minute
    but I have saved it and also included your RSS feeds,
    so when I have time I will be back to read a lot more, Please do keep up the superb job.

Leave a Reply

Your email address will not be published. Required fields are marked *

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.