Friday, June 20, 2008

Useful SQL statements

Here is a grand list of TSM SQL statements that you can use in your daily report. Excellent work by Thobias, thank you very much.

1 comment:

  1. Hi,

    i always want send devcnfg.out by oprational reporting. Howyou can see here is example of case in SQL92/93. I missed in examples. Hope this help:

    select case DEVTYPE -
    WHEN '' THEN -
    (select concat('SET servername ',server_name) from status) -
    concat('DEFine DEVclass ',concat(DEVCLASS_NAME,concat(' DEVType=FILE MAXCAPacity=',concat(CAPACITY,concat(' DIRectory=',concat(DIRECTORY,concat(' MOUNTLimit=',MOUNTLIMIT))))))) -
    concat('DEFine DEVclass ',concat(DEVCLASS_NAME,concat(' DEVType=LTO FORMAT=',concat(FORMAT,concat(' MOUNTWAIT=',concat(varchar(MOUNTWAIT),concat(' MOUNTLimit=',MOUNTLIMIT))))))) -
    END from devclasses

    Yes, it is only for deviceclasses FILE and LTO.

    Filip Hasa