Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2004, 09:09 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default min/max server memory configuration

Hi,

Looking for some help where I can set a fixed min/max server memory value, which is still dynamic. I need to distribute a script to different machines that have different memory configurations : 256 Mb, 512 MB and 1024 Mb. Is there a way I can dynamically change the fixed values for min/max memory based on the computer's actual amount of RAM ? Thanks.

sp_configure 'max server memory', 350
go
sp_configure 'min server memory', 150
go

Sebastiaan.
 
Old December 29th, 2004, 07:14 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

K, if by any reason I can use a VB variable to extract the total RAM ? Thanks.
 
Old December 29th, 2004, 07:56 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

You may want to look for more detail information on Query_Governor_Cost_limit on Books Online or any source.

SET QUERY_GOVERNOR_COST_LIMIT
Overrides the currently configured value for the current connection.

Syntax
SET QUERY_GOVERNOR_COST_LIMIT value

Arguments
value

Is a numeric or integer value indicating if all queries are allowed to run (value of 0) or if no queries are allowed to run with an estimated cost greater than the specified nonzero value. If a numeric value is specified, Microsoft® SQL Server™ truncates it to an integer.

Remarks
Using SET QUERY_GOVERNOR_COST_LIMIT applies to the current connection only and lasts the duration of the current connection. Use the query governor cost limit option of sp_configure to change the server-wide query governor cost limit value. For more information about configuring this option, see sp_configure and Setting Configuration Options.

The setting of SET QUERY_GOVERNOR_COST_LIMIT is set at execute or run time and not at parse time.

Permissions
SET QUERY_GOVERNOR_COST_LIMIT permissions default to members of the sysadmin fixed server role.




Jaime E. Maccou
 
Old December 30th, 2004, 10:06 AM
Authorized User
 
Join Date: Jun 2003
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help, but have created a vbs which creates the sql input file dynamically based on the following :

Set objMemory = GetObject("WinMgmts:root/cimv2:Win32_OperatingSystem")

For each objModule in objMemory.Instances_
    intPhysicalMemory = intPhysicalMemory + objModule.TotalVisibleMemorySize
Next

Sebastiaan.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get the Max or Min Filename? crabjoe ASP.NET 1.0 and 1.1 Basics 4 January 15th, 2008 04:48 PM
MAX/MIN Value Help slbibs SQL Server 2005 4 November 6th, 2007 04:00 AM
MIN( MAX( UPDATE Stuart Stalker SQL Language 3 February 21st, 2007 07:10 AM
Min / Max followup danbush XSLT 2 August 31st, 2005 12:02 PM
MAX and MIN ON TD cleytonjordan XSLT 7 July 27th, 2005 12:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.