Author Topic: Autostart instances on Linux  (Read 1938 times)

Srinivas

  • Guest
Autostart instances on Linux
« on: March 11, 2017, 12:26:07 AM »
Hi folks,

i am new to IBM CMOD, Please help me ( Auto start instance )

I tried to start the CMOD instance with arssockd command manually, But it need to be auto-start instance while rebooting the system.

Platform : CMOD V9.0, DB2 V9.7, LINUX ( RHEL 6.5 )

Please help me out in this!!!!!!!!!!!
« Last Edit: March 12, 2017, 11:14:13 PM by Srinivas »

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Autostart instances on Linux
« Reply #1 on: March 13, 2017, 03:25:50 AM »
Hi,

your question has nothing to do with being new with CMOD. It has to do with the knowledge of your operating system.

If you know how to start / stop manually CMOD, then with that knowledge, you should be able to auto start / stop your instance for your operating system.

In your case, you are using GNU/Linux RedHat V6.5, then look at this link https://blog.hazrulnizam.com/create-init-script-centos-6/ It will explain you how to create a service in RedHat / CentOS environment.

Then for CMOD, as you already know, but I will repeat it, since you are new in CMOD.
In order to start CMOD, you must ensure 2 things:

1) The CMOD database is already started
2) You are connected with the CMOD Instance owner user

How to start DB2?
You have 2 ways, normally with the CMOD instance owner:
CMOD way) arsdb -gkv -I <cmodinstance>
DB2 way) db2start

If you are not sure which user needs to start DB2, then you need to check the CMOD configuration files corresponding to ars.cfg and search for the key DB2INSTANCE this will give you the DB2 Instance owner, and do a "db2start" with this user.
Even better, check with your DB2 dba, if you have them, in order to check how DB2 is started...

How to start CMOD?
If DB2 is started, and this is a PREREQ... then you can simply run the command, with the CMOD instance owner:

arssockd -S -I <cmodinstance>

How to find the name of you instance owner? Look at the file ars.ini and look at the key SRVR_INSTANCE_OWNER this will give you the name of the linux user which is the CMOD instance owner.


So basically a script to start CMOD could be:

Code: [Select]
arsdb -gkv -I MYCMOD
arssockd -S -I MYCMOD

and to stop it

Code: [Select]
arssockd -T -I MYCMOD
arsdb -hv -I MYCMOD

Hope that you can now implement your auto start / stop for CMOD according to your company rules / requirements.

Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML