0

I am new to DB2/UDB. I have a 3 instances each instance have different number of databases below.

instance_1 - 20 databases
instance_2 - 18 databases
instance_3 - 16 databases

Totally I have 54 DBs. All are in sync now. I have developed a stored procedure for a requirement. I have to deploy this stored procedure to all 54 databases. I am doing it manually (54 times). It is very hard to do and it leads to human errors.

Can anyone suggest a tool / approach to do this process automatically.

jarlh
  • 42,561
  • 8
  • 45
  • 63
StackUser
  • 5,370
  • 2
  • 24
  • 44
  • a shell script that connects to each database in turn and then runs the `create or replace procedure...` statement on each (e.g. via `db2 -td@ -f proc_file.sql`), checking for a 0 return code? – Paul Vernon Jun 08 '18 at 12:15
  • Does your company have any deployment automation tooling? There are many, including open source ones, in addition to commercial products. If you wish to use shell scripts (or python, or perl etc), with Db2-CLP command line actions, be careful to run `db2 terminate` explicitly if you are running locally to the Db2-instances. If you are running remotely, you will need to automate the catalog actions for all remote nodes and remote databases, this is also simple for scripting. – mao Jun 08 '18 at 12:23
  • @P.Vernon: Can you please provide me the sample steps to deploy a single script to two instances. – StackUser Jun 08 '18 at 13:31
  • @mao: Can you please suggest me any one specific open source tool to automate the deployment process especially to handle my scenario. – StackUser Jun 08 '18 at 13:33
  • @stackuser Google database deployment automation open source. Speak with your developers or devops people , most likely they already have a toolset that you can harness if you have the skills, or are prepared to learn those skills. – mao Jun 08 '18 at 13:40

0 Answers0