I developed an installer and now I want to add feature (basically a check) that will check the memory allocated to SQL Server.
I can login to SQL Server and get memory details, but on client side they don’t provide access to SQL Server and so I need to develop a tool to get this detail. They will provide credentials in tool to connect to the SQL Server.
I know how to change the memory
EXEC master.dbo.sp_configure
GO
EXEC master.dbo.sp_configure 'show advanced options', 1
RECONFIGURE
GO
EXEC master.dbo.sp_configure 'min server memory', 1024
RECONFIGURE
GO
EXEC master.dbo.sp_configure
GO
But is there any way I can get how much memory is allocated?
You could inquire with the
sys.configurationscatalog view – how about this setting here?Is that the value you’re looking for?
Or maybe you’re looking for the value for ‘min server memory (MB)’ ? (as the code in your post seems to imply)