Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Recovery Solution Consolidated Free Space Notification Policy

Created: 30 Nov 2011 | 2 comments

Hi,

in my altiris 7 environment i run 20 Recovery Solution Cluster.

it is a pain to click everytime to an cluster configuration go tget the free space information.

i found the following article https://www-secure.symantec.com/connect/downloads/recovery-solution-consolidated-free-space-notification-policy

but i cant apply this report to my Altiris 7 env.

any idea how i can modify this to get this running in my altiris 7 world ?

Thanks in Advance

Robert

Comments 2 CommentsJump to latest comment

KSchroeder's picture

Hi Robert,

I haven't looked much at RS 7.x, but I'm going to guess that the DB schema (tables, columns, etc) are mostly the same.  Here's the original code I used; perhaps you can put it into an Automation policy or the equivalent.

declare @ClusterName  nvarchar(64), @dbServer nvarchar(64), @dbName nvarchar(64)       
       
CREATE TABLE #RS_Space_Usage_Summary ([ClusterName] nvarchar(64), [Max Size (MB)] float,   
     [Used (MB)] float,  [Free (MB)] float , [% Free] float)        
declare cluster_cursor CURSOR FOR       
 SELECT i.name, rsc.DBServer, rsc.DbName       
 FROM Item i       
 JOIN RS_Clusters rsc       
 ON i.Guid = rsc.Guid       
 ORDER BY i.Name ASC       
       
OPEN cluster_cursor       
FETCH NEXT FROM cluster_cursor INTO @ClusterName, @dbServer, @dbName       
       
WHILE @@FETCH_STATUS = 0       
BEGIN       
 DECLARE @SQL nvarchar(4000)       
 SET @SQL = 'INSERT #RS_Space_Usage_Summary        
    SELECT ''' + @ClusterName + ''',  
    CAST(SUM(rv.MaxSize) / 1048576 AS NUMERIC(10,1)) AS [Max Size (MB)],                
    CAST(SUM(rv.SpaceUsed) / 1048576 AS NUMERIC(10,0)),              
    CAST(SUM(rv.SpaceFree) / 1048576 AS NUMERIC(10,0)) ,              
    CAST(((SUM(SpaceFree) / SUM(MaxSize))*100) AS NUMERIC(5,1))       
    FROM [' + @DbServer + '].' + @dbName + '.dbo.RawVolume rv'  
       
 EXEC(@SQL)       
 FETCH NEXT FROM cluster_cursor INTO @ClusterName, @dbServer, @dbName       
       
END        
       
CLOSE cluster_cursor       
DEALLOCATE cluster_cursor       
       
SELECT * from #RS_Space_Usage_Summary     
ORDER BY [% Free] ASC    
DROP TABLE #RS_Space_Usage_Summary

Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.

KSchroeder's picture

Hi Robert,

Were you able to try this, and if so any luck with it?

Kyle

Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.