How to get available memory using SQL

  • Does anyone knows how to get available physical memory using SQL ? Thanks.

    -Jimmy

  • exec master.dbo.xp_msver 'PhysicalMemory'

     

     

    SQL = Scarcely Qualifies as a Language

  • Thanks for trying but this xp only provides total physical memory installed. I'm looking for available physical memory.

  • Target Server Memory(KB) and Total Server Memory (KB) values in the master..sysperfinfo table?



    Bye
    Gabor

  • Thanks Gabor.

    How often this system table is updated ?

    Thanks again,

    Jimmy

  • It's not a table : run this in the master table

    Select objectproperty(object_id('sysperfinfo'), 'TableIsFake')

    It will return 1. This means than when you query that table, Sql server meterializes it so that the query can execute, but this information is never actually kept on the hd like a real table.

    checks BOLS : objectproperty::TableIsFake

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

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