ADSM-L

Re: [ADSM-L] Select Help

2011-06-03 17:15:12
Subject: Re: [ADSM-L] Select Help
From: john d <mrmelrose AT COMCAST DOT NET>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 3 Jun 2011 17:10:02 -0400
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

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