Solved

SQL Server Performance

Posted on 2007-03-21
3
191 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
  • 2
3 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
> 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now