ADSM-L

Re: [ADSM-L] Select Help

2011-06-05 00:43:45
Subject: Re: [ADSM-L] Select Help
From: Grigori Solonovitch <Grigori.Solonovitch AT AHLIUNITED DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sun, 5 Jun 2011 07:37:30 +0300
I do not think my scripts are the same what you are looking, but maybe you can 
modify them to have script which you want (note, scripts can run for a long 
time - depends on size of database):



delete script F3_Node_Backup_Classes_Files

define script F3_Node_Backup_Classes_Files description="<Node> List of backup 
management classes for node files"

update script F3_Node_Backup_Classes_Files \

"select distinct node_name,class_name,filespace_name \

from backups \

where node_name = upper('\$1') and type = 'FILE' \

group by node_name,class_name,filespace_name"



delete script F4_Node_Backup_Classes_Dirs

define script F4_Node_Backup_Classes_Dirs description="<Node> List of backup 
management classes for node directories"

update script F4_Node_Backup_Classes_Dirs \

"select distinct node_name,class_name,filespace_name \

from backups \

where node_name = upper('\$1') and type = 'DIR' \

group by node_name,class_name,filespace_name"



delete script F5_Node_Archive_Classes_Files

define script F5_Node_Archive_Classes_Files description="<Node> List of archive 
management classes for node files"

update script F5_Node_Archive_Classes_Files \

"select distinct node_name,class_name,filespace_name \

from archives \

where node_name = upper('\$1') and type = 'FILE' \

group by node_name,class_name,filespace_name"



delete script F6_Node_Archive_Classes_Dirs

define script F6_Node_Archive_Classes_Dirs description="<Node> List of 
archive_management classes for node directories"

update script F6_Node_Archive_Classes_Dirs \

"select distinct node_name,class_name,filespace_name \

from archives \

where node_name = upper('\$1') and type = 'DIR' \

group by node_name,class_name,filespace_name"



Grigori G. Solonovitch





-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
john d
Sent: Saturday, June 04, 2011 12:10 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Select Help



define script policy_check desc="check domain, mgmt, bu/ar_copy"



update script policy_check "set sqldisplay wide"



update script policy_check "select cast(DOMAIN_NAME as char(12))as 
dom,cast(SET_NAME as char(8))as setname,cast(DEFMGMTCLASS as char(16))as 
def_MGT,cast(DESCRIPTION as char (33))as desc from policysets where 
set_name='ACTIVE'"



update script policy_check "set sqldisplay wide"



update script policy_check "select cast(DOMAIN_NAME as char(12))as dom, 
cast(ACTIVATE_DATE as date)as act_date,  cast(DEFMGMTCLASS as char(19))as 
DEFMGT, NUM_NODES, cast(BACKRETENTION as char(7))as backret, cast(ARCHRETENTION 
as char(7))as archret, cast(ACTIVESTGPOOLS as char(10))as active_stg, 
cast(DESCRIPTION as char (33))as desc from domains"



update script policy_check "set sqldisplay wide"



update script policy_check "select cast(DOMAIN_NAME as char(12)) as dom, 
cast(SET_NAME as char(12))as set_name, CLASS_NAME, cast(DEFAULTMC as char(6))as 
def_mc,cast(MIGDESTINATION as char(22))as mig_dest,cast(DESCRIPTION as char 
(35))as desc from MGMTCLASSES where SET_NAME='ACTIVE'"



update script policy_check "set sqldisplay wide"



update script policy_check "select cast(DOMAIN_NAME as char(12))as 
dom,cast(sET_NAME as char(6))as setname,cast(CLASS_NAME as char(19))as 
class,cast(cOPYGROUP_NAME as char(8))as copyg, cast(VEREXISTS as char(7))as 
vere, cast(VERDELETED as char(7)) as verd, cast(RETEXTRA as char(4))as 
rete,cast(RETONLY as char(4)) as reto, cast(SERIALIZATION as char(12))as 
serial, cast(DESTINATION as char(22))as destination, 'BU' as backup from 
BU_COPYGROUPS where set_name='ACTIVE'"



update script policy_check "set sqldisplay wide"



update script policy_check "select cast(DOMAIN_NAME as char(12))as dom,  
cast(sET_NAME as char(6))as setname,cast(CLASS_NAME as char(19))as 
class,cast(cOPYGROUP_NAME as char(8))as copyg, cast(RETVER as char(5))as retv, 
cast(SERIALIZATION as char(12))as serial, cast(DESTINATION as char(22))as 
destination,'ARCHIVE'as archive from AR_COPYGROUPS where set_name='ACTIVE'"



update script policy_check "set sqldisplay wide"







-----Original Message-----

From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Mike De Gasperis

Sent: Friday, June 03, 2011 4:27 PM

To: ADSM-L AT VM.MARIST DOT EDU

Subject: [ADSM-L] Select Help



I've played around with this select before and I've never been able to get it 
perfected.



I'm looking for something that will tell me the information below for the 
active policy set and default management class



associations.node_name



client_schedules.schedule_name

client_schedules.startdate

client_schedules.starttime

client_schedules.period

client_schedules.perunits

client_schedules.dayofweek



bu_copygroups.domain_name

bu_copygroups.class_name

bu_copygroups.verexists

bu_copygroups.verdeleted

bu_copygroups.retextra

bu_copygroups.retonly



This is the closest I've gotten with a select, the problem is it returned bogus 
information for other domains. I know it's wrong I just have no idea how to 
correct it or if it's possible with the TSM SQL engine. If any of you SQL 
wizards have an idea or even an alternate better solution to get this 
information I'd greatly appreciate hearing what you have.



select associations.node_name, client_schedules.schedule_name, 
client_schedules.startdate, client_schedules.starttime, 
client_schedules.period, client_schedules.perunits, client_schedules.dayofweek, 
domains.domain_name, domains.defmgmtclass, bu_copygroups.verexists, 
bu_copygroups.verdeleted, bu_copygroups.retextra, bu_copygroups.retonly from 
client_schedules, domains, bu_copygroups, associations associations where 
client_schedules.schedule_name=associations.schedule_name and 
bu_copygroups.class_name=domains.defmgmtclass





Please consider the environment before printing this Email.

________________________________
CONFIDENTIALITY AND WAIVER: The information contained in this electronic mail 
message and any attachments hereto may be legally privileged and confidential. 
The information is intended only for the recipient(s) named in this message. If 
you are not the intended recipient you are notified that any use, disclosure, 
copying or distribution is prohibited. If you have received this in error 
please contact the sender and delete this message and any attachments from your 
computer system. We do not guarantee that this message or any attachment to it 
is secure or free from errors, computer viruses or other conditions that may 
damage or interfere with data, hardware or software.

<Prev in Thread] Current Thread [Next in Thread>