SQLServerCentral.com / Article Discussions / Article Discussions by Author / Discuss content posted by Scott Abrants / Ready Made Code Snippet Tool Box Courtesy of SCOM / Latest PostsInstantForum.NET v2.9.0SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comTue, 03 Mar 2015 16:24:19 GMT20RE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxMarios,Try a search for sp_spaceused on all management packs on your target server. I beieve it will be in one of the core system packs.Tue, 28 Apr 2009 19:21:53 GMTSQLRockstarRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspx[quote][b]Thomas LaRock (4/28/2009)[/b][hr]did you also look through the discovery management packs? the SQL packs usually are in pairs, one for dscovery, one for monitoring. do a quick search through all of them (2000/5/8), just to be safe.[/quote]Thanks for the reply.Yes, I just looked at all management packs for SQL, SCOM version 6.0.6460.0, and could not find sp_spaceused.Here are the MPs I searched (under ...\Program Files\System Center Operations Manager 2007\Health Service State\Management Packs):[quote]Microsoft.SQLServer.2000.Discovery.{0B5A085F-F001-0E39-42B4-807321EE46D4}.{DC14D306-B845-D465-ED80-FFD52DE8DF5E}.xmlMicrosoft.SQLServer.2000.Monitoring.{8F1F7C0E-ADC9-2226-BD01-B70C6D1B206D}.{7B6079F9-AF30-8053-50D1-8288DC6D9240}.xmlMicrosoft.SQLServer.2005.Discovery.{6A9F98A6-04FB-7740-9429-08D0721CAE7D}.{2FFCE1C9-09C4-D319-9E03-2C4B2665BC64}.xmlMicrosoft.SQLServer.2005.Monitoring.{1E1833E1-5E0B-1B28-AF46-933A6861FAE0}.{1C88D85E-8695-2AE7-215A-B6E707DD2D14}.xmlMicrosoft.SQLServer.2008.Discovery.{542C15D1-2E58-C85D-8574-84A35AB751E9}.{B18574A1-9304-5FEB-91BF-F128F4A519BD}.xml[/quote]There is no monitoring MP for SQL 2008.I did not find a reference for sp_spaceused in any of these files.Tue, 28 Apr 2009 12:46:08 GMTMarios PhilippopoulosRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxdid you also look through the discovery management packs? the SQL packs usually are in pairs, one for dscovery, one for monitoring. do a quick search through all of them (2000/5/8), just to be safe.Tue, 28 Apr 2009 12:11:43 GMTSQLRockstarRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxI'm currently having a performance problem related to SCOM that I'm trying to resolve.Procedure [b]sp_spaceused[/b] appears to be consuming a lot of tempdb space in my SQL 2000 instance, to the point that tempdb free space is almost gone.This seems to be occurring when the [b]sp_spaceused[/b] process is blocked by another server process.I am certain that stored procedure [b]sp_spaceused[/b] is being executed by a SCOM rule/monitor that ships with the SQL Server management packs: the user is NT Authority/System, which is the SCOM user.I [i]think [/i]sp_spaceused is being called from the [i]DB Space Free[/i] monitors.To confirm, I looked through the SQL2000 Monitoring management pack (in XML) and could not find any occurrence of [b]sp_spaceused[/b].What am I missing?Tue, 28 Apr 2009 10:41:12 GMTMarios PhilippopoulosRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxHi Scott,Interesting article especially if you are a newbie to SCOM 2k7 and have limited exposure SQL 2005 R2. Have you a desire to share in greater detail some of possibilities in scripts you have created from SQL and SCOM 2k7? Its a pleasure to read your enthusiasm.Thu, 27 Mar 2008 08:28:24 GMTr.h.ocarrollRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxSee the post above by Julius. That shows how to unpack the XML files.Wed, 26 Mar 2008 10:28:27 GMTGrant FritcheyRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxWhich folder has MP definition files such as "Microsoft.SQLServer.2005.Discovery.xml"? Thanks.Wed, 26 Mar 2008 10:17:41 GMTdsingh-531594RE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxJulius,My fellow co-worker; thank you for that!Tue, 25 Mar 2008 12:37:17 GMTScott AbrantsRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxyou need to export that management pack into an xml format. this link should provide insight[url=http://blogs.msdn.com/boris_yanushpolsky/archive/2007/08/16/unsealing-a-management-pack.aspx ]Unseal MP to XML[/url]Tue, 25 Mar 2008 11:42:10 GMTjulius.tancincoRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxI have the exact same issue - some more info on the file location would be appreciatedTue, 25 Mar 2008 10:16:07 GMTMarios PhilippopoulosRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxI have search my whole server for the xml files and can not find them. After downloading the management packs I have several .mp files but no xml files. A little more info on where the xml files are located would be appreciated.Thanks,Mon, 24 Mar 2008 15:00:30 GMTBill StevensonRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxGreat link. I would have preferred more info in it as well, but, all in all, I'm glad I got notified on it.One question: where can I find the discovery.xml files mentioned? I'm looking in the [i]System Center Management Packs[/i] folder. Is that the location?Mon, 24 Mar 2008 14:57:40 GMTMarios PhilippopoulosRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxThanks for the expansion. I myself have a zipped up Virtual PC with Windows 2003 / SQL Server 2005 base build which I generally unzip fresh and use for this sort of thing. I queried it as I was wondering if there was a specific problem you had encountered, or a bug.Look forward to the follow-up articles! If I manage to recode anything I'll post back ;)Mon, 24 Mar 2008 13:37:32 GMToconnor_dpRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxThank you for your comments...Now as I stated in the article I will be writing a follow-up to this one in the very near future showing one or two of the snippets, written in Vb.Net, getting put to some interesting use for a custom app. Also as far as the comment about why I suggested a virtual server for the initial install my reasoning is this. Have you downloaded the 2008 SQL Server CTP to your work or personal machine - not a server of course - only to find that when it comes time to remove the trial or CTP software your needed installs (SQL Server 2005) fails to work? I simply use Microsoft’s virtual client and create a virtual space for tools like SCOM, CTP versions of software and the like then I never have to worry about uninstalling them or worse yet the annoying messages when the trial version is about to run out. And everything is contained in isolation without worry.Mon, 24 Mar 2008 12:31:54 GMTScott AbrantsRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxI love having new tools to help me and my clients do our jobs more efficiently, but unfortunately I don't have time to install a big software package and play around with extracting/converting code. If anyone does take the time to do this I would very much appreciate a public dissemination of the efforts!!Mon, 24 Mar 2008 10:09:38 GMTTheSQLGuruRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspx[quote][b]Mark Horninger (3/24/2008)[/b][hr]Nice work! do you have a link to download the toolbox?[/quote]http://technet.microsoft.com/en-us/bb738014.aspxIt will ask you to register with microsoft. Its a huge file of 280 MB. I will download it from home.Mon, 24 Mar 2008 08:20:52 GMTSanjayAttrayRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxAlthough it's early (just saw the article earlier this morning), it's already yielding results, because -- while I "speak VB", we exclusively use C#. And as I am researching, I'm seeing some great candidates for conversion that can then be incorporated into all sorts of useful things like CLR packages, ReportingServices reports, etc.Thanks for the heads up!!Mon, 24 Mar 2008 07:46:29 GMTPaul EllsworthRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxLittle actual content in this article. How about some links? Or some examples of the code you've customised, in VB.net or C#?It does sound interesting, but why exactly do you recommend a virtual server? Have you had some problems, or is this just a safety precaution? Obviously people don't deply trial software to their 10TB production estates.Mon, 24 Mar 2008 06:21:41 GMToconnor_dpRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxThat's a good idea, and one I had not thought about previously except when I needed to dive into my own custom management pack. I'm not sure what you have to gain by stripping something out of a default SCOM management pack, unless your company was not using SCOM.I am always trying to put extra code on top of the defaults, so now I will remember to look inside some of the default packs to see how they are getting the job done. One thing I have been struggling with recently is setting up a way to customize the discovery of a service (i.e. Sybase) in a similar fashion to how MSSQL is discovered. This would make the custom groups and rules I create much easier to administer.Anyway, thanks for the tip, and I look forward to reading more.Mon, 24 Mar 2008 06:08:48 GMTSQLRockstarRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxNice short to-the-point article on some very useful information... thanks!Mon, 24 Mar 2008 05:56:12 GMTJeff ModenRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxNice work! do you have a link to download the toolbox?Mon, 24 Mar 2008 05:22:15 GMTSuperDBA-207096RE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxNice job Scott. I'm looking forward to seeing the code coming out of this effort.Mon, 24 Mar 2008 04:05:30 GMTGrant FritcheyRE: Ready Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxFirst of all thank the author for the information sharing. This cannot be an article. This comes under knowledge/information sharing. I would request Steve to open a new category called 'Information Sharing', where we can share our tips, new tools available. I also want comment on this from my forum partner.:)Mon, 24 Mar 2008 01:21:00 GMTAnipaulReady Made Code Snippet Tool Box Courtesy of SCOMhttp://www.sqlservercentral.com/Forums/Topic473321-1234-1.aspxComments posted to this topic are about the item [B]<A HREF="/articles/SCOM/62369/">Ready Made Code Snippet Tool Box Courtesy of SCOM</A>[/B]Sun, 23 Mar 2008 14:30:41 GMTScott Abrants