cancel
Showing results for 
Search instead for 
Did you mean: 
manthinks
Mission Specialist
Mission Specialist
  • 2,703 Views

i want to know is their any ansible module/role to use for IBM DB2 database?

Jump to solution

Task is to restore DB2 database using ansible where managed host is IBM AIX server. 

Labels (2)
Tags (3)
1 Solution

Accepted Solutions
Travis
Moderator
Moderator
  • 2,564 Views

@manthinks -

There is nothing special about Ansible here to do this for you. Unfortunately, when there are not Ansible modules or collections that exist, then it is up to the end-user to specify how to move forward. What can be done is leverage existing BASH or other scripts with Ansible using the SHELL/COMMAND/RAW modules. These allow regular commands to be specified when other modules don't exist.

Again, these commands and arguments within Ansible must be valid and useable just as if you were using on the command line. It has been a very long time since I've done anything with a DB2 database, but I do remember you had to be a DB2 user to do any administration, so the playbook you create will need a BECOME_USER of DB2USER (providing that is the service account and admin for DB2).

You will then be able to use all DB2 commands to manage the database including backup and restore. From my experience a lot of DB2 admins will create their own scripts for backup and restore, so most likely your colleague was suggesting that you leverage the existing process and just add it to a playbook.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

4 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 2,610 Views

Not sure about it ( could not find it in Ansible docs ) but see if this helps you in any way :

https://github.com/bernardoVale/ansible-role-db2 

else check the same in : https://www.ansible.com/community 

manthinks
Mission Specialist
Mission Specialist
  • 2,580 Views

Thank you, @Chetan_Tiwary_ , for your reply. I did see this link, but I believe this module on GitHub is intended solely for the installation of DB2 and not for tasks such as restoring DB2. Is there any other method for accomplishing this without using modules or collections that are specifically designed for DB2? I asked my colleague, and he mentioned that you can request a script file from the customer and do the restoration thing . Do you have any information about this?

0 Kudos
Travis
Moderator
Moderator
  • 2,565 Views

@manthinks -

There is nothing special about Ansible here to do this for you. Unfortunately, when there are not Ansible modules or collections that exist, then it is up to the end-user to specify how to move forward. What can be done is leverage existing BASH or other scripts with Ansible using the SHELL/COMMAND/RAW modules. These allow regular commands to be specified when other modules don't exist.

Again, these commands and arguments within Ansible must be valid and useable just as if you were using on the command line. It has been a very long time since I've done anything with a DB2 database, but I do remember you had to be a DB2 user to do any administration, so the playbook you create will need a BECOME_USER of DB2USER (providing that is the service account and admin for DB2).

You will then be able to use all DB2 commands to manage the database including backup and restore. From my experience a lot of DB2 admins will create their own scripts for backup and restore, so most likely your colleague was suggesting that you leverage the existing process and just add it to a playbook.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
manthinks
Mission Specialist
Mission Specialist
  • 2,550 Views

Thanks @Travis this reply does answers and clears lot of my doubt.thanks for the support.

and also thanks to @Chetan_Tiwary_ again.

Join the discussion
You must log in to join this conversation.