MDW Data Collector doesn't work, meaning the custom_Snapshot table isn't created? Why? ? ?

I think the issue is with a long query in XML. Please, how to make this work?
Here are the definitions I used:
STEP 1 --- Find Collecter TYPE ID from
SELECT collector_type_uid ,* FROM [msdb].[dbo].[syscollector_collector_types_internal]
STEP 2 -- find the schedule
STEP 3  -- create collection SET using a SP
DECLARE @collectionsetid int 
DECLARE @collectionsetuid uniqueidentifier
EXEC [msdb].[dbo].[sp_syscollector_create_collection_set]
@name=N'Index Fragmentation Usage Report3',
 @collection_mode=1, -- Non-cached mode 
 @description=N'Records fragmentation of indexes over 100 pages AGAIN',
 @days_until_expiration=30, -- 400=A year and a month --number of days
 @schedule_uid='C40E90DE-5ECC-4B89-9DF8-424DD6160A0A',
 @collection_set_id=@collectionsetid OUTPUT,
 @collection_set_uid=@collectionsetuid OUTPUT
STEP 4 --- Create the job definition and QUERY
DECLARE @parameters XML 
Set @parameters=' <ns:TSQLQueryCollector xmlns:ns="DataCollectorType"> 
 <Query> 
 <Value>Select
 db_name([database_id])+''.''+Sch.[Name]+''.''+T.[Name]+''.''+Indexes.[Name] as [IndexName],  S.
[FragmentationPercentage] 
FROM (Select 
 [database_id], [object_id], [index_id], 
 Sum(avg_fragmentation_in_percent * 
page_count)/Sum(page_count) as [FragmentationPercentage] 
 FROM sys.dm_db_index_physical_stats( db_id(), NULL, NULL, NULL, 
''DETAILED'') 
 Where index_type_desc IN (''CLUSTERED INDEX'',''NONCLUSTERED INDEX'') 
AND alloc_unit_type_desc=''IN_ROW_DATA'' 
Group by [database_id],[object_id],[index_id] 
) S 
Join Sys.objects T On S.[object_id] = T.[object_id] 
Join Sys.schemas sch On Sch.[schema_id] = T.[schema_id] 
Join Sys.Indexes On Indexes.[Object_id] = S.[Object_Id] And 
Indexes.[Index_id] = S.[Index_id] </Value> 
 <OutputTable>IndexFragmentation</OutputTable> 
 </Query> 
 <Databases UseUserDatabases="true" /> 
</ns:TSQLQueryCollector> ' 
DECLARE @collectionitem INT
EXEC [msdb].[dbo].[sp_syscollector_create_collection_item]
@name=N'Index Fragmentation3',
@parameters=@parameters,
@collection_item_id=@collectionitem OUTPUT,
@collection_set_id=10,
@collector_type_uid='302E93D1-3424-4BE7-AA8E-84813ECF2419'
After the Data Collector is created, and I run it by right clicking it and select "collect and upload now", it isn't creating the custom_snapshot table that it should create?????  PLease what am I doing wrong????

Can you please fix your query? . I was getting Divide by Zero error. you need to check if SUM(page_count) is 0, and replace it with  non-zero value
Here is the sample script :
https://gist.github.com/sethusrinivasan/1bc23477936be4677e61#file-custom_collectionset
Thanks
Sethu Srinivasan [MSFT]
SQL Server

Similar Messages

  • I just made update to iOS 7 on my iphone 4 and now doesn't work anymore the left side button of ringtone why??

    Update to iOS 7.0.4 and ringtone button doesn't work anymore, why???

    Double click home button, then swipe up on app picture (not the icon itself)

  • I am from Brazil, and i have an iphone 5. Since it was purchased the 3G/4G data signal doesn't work. I made contact with people in Apple from Brazil and they told me I had to ask for your support to unlock the 3G/4G data signal.

    I am from Brazil, and i have an iphone 5. Since it was purchased the 3G/4G data signal doesn't work. I made contact with people in Apple from Brazil and they told me I had to ask for your support to unlock the 3G/4G data signal. How do I have to proceed to unlock this feature in my iphone?
    I would appreciate if you can help me.
    Thanks!

    Greetings alex.bonifacio! I'm very sorry that you're having connection problems with your iPhone 5. While would love to help in any way I can, the device must at least be on an active line of service with Verizon Wireless in order for me to be able to make any changes. I must therefore urge you to contact your local wireless carrier for your equipment options. Good luck and thanks!
    DionM_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Reinstalled 10.3.4, now date/time doesn't work or open

    I had a hard drive failure, a company replaced my drive with a new one in my G4. The new hard drive works fine, they reinstalled 10.3.4 from my original disks, but the date/time doesn't work and I can't open that panel even.
    So I just resinstalled from those disks again and it still didn't fix this problem.
    Also my old password for installers doesn't work either, but it lets me bypass it.
    Any suggestions?
    Should I just try upgrading to Tiger and see if that works?
    Thanks

    blackrhino:
    Not sure what the problem is, however, before you go reinstalling or upgrading try this:
    1. Reset PRAM.
    2. a. From a cold start, boot from your installer disk holding down the "C" button. Go to the Installer Menu and open Disk Utility.
    b. Select your Mac OS X startup disk.
    c. Select the First Aid tab in the Disk Utility window.
    d. Select Repair Disk button in Main panel. If problems are found run again and again until no problems are reported.
    e. Select the Repair Disk Permissions button on the First Aid tab.
    f. After Repair Disk Permissions completes, Quit (Command-Q) Disk Utility.
    3. Update Software to 10.3.9 (Go to Apple Menu and select Software Update.
    Post back after these operations.
    Good luck.
    cornelius
    PB G3 Pismo400, 100 GB 5400 Toshiba internal, 1 GB RAM   Mac OS X (10.3.9)   Beige G3 OS 8.6

  • Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

    Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.
    e.g.
    In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.
    /content/myproject/-/
    So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.
    But the problem is there in following scenario.
    I have an anchor tag as follows.
    <a href="#" id="test"> click here </a>
    And I am assigning the href to anchor through JQUERY.
    <script>
    $("#test").attr("href","/content/myproject/en.html");
    </script>
    Ideally this should have been mapped to "/en.html".
    But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".
    How to resolve this.
    Thanks,
    Sai

    In a servlet you have access to the resourceResolver so if you know which attributes contain links then it's relatively easy to apply resourceResolver.map to those links.
    Your challenge is clearly how do you know which attributes are links and which aren't. Its is the same challenge that makes parsing the response and rewriting it on the way out difficult - the JSON doesn't have any semantic meaning so how do identify which attributes require rewriting. There really is no good answer ot that question in my experience - all the options have down sides.
    Create some convention - all attributes matching this pattern X get mapped before being converted to JSON (could be attributes whose name ends in link, or it could a convention applied to the value of the attribute - if the attribute is a string that starts with /content apply the resource resolver mapping. In this case you have train your developers to follow this convention which is the down side.
    Create some configurable list of attribute names that require mapping. This is brittle, requires training and is easy to break.
    Implement a client side version of the resource resolver mapping. It wouldn't be as full proof as server side mapping (because that takes into account but you could make it work for simple logic like stripping of /content/site/en. If ou are just trying to solve the simple version of this issue - stripping off the top of the repository path this might be your best option.
    Not worry about it and set up Apache 301 redirects that catch any long URLs and redirect them to short URLs (so configure apache to look for any URL matching /content/site/en and strip off /content/site/en and do a 301 redirect to the shortened URL. You end up with a lot of extra HTTP request because of all the 301s but it would work (I wouldn't recommend this option - but it is possible).

  • My Wifi doesn´t work. The Wifi icon on top menu bar states there is no hardware connected. How can I resolve this as previously Wifi connection worked perfectly. Is this something that to do with the computer hardware? Please advise.

    My Wifi doesn´t work. The Wifi icon on top menu bar states there is no hardware connected. How can I resolve this as previously Wifi connection worked perfectly. Is this something that to do with the computer hardware? Please advise.

    SkyDaughter29 wrote:
    My current situation: I have soooo many texts on my iphone and I haven't deleted many because I need the information contained in them for future reference and for legal purposes.  I would really like to find a means and way to save them other than on the phone itself. I've done searches for various apps yet I'm not finding what I think I would need.  It appears Apple does not sync the texts between the iphone and my MacBook Pro.
    Try the computer apps PhoneView (Mac) or TouchCopy (Mac & PC):
    http://www.ecamm.com/mac/phoneview/
    http://www.wideanglesoftware.com/touchcopy/index.php
    Best of luck.

  • Every app on my ipod (2nd gen) which requires wifi connection doesn't work although the wifi mark is on. i did try restarting my ipod, resetting network setting, disconnect from wifi and reconnected it but non of them worked.

    every app on my ipod (2nd gen) which requires wifi connection doesn't work although the wifi mark is on. i did try restarting my ipod, resetting network setting, disconnect from wifi and reconnected it but non of them worked.

    This may sound silly but try your date a time setting my ipod had the same problem and i had even checked the the date and time went all the way to the apple store for help and the genius guy just rest the date and time and it worked just fine.

  • Imessage doesn't work after the installation of the update 6.0

    imessage doesn't work after the installation of the update 6.0

    iMessage will not work until it's activated.
    Switch iMessage OFF. Double tap Home button and delete Messages in multitask-bar.
    Do a reset (Hold Sleep/Wake and Home buttons about 10 secs or more till Apple logo appears, ignore the Slide to Power Off that appears)
    Note: You will not lose any data.
    Switch iMessage back ON.

  • Charger works when notebook is off, but it doesn't work when the notebook is on.

    I have a HP Pavilion dv6-3070tx Entertainment Notebook PC.
    My charger doesn't work when the notebook is on and plugged in, but when the notebook is off (or even when it is in sleep mode) it gets charged. I tested this by using different chargers that work in other hp notebooks. If this can be solved, I'll be grateful.

    Hi
    There are two structures of DVDs
    • Data-DVD - as burned from DeskTop/Finder
    • Video-DVD - to be played on a DVD-Player - Needs a program that can do this
    One can in iMovie - Export as QuickTime .mov and save this via DeskTop/Finder onto a DVD - BUT this will only play on a Computer and if it is a Window-PC this needs to download QT-player or VLC-player.
    But no DVD-player for TV can play back this.
    To get a Video-DVD then You need
    • iDVD (not from Apple any more) - or -
    • DVD Studio Pro (not from Apple any more) - or -
    • FinalCut Pro-X (can do simple Video-DVDs) - or -
    • Burn - http://www.digital-digest.com/software/Burn.html - FREE - but very PLAIN - no fancy things at all.
    • Roxio Toast™ 11 Pro - Fairly advanced - and costs a bit - still very Good and lot's of great tool's included. (I love it) - Can also back convert home made DVDs to an editable mode in an OK quality. With BD-component also capable to do sort of Blu-Ray DVDs.
    Yours Bengt W

  • TS4079 I have an iphone 5 and my Siri doesn't work at the moment. But when I restart my phone it works but 5 minutes later it doesn't work again!!! What should I do???

    I have an iphone 5 and my Siri doesn't work at the moment. But when I restart my phone it works but 5 minutes later it doesn't work again!!! What should I do???

    Try reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • ID CS3 - text wrap doesn't work at the end of a long multi-columned text frame

    Did a search - don't think this specific issue has been addressed:
    We design large graphics often used on walls. When working with a text frame that that was 11 feet long and had 8 columns, text wrap would not work on an image placed in the last column. The same image with the same text wrap applied will work fine anywhere else in the text frame. I found that if I shortened the width of the text frame a little bit at a time eventually it would work, but there doesn't seem to be a specific cut-off width - sometimes the last column won't text wrap when the frame is 115 inches wide and sometimes it doesn't work when the frame is only 80 inches wide. Again, all of the other columns work fine. I have tried all of the obvious stuff, the only variable between the columns that wrap and the one that doesn't is it's position at the end of the text frame.
    We have gotten around this issue by using multiple threaded frames instead of one long frame with multiple columns, but I am curious if anyone else has run into this or might know what the issue is.
    thanks

    Did a search - don't think this specific issue has been addressed:
    We design large graphics often used on walls. When working with a text frame that that was 11 feet long and had 8 columns, text wrap would not work on an image placed in the last column. The same image with the same text wrap applied will work fine anywhere else in the text frame. I found that if I shortened the width of the text frame a little bit at a time eventually it would work, but there doesn't seem to be a specific cut-off width - sometimes the last column won't text wrap when the frame is 115 inches wide and sometimes it doesn't work when the frame is only 80 inches wide. Again, all of the other columns work fine. I have tried all of the obvious stuff, the only variable between the columns that wrap and the one that doesn't is it's position at the end of the text frame.
    We have gotten around this issue by using multiple threaded frames instead of one long frame with multiple columns, but I am curious if anyone else has run into this or might know what the issue is.
    thanks

  • Safari show all tabs doesn't work all the time

    It is annoying: safari show all tabs doesn't work all the time. The little icon to the right of the "New Tab" area sometimes works, and sometimes doesn't. The Shift Command Back-slash, sometimes works, and sometimes doesn't. I find no rhyme nor reason for this. I have a MacBook Pro, Mountain Lion, the latest updates. It doesn't matter if I am in Full Screen or not.
    I am quite confused regarding this.

    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type of copy paste the following:
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If that helped, empty the cache more often from your keyboard.
    Command + Option + E

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

  • How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5 mm to 3.5mm jack I bought doesn't work on the ipod.

    How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5mm to 3.5mm jack I bought doesn't work with the ipod (although it does work with an MP3 player).  My ipod is a 5th generation 80GB classic.

    I know this is old - but did you ever get this working. Thinking of getting a 780 ti card and I have an older mac with the mini-displayport too.

  • I have an iPod 4th gen and the bottom part of it doesn't work where the space, .?123, and the go buttons are I droped it yesterday but it started doing this an hour ago I can slide to get in but it's stops working after that someone tell me how I fix this

    I have an iPod 4th gen and the bottom part of it doesn't work where the space, .?123, and the go buttons are not working I droped it yesterday but it started doing this an hour ago I can slide to get in but it's stops working after that someone tell me how I fix this

    Try:
    - Reset the iOS device. Nothing will be lost       
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                                     
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                                              

Maybe you are looking for

  • How do I play a 30 second clip of a song?

    I am doing a school presentation, and I can only play a 30 second clip of a certain song from iTunes. How can I play just the 30 seconds without having to watch the clock and pressing stop? Thanks!

  • Lacie dead - iTunes store & backup lost!

    Yesterday, I hooked up my Lacie D2 to my new MacBookPro so I could transfer some work files (to see how fast the MBP is) and to listen to my iTunes music, which I keep on the Lacie. Somehow, through hitting a series of keys whilst working, I recall t

  • New MBP, Boot Camp 2.1, Vista=Missing Wifi

    I have just installed Vista Ultimate via Boot Camp, but I cannot find my WiFi card at all. Is there something that I am missing. There are no issues when I switch back to OSX.

  • Error while sending images via messages

    Hi there, everytime i try to send an image (small size) from my macbook pro using osx mavericks to an iPhone i get an error that ist was not able to send the image. How can i fix it or is it impossible to send images from macbook (OSX) to iPhone? Reg

  • Hi every one using xperia series z1 ;-)

    i wanna ask about when i wanna do to do restor factory defulte or when i press on reset button under the micro sim cover >>> the question is /when i use some this step to make my phone clean like first time my new sowftware version (kitkat 4.4) she i