With Generative AI (a.k.a Gen AI) tools, Database Administrators (DBAs) can be more productive at work in less time. For example, Gen AI tools can be used for writing code. In a matter of a few minutes, we can generate quality code with "How-to" instructions with the help of Gen AI tools. Gone are the days when DBAs used to spend 1 or 2 weeks to write a database monitoring program in Python or Shell Scripting (Linux or Windows Powershell).
In this article, I will compare three of the most popular free Gen AI tools available.
1. Claude AI (Sonnet 4.5) https://claude.ai/chat
2. Google Gemini https://gemini.google.com/
3. ChatGPT https://chatgpt.com/
Coding Task
Type the below question for generating code for developing a basic Oracle Exadata database cluster monitoring program.
I want to write code for monitoring Oracle Exadata cluster. I have a FULL RACK of 8 nodes. From a central monitoring server, I want to write a program in Python or Linux shell scripting that SSH into each of these 8 nodes and do monitoring such as node availability, Oracle database instance UP and DOWN, node load average, free memory and free disk space etc. Please write code for this program.
You will notice that in a matter of just a few minutes, each of these Gen AI tools produces code as per our requirement.
Which is the best Gen AI tool for DBAs for generating code ?
Though all the three Gen AI tools have done a decent job in generating the code for this monitoring program, Claude AI is the better one. Claude AI is better than ChatGPT and Google Gemini in the all the below four programming practices (coding practices).
1. Commenting
2. Verbose output (echo/print statements etc.)
3. Readability (Easy to understand Variable and Function/Procedure names)
4. Modularity (Separation of each sub-task into functions/procedures)
Additionally, Claude AI and ChatGPT have also written the code for faster execution. For example, for the Python code, both used ThreadPoolExecutor to monitor all 8 nodes of the cluster simultaneously for faster execution.
We would like to hear from the DBA community if you have more tips and hints in using Gen AI tools at work for Database Administration tasks. Please feel free to comment here.
No comments:
Post a Comment