• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

birdsafe
#1 Posted : Thursday, January 29, 2009 8:39:13 PM(UTC)
birdsafe

Rank: Member

Joined: 2/21/2007(UTC)
Posts: 1,113

Has anyone figured out a way to get notified when the database is nearing the top limit? Several times now I have not known that the database had reached its limit until either: A) a customer says they can't place an order; B) I notice I don't have any sales for a few hours and check; or C) happen to look in the error log and see an error related to the database being full.


I'm surprised that there isn't a way to have a SQL database "self-expanding" -- but as it stands when I find out, I have to email the host, ask them add space (and then go and pay for it).



It would also be nice if there were a way to clean up the database of old, no longer useful data!
Mark H
#2 Posted : Friday, January 30, 2009 12:51:05 AM(UTC)
Mark H

Rank: Member

Joined: 12/19/2006(UTC)
Posts: 153

Agreed! Over the past 2 years we have noticed the user search getting slower and slower. I was thinking of trying to dump all users who have not logged in in over 2 years.
Aaron
#3 Posted : Friday, January 30, 2009 11:49:01 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Mark & Joe,
Talk to your hosting companies. They are the ones that are forcing an artificial limit on the size of your database. That's really not a good policy because your store will stop working correctly when you run out of space...
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
bvcoder
#4 Posted : Saturday, January 31, 2009 1:05:35 AM(UTC)
bvcoder

Rank: Member

Joined: 8/1/2007(UTC)
Posts: 310

Joe / Mark,

Actually SQL Server databases (2000, 2005 and 2008 - cant vouch for 7.0) are by default self expanding. You can configure how much you want to increase the DB size by when it reaches a specific level at DB creation time and also at a later time. Hosts configure them with certain top limits and they demand you to pay more when you run out of space.

And there is a hidden secret here which I am not sure how many merchants know of. Every SQL database has 2 files on the file system. A db file (has a mdf extension by default) and a log file (has a ldf extension by default). These extensions can be changed to anything else as well. What really grows in size rapidly is the log file size and not the database file size. And do you know why the log file size grows so rapidly? Its because of the recovery model set for your database. By default when you create a database, the recovery model is set to Full. Read this article: http://msdn.microsoft.co...us/library/ms175987.aspx for more information on recovery models.

Now having said that, irrespective of what recovery model you choose, you can always shrink the database file size (especially the transaction log file size). This is an admin operation and is pretty straight forward. Else what you end up with is huge transaction log file sizes.

For instance, I know of one customer whose transaction log file size grew to 14 GB because they never shrink the transaction log. In that case, your store performance will come down. And not just that, the host was charging more and more every month. The speed at which your transaction log file size increases depends on the number of DB transactions happening. If yours is a high traffic store, expect your transaction file to grow very fast.

On top of this, if you have a huge transaction file size, then backup and restore also takes a lot of time. For instance the database that I am talking about here (the one with a transaction log file size of 14 GB), a restore database from full backup took almost 35 minutes. You definitely dont want to be in that situation. Overall with huge transaction log file sizes, you will sacrifice performance, money and risk DB restores.

However, database and transaction log files should be reduced in size in a proper way taking into account what you would want to restore and what not. It also depends on how often your DB gets backed up. It should be carefully planned and very few people can advise you on how to shrink the DB and transaction log file sizes. Thats a niche area. :-)

To know your database transaction log file size, ask your host for a full database backup. Restore it on your server and notice the file sizes. Alternatively ask your host for the file sizes. If your log file is not huge and if your store is slow, then there is something else going on. :-)

Let me know if you have further questions.
Thanks,
Satya
support @ bayquel.net
Work: +1 803 883 3226
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012