Getting values of @@cpu_busy etc from linked server

  • Hello,

    Is there any way i can get values of @@cpu_busy, @@io_busy etc etc global variables of any linked server.

    Suppose A is my server, B is linked server, i need to get values of global variable of this B server.

    Any idea will be much appreciated?

    Thanks,

    Muhammad

  • Try something like this....

    EXEC [Your Linked Server Name].[master].[dbo].sp_ExecuteSQL N'SELECT @@cpu_busy'

  • Hi Baddabing,

    Thank you very much for your reply, i get this error

    Server 'A' is not configured for RPC.

    i tried to change this RPC value to true from linked server properties page but still getting same error.

    Thanks,

  • Try running this from server A

    exec sp_serveroption @server='ServerName', @optname='rpc', @optvalue='true'

    exec sp_serveroption @server='ServerName', @optname='rpc out', @optvalue='true'

  • Again Thanks a lot,

    Now after turning RPC and RPC out to True, getting this error

    Procedure expects parameter '@handle' of type int.

    My statement looks like this.

    exec [A].[master].[dbo].sp_execute N'Select @@cpu_busy'

  • ohh i got it,

    i mistyped sp_executeSQL

    Thanks a lot for this , i works now

Viewing 6 posts - 1 through 5 (of 5 total)

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