?
Solved

SQL Server Performance

Posted on 2007-03-21
3
Medium Priority
?
244 Views
Last Modified: 2010-03-19
We had a SQL Server 2000 Server running on a Windows 2003 Server with 4GB of RAM, RAID 5.  We were experiencing slow performance.  So we purchased a new Windows 2003 Server with 4GB of RAM, RAID 5, and upgraded to SQL Server 2005.

The applications seem to read from the databases fine, but saving records is slow, sometimes, even causing the application to stop responding.

Any help here, I am new to SQL Server and don't even know where to begin.

Thank you.
0
Comment
Question by:ourguru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18765785
this is usually one of 2 issues:
* SQL Server is allowed to take ALL the RAM, and hence the os/sql server start swapping
or, more probable here:
* your transaction log files are growing endlessy, without getting cleared.
here some explanations in regards to transaction logs:

  the transaction log is (in short) a circular buffer.
  every transaction is written to it.
  every transaction that has been backed up or truncated from the transaction log can be overwritten.
    -> hence, you either need a regular transaction log backup, or the database to be in simple recovery mode (be aware of the consequences)

  so, if you have a large .ldf file, you did have your database in full recovery mode, but "never" issued the transaction log backup.
    -> to avoid large .ldf file, see above.

  once the backup is in place, or the database in simple recovery mode, you can start shrinking the ldf file.
    -> note: put a correct size for it, so that even the largest transaction of your applications on that database can fit.
  if the shrink does not work straight away, this is because some non-cleared/active transactions are still in the file, usually and the end of the file  
    -> remember, the log file is a circular buffer.
  to solve that, simply run some transactions on the database (or wait for some to be run), and retry the shrink operation.
 

0
 

Author Comment

by:ourguru
ID: 18766002
My database is 4.5GB, and my LDF is 2.5GB.  I have them set to backup the LDF every night, but they stay around 2.5GB.

Is there any formula to estimate the amount of Memory needed for SQL Server.  Like a 4.5GB DB should have 6GB of RAM?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 18766062
> I have them set to backup the LDF every night,
how? online backup (ie transaction log backup), I assume

> but they stay around 2.5GB
that should be fine. as long as the file does not grow, there is no indication of problem...

>Is there any formula to estimate the amount of Memory needed for SQL Server.
no. of course, the more, the better, but the max RAM you need is the size of the db itself (+a bit of overhead for the running programs, including sql server itself).
but that is usually not needed/possible.

check the performance counters to determine the bottleneck during the problems, like disk write contention...

check the execution plans of the update queries, see if you have eventually full table scans of clustered index scans. if that is the case, you are missing index(es)...

0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question