logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
icecubetray  
#1 Posted : Thursday, January 19, 2006 1:09:46 PM(UTC)
icecubetray

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/3/2006(UTC)
Posts: 5

I found that the ST_DATA.MDB seems to grow continuously regardless of whether you discard your results or perform cleanups. After a while I started getting errors constantly and Metastock was running really slow. After reading some posts about the ST_DATA.MDB I noticed the size of mine had exceeded 2GB, yet Metastock was telling me I had no data. So using Microsoft Access I opened up the Database and removed some of the garbage. I cleared out 51k of records in the AnalysisEvents, and in one other Analysis table but I can't remember the name. Then I did Tool->Database Utilities->Compact and Repair from the file menu. This got the Database down to 100Meg. Now the Performance of Metstock has drastically improved! If you are getting lots of errors or performance problems this is the way go! I'm not sure Metastock isn't cleaning this up properly......but it looks like it might have to be a manually purging process every once in a while.
StorkBite  
#2 Posted : Thursday, January 19, 2006 1:16:43 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Thanks for sharing your experience. This is the way to go for sure.
icecubetray  
#3 Posted : Saturday, January 21, 2006 1:01:23 AM(UTC)
icecubetray

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/3/2006(UTC)
Posts: 5

Attached is a Little VB application that runs cleans out the AnalysisEvents and AnalysisResults and can run compact and repair on the ST_DATA.MDB. As I said in the previous post it improves performance and seems to do the cleaning that Metastock doesn't, as far as I can tell. It will also decrease the size of your database file. Its not overly user friendly but it does the job. Unzip in your metastock directory which contains the database file "ST_DATA.MDB" and run Hopefully someone else finds it of use. T :D PS: use at your own risk.....
StorkBite  
#4 Posted : Saturday, January 21, 2006 1:13:22 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Hey P- Will you add this to the d/l section too? It's great getting in utility submissions! Thanks again Ice!
konrad  
#5 Posted : Saturday, January 21, 2006 1:13:25 AM(UTC)
konrad

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/6/2005(UTC)
Posts: 424
Location: connecticut,USA

G, did you check if a file working?
Patrick  
#6 Posted : Saturday, January 21, 2006 1:16:02 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Wow this is excellent thanks icecubetray :D I will move it to the download section sometime this weekend g ;)
garykong  
#7 Posted : Wednesday, January 25, 2006 10:48:02 AM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi, I have found that my ST_Data file with a size of 2.5 GB..... does it regarded as a big file? Has anyone tired the cleanup file?? Gary
hayseed  
#8 Posted : Wednesday, January 25, 2006 11:50:58 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey gary.... my st data is less than 5 meg, 4,272 kb..... just checked... so 2.5 gig would appear high, unless your using meta different than me which is quite possible...... surely there are users that do daily tasks that have not even occured to me.... so differing file sizes are to be expected..... h
StorkBite  
#9 Posted : Wednesday, January 25, 2006 11:52:44 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Gary- You can always make a backup of your original database and see if cleaning and compressing it will reduce the size. Could be that 2 GB is nothing... I guess it's all relative to the storage space you have available.
garykong  
#10 Posted : Wednesday, January 25, 2006 2:27:03 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi all, I have made a mistake, the size of the file should be 2500 kb that can be cleanup to 2260 kb, but I have not tried it... will do with a backup! Gary
chris3105  
#11 Posted : Saturday, January 28, 2006 3:50:47 PM(UTC)
chris3105

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/11/2005(UTC)
Posts: 37

Was thanked: 1 time(s) in 1 post(s)
Hi, the limitation of 2 GB is a general MS (Microsoft) Access Problem, not a problen of the Systemtester. A database greater than 2 GB can't be handled properly. The problem is, that after every insert of a recordset the size of the database will increase a little bit. So, although you delete old records/systemtests, the size of the database will increase and increase and increase .... If you have installed MS Access on your computer, you should open ST_DATA.mdb and compress and repair the database with MS Access on a regular basis. In general, it's a good idea, to make often backups of this database. A very bad thing is, that you get very often curious system results when this database is corrupt. Chris
wabbit  
#12 Posted : Thursday, February 2, 2006 1:16:06 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
icecubetray.... Love your work, but there could be a couple of improvements?? Perhaps: create a backup of the file BEFORE cleaning a message box showing the status of the operations a message box when operations are complete If yuo would like to share the source code, I can make the appropriate changes and repost the revised product? Just a thought. wabbit :D 16 days to go !! I can almost taste the freedom!
StorkBite  
#13 Posted : Thursday, February 2, 2006 7:55:13 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
I haven't tried, but should be easy to do with vb.net intraop... If there is no update posted, I will add this to my project list.
StorkBite  
#14 Posted : Friday, February 3, 2006 5:39:04 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Wabbit- Not sure of your programming preference, but if you care for VB.NET, take a look here: http://support.microsoft...spx?scid=kb;en-us;306287 Here is a rudimentary example... of course, it could be a lot more detailed ;-) Cleaning the database tables can be accomplished using the OleDbCommandBuilder function with an SQL command such as "DELETE * FROM AnalysisEvents". Honestly, I omitted this function, because these tables have dependencies upon other tables. I'm not quite sure of the proper sequence to clean them (i.e., remove entries). For example, the AnalysisEvents table is dependent upon the Analysis table. If I understood the relationship better, I could easily add the code. I included some of my coding thoughts as a text file within the attached solution file. [code:1:75ea3a92de]' Add Reference to Microsoft Jet and Replication Objects 2.x Library Imports System.Data.OleDb Imports System.IO Public Class frmUtility Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " ******* Omitted from post due to length of post constrints ******* #End Region Private mdbFile1 As String = "C:\\Program Files\\Equis\\MetaStock\\ST_DATA.MDB" Private mdbFile2 As String = "C:\\Program Files\\Equis\\MetaStock\\ST_DATA_BU.MDB" Private mdbFile3 As String = "C:\\Program Files\\Equis\\MetaStock\\ST_DATA_TEMP.MDB" Private Sub BackupDB() Try Dim file As IO.File Select Case file.Exists(mdbFile1) Case True ' Make a backup copy (overwrite existing backup, if any) file.Copy(mdbFile1, mdbFile2, True) Case False ' File not found MessageBox.Show("File not found!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Select Catch ex As Exception ' Unexpected error MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub CompactDB() ' Attempting to compact a database file that is currently in use will result in an exception Try Dim file As IO.File If file.Exists(mdbFile3) Then ' Delete temporary file, if exists file.Delete(mdbFile3) End If ' Create a new compacted file Dim jro As New JRO.JetEngine jro.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdbFile1, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdbFile3 + ";Jet OLEDB:Engine Type=5") ' Overwrite original file with compacted file file.Copy(mdbFile3, mdbFile1, True) ' Delete temporary file file.Delete(mdbFile3) Catch ex As Exception ' Unexpected error MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End Sub Private Sub btnManage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnManage.Click lblStatus.Text = "Working..." If cbCompact.Checked = True Then CompactDB() ' Status report lblStatus.Text = "Compacting..." End If If cbBackup.Checked = True Then BackupDB() ' Status report lblStatus.Text = "Backup in progress..." End If Beep() lblStatus.Text = "" cbCompact.Checked = False cbBackup.Checked = False End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click MyBase.Close() End Sub Private Sub cbCompact_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbCompact.CheckedChanged If cbCompact.Checked = False And cbBackup.Checked = False Then btnManage.Enabled = False Else btnManage.Enabled = True End If End Sub Private Sub cbBackup_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbBackup.CheckedChanged If cbCompact.Checked = False And cbBackup.Checked = False Then btnManage.Enabled = False Else btnManage.Enabled = True End If End Sub End Class[/code:1:75ea3a92de]
Users browsing this topic
Guest (Hidden)
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.