Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    52
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default Billing SQL Query

    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 associated with domains.

    I have my policy domains configured for departments, like so:
    ACCNT_FILE
    ACCNT_DB2
    ACCNT_EXCH
    LEGAL_FILE
    LEGAL_DB2
    LEGAL_EXCH

    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...

    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?

    Thanks in advance.

    Kind regards,
    Michael Andrews

  2. #2
    Senior Member
    Join Date
    Oct 2002
    Location
    netherlands
    Posts
    335
    Thanks
    0
    Thanked 9 Times in 9 Posts

    Default

    This might be a good starting point
    http://www.thobias.org/tsm/sql/index.html

  3. #3
    Member
    Join Date
    Jan 2008
    Location
    London, UK
    Posts
    166
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Default

    Here's a starting point...

    By Node:

    select auditocc.node_name, nodes.domain_name, auditocc.backup_mb from auditocc inner join nodes on auditocc.node_name = nodes.node_name order by nodes.domain_name

    Totals for each Domain:

    select nodes.domain_name as DOMAIN, sum(auditocc.backup_mb)/1024 as BACKUP_GB from auditocc inner join nodes on auditocc.node_name = nodes.node_name group by nodes.domain_name

    Format and tweak as you see fit.

  4. #4
    Member
    Join Date
    May 2011
    Location
    Melbourne, Australia
    Posts
    52
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by Tiger22 View Post
    Totals for each Domain:

    select nodes.domain_name as DOMAIN, sum(auditocc.backup_mb)/1024 as BACKUP_GB from auditocc inner join nodes on auditocc.node_name = nodes.node_name group by nodes.domain_name

    Format and tweak as you see fit.
    That's exactly what I needed. Thanks for that mate.

    Cheers,

    bigred15

Similar Threads

  1. Help SQL query
    By THE_WIPET in forum TSM Reporting & Monitoring
    Replies: 1
    Last Post: 11-09-2012, 10:55 AM
  2. Accounting/Billing for individual SQL database backups
    By missel in forum TSM Reporting & Monitoring
    Replies: 6
    Last Post: 12-30-2009, 04:05 PM
  3. SQL Query Help
    By THE_WIPET in forum Scripting
    Replies: 3
    Last Post: 10-30-2008, 01:35 PM
  4. Sql query help
    By THE_WIPET in forum Scripting
    Replies: 2
    Last Post: 04-19-2007, 11:35 AM
  5. Replies: 0
    Last Post: 02-13-2004, 06:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •