Manually purging trail files from OCI GoldenGate Service
Oracle GoldenGate Service is Oracle’s cloud offering to quickly use GoldenGate to move data within OCI as well as other clouds. Now network connection and bandwidth has a bit to do with the speed of data being processed, but it a quick service over all.
One thing that any GoldenGate Administrator has to get use to is the lack of access to the underlying host where GoldenGate is running. As my friends, the PMs, have told me this is due to GoldenGate Service being a “SERVICE”. This basically means you do not need or will get access to the underlying filesystem of GGS. For many GoldenGate Administrators this will be frustrating from a troubleshooting aspect – How do you confirm or make sure that trail files are being written to or read from? Well, the answer is in OCI GoldenGate Service, but that is not the point of this post.
The item that needs to be discussed is how to clean up trail files in GGS? Cleaning up trail files is important because they do take space and if you don’t have a task enabled to clean up trail files, then space will be consumed and eventually used up. How do you take care of this issue then manually? The answer is simple and what is built into Oracle GoldenGate and Oracle GoldenGate Service – REST APIs.
To purge a single set of trail files (all trail files) that begin with a specific name, the below code can be used in Microsoft Visual Studio Code (VSCode).
@url = <url>
###
POST {{url}}/services/v2/commands/execute
Authorization: Basic Z2dhZG1pbjphbHRlY0dHUE9DYWRtaW4yMyE
Content-Type: text/plain
{
"name": "purge",
"purgeType": "trails",
"trails": [
{
"name": “AL"
}
],
"useCheckpoints": false,
"keep": [
{
"type": "min”,
"units": "files”,
"value": 0
}
]
}
###
In the above example code, we are removing all the trail files that being with “AL”. If you want to remove more than one series of trail files, we can simply add more trail file names to the code as follows:
@url = <url>
###
POST {{url}}/services/v2/commands/execute
Authorization: Basic Z2dhZG1pbjphbHRlY0dHUE9DYWRtaW4yMyE
Content-Type: text/plain
{
"name": "purge",
"purgeType": "trails",
"trails": [
{
"name": “AL”
},
{
“name”:”AB”
}
],
"useCheckpoints": false,
"keep": [
{
"type": "min”,
"units": "files”,
"value": 0
}
]
}
###
If you are curious how this would look in a written cURL command, the below would do the same thing:
curl --request POST \
--url <url>/services/v2/commands/execute \
--header 'authorization: Basic Z2dhZG1pbjphbHRlY0dHUE9DYWRtaW4yMyE' \
--header 'content-type: text/plain' \
--header 'user-agent: vscode-restclient' \
--data '{"name": "purge","purgeType": "trails","trails": [{"name": "AL"}],"useCheckpoints": false,"keep": [{"type": "min","units": "files","value": 0}]}'
Enjoy!
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.
My brother recommended I might like this website.
He was entirely right. This post actually made my day. You cann’t imagine just how much time I had spent for this information! Thanks!
Feel free to surf to my web page: Nordvpn Coupons Inspiresensation – https://T.Co/ –
I love it whenever people come together and share ideas. Great website, stick with it!
my website; nordvpn coupons inspiresensation; in.mt,
Hello there! I could have sworn I’ve been to this site
before but after reading through some of the post I realized it’s new to me.
Nonetheless, I’m definitely happy I found it and I’ll be bookmarking and checking back frequently!
Here is my website: nordvpn coupons inspiresensation
nordvpn 350fairfax
Hi, I do believe this is a great blog. I stumbledupon it
😉 I am going to revisit yet again since I book marked it.
Money and freedom is the greatest way to change, may you be
rich and continue to guide others.
Here is my web blog; nord vpn coupon codes