IBM Storage Defender

IBM Storage Defender

Early threat detection and secure data recovery

 View Only
Expand all | Collapse all

Can I run a SQL script in the background of TSM?

  • 1.  Can I run a SQL script in the background of TSM?

    Posted Mon June 06, 2016 12:38 PM

    I am trying to create a SQL script to generate archive date and nodes for all my nodes that are using our long term tape pool. However, the script keeps crashing. How can I run a SQL script in the background in TSM (v6.3.0) without this issue?



  • 2.  RE: Can I run a SQL script in the background of TSM?

    Posted Mon June 06, 2016 04:10 PM

    may be show script



  • 3.  RE: Can I run a SQL script in the background of TSM?

    Posted Wed June 08, 2016 02:30 PM

    Christine,

    Your question raises several serious issues.  When you say "the script keeps crashing" do you mean it crashes TSM, or it gives an error (such as ANR9999D)?  

     

    If you are crashing the TSM Server, you need to absolutely stop.  Consider getting info from client-side queries, perhaps.

     

    If the query is just erroring, is it because TSM is running out of memory for the SELECT, or because it cannot cache the output? Try running "show memtrend" to see how much memory the TSM Server has been using over past 48 hours (cannot change timeframe).  You can also run "show deadlock" while the query is running to see if there are conflicts.  Show commands are listed in the "Performance Tuning Guide" but really they are usually unnecessary (and there is no "show script").

    If the query is causing TSM to run out of memory, the SELECT is probably doing a complex, ugly JOIN across multiple gigantic tables; consider breaking it down into multiple queries, or having your Sys Admin increase the memory of the LPAR or system.

    If there is insufficient temp space, consider running the query with output to your own system; for example:

     dsmadmc -admin=myuser -password=secret -tcpserveraddr=TSMBKUP  "select node_name, archive_mb from auditocc order by archive_mb desc  fetch first 20 rows only"  >>TSMBKUP_select-archive-from-auditocc_2016-06-08.txt

     

    Hope one or more of these suggestions helps!

     

      Best Regards,

          Robert Luehrs