Results 1 to 6 of 6
-
02-21-2011, 04:11 AM #1Member
- Join Date
- Jan 2011
- Posts
- 108
- Thanks
- 11
- Thanked 3 Times in 2 Posts
SQL querry Data backedup each year/month
Hi
Is it possible to write a querry to find out how much data was backedup/archived for a node in a particular month. The months are beyond a year or 2.
NODENAME DATABACKEDUP MONTH/YEAR
Regards,
TSMDUMBER
-
02-21-2011, 12:13 PM #2
It's possible.

I run this as a daily report but this may get you going in the right direction.
Code:SELECT - n.node_name||' ' as NODE, - n.platform_name as PLATFORM, - su.activity,sum(cast(su.bytes/1024/1024/1024 as decimal(6,2))) as GB, - su.affected - FROM nodes n, summary su - WHERE - (end_time between current_timestamp - 24 hours and current_timestamp) - and su.activity='BACKUP' - and ((n.node_name=su.entity)) - GROUP BY - n.node_name, - n.platform_name, - su.activity, - su.affected - ORDER BY - platform, - GB, - node asc
-
02-23-2011, 05:09 AM #3Member
- Join Date
- Jan 2011
- Posts
- 108
- Thanks
- 11
- Thanked 3 Times in 2 Posts
Thanks Greg. I am looking for something which can go back to a year!!with actlog retention of 100 days querryinf from summary tabel will not help!!!
In which table is the size of a file stored?
I found something like the below form the internet like this
select sum(BYTES)/1024/1024/1024 "Data_Backup GB" from summary where start_time>(current_timestamp - 1 days) and End_Time< (current_timestamp) and ACTIVITY in ('BACKUP','ARCHIVE') and ENTITY='______'
but i want the perido inbetween 2 years, sayy nov 2008 to nov 2009?
-
02-23-2011, 08:45 AM #4Member
- Join Date
- Sep 2010
- Posts
- 151
- Thanks
- 0
- Thanked 0 Times in 0 Posts
What about the table ARCHIVES?? and the table BACKUP??
Those might do the trick for you.
But be careful, according to the database size and those tables can be very big and to query them can be time consuming.
-
02-24-2011, 02:54 AM #5Member
- Join Date
- Jan 2011
- Posts
- 108
- Thanks
- 11
- Thanked 3 Times in 2 Posts
the tables archives nad backups do not have the bytes column or anything related to size
tsm: TSM>select * from backups where node_name =
ANR2963W This SQL query may produce a very large result table, or may require a significant amount of time to compute.
Do you wish to proceed? (Yes (Y)/No (N)) y
NODE_NAME:
FILESPACE_NAME: /adsmorc
FILESPACE_ID: 1
STATE: ACTIVE_VERSION
TYPE: FILE
HL_NAME: //
LL_NAME: 00jttadl_1_1
OBJECT_ID: 110103009
BACKUP_DATE: 2008-10-23 23:13:58.000000
DEACTIVATE_DATE:
OWNER:
CLASS_NAME: DEFAULT
tsm: TSM>select * from occupancy where node_name=
NODE_NAME:
TYPE: Bkup
FILESPACE_NAME:
STGPOOL_NAME:
NUM_FILES: 54116
PHYSICAL_MB: 48613062.85
LOGICAL_MB: 48613062.85
FILESPACE_ID: 1
still the big question is In which table is the size of a file stored?
Regards,
TSMDUMBER
-
02-24-2011, 08:12 AM #6Member
- Join Date
- Sep 2010
- Posts
- 151
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Ok, I get it.
Well there is the CONTENTS table, it has the FILE_NAME and the FILE_SIZE columns, also the NODE_NAME.
Again this table is even bigger than the previous one I told you, once I had to a query and it was really slow, so much that I decided to go with occupancy.
Regards.
Similar Threads
-
SQL statement to get nodes added per year
By dig1tal in forum TSM Reporting & MonitoringReplies: 6Last Post: 12-22-2009, 06:42 AM -
Restore data backedup with subfile option.
By major in forum TSM Installation, Upgrade and ConfigurationReplies: 2Last Post: 06-16-2009, 04:41 PM -
dsmc querry access failed with error message ans1302
By nickalai17 in forum Administrative ClientReplies: 0Last Post: 04-12-2008, 03:42 AM -
Month end and Year end Schedule.
By pmishra in forum Backup / Archive DiscussionReplies: 1Last Post: 10-01-2007, 11:10 AM -
Total Data backedup to TSM server for One NIGHT.
By suresh in forum ScriptingReplies: 7Last Post: 08-29-2005, 04:42 PM


Reply With Quote