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”.
Can I simply just say what a comfort to uncover
somebody who actually understands what they’re discussing online.
You certainly understand how to bring a problem to
light and make it important. More and more people must check this out and understand this side of the story.
I was surprised that you aren’t more popular since you surely have the
gift.
Here is my web site – vpn
Nice post. I learn something totally new and challenging on websites
Hello, I check your new stuff like every
week. Your writing style is awesome, keep up the good work!
https://tinyurl.com/28555853 gamefly
I really like reading through a post that can make men and women think. Also, thank you for allowing me to comment!
This is really interesting, You’re a very skilled blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your site in my social networks!
This was beautiful Admin. Thank you for your reflections.
I always emailed this blog post page to all my contacts, as if like to read it after that my contacts will too.
https://tinyurl.com/24dyn2m6 what is vpn connection
Greetings! Very useful advice within this article! It’s the
little changes that produce the greatest changes.
Many thanks for sharing!
Great article, just what I was looking for.
I’m not that much of a internet reader to be honest but your blogs really nice, keep it up!
I’ll go ahea and bookmark your site to come back later on.Cheers https://Fortune-Glassi.Mystrikingly.com/
Link exchange is nothing else except it is just placing the other
person’s web site link on your page at suitable place and other person will also do similar in favor of you. https://timviec24H.com.vn/companies/tonebet-casino/