YAFLogo

doxa123
  • doxa123
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter YAF Version: 3.1.14
14 years ago
Hello,

I have a yaf 1.9.4 RC1 forum.

215 Forums, 1.241 Topics, 1.815 Message, 466 Members

this forum uses over 600 MB Database Size.

is it normal ?

if not, how can i reduce size of db ?


Sponsor
RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time
14 years ago
do you mean 1,815 messages? my db has more and is only 88M large.

Depending on where it's hosted, you should be able to issue a dbbshrinkfile against the database.


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
There is a Shrink button in Admin db utils. It can works in some cases.
RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time
14 years ago
yes, it depends on your hosting; I'm on GoDaddy, and the built in shrink function doesn't work.

What I've done:

1. backup database in GoDaddy hosting panel

2. bring db.bak file to local machine.

3. restore dB with SQL server management studio (part of SQL express)

4. run dbcc shrinkfile on local copy of database

5. Publish database back to GoDaddy server

GoDaddy has instructions for using SQL express database publishing wizard in their help files


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

doxa123
  • doxa123
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter YAF Version: 3.1.14
14 years ago
I shrinked on local copy of database. But only 15 mb decreased.

Most of size , used from log file.

You can see the attached pictures.


herman_herman
14 years ago
Well..the size does not seem to be normal.Do you store attached files in you database (Host Settings > Use File Table)?
doxa123
  • doxa123
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter YAF Version: 3.1.14
14 years ago
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
It's a no a YAF problem.

Show output of SELECT name, recovery_model_desc FROM sys.databases

herman_herman
14 years ago

it is unchecked

doxa123 wrote:

One more thing...Set you database Recovery Model to Simple and do a shrink (All via database maintenance section) and see if the size reduces!

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time
14 years ago

I shrinked on local copy of database. But only 15 mb decreased.

Most of size , used from log file.

You can see the attached pictures.

doxa123 wrote:

If your db changed, but your log file didn't; how are you shrinking? using shrink database or dbcc shrinkfile?

shrink database will not alter the log file; dbcc shrinkfile needs to be told what to shrink (you can tell it to shrink the log file after it does the database.

I don't use shrink database, just dbcc shrinkfile. I run it on the db and the log file. I run it twice on each (once with 'NOTRUNCATE' to get all the free space at the end, and once with TRUNCATEONLY to drop the free space at the end).


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

doxa123
  • doxa123
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter YAF Version: 3.1.14
14 years ago
Now recovery model is Simple and database size is 32 MB. Thank you;)

The recent log file is 1MB.

One more thing, is there a problem to take FULL Backup ? How should i backup database? Full or Differential?

(i can't restore differential backup on Ms Sql 2008, "To Database" doesn't list on Restore Files and Filegroups)


herman_herman
14 years ago
Hi

When you set your DB recovery model to Full everything is logged and therefore you can restore it to a specific point but in simple mode you can just restore the whole backup.I personally use Simple mode and i backup my DB every couple of days.

You can read more about Recover Model here