Author Topic: Application Group and Database(DB2) Relation  (Read 4091 times)

Pk2016

  • Guest
Application Group and Database(DB2) Relation
« on: July 11, 2016, 10:25:21 AM »
Good Day!.

I have a question on how is the "Database name " allocated or has a relation to the "Application group identifier " under the "advanced" option under "Storage Management " tab for an Application Group

Application Group --> Storage Management  --> Advanced -->Application Group Identifier.

I query in DB2 using the three letter identifier . Found the Table with corresponding Table Owner, Table Name and Database Name and Table space name .

The scenario in Question has Four Table Space Name A**1, A**2 ,A**3 and A**4
The first  three are under the same Database Name  " P***100" but the Fourth One is under a New Database Name(P***101).

I would like to know what causes the Database name to change or create a new a one that is different from the others.I have access to query the three tables but not for "A**4". We have not made any changes from our end.

I coundnt find an answer and reached out to our DBA who comes back stating we(developers) make the changes and put content in a New Database name . Seems the Fourth Table is "SYSTEM TABLE " and we should not be creating new tables under the Database and refused to provide access untill we change it .

Im lost on what changes the Database and who creates them. Any help/advice is appreciated. I have attached a screen capture of the table. Have blocked few numbers ,not sure if its ok share that piece of info

CMOD CLient and Admin used : 8.5.0.7

Pk2016

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #1 on: July 13, 2016, 07:16:46 AM »
Still looking ..  :-[

Greg Ira

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: Application Group and Database(DB2) Relation
« Reply #2 on: July 14, 2016, 06:07:28 AM »
I can honestly say that in the 10 years of running CMOD for z/OS we've never had the database change when creating a new table.  That behavior is very peculiar as that would cause any number of issues.  Out of curiosity did you query SYSIBM.SYSTABLES and see who created the table?

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Re: Application Group and Database(DB2) Relation
« Reply #3 on: July 14, 2016, 08:09:44 AM »
I'm with Greg.  I can't imagine the database changing unless you've hit the condition here:

http://www.odusergroup.org/forums/index.php?topic=617.0

Ed
#zOS #ODF

Pk2016

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #4 on: July 14, 2016, 09:10:47 AM »
Thank You Greg and Ed,

The article gave me an insight on the reasons for New DB creation which i never had.

Hoping this would solve my problem , i queried our DB but the numbers are far from what the article stated :(

I looked for "P****100" to check if this DB has reached the limit which created the tablespace "A**4" in  new DB "P****101"

The results are as below:
SELECT DBID FROM SYSIBM.SYSDATABASE
WHERE NAME = 'P***100';     
                                          --- 687
     
SELECT MAX(OBID) FROM SYSIBM.SYSINDEXES
WHERE DBID = 687;   
                                             --- 881

SELECT MAX(OBID) FROM SYSIBM.SYSTABLESPACE
WHERE DBID = 687;   
                                             --- 876

SELECT MAX(OBID) FROM SYSIBM.SYSTABLES
WHERE DBID = 687;   
                                              --- 878       

SELECT COUNT(*) FROM SYSIBM.SYSTABLESPACE
WHERE DBID = 687;         
                                             ---   84

Though i couldnt still find the answer why the segment table was created  under a new database name , What should we worry about w.r.t to this scenario. This being in Production, not sure what should be done or preventive measures we need to take.

thank you for your inputs.

Pk2016

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #5 on: July 14, 2016, 01:26:52 PM »
Greg,

to your question on " Who created the table" its the "ARSSERVR" task.

I was searching online for information and came across this piece of info regarding job "ARSTSPAC "

Ed/Greg/ Anyone,

Would this job"ARSTSPAC" have any role in defining  table spaces and Databases which were existing already.


Meanwhile ill check with our DBA to get further information on the job details for DB creation.

Bernard Wolf

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #6 on: August 01, 2016, 02:17:06 PM »
Application group identifiers have no relationship to the database name.

CMOD uses the database name specified by SRVR_INSTANCE= in the ars.ini unless a database name is specified in the application group->General tab,  'Advanced' button, 'Database Name' field.  The server will not do a CREATE DATABASE for it - it is assumed the database has been created.

Note that changing the database name in the applgrp will not cause that database to be immediately used.  That database in the applgrp will only get used when the server needs to create a new applgrp data table.  That only occurs when the current table being used for loading fills up, or after using arstblsp -a 1 to close the table.

To check for database name specified in the applgrp:
 
 SELECT NAME, DATABASE_NAME from ARSAG WHERE     
         DATABASE_NAME <> '' ;     

Pk2016

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #7 on: August 31, 2016, 07:51:16 AM »
Thank you everyone . I was able to figure out the cause for the change .

Its because of the change in  "SRVR_INSTANCE" in ars.ini

CMOD 8.4  was set up to use

SRVR_INSTANCE=PI***100
SRVR_INSTANCE_OWNER=D****N0


And

CMOD 8.5 is set up to use.

SRVR_INSTANCE=PI***101
SRVR_INSTANCE_OWNER=D****N0


Im not sure if  the change was intended at this point.

But  will there be any complications if we change ARS.INI to what it was with 8.4? ( PI***101  ---> PI***100 ) ??


« Last Edit: August 31, 2016, 08:17:20 AM by Pk2016 »

Pk2016

  • Guest
Re: Application Group and Database(DB2) Relation
« Reply #8 on: August 31, 2016, 07:57:25 AM »
Application group identifiers have no relationship to the database name.

CMOD uses the database name specified by SRVR_INSTANCE= in the ars.ini unless a database name is specified in the application group->General tab,  'Advanced' button, 'Database Name' field.  The server will not do a CREATE DATABASE for it - it is assumed the database has been created.

Note that changing the database name in the applgrp will not cause that database to be immediately used.  That database in the applgrp will only get used when the server needs to create a new applgrp data table.  That only occurs when the current table being used for loading fills up, or after using arstblsp -a 1 to close the table.

To check for database name specified in the applgrp:
 
 SELECT NAME, DATABASE_NAME from ARSAG WHERE     
         DATABASE_NAME <> '' ;   


Wowy!. Thanks Bernard! i should have seen your post earlier. i didnt get a notification :( duh!

Like you said its the change in SRVR_INSTANCE.

« Last Edit: August 31, 2016, 08:04:21 AM by Pk2016 »