<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>ADSM.ORG - Scripting</title>
		<link>http://adsm.org/forum/</link>
		<description>TSM and SQL Scripting</description>
		<language>en</language>
		<lastBuildDate>Tue, 18 Jun 2013 05:59:53 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://adsm.org/forum/images/misc/rss.png</url>
			<title>ADSM.ORG - Scripting</title>
			<link>http://adsm.org/forum/</link>
		</image>
		<item>
			<title><![CDATA[Where's that $!@# tape!]]></title>
			<link>http://adsm.org/forum/showthread.php?27928-Where-s-that-!-tape!&amp;goto=newpost</link>
			<pubDate>Wed, 05 Jun 2013 22:03:37 GMT</pubDate>
			<description>Ok, here is the senerio... 
 
- Three tape libraries with over 1500 tapes 
- Seven Windows TSM servers and three are library managers. 
- DRM is...</description>
			<content:encoded><![CDATA[<div>Ok, here is the senerio...<br />
<br />
- Three tape libraries with over 1500 tapes<br />
- Seven Windows TSM servers and three are library managers.<br />
- DRM is being used<br />
<br />
Occasionally I need to find who/what is using a tape.  Sounds simple enough, but the tape I am looking for could be a scratch tape, a DB backup tape, a &quot;normal&quot; tape (with data and being filling), or a DRM tape already sent back offsite.<br />
<br />
Currently, to find these tapes I have to do a 'q libv' on my three library managers, and a 'q drm' on all my tsm servers, then sift through all the output looking for the one tape I am interested in.<br />
<br />
Before I go reinventing wheels, does anyone have a slick script/macro that can search multiple TSM servers for a tape...no matter what the tape is being used for?</div>

]]></content:encoded>
			<category domain="http://adsm.org/forum/forumdisplay.php?16-Scripting">Scripting</category>
			<dc:creator>droach</dc:creator>
			<guid isPermaLink="true">http://adsm.org/forum/showthread.php?27928-Where-s-that-!-tape!</guid>
		</item>
		<item>
			<title>Different result from select in v5 vs v6</title>
			<link>http://adsm.org/forum/showthread.php?27920-Different-result-from-select-in-v5-vs-v6&amp;goto=newpost</link>
			<pubDate>Tue, 04 Jun 2013 10:55:07 GMT</pubDate>
			<description><![CDATA[Hello TSM'ers 
 
I have been using the following statement in TSM v. 5, to monitor how long since the last server restart; 
select...]]></description>
			<content:encoded><![CDATA[<div>Hello TSM'ers<br />
<br />
I have been using the following statement in TSM v. 5, to monitor how long since the last server restart;<br />
select cast((current_timestamp)-(restart_date) hours as integer) from status<br />
<br />
Running the same in v 6, does not take into account that the date has changed, and will only display in the range of 0-23 hours. It looks as it only calculates based on the time, and not including the date.<br />
<br />
Does anyone have a select statement for v 6 that will give me the real number of hours since last restart?<br />
<br />
Any help much appreciated.<br />
<br />
G<br />
<br />
EDIT:  AAAaaahhh - after trying long enough, i found one possible solution;<br />
select cast((current_timestamp)-(restart_date) hours as integer) + (day(current_timestamp - restart_date))*24 from status<br />
This adds up the difference in hours + difference in days*24 to get the correct number of hours. Not so pretty, but it works. <br />
G</div>

]]></content:encoded>
			<category domain="http://adsm.org/forum/forumdisplay.php?16-Scripting">Scripting</category>
			<dc:creator>Geirr</dc:creator>
			<guid isPermaLink="true">http://adsm.org/forum/showthread.php?27920-Different-result-from-select-in-v5-vs-v6</guid>
		</item>
		<item>
			<title>Billing SQL Query</title>
			<link>http://adsm.org/forum/showthread.php?27891-Billing-SQL-Query&amp;goto=newpost</link>
			<pubDate>Tue, 28 May 2013 07:12:33 GMT</pubDate>
			<description>Hi all, 
 
I am looking for an SQL query which will allow me to determine how many GB is being used in the primary storage pool by the nodes...</description>
			<content:encoded><![CDATA[<div>Hi all,<br />
<br />
I am looking for an SQL query which will allow me to determine how many GB is being used in the primary storage pool by the nodes associated with domains.<br />
<br />
I have my policy domains configured for departments, like so:<br />
ACCNT_FILE<br />
ACCNT_DB2<br />
ACCNT_EXCH<br />
LEGAL_FILE<br />
LEGAL_DB2<br />
LEGAL_EXCH<br />
<br />
So I am looking for an SQL query which will determine the amount of occupancy by the nodes associated with the domains for accounting, for legal, for marketing etc...<br />
<br />
I've spent a couple of hours trying to work it out myself but I've really gotten nothing but excessive failed SQL queries. Does anyone have any queries which will help me here?<br />
<br />
Thanks in advance.<br />
<br />
Kind regards,<br />
Michael Andrews</div>

]]></content:encoded>
			<category domain="http://adsm.org/forum/forumdisplay.php?16-Scripting">Scripting</category>
			<dc:creator>bigred15</dc:creator>
			<guid isPermaLink="true">http://adsm.org/forum/showthread.php?27891-Billing-SQL-Query</guid>
		</item>
		<item>
			<title>SQL for sessions running during a specific time frame</title>
			<link>http://adsm.org/forum/showthread.php?27883-SQL-for-sessions-running-during-a-specific-time-frame&amp;goto=newpost</link>
			<pubDate>Fri, 24 May 2013 01:30:27 GMT</pubDate>
			<description>I need a select statement that can give me a list of sessios (output should look like q sess) but for a specific date and time range.  i.e.:  today...</description>
			<content:encoded><![CDATA[<div>I need a select statement that can give me a list of sessios (output should look like q sess) but for a specific date and time range.  i.e.:  today between 9:00am and 10:00am.</div>

]]></content:encoded>
			<category domain="http://adsm.org/forum/forumdisplay.php?16-Scripting">Scripting</category>
			<dc:creator>ebaracco</dc:creator>
			<guid isPermaLink="true">http://adsm.org/forum/showthread.php?27883-SQL-for-sessions-running-during-a-specific-time-frame</guid>
		</item>
		<item>
			<title>Format HH:MM:SS field</title>
			<link>http://adsm.org/forum/showthread.php?27869-Format-HH-MM-SS-field&amp;goto=newpost</link>
			<pubDate>Mon, 20 May 2013 13:03:20 GMT</pubDate>
			<description>Hello all, I have this script that is working except that in the hours, minutes and seconds fields when any of them have a leading zero the zero gets...</description>
			<content:encoded><![CDATA[<div>Hello all, I have this script that is working except that in the hours, minutes and seconds fields when any of them have a leading zero the zero gets dropped. For instance: if a session has been running for 12 minutes and 7 seconds the output will display 0:12:7   instead of   00:12:07. A trailing zero is ok. Those get displayed. I suspect I have to do something with the  decimal(2)    but not sure what that might be yet so I thought I'd ask the experts.<br />
<br />
Thanks!<br />
<br />
<br />
select client_name, session_id, state, -<br />
substr(cast((start_time) as char(29)),1,10) as &quot;Start Date&quot;, -<br />
substr(cast((start_time) as char(29)),12,8) as &quot;Start Time&quot;, -<br />
cast(float(bytes_sent/1024/1024) as dec(12,3)) as &quot;MB Sent&quot;,  -<br />
cast(float(bytes_received/1024/1024) as dec(12,3)) as &quot;MB Recvd&quot;,  -<br />
CAST((current_timestamp-start_time)hours as decimal(2))||':'|| -<br />
CAST((current_timestamp-start_time)minutes as decimal(2))||':'|| -<br />
CAST((current_timestamp-start_time)seconds as decimal(2)) as &quot;ELAPTIME HH:MM:SS&quot; -<br />
from sessions order by session_id</div>

]]></content:encoded>
			<category domain="http://adsm.org/forum/forumdisplay.php?16-Scripting">Scripting</category>
			<dc:creator>rdemaat</dc:creator>
			<guid isPermaLink="true">http://adsm.org/forum/showthread.php?27869-Format-HH-MM-SS-field</guid>
		</item>
	</channel>
</rss>
