Welcome to Radarspotting. Please login or sign up.

August 24, 2026, 10:24:06 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

New member - Help required - deleting history

Started by stephenjenningscov, November 06, 2015, 11:12:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

stephenjenningscov

Hi,
I have just joined this site and would like to open with what I hope is a simple question (sorry if the answer is already in the depths of this forum).

I would like to delete the history for each entry that is held each time a SBS code is picked up, but without losing the data that contains the hex code/ registration tie up.

Is there a utility that will allow me to edit the SQB file in this way?

Many thanks in advance.


Anmer

Do you want to remove the flight sessions from the sqb database but retain the individual aircraft records?

I used to do this using SBS1 Populate.  I don't know if there's an equivalent function in any of the other sqb database utilities?

I have just made a copy of my current sqb file and deleted the sessions using the free SQLite Expert Personal.  Seems to have worked OK.

http://www.sqliteexpert.com
Here to Help.

stephenjenningscov

Thanks Anmer.  that is indeed what I am wanting to do. I will investigate your suggestion.

Regards...

Anmer

Take a copy of the sqb file to test.

Make sure you can revert to the original database if you need to.
Here to Help.

IanH

As Anmer says back up your existing basestation.sqb first.

Open it in SQLite Personal which Anmer has linked to.

Click on the SQL tab and enter

DELETE FROM Flights;


Then click on the Execute SQL button.

You will also need to click on Database/Vacuum to compact the database to reduce its size after the deletions.

acarslogger

Hi,

Basestation Menu > Settings > Data Settings >Database.
Check Purge Flight Table After .... and add your required value - measured in days.

Stuart

stephenjenningscov

Thanks for your help everybody - mission accomplished :-)

Anmer

Quote from: acarslogger on November 06, 2015, 04:22:42 PM
Basestation Menu > Settings > Data Settings >Database.
Check Purge Flight Table After .... and add your required value - measured in days.

Thanks Stuart, forgot about that, BUT......

Tried it setting it to 30 days.  BaseStation closed saying the database was being purged but looking at the sqb file afterwards, it's the same size and the sessions are still there?
Here to Help.

Anmer

OK, found the issue.

If you use Stuart's method of purging the database, follow it up using BaseStationReporter to Pack the database, as suggested by IanH.

The sessions will remain albeit empty of any records, unless you have "open ended" sessions without an end date and time.  If you do, the records will remain.

You may need SQLite Expert to clear these.

Thanks again to Stuart and IanH.
Here to Help.

IanH

Thanks to you Mike for confirming which table needed deleting - I thought it was the Flights one but not certain so I did not want to jump in until confirmed.  ;)

Truetrack

One way I go is
Since I am populating SQB myself and dislike auto polulating
I use parallel to BS the ADLite in "Needs populating ..." mode with a few keys
from this list I recheck databases and if target still onscreen will enter in BS Aircraft list,
or else jotting my additions down for BS Reporter when BS is off.

Purging the events after 10 , and Flights in session after 32 days
this shows last 10 movements in Reporter and at least empty the sessions after a month+
with fig of 10 I cover a weekly Charter or others nondaily.
After some 90 days I delete sessions completely by me in SQLiteBrowser.
I am not packing SQB, and have with some 44000 entries steady at about 129 Mb .
So i use either  delete from aircraft where modeS ...
or the delete from aircraft where modeSCountry="Not Allocated_0'; respective 1
and
delete from Sessions where sessionID>=.... AND SessionID>=....;
 
Well I have to admit this is by no means time-effective, but I feel it is part of the 'game'.
After all for a Senior Citizen it is manageable .
Klaus