Paul,
here is SQL I run frequently as a macro from the command line.
It makes a reasonable size list of some or all
the backups for a node that can be viewed with notepad .
The parameters are -
%1 - the nodename quoted in caps.
%2 - either = or like, unquoted not caps
%3 - if %2 is =, then one filespace name quoted and in the correct case
or if %2 is like, then some quoted string ending in '%', it can be just '%'
%4 - a date to find only backups after a certain date; quoted and in the
form 'mm/dd/yyyy'.
Here is the macro now, I hope you can use it in your presentation.
Unfortunately I can't make SHARE this time.
- - cut after - - -
/* */
/* macro file to select files for a user */
/* */
set sqldatetimeformat i
set sqldisplaymode w
set sqlmathmode r
commit
select cast(rtrim(filespace_name) as char(16)) as filespace, -
cast(substr(char(type),1,1)||'-'||substr(char(state),1,1) as char(3)) as
state, -
cast(backup_date as char(19)) as bac_date_time, -
cast(deactivate_date as char(19)) as del_date_time, -
cast(rtrim(hl_name)||trim(ll_name) as char(128)) as path_and_name -
from adsm.backups -
where node_name = %1 -
and filespace_name %2 %3 -
and date(backup_date) >= %4 -
> c:\tsmadmin\sqllists\backups4.txt
commit
- - cut before - - -
At 02:24 PM 7/20/2002, you wrote:
>I am doing this presentation again in San Francisco. Would appreciate your
>favorite SQL statements to include.
>
>Thanks.
>
>Paul D. Seay, Jr.
>Technical Specialist
>Naptheon, INC
>757-688-8180
----------
Bill Colwell
Bill Colwell
C. S. Draper Lab
Cambridge Ma.
|