PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Way to see SQL Server memory usage in QA?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Way to see SQL Server memory usage in QA?

Réponse
 
LinkBack Outils de la discussion
Vieux 16/07/2008, 15h21   #1
Ian Boyd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Way to see SQL Server memory usage in QA?

Is there a way to see the memory (RAM) usage by an SQL Server instance, and
get that value by executing a statement in Query Analyzer?

SQL Server 6.5
SQL Server 7
SQL Server 2000
SQL Server 2005
SQL Server 2008


  Réponse avec citation
Vieux 16/07/2008, 15h39   #2
Ian Boyd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Way to see SQL Server memory usage in QA?

> Is there a way to see the memory (RAM) usage by an SQL Server instance,
> and get that value by executing a statement in Query Analyzer?


*the memory currently used by an instance of an SQL Server engine*

> SQL Server 6.5
> SQL Server 7
> SQL Server 2000
> SQL Server 2005
> SQL Server 2008


* query can be different between different versions of SQL Server
** query can be non-existant if a given version of SQL Server doesn't
support such a query
*** required level of access (dbo, public, sysadmin, fixed sys admin, backup
operator, etc) not important


  Réponse avec citation
Vieux 16/07/2008, 22h59   #3
TheSQLGuru
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Way to see SQL Server memory usage in QA?

1) Use xp_cmdshell to fire a batch file that uses wscript to hit WMI to find
the memory used by each sqlserver.exe process.

2) dbcc memorystatus

3) For 2005+, search BOL for the DMV(s) that expose memory counters and
usage.

--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net


"Ian Boyd" <ian.msnews010@avatopia.com> wrote in message
news:unV3gl05IHA.4988@TK2MSFTNGP04.phx.gbl...
>> Is there a way to see the memory (RAM) usage by an SQL Server instance,
>> and get that value by executing a statement in Query Analyzer?

>
> *the memory currently used by an instance of an SQL Server engine*
>
>> SQL Server 6.5
>> SQL Server 7
>> SQL Server 2000
>> SQL Server 2005
>> SQL Server 2008

>
> * query can be different between different versions of SQL Server
> ** query can be non-existant if a given version of SQL Server doesn't
> support such a query
> *** required level of access (dbo, public, sysadmin, fixed sys admin,
> backup operator, etc) not important
>



  Réponse avec citation
Vieux 17/07/2008, 00h21   #4
Andrew J. Kelly
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Way to see SQL Server memory usage in QA?

Other than the MemtoLeave memory on 32 bit you can see the Target and Total
Server memory usage with the sys.dm_os_performance_counters dmv along with
several other memory counters. What is the goal? A typical SQL Server will
max out the memory available to it after a short term anyway and it does not
release memory unless the OS specifically asks for it. Then there are
certain conditions that must be met and idiosyncrasies.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Ian Boyd" <ian.msnews010@avatopia.com> wrote in message
news:unV3gl05IHA.4988@TK2MSFTNGP04.phx.gbl...
>> Is there a way to see the memory (RAM) usage by an SQL Server instance,
>> and get that value by executing a statement in Query Analyzer?

>
> *the memory currently used by an instance of an SQL Server engine*
>
>> SQL Server 6.5
>> SQL Server 7
>> SQL Server 2000
>> SQL Server 2005
>> SQL Server 2008

>
> * query can be different between different versions of SQL Server
> ** query can be non-existant if a given version of SQL Server doesn't
> support such a query
> *** required level of access (dbo, public, sysadmin, fixed sys admin,
> backup operator, etc) not important
>


  Réponse avec citation
Vieux 17/07/2008, 15h12   #5
Ian Boyd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Way to see SQL Server memory usage in QA?

> 2) dbcc memorystatus

Excellent! Thank you.


  Réponse avec citation
Vieux 17/07/2008, 15h17   #6
Ian Boyd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Way to see SQL Server memory usage in QA?

> What is the goal?

Customer's live SQL 2005 machine is running queries with poor execution plan
choices. i wanted to limit our development machine to the same amount. But i
don't have access to the server's desktop, performance counters, task
manager, etc. But we could talk to SQL Server through SQL Server.


In the end, i starved our SQL Server to 30MB of RAM, as opposed to the
normal 300MB that it normally sits on. The query still used the 'proper'
execution plan, with the 'proper' number of logical reads. So memory
starving wasn't able to reproduce the problem.


....starting new thread shortly... so tired.


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h02.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10096 seconds with 14 queries