Get-Counter : The \\ServerNameHere\\SQLSERVER:Locks(_Total)\Lock Waits/sec performance counter path is not valid.

I have the following code:
Import-Module "sqlps" -DisableNameChecking
#####http://www.travisgan.com/2013/03/powershell-and-performance-monitor.html
function ExtractPerfmonData 
    param(
        [string]$server,
        [string]$instance
    [Microsoft.PowerShell.Commands.GetCounter.PerformanceCounterSampleSet]$collections
    $monitorServer = "MonitoringServerNameHere"
    $monitorDB = "MonitoringDatabaseNameHere"
    $counters = @(
        "\$($instance):Memory Manager\Memory Grants Pending",
        "\$($instance):Memory Manager\Target Server Memory (KB)",
        "\$($instance):Memory Manager\Total Server Memory (KB)",
        "\$($instance):Buffer Manager\Buffer Cache Hit Ratio",
        "\$($instance):Buffer Manager\Checkpoint pages/sec",
        "\$($instance):Buffer Manager\Page Life Expectancy",
        "\$($instance):General Statistics\User Connections",
        "\$($instance):General Statistics\Processes Blocked",
        "\$($instance):Access Methods\Page Splits/sec",
        "\$($instance):SQL Statistics\Batch Requests/sec",
        "\$($instance):SQL Statistics\SQL Compilations/sec",
        "\$($instance):SQL Statistics\SQL Re-Compilations/sec",
        "\$($instance):Locks(_Total)\Lock Waits/sec"
    $collections = Get-Counter -ComputerName $server -Counter $counters -SampleInterval 1 -MaxSamples 1
    $sampling = $collections.CounterSamples | Select-Object -Property TimeStamp, Path, Cookedvalue
    $xmlString = $sampling | ConvertTo-Xml -As String
    $query = "dbo.usp_InsertPerfmonCounters_SQLServer '$xmlString';"
    Invoke-Sqlcmd -ServerInstance $monitorServer -Database $monitorDB -Query $query
#####ExtractPerfmonData -server "YourRemoteServerName" -instance "MSSQL`$SQLTest"
ExtractPerfmonData -server "ServerName1Here" -instance "SQLSERVER" 
ExtractPerfmonData -server "ServerName2Here" -instance "SQLSERVER"
ExtractPerfmonData -server "ServerName3Here" -instance "MSSQL`$InstanceNameHere"  
ExtractPerfmonData -server "ServerName4Here" -instance "SQLSERVER" 
(I have 93 instances listed; here I just gave a sample of 4.)
For only one instance I get the following error message:
Get-Counter : The
\\ServerNameHere2\\SQLSERVER:Locks(_Total)\Lock Waits/sec performance counter path  is not valid.
All of the instances should have been set up the same, so I am confused as to why this error only occurs on this one instance.  I do not know where to look.  Has anyone ever seen this type of error before?
lcerni

Here is the output of the first script:
CounterSetName                                                                                                                     
...       (eliminating non sql server counters here)              
SQLAgent:Alerts                                                        
SQLAgent:Jobs                                                          
SQLAgent:JobSteps                                                        
SQLAgent:Statistics                                      
SQLServer:Access Methods                                                                                          
SQLServer:Availability Replica  SQLServer:Backup Device                                                                                                            
SQLServer:Batch Resp Statistics                                                                                                    
SQLServer:Broker Activation                                                                                                        
SQLServer:Broker Statistics                                                                                                        
SQLServer:Broker TO Statistics                                                                                                     
SQLServer:Broker/DBM Transport                                                                                                     
SQLServer:Buffer Manager                                                                                                           
SQLServer:Buffer Node                                                                                                              
SQLServer:Catalog Metadata                                                                                                         
SQLServer:CLR                                                                                                                      
SQLServer:Cursor Manager by Type                                                                                                   
SQLServer:Cursor Manager Total                                                                                                     
SQLServer:Database Mirroring                                                                                                       
SQLServer:Database Replica                                                                                                         
SQLServer:Databases                                                                                                                
SQLServer:Deprecated Features                                                                                                      
SQLServer:Exec Statistics                                                                                                          
SQLServer:FileTable                                                                                                                
SQLServer:General Statistics                                                                                                       
SQLServer:Latches                                                                                                                  
SQLServer:Locks                                                                                                                    
SQLServer:Memory Broker Clerks                                                                                                     
SQLServer:Memory Manager                                                                                                           
SQLServer:Memory Node                                                                                                              
SQLServer:Plan Cache                                                                                                               
SQLServer:Query Execution                                                                                                          
SQLServer:Replication Agents                                                                                                       
SQLServer:Replication Dist.                                                                                                        
SQLServer:Replication Logreader                                                                                                    
SQLServer:Replication Merge                                                                                                        
SQLServer:Replication Snapshot                                                                                                     
SQLServer:Resource Pool Stats                                                                                                      
SQLServer:SQL Errors                                                                                                               
SQLServer:SQL Statistics                                                                                                           
SQLServer:Transactions                                                                                                             
SQLServer:User Settable                                                                                                            
SQLServer:Wait Statistics                                                                                                          
SQLServer:Workload Group Stats                                                                                                     
...       (eliminating non sql server counters here)
lcerni

Similar Messages

  • When I try to install flash player on my mac, I get to the panel that asks for my name and password, and it will not take my password.  tried changing to a new password and same result

    When I try to install flash player on my Mac, I get to the panel that asks for my name and password, but it will not take my password.  Tried changing the password, but same result.  Suggestions??

    This password prompt is presented by your operating system, and is intended to keep you from accidentally installing software.
    If this is your personal machine and you don't need a password to log into the computer when it first starts up, you can probably leave the password blank and click OK to get past this prompt.  If this is your personal machine and your normal password isn't working, check to make sure that CAPS LOCK is off, and type the password carefully.
    If this is your work machine and it's asking for an Administrator password, well, you'll need to have a conversation with your friendly IT person.

  • HT1414 I restored my I phone 4 using Itunes, after that I can't access the icon any more I only got a message that says " ( Sim not Valid.) Only compatible SIM cards from supported carrier may be used to activate iphone.

    I restored my I phone 4 using Itunes, after that I can't access the icon any more I only got a message that says " ( Sim not Valid.) Only compatible SIM cards from supported carrier may be used to activate iphone. I need some proffesional help. Thanks

    "We're Sorry, Activation Server Temporarily Unavailable, contact Customer Care, Sim not vaild?"
    99.9% of the time, the cause of this issue is the fact the phone was jailbroken/hacked to unlock it for use on networks other than the network the phone was originally locked to. Apple maintains a database of officially unlocked iPhones, and when Apple's servers detect phones such as yours, activation stops & you get the message you got.
    So, either get a sim card from the carrier your phone was originally locked to, or get it officially unlocked, if you want to activate it. Because it appears that it was not officially unlocked.

  • The temporary file path is not valid.  Lightroom cannot start

    Windows XP, SP3, Lightroom 2.5.
    External hard drive starts acting funny.  Round here we expect hard drive failure, so I order a new drive and when it arrives copy the backup onto the new drive.  The new drive has the same drive letter as the old one, but not the same name.  When I try to open a catalog I get: "The temporary file path is not valid.  Lightroom cannot start."  The catalogs seem to be fine, as when I open lightroom directly, not by clicking the .lrcat file, catalogs look normal.  If I copy the lrcat file to my internal hard drive it opens.  If I create a new catalog on the external drive I get the same problem.
    I have tried deleting the preferences file.  I have tried deleteing and reinstalling lightroom.  I have used the external HD on another computer with lightroom and it opens normally.
    All I can imagine is that there is some setting, somewhere in the registry which does not get erased when the lightroom gets re-installed.  Any guesses?
    I am at a loss!  Please hope me!

    Could be your Windows tempfile path is messed up. You could try going to Control Panel/Advanced and pushing the Environment Variables button.See what the TEMP and TMP variables are set to.
    Under "User Variables", both of mine are set to C:\Documents and Settings\<my name>\Local Settings\Temp.
    Under "System Variables", both are set to C:\Windows\Temp.
    Make sure that the directories referred to are legal and on accessible drives. Make sure they aren't read-only. It wouldn't hurt to create them if they don't exist.
    It's worth a try, I think.
    Hal

  • Opening PDFs get "file path is not valid" errmsg

    very strange...
    I dumped a bunch of PDFs, word, excel & ppt files onto the documents folder. 
    All the PDFs give me "file path is not valid" errmsg and cannot be opened.
    But the word, excel & ppt files can be opened.
    Can someone help me figure it out? 
    Thanks.
    Solved!
    Go to Solution.

    solution is here: http://forums.crackberry.com/showthread.php?t=607769
    I feel also compelled to mention that I've had a ticket open at rim for this issue since 04/21 and have been escalated numerous times and yet all this time rim support has had no clue how simple the problem is to fix. This solution was posted >2 full days ago.

  • Archos 7: the file path is not valid

    Hi,
    I installed Adobe Readwe on my Archos 7 Tablet (Android 2.1).
    Every time I try to open a file the message "the file path is not valid" shows.
    Could you please help me ?
    Regards
    Konstantin Tzovanis

    Hey,
    I'm having the same problem.
    I just recently downloaded and installed the Acrobat Reader on my Archos 7 (home tablet). The installation run without any problems. But whenever I try to open a PDF file, a message shows up, telling me "Error: The file path is not valid".
    I have tried almost every single folder on my tablet. Does the PDF file need a specific file name? Do I have to create a folder (what would be it's name)?
    I haven't tried to download PDFs from the internet... it might work, but it would be great, if I can copy some PDFs from my computer to my tablet, too.
    Please Help!
    Thanks
    Matt

  • HT5622 I'm trying to do my updates in the App Store and it keeps telling me that my account is not valid in the us stores and I must switch to the Canadian one. How do I do that?

    I'm trying to do updates in the App Store and it keeps telling me that my account is not valid for use in a US store and I must switch t the Canadian one. How do I do that?

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the region where you are located.
    9. Tap "Done".

  • I was using ios 5.1 and i created an id from india, nw am in qatar n i updated to ios 6.0.1 nw i cant able to purchase from the store.when i tried to do it says " your account is not valid in the qatari store. you must switch to the indian store before

    I was using ios 5.1 and i created an id from india, nw am in qatar n i updated to ios 6.0.1 nw i cant able to purchase from the store.when i tried to do it says " your account is not valid in the qatari store. you must switch to the indian store before purchasing" please help me with this issue.. hw i can switch to indian store..?

    How to Change Your App Store Account Location | eHow.com

  • Can't install on windows 7 get message - the folder is on a locked disk or you do not have write permissions for this folder

    Have tried to install Itunes on laptop running 32 bit Windows 7 - it says it installed successfully but then when I click to open I get the message "the folder is on a locked disk or you do not have write permissions for this folder."

    You will have to descripe where the drive is and much more.
    Then go and look at the drive and folder and who has group ownership policy and more.
    It would have to be a guess, plus "20 questions" but why post here? when there are Snow Leopard, iMac, and of course, iTunes, Community forums.
    https://discussions.apple.com/community/itunes
    http://www.apple.com/support/itunes
    But this is not iTunes, it is a workstation community

  • How do I get past the password prompt with a locked iPhone?

    I updated to iOS7, and everything seemed fine. But then when the phone locked after a few minutes, it asked me for a password to unlock. I never used a password before. So the  phone is asking me for something I didn't have to do before. Now the phone remains in a locked state.
    I tried my Apple ID password, 0000, 1234, last four of my phone number, last 4 of my SSN, and nothing works. Has anyone else encountered this?
    The ultimate solution is to restore the phone to factory settings using iTunes, but that is pretty drastic, and besides, there is another little quirk about my phone that makes it not so easy -- I can't turn the phone off. The button on the top no longer works. I've learned to deal with that by just setting the phone to blank out after a minute, and of course when the new phone becomes available, I'm going to buy it, but in the meantime, the only way to turn the phone off is to let the battery discharge. So in order to restore to factory settings, I also have to let the phone discharge.

    Yes, I have the same problem! It is driving me crazy as I don't have a clue what code they want me to put in and now everytime I try a new one my phone is disabled and I have to wait half an hour until I can try another one! It's ridiculous!!!
    I am praying that someone finds a solution soon!!!

  • Firefox was working fine, I closed it and later it would not open at all. I've uninstalled and reinstalled and it will now open. I've followed all the directions and all I get is the crash reporter when I try to open firefox. It does not open at all. HELP

    I'm using XP sp3, fully patched with the current version of firefox 3. 6.12. I have 4 gb memory and a 250 gb hard drive. Most of which is all free, so I have lots of memory and hard drive space. I was using firefox and everything was working fine. I shut it down and when I went back later, it would not open at all. I've uninstalled and reinstalled, renamed the user acct, followed all directions I could find and firefox will not open. I've run all kinds of scans on my computer for viruses or malware and found nothing. Everytime I try to open firefox, I get the crash reporter and it will not open at all. I would appreciate some help. I don't know what else to try. I use firefox as my default browser.

    hello, this crash is caused by Websense Endpoint security software that is running on the system. please try to install all the updates for this program that are available...

  • Cannot log into any games keep on getting this The requested URL "/gardensoftime/?track=bookmark&ref=bookmarks&count=0", is invalid. Reference #9.5f34f418.1312835054.e594d25 invalid URL

    cannot log into any facebook games this happens all the time everyday

    Hi,
    Found a note explaining the significance of these errors.
    It says:
    "NZE-28862: SSL connection failed
    Cause: This error occurred because the peer closed the connection.
    Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
    For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
    Thanks & Regards,
    Sindhiya V.

  • I upgraded my storage plan, I do not need it and I am trying to downgrade but when I get to the last part where I am to click on "done", "done" is not illuminated and I can not complete the transaction...in other words, downgrade my storage

    I am not able to downgrade my storage.  The process does not complete on the last page.

    LONG STORY---It took 78min16sec but I did get my storage downgraded. I called 1-800-MY APPLE (1-800-692-7533). After 5 min I explained my issue (same as yours - couldn't get DONE to click) and they said they needed to transfer me to Apple Care. 15 minutes later Apple Care said they needed to transfer me to iTunes ETA 15 more minutes. W-A-Y more than 15 min later, the Apple Care person, who did check back with me throughout the wait time, handed me off to iTunes. Apple Care and iTunes had talked and iTunes had my problem in the process of being taken care of as we began talking. The people were all very nice, knowledgeable and helpful. It took a LONG time, but the problem is now solved. Actually iTunes said that my storage had already been downgraded. iTunes also processed a storage upgrade refund for me.
    SHORT STORY - Phone 1-800-MY APPLE (1-800-692-7533) and ask to speak to an iTunes Store Support Advisor to downgrade your iCloud storage plan.

  • I cannot get into the second page of some internet sites. For example, I'm not able to go into Business Section or Sport in NYT. Any idea how to fix this problem? Tks..

    I'm also having issues with multiple emails..

    For Flash, could you try downloading the "full" installers from this page:
    https://www.adobe.com/products/flashplayer/distribution3.html
    In the first table, there are two rows for Windows: one for the ActiveX control for IE, and one for the plugin for Firefox. You might want to grab both. And try the .msi files instead of the .exe files to see whether those work better.
    Will either of those install?
    It's odd that on a newly rebuilt system your More System Details shows that you have a user.js file, which is an optional settings files used to override your previous session settings. This is not part of the standard Firefox installation, so if you did not create that file yourself, you may want to investigate or delete it. This article has more information on that: [[How to fix preferences that won't save]].

  • I have a i phone 3 that is disabled and i am trying to get all the pictures and videos offof it or unlock it but it has not been synced to itunes. what should i do?

    i have an i phone 3 that is disabled.I am trying to get pictures off of it or unlock it but it is not synced with itunes. i would really like to just unlock it.what should i do?

    If it's disabled then it's too late to copy anything off it, there are instructions on this page for how to reset a disabled device : http://support.apple.com/kb/HT1212

Maybe you are looking for