FTView Datalogging to SQL Express. How to purge database

Join Date
Jul 2007
Location
Kiruna
Posts
600
Hi all,

I am logging data via ODBC to a 2008 RS SQL express database. In FTView File Management I have set it up to purge record after 6 months. This is not working and my DB has now reached its limits.

Has anyone seen this before? Does it actually work or must I handle the purging externally via a stored procedure or scripting?

Thanks in advance.

Trevor
 
Hi
I maybe out of date but i recall you cannot purge the empty records unless the database is closed.
 
You can clean out old records by using running an SQL statement every now and then, for instance in the task scheduler in Windows. You can do this on the fly, so no need to shut anything down.

Code:
DELETE FROM Table_name
WHERE Date_column < DATEADD(mm,-6,GETDATE())

SQL Express is just a standard database from Microsoft. A free, scaled down version of their SQL server with some limitations on storage and memory use.
 
Hi Pete
Thanks for that info. I tried about 10 yrs ago and found i could delete the records but not 'compact' the database to removed the null entries when it was open
 
SQL Express is just a standard database from Microsoft. A free, scaled down version of their SQL server with some limitations on storage and memory use.


found i could delete the records but not 'compact' the database to removed the null entries when it was open

I see this a lot as we generate a LOT of data. In SQL express you can not scheudle this automatically with the database tools, in the full version you can. We end up having to manually backup, compress, and delete old records - on a weekly basis.

When you right click on the database (not table) tree to perform these functions, the GUI that comes up will tell you the % free space. In our case, when it gets below 1%, the machines will stop.
 

Similar Topics

Hello, Does anyone experience of having "Unable to start process for the following command: DatalogOn xxxxx`" ? How to fix it? Thanks for your...
Replies
3
Views
1,639
I'm trying to figure out what would be the best way to have a plc change a tag to "1", once FTVIEW SE see's that this tag is '1" it would log one...
Replies
12
Views
4,271
I am creating a global object in FTView SE 13. I want to have a string read from the PLC and display (in this case the tagname). So lets say...
Replies
4
Views
167
I want to set user security level based on the value of a tag in my PLC called "ActiveUser". That tag will contain the A-P code which we use for...
Replies
6
Views
207
Hi All, we've recently upgraded from FTView SE v10 to v12. Since the upgrade we've been having a problem where the HMI is slow to update tags in...
Replies
0
Views
87
Back
Top Bottom