August 25, 2009 at 7:34 pm
Nah, let's keep it on here. If the article wasn't clear, this can help to explain the issues for someone else.
No, don't put in the name of a single server. You're right, that's not how it's supposed to work. This is from our local management pack:
-
Microsoft.SQLServer.Library
6.0.6247.5
XXXXXX
That Reference Alias, that's what you need from your own management pack. I had a hard time figuring that part out too.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 26, 2009 at 2:26 pm
Grant Fritchey (8/25/2009)
Nah, let's keep it on here. If the article wasn't clear, this can help to explain the issues for someone else.No, don't put in the name of a single server. You're right, that's not how it's supposed to work. This is from our local management pack:
-
Microsoft.SQLServer.Library
6.0.6247.5
XXXXXX
That Reference Alias, that's what you need from your own management pack. I had a hard time figuring that part out too.
Thx again Grant. tantalisingly close.
I am using R2 for SCOM and the latest SQL(2005) MP.
For this exercise a new MP was created SQLa.
I can do everything EXCEPT enter parameters.
If the parameters are left out, I can save the new rule, no proplems.
I can also from the Properties of the rule, Edit the script and select Parameters from the little Target button. They work fine. I can then save the rule.
BUT, when I try to enter the two lines as mentioned previously, SCOM spits the dummy and won't save the rule.
So I went in to the XML for the new MP and can't find Microsoft.SQLServer.Library that looks like the example given.
Mine looks like:
Reference Alias="MicrosoftSQLServerLibrary6066480">
Microsoft.SQLServer.Library
6.0.6648.0
31bf3856ad364e35
So I cut out the MicrosoftSQLServerLibrary6066480 and get
$Target/Host/Property[Type="MicrosoftSQLServerLibrary6066480!Microsoft.SQLServer.DBEngine"]/ConnectionString$
$Target/Property[Type="MicrosoftSQLServerLibrary6066480!Microsoft.SQLServer.Database"]/DatabaseName$
That then saves OK! Seems like a strange string to paste in.
Let's see what populates.
Now to get the view working....
Thx,
John Bradshaw
August 26, 2009 at 6:14 pm
Nope...Can't get anything to populate.
Any ideas as to what is missing??
Thx,
JB
August 27, 2009 at 5:45 am
Yep, you found your alias (there is a way to edit that, but I'm not sure what it is). If it saved, you should be there. You mapped the property bag to get the data out? After that, you should be able to create a view based on the rule. It'll take a little while for the rule to populate out to the servers and then a while for the data to start coming back, but usually I've seen results back into the database within 45 minutes or so.
You might need to go on to one of your servers and see if errors are being generated. There's no easy way to debug these things. We don't even bother setting up a dev/test/staging process to get new rules into production.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 27, 2009 at 4:02 pm
Still no data. The mapping seems fine. Script is there. But can't see anything in a Performance view. Then I thought i would take a look at what the MS SQL management pack offered and there was a Performance view for Database free Space. Looks like they have incorporated this in the latest MP as standard.
Of-course the DBA's now want it in a table format rather than a performance view......
Thx for all the help Grant. I learnt a lot.
JB
August 27, 2009 at 7:06 pm
j.bradshaw (8/27/2009)
Still no data. The mapping seems fine. Script is there. But can't see anything in a Performance view. Then I thought i would take a look at what the MS SQL management pack offered and there was a Performance view for Database free Space. Looks like they have incorporated this in the latest MP as standard.Of-course the DBA's now want it in a table format rather than a performance view......
Thx for all the help Grant. I learnt a lot.
JB
Did you create a new view specifically for this rule? It didn't sound like it based on what you said.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 27, 2009 at 7:11 pm
Hi Grant,
Yes I did, and I could select the rule I created, but still nothing came through.
Seems so close, but I cannot find what I am doing wrong.
Thx,
John Bradshaw
October 5, 2009 at 6:20 am
General question:
I would like to check on the rules of MP for SQL Server for SCOM, but sofar I have not been able to find anything on this, not even on the Microsoft site. Is there a list somewhere, or do I really have to install a trial version in order to look at those standard rules?!
Greetz,
Hans Brouwer
October 5, 2009 at 7:13 am
You don't need to install Operations Manager. You can download the sql server management pack and then review what it does.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 5, 2009 at 8:24 am
Hm, maybe I misunderstand what you mean: I have downloaded this managementpack(we have SCOM installed) but in the readable objects I cannot find a list with rules for SQL Server, only a general overview of what can be monitored and how to set this up.
Greetz,
Hans Brouwer
October 5, 2009 at 10:50 am
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
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
October 6, 2009 at 10:04 am
Try this:
http://technet.microsoft.com/en-us/library/dd767418.aspx
__________________________________________________________________________________
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]
November 1, 2010 at 3:44 pm
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
November 1, 2010 at 7:07 pm
Hi Rapiddata,
U could try posting to the SCOM forum....
http://social.technet.microsoft.com/Forums/en-US/operationsmanagergeneral/threads
Cheers,
John Bradshaw
January 11, 2012 at 1:05 am
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',
( - 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
Viewing 15 posts - 61 through 75 (of 75 total)
You must be logged in to reply to this topic. Login to reply