YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I'm trying to trim my near 500MB database down and even though I Pruned and manually (via the forum delete option) deleted nearly 40,000 messages , I still see them in the database with IsDeleted = 1. How the heck do you get rid of these? I chose to permanently remove these and yet they are still there?

When I try to delete them via SQL I get all sorts of FK problems. I spent an hour doing as they requirer and still nothing.

Then figured, since they are there, let's change the IsDeleted to 0 so I get all 200k messages visible. That failed too!!

Msg 271, Level 16, State 1, Line 1

The column "IsDeleted" cannot be modified because it is either a computed column or is the result of a UNION operator.

1. After you say to permanently remove a post and/or topic from the database, how do you make that actually permanent and be removed??

If that is not possible...

2. How can you change the topics and messages from IsDeleted = 1, to 0 so since they are wasting space, you can at least view them? Edit, Answered below...

Thanks for any help on this ... very frustrated at this.

Sponsor
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
Okay, I think I figured out how to change IsDeleted from 1 to 0, you have to change the Flags value.

 UPDATE [yaf_Topic]
 SET [Flags] = 0
 WHERE [Flags] = 8

 UPDATE [yaf_Message]
 SET [Flags] = 22
 WHERE [Flags] = 30

 UPDATE [yaf_Message]
 SET [Flags] = 22
 WHERE [Flags] = 29

 UPDATE [yaf_Message]
 SET [Flags] = 22
 WHERE [Flags] = 158

So I had three different Flags value's that computed to True for IsDeleted? 30, 29, 158 apparently.

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
Wrong approach you can f... your database.

If you want to udelete deleted messages use

UPDATE [yaf_Topic]

SET [Flags] = [Flags] ^ 8

WHERE ([Flags] & 😎 = 8

This deletes all messages

UPDATE [yaf_Topic]

SET [Flags] = [Flags] | 8

WHERE ([Flags] & 😎 <> 8

But really - your problem is not in the db size.

If you can shrink it from YAF - use available tools like Management Studio to make it.

http://msdn.microsoft.com/en-us/library/ms189035.aspx 

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
If I do as you suggest to delete the messages, will that actually remove them from the database?

I am not able to shrink the database using the YAF maintenance tools. It times out, but Jaben stated the timeout should be longer than 30 seconds I believe.

I am also having issues setting the Recovery Mode as well.

Edit, lol its so frustrating how fast this site is every time and how crappy slow mine is!! haha ... anyhow I did do the Management Studio shrink a few days ago. It trimmed the DB from 491MB to 412MB.

squirrel
12 years ago
DotNetNuke has horrible database management. If the system is running in "FULL" recovery mode, under DNN, your database can grow to huge sizes because of the amount of logging DNN does to the database. Not only in the tables themselves, but in the SQL Logs.

Something you can try is to run a 'full backup' of your database - including your log files, then run a shrink on the databases -- this will truncate the SQL LOG files attached to that database.

You may also check the size of the tables individually and find that DNN is what's bloating the database. That's the exact reason I moved from DNN on my sites. It requires almost 500mb of server memory to stay resident and run, and if you let the pool 'expire' it takes forever for it to startup and run again - plus it has horrible database bloat issues.

Even running SQL in "Simple Recovery" mode which keeps small logfiles did not help the internal DNN bloat in it's event tables...


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I can't get YAF to run in anything other than FULL. I switch to SIMPLE and it always reverts back to FULL. Frustrating.

I have done the Management Studio shrink (the YAF Shrink timesout after 30 seconds) database, which did spare me about 70MB.

What are you using in place of DNN? My only real use for DNN is the use of a Java Applet software that I converted into a module. I can run it from an ASP or HTML page, but I don't know how to get the username of the person logged in, nor do I know how to block unregistered members from YAF from accessing the chat.

squirrel
12 years ago
I actually switched to the dark side and am running a php based social network application for my main site. The site we run YAF on our server runs it as a seperate application, while the root-web is all ClassicASP driven because the owner only needs ability to add content - not so much 'audience participation' -- the php application I use has a forum built into it (although it sucks) that covers our needs... But it offers other features we use, such as video chat, media server, and so on --

The database properties in the Management Studio can also control the database recovery model -- if you right click on the database itself on the left side, you can set the recovery model there and it will stick -- YAF won't change it. YAF is supposed to read the status from the database, but on our site (1.9.5.5 RC1) it also always shows 'full recovery' on it even though the db is set to simple.

Also, I don't know if this helps, but you are supposed to be able to change your SQLServer timeout in one of YAF's config files (I believe app.config) - but I don't know if this setting applies to the maintenance features or not.

I would also look into the size of your DNN event tables/log tables -- those are what killed my installation when I first worked with it (v4.8.0 and some of v5) -- I had an issue where between the logfiles and those tables, my DNN alone was consuming over 5 gig of space (db had around 3 gig and logs were around 2 gig) and the site was doing 'minimal traffic with some search indexing) - that was it. I would have to go in and zap those two tables several times a month to keep the database manageable and the logs from going over quota...

I really liked DNN, but it is so server intensive that I couldn't justify the overhead for what it was doing -- maybe 30 visits a day total, never more than 2-3 users online at a time, and the app would consume upwards of 500mb of server resources to stay resident... It was ridiculous... Our YAF install mixed with a classic ASP site only runs around 175mb total and it serves an average of 40 users continuously all day long with some good peak usage as well -- it's much more well written IMO than DNN...


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I'm getting about 400 unique hits a day and about 100 posts or so a day with rarely more than 20 users online at once. I like DNN as well. I had PHP CMS previously, but I don't know PHP worth a damn, so I figured I'd move my hobby site to something that I enjoy, C#.

I'm not able to find that SQL Server time out, or the app.config file. If I have to compile YAF, I'm screwed. I haven't been able to get it compile at home at all.

I should probably ask the DNN folks, but is it possible to limit the logging?

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
When I "Delete Topic", the topic and message are still in the database.

When I "Delete" a message and select, "Erase message from the database (irreversible) " the message is still in the database.

Any idea how I can delete a topic and/or message permanently from the database? Or say hey stupid, this is what you're doing wrong?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
It will not solve the problem at all in your case. It's obviously not database-related. You could see it in debug mode where you.can see sql scripts exution timw share in the total page download time. Moreover if the situation deteriorates in a month the total will be just a useless forum size cutting.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago

It will not solve the problem at all in your case. It's obviously not database-related. You could see it in debug mode where you.can see sql scripts exution timw share in the total page download time. Moreover if the situation deteriorates in a month the total will be just a useless forum size cutting.

Originally Posted by: bbobb 

The problem being slow page load times, is that what you're referring to?

I want to know how to permanently delete topics and messages. My next host will probably have a size limitation and pruning and deleting need to work as expected. I don't want them simply masked from the site publicly, I want them removed from the database all together.

Deleting data permanently and increasing load times are two separate issues for me.

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
In the latest repository it works so - you remove first topic's post and you can see all the options on the page. Don't know if it applies to your version.
a5med
  • a5med
  • 51.2% (Neutral)
  • YAF Forumling
12 years ago
Good question
a5med
  • a5med
  • 51.2% (Neutral)
  • YAF Forumling
12 years ago
Good question indeed
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
12 years ago
I can not explain this, but after switching to my new host, when I delete a message, it actually is deleted!

Deleting a message, deletes it from the database.

However, when I delete a topic, the topic and messages remain in the database.