Maurice
Simple and did the job ... I like it
Thank you for the good advice
Regards
Robert
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Maurice van 't Loo
Sent: Sunday, November 07, 2010 2:44 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Output of script in TSM 6
The length of the fields are much wider than at version 5
Try:
select substr(node_name,1,15) as NODE_NAME,substr(tcp_address,1,15) as
IPADDRESS,substr(contact,1,20) as CONTACT from nodes where node_name =
upper('$1') order by 2
Now we just take the first 15 or 20 chars of each field. You can make them
bigger or smaller as required.
Here are a couple of sql's as example:
# Old used filespace
select date(BACKUP_END) as LAST_BACKUP,(days(current date) -
days(date(BACKUP_END))) as DAYS_OLD,substr(NODE_NAME,1,15) as
NODE,substr(FILESPACE_NAME,1,15) as FILESPACE,FILESPACE_ID as ID from
filespaces order by BACKUP_END
# Number of volumes per storage pool, status and access select
substr(STGPOOL_NAME,1,15) as STGPOOL,substr(STATUS,1,10) as
STATUS,substr(ACCESS,1,10) as ACCESS,count(*) as NR from volumes group by
STGPOOL_NAME,STATUS,ACCESS
# Number of library volumes private and scratch per library select
substr(LIBRARY_NAME,1,10) as LIBRARY,substr(STATUS,1,10) as
STATUS,count(*) as NR from libvolumes group by LIBRARY_NAME,STATUS
# Migration results
select date(start_time) as
START_DATE,(hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as DURATION,cast(cast(bytes as decimal(18,0))/1024/1024/1024 as
decimal(8,2)) as GB,cast(cast(bytes as
decimal(18,0))/1024/1024/cast((hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as decimal(18,0)) as decimal(8,2)) as MB_SEC from summary where
activity='MIGRATION' order by start_time
# Migration results last week
select date(start_time) as
START_DATE,(hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as DURATION,cast(cast(bytes as decimal(18,0))/1024/1024/1024 as
decimal(8,2)) as GB,cast(cast(bytes as
decimal(18,0))/1024/1024/cast((hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as decimal(18,0)) as decimal(8,2)) as MB_SEC from summary where
activity='MIGRATION' and (current date - date(start_time)) < 7 order by
start_time
# Stgpool results
select date(start_time) as START_DATE,substr(ENTITY,1,30) as
STG2STG,cast(AFFECTED as decimal(8,0)) as
NR_OF_ITEMS,substr(SUCCESSFUL,1,3) as
SUCCES,(hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as DURATION,cast(cast(bytes as decimal(18,0))/1024/1024/1024 as
decimal(8,2)) as GB,cast(cast(bytes as
decimal(18,0))/1024/1024/cast((hour(end_time-start_time)*3600)+(minute(end_time-start_time)*60)+second(end_time-start_time)
as decimal(18,0)) as decimal(8,2)) as MB_SEC from summary where
activity='STGPOOL BACKUP' order by start_time
2010/11/7 Robert Ouzen <rouzen AT univ.haifa.ac DOT il>:
> Hi Maurice
>
> I already check it and I am in wide option
>
> Regards
>
> Robert
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf
> Of Maurice van 't Loo
> Sent: Sunday, November 07, 2010 2:02 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: [ADSM-L] Output of script in TSM 6
>
> Check out:
> set sqldisplaymode wide|narrow
>
> All the sql output from 5.5 scripts need to be checked and corrected in
> version 6.
>
> Good luck,
> Maurice van 't Loo
>
> 2010/11/7 Robert Ouzen <rouzen AT univ.haifa.ac DOT il>:
>> Hi to all
>>
>> I am testing a TSM version 6.2.1 in a Windows test environment and a little
>> question about a lot of scripts I wrote in the Tsm server Production .
>>
>> Running as this one for example got it in three lines instead one in the
>> previous version, did is a way to get it in one line ?
>>
>> Run ip digiprod (select node_name , tcp_address, contact from
>> nodes where node_name = upper('$1') order by 2)
>>
>> Output: Version 6
>> NODE_NAME: DIGIPROD
>> TCP_ADDRESS: 132.74.59.177
>> CONTACT: Library
>>
>> Output: Version 5
>> NODE_NAME TCP_ADDRESS CONTACT
>> ------------------ ------------------ ------------------
>> DIGIPROD 132.74.59.177 Library
>>
>> Regards
>>
>> Robert
>>
>
|