SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Operations Manager Custom Collection


Operations Manager Custom Collection

Author
Message
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222981 Visits: 33564
The management pack is an XML definition. You can read through the XML directly to see the list of rules & monitors. I meant you could go there.

I tried searching. There used to be a list of what was monitored in a management pack. I can't see my old docs because I'm packed up for a move, but I'm pretty sure MS had something online at one point.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Marios Philippopoulos
Marios Philippopoulos
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33346 Visits: 3784
Try this:

http://technet.microsoft.com/en-us/library/dd767418.aspx

__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables
Persisting SQL Server Index-Usage Statistics with MERGE
Turbocharge Your Database Maintenance With Service Broker: Part 2
rapiddata
rapiddata
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 3
I am using the latest version of operations manager and have imported the sql server 2008 managament pack.

I am getting an error with the input parameter because sql 2008 does not have an entry for DatabaseName$.

Any ideas?

Thanks,
Leo Cono, http://www.YouLoveMe.com - Free Dating
j.bradshaw
j.bradshaw
SSC-Enthusiastic
SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)SSC-Enthusiastic (109 reputation)

Group: General Forum Members
Points: 109 Visits: 172
Hi Rapiddata,
U could try posting to the SCOM forum....
http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/threads

Cheers,
John Bradshaw
sakshi.b.gupta
sakshi.b.gupta
Valued Member
Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)

Group: General Forum Members
Points: 71 Visits: 147
I have modified script as per my envrionment

' Param 0: The SQL connection string for the server
' Param 1: The Database to use
Option Explicit

If WScript.Arguments.Count = 2 then
Dim oAPI
Set oAPI = CreateObject("MOM.ScriptAPI")

'Connect to the database
Dim cnADOConnection
Set cnADOConnection = CreateObject("ADODB.Connection")
cnADOConnection.Provider = "sqloledb"
cnADOConnection.ConnectionTimeout = 15
Dim ConnString
ConnString = "Server=" & WScript.Arguments(0) & ";Database=" & WScript.Arguments(1) & ";Integrated Security=SSPI"
cnADOConnection.Open ConnString

'Connection established, now run the code
Dim oResults
Set oResults = cnADOConnection.Execute("name AS 'File Name' , physical_name AS 'Physical Name',
Round((size/128)/1024,2) AS 'Total Size in GB',
Round((CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/1024,2) AS 'Used Space in GB',
([size] - Round((CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/1024,2)) as 'Free Space In GB'
FROM sys.database_files ORDER BY [Name] ASC")

Dim oBagTotalSize
Dim oBagSpaceUsed
Dim oBagFreeSpace

'Walk the result set
Do While Not oResults.EOF
Set oBagTotalSize = oAPI.CreateTypedPropertyBag(2)
call oBagTotalSize.AddValue("DBName",Cstr(WScript.Arguments(1)))
call oBagTotalSize.AddValue("LogicalName" ,CStr(oResults(0)))
call oBagTotalSize.AddValue("TargetName","TotalSizeInGB")
call oBagTotalSize.AddValue("perfValue",Cstr(oResults(2)))
oAPI.AddItem(oBagTotalSize)

Set oBagSpaceUsed = oAPI.CreateTypedPropertyBag(2)
call oBagSpaceUsed.AddValue("DBName",Cstr(WScript.Arguments(1)))
call oBagSpaceUsed.AddValue("LogicalName" ,CStr(oResults(0)))
call oBagSpaceUsed.AddValue("TargetName","SpaceUsedInGB")
call oBagSpaceUsed.AddValue("perfValue",Cstr(oResults(3)))
oAPI.AddItem(oBagSpaceUsed)

Set oBagFreeSpace = oAPI.CreateTypedPropertyBag(2)
call oBagFreeSpace.AddValue("DBName",Cstr(WScript.Arguments(1)))
call oBagFreeSpace.AddValue("LogicalName" ,CStr(oResults(0)))
call oBagFreeSpace.AddValue("TargetName","FreeSpaceInGB")
call oBagFreeSpace.AddValue("perfValue",Cstr(oResults(4)))
oAPI.AddItem(oBagFreeSpace)

oResults.MoveNext
Loop
cnADOConnection.Close

'return the property bag objects
Call oAPI.ReturnItems
End If
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222981 Visits: 33564
And is it working for you?

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search