help with the xp_cmdshell

  • Hi,

    I'm trying to run the script exec xp_cmdshell N'typeperf "\Memory\Pages/sec" -sc 1'

    and i get an error "Error: No valid counters."

    the server is windows 2003 r2 64bit sp2 and the sql is sql 2005 std sp3.

    if i run this command from cmd it runs ok typeperf "\Memory\Pages/sec" -sc 1.

    i try to change the sql service account to administrator no working.

    i've 20 other sql servers and it works on all of them.

    i must say that some counters work on the xp_cmdshell command but not the counter that i need.

    what do you think can bloc this script from running?

    THX

  • it's a security thing....see this post for a long winded explanation with screenshots and a solution:

    http://www.sqlservercentral.com/Forums/Topic951702-146-1.aspx

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hi

    It's a permissions issue. Please check that whether you have all required proivileges.

    Thank You,

    Best Regards,

    SQL Buddy

  • so how other counters work in the xp_cmdshell and other not?

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply