banner_bild_01 banner_bild_02 banner_bild_03 banner_bild_04 banner_bild_05
banner_bild_06 banner_bild_07 banner_bild_08

TSM SQL Beginners Tutorial (11)


Home SQL



Before we refer you to the more complex TSM examples and some general SQL Documentation for further reading, lets look at one of the more annoying things in the TSM Database Structure: The timestamp handling. When working with TSM, you will often want to limit queries to a certain timeframe. Sticking to our previous example, we shall look at the objects backed up from Benjamin in a certain timeframe.

 FILESPACE_NAME: \\benjamin\c$
           TYPE: FILE
        HL_NAME: \
        LL_NAME: 1-3200201.PRT
      OBJECT_ID: 6176
    BACKUP_DATE: 2002-12-30 08:29:29.000000

The field "Backup_Date" holds a timestamp describing the point in time when that backup of this object actually took place. Lets assume we'd like to count all objects backed up by Benjamin on December 30 2002, we could be so naïve as to think that something like "where backup_date like '2002-12-30%'" would do the trick, but it's more complex than that. Since TSM stores date and time information in a special Timestamp format, we have to write a little more code:

select count(*) as "Objects from Benjamin C:" from backups -
where node_name='BENJAMIN' and backup_date -
between '2002-12-30 00:00:00' and '2002-12-30 23:59:59'

You can also use abstract relative times as, for example, the last 7 days however this requires the conversion of the timestamp format. We may do it like this:

select count(*) as "Objects from Benjamin C:" from backups -
where node_name='BENJAMIN' and backup_date>current_timestamp-(7)days

We hope these examples gave you an understandable introduction of how you can extract basic information from the TSM Database and would like to point your attention to the following sources:

First, check the TSM Help for more details about SQL and how it works in the TSM environment by typing "h select" on a TSM Admin command line. You'll find a bunch of useful examples for day to day business and pointers to related information like setting the various SQL format options in TSM.

Also checkout our more advanced samples in the "Code Bits" Section.

Take a look at the many SQL tutorials on the internet by simple searching for "sql tutorial" with your preferred Web search engine.

If you can't get at the info you want and prefer a more graphical approach to working with the TSM Database, download the Home Edition of ActView for a quick graphical overview about what happened when and why on your server.

For working through Gigabytes of info on a larger number of distributed TSM Servers, checkout General Storage ActView Enterprise Edition, a fully blown Replication, Data Mining and Monitoring Solution for TSM.

 Alle erwähnten Produkte und Bezeichnungen können eingetragene Warenzeichen der jeweiligen Hersteller sein und werden als solche betrachtet.
Bei Fragen oder Problemen kontaktieren Sie bitte

Navigation  | Über GS  |  Lösungen  |  ServiceReferenzen  |  Impressum  |  Download

© 2016 by General Storage GbR. Alle Rechte vorbehalten



Kontaktieren Sie uns:

Telefon: +49 6206 157686
Telefax:  +49 6206 157687


55. Tagung des
AK Storagemanagement
09.-11. April 2018,

IBM Spectrum Protect und Veeam Kundenform,
13. Juni 2018,
Skyloft Frankfurt Airport

dsmISI for Veeam ermöglicht unbegrenzte Speicher für Backups

Hier nachlesen

General Storage Lösungen
Ready for IBM Tivoli Software