October 7, 2004 at 11:01 pm
We are runing an application that call a stored procedure in SQL Server 2000. Sometimes, the application respones very slow (over 2 minutes). The profile shows that the Duration, Reads and CPU were much higher than normal at that time. I run the same stored procedure in SQL Analyser. It is very fast, about one second. Could anyone can tell me what are the possible reasons and how to fix it. Thanks.
October 9, 2004 at 11:39 pm
Anybody help me? Please!!!
October 10, 2004 at 11:29 pm
If you are using SQL Server 2000 Standard Edition under Windows NT 4.0 or Windows 2000 (any version), or are running SQL Server 2000 Enterprise Edition under Windows NT 4.0 or Windows 2000 Server, or if your server has less than 4GB or RAM, the "awe enabled" option should always be left to the default value of 0, which means that AWE memory is not being used.
The AWE (Advanced Windowing Extensions) API allows applications (that are written to use the AWE API) to run under Windows 2000 Advanced Server or Windows 2000 Datacenter Server to access more than 4GB of RAM. SQL Server 2000 Enterprise Edition (not SQL Server 2000 Standard Edition) is AWE-enabled and can take advantage of RAM in a server over 4GB. If the operating system is Windows 2000 Advanced Server, SQL Server 2000 Enterprise Edition can us up to 8GB of RAM. If the operating system is Windows 2000 Datacenter Server, SQL Server 2000 Enterprise can use up to 64GB of RAM.
By default, if a physical server has more than 4GB of RAM, Windows 2000 (Advanced and Datacenter), along with SQL Server 2000 Enterprise Edition, cannot access any RAM greater than 4GB. In order for the operating system and SQL Server 2000 Enterprise Edition to take advantage of the additional RAM, two steps have to be completed.
Exactly how you configure AWE memory support depends on how much RAM your server has. Essentially, to configure Windows 2000 (Advanced or Datacenter), you must enter one of the following switches in the boot line of the boot.ini file, and reboot the server:
The /3GB switch is used to tell SQL Server to take advantage of 3GB out of the base 4GB of RAM that Windows 2000 supports natively. If you don't specify this option, then SQL Server will only take advantage of 2GB of the first 4GB of RAM in the server, essentially wasting 1GB of RAM.
AWE memory technology is used only for the RAM that exceeds the base 4GB of RAM, that's why the /3GB switch is needed to use as much of the RAM in your server as possible. If your server has 16GB or less of RAM, then using the /3GB switch is important. But if your server has more than 16GB of RAM, then you must not use the /3GB switch. The reason for this is because the 1GB of additional RAM provided by adding the /3GB switch is needed by the operating system in order to take advantage of all of the extra AWE memory. In other words, the operating system needs 2GB or RAM itself to mange the AWE memory if your server has more than 16GB of RAM. If 16GB or less of RAM is in a server, then the operating system only needs 1GB of RAM, allowing the other 1GB of RAM for use by SQL Server.
Once this step is done, the next step is to set the "awe enabled" option to 1, and then restart the SQL Server service. Only at this point will SQL Server be able to use the additional RAM in the server.
One caution about using the "awe enabled" setting is that after turning it on, SQL Server no longer dynamically manages memory. Instead, it takes all of the available RAM (except about 128MB which is left for the operating system). If you want to prevent SQL Server from taking all of the RAM, you must set the "max server memory" option (described in more detail later in this article) to a figure that limits SQL Server to the amount or RAM you specify.
As part of your audit process, you will want to check what this setting is and then determine if the setting matches your server's configuration. If not, then change the setting appropriately.
Ajay Sharma( Delhi)
October 11, 2004 at 12:14 am
See the following thread:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=138953
Maybe it will help...
Razvan
October 14, 2004 at 11:13 pm
Thank you very much for your hlep, Ajay Sharma and Razvan Socol.
We are using SQL Server 2000 Enterprise Edition under Windows 2003. The memory is 6G. The minimium for SQL server is 1G.
Some rows in the profile show that some trace data did not be written to the profile because the memory has reached the maximium usage for the process. Does this mean the server memory is not big enough for all the processes or just for this process? How to solve the problem? Thanks,
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply