Database cleaning: Unterschied zwischen den Versionen

Aus Wiki - Heidler Strichcode GmbH
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „[[de:Datenbankbereinigung]   = <span style="font-family:arial,helvetica,sans-serif;">'''Datenbankbereinigung (manuell)'''</span> = <br/> Die Produktiv…“)
 
 
(5 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
[[de:Datenbankbereinigung]
+
[[de:Datenbankbereinigung]]
  
  
 
&nbsp;
 
&nbsp;
  
= <span style="font-family:arial,helvetica,sans-serif;">'''Datenbankbereinigung (manuell)'''</span> =
+
= <span style="font-family:arial,helvetica,sans-serif;">'''Database cleaning'''</span> =
  
<br/> Die Produktiv-Datenbank soll vom Inhalt und von der verbuchten Satzanzahl her aus Performancegründen bereinigt werden. Nur die aktuellsten Versanddaten eines gewissen Zeitraumes verbleiben in der Datenbank.<br/> Der Zugriff auf ältere Daten zu Auskunfts-Nachforschungszwecken bleibt gewährleistet durch vorheriges Abstellen einer Kopie der Datenbank in ein Archivverzeichnis.<br/> &nbsp;
+
<br/> For performance reasons, the productive database should be cleaned up in terms of content and the number of records posted. Only the most recent shipping data from a specific period in the database.<br/> Access to older data for information research purposes is guaranteed by prior storage of a copy of the database in an archive directory.<br/> &nbsp;
  
  
== '''Vorgehensweise''' ==
+
== '''Method''' ==
  
Alle&nbsp;Schritte müssen auf dem Server durchgeführt werden&nbsp;
+
All&nbsp;steps must be performed on the server&nbsp;
  
*Verfügbarer Speicherplatz mit dem HVS32-Verzeichnis überprüfen. Temporär sollte das 3-fache der aktuellen Datenbankgrösse (HVS32.FDB) als freier Speicherplatz verfügbar sein
+
*Check available disk space with the HVS32 directory. Temporarily three times the current database size (HVS32.FDB) should be available as free storage space.
*Alle laufenden HVS32-Versandprogramme beenden, wenn vorhanden auch die laufenden Monitroing Instanzen
+
*Terminate all running HVS32 dispatch programs, if available also the currently running monitoring instances
*Die Datei HVS32.FDB im HVS32\DATABASE-Verzeichnis testweise umbenennen in HVS32AKT.FDB . Wenn dies möglich ist, greift kein Prozess mehr auf die Datenbank zu und es kann fortgefahren werden
+
*Rename the HVS32.FDB file in the HVS32\DATABASE directory to HVS32AKT.FDB as a test. If this is possible, no more processes are accessing the database and you can continue
*Inhalt der „clear.zip“ in das \DATABASE Verzeichnis kopieren
+
*Copy the content of "clear.zip" into the \DATABASE directory
*Die Datei HVS32AKT.FDB in den Ordner HVS32\ARCHIV kopieren und umbenennen in HVS32_jjjjmmdd.FDB wobei hier der Verdeutlichung halber zur Benamung das vorgesehene Bereinigungs-Datum zu verwenden ist (d.h. das Datum bis zu dem die Versanddaten später bereinigt werden sollen)  
+
*Copy the HVS32AKT.FDB file to the HVS32\ARCHIV folder and rename it to HVS32_jjjjmmdd.FDB. For the sake of clarification, the intended cleansing date should be used here for naming (i.e. the date by which the shipping data should later be cleaned)  
*Die Originaldatei im HVS32\DATABASE-Ordner wieder umbenennen in HVS32.FDB und die Firebirddienste &nbsp;wieder starten
+
*Rename the original file in the HVS32\DATABASE folder to HVS32.FDB and restart the Firebird services
*In der DOS-Eingabeaufforderung wechseln und dort in das HVS32\DATABASE-Verzeichnis navigieren
+
*Switch to the DOS prompt and navigate to the HVS32\DATABASE directory
*Das Clear-Programm muss mit 4 Parametern aufgerufen werden:<br/> '''''clear <Ausgangsdatum-Bereinigungsgrenze Format yyyy.mm.tt> <Druckdatum-Bereinigungsgrenze f. Einlagerungen Format yyyy.mm.tt> <Datenbankuser> <Datenbankpasswort>Bsp: clear 2006.01.01 2006.01.01 dbUser dbPasswort'''''
+
*The clear program must be called with 4 parameters:<br/> '''''clear <Starting date-Cleanup limit Format yyyy.mm.tt> <Print date-print date f. Storage Format yyyy.mm.tt> <Database user> <Database password>Bsp: clear 2006.01.01 2006.01.01 dbUser dbPassword'''''
  
== <br/> '''Parameter Erläuterung''' ==
+
== <br/> '''Parameter explanation''' ==
  
*'''Ausgangsdatum-Bereinigungsgrenze''': Datum bis zu dem alle verbuchten Packstücke mit älterem Ausgangsdatum gelöscht werden
+
*'''Starting Date Purge Limit''': Date by which all booked packages with an older starting date are deleted
*'''Druckdatum-Bereinigungsgrenze''': Datum bis zu dem alle verbuchten Packstücke ohne Ausgangsdatum (d.h. mit Status Eingelagert) mit älterem Druckdatum gelöscht werden.  
+
*'''Print date-Cleanup Limit''': Date by which all booked packages without an exit date (i.e. with the status Stored) with an older print date are deleted.  
*'''Datenbankuser''': Bitte beim Support erfragen
+
*'''Data base user''': Please ask support
*'''Datenbankpasswort''': Bitte beim Support erfragen
+
*'''Data base password''': Please ask support
  
== <br/> <br/> '''Programmablauf''' ==
+
== <br/> <br/> '''Program Sequence''' ==
  
Der vorhergehende Aufruf ist der letzte Schritt, der vom Benutzer interaktiv durchgeführt werden muss. Die folgenden Vorgänge laufen automatisch ab. Allerdings sollte anhand der Bildschirmmeldungen noch überprüft werden, ob mit dem eingegebenen Benutzer/Passwort die Anmeldung auf der Datenbank möglich ist.
+
The previous call is the last step that must be performed interactively by the user. The following operations are automatic. However, the screen messages should be used to check whether it is possible to log on to the database with the entered user/password.
  
*Bereinigung der Vormerkpackstück-Tabelle
+
*Cleanup of the pre-package table
*Bereinigung der Vormerklieferung-Tabelle
+
*Cleanup of the reservation delivery table
*Durchlauf durch die verbuchten Versanddaten und Löschvorgang anhand der eingegebenen Datumsgrenzen, hier können vorallem die Einträge&nbsp;<br/> „writing data for table VERSANDEINHEIT”<br/> „writing data for table ABRECHNUNGSEINHEIT”<br/> „writing data for table LIEFERUNG”<br/> einige Zeit in Anspruch nehmen, ohne dass ein sichtbarer Fortschritt zu verzeichnen ist. Dies ist kein Fehler im Ablauf, sondern das Übergehen der angelöschten Sätze benötigt hier entsprechende Zeit.  
+
*Run through the booked shipping data and delete process based on the entered date limits, the entries can be made here in particular:&nbsp;<br/> "writing data for table SHIPPING UNIT"<br/> "writing data for table ACCOUNTING UNIT"<br/> "writing data for table DELIVERY"<br/> it may take some time with no visible progress. This is not an error in the process, but skipping the deleted records requires a certain amount of time here.  
*Backup-Auslagerung in eine temporäre Auslagerungsdatei mit Endung GBAK  
+
*Backup swapping to a temporary swap file with the GBAK extension
*Bildung einer neuen temporären Datenbank RESTORED_HVS32.FDB durch Restore der
+
*Creation of a new temporary database RESTORED_HVS32.FDB by restoring the
*Backup-Auslagerung (um eine Verkleinerung der Datenbank zu erreichen.)  
+
*Backup swapping (to achieve a reduction in the size of the database.)  
*Nach erfolgreichem Restore Umbenennung von HVS32.FDB in HVS32.FDB.tt_mm_jj_hh_nn_ss.BAK  
+
*After successful restore renaming of HVS32.FDB in HVS32.FDB.tt_mm_jj_hh_nn_ss.BAK  
*Umbenennung von RESTORED_HVS32.FDB in HVS32.FDB  
+
*Remaining of RESTORED_HVS32.FDB in HVS32.FDB  
  
<br/> Am Ende des Clear Programmes wird eine Umbenennung der Datenbank vorgenommen. Dieser Schritt funktioniert manchmal bei sehr großen Datenbanken nicht. Sollte dies der Fall sein, hat die Datenbank (HVS32.fdb) nach der Bereinigung noch die gleich Größe wie davor.<br/> Trifft dies zu, gibt es im Ordner Database noch eine RESTORED_Hvs§.fdb.TEMP die dann manuell in HVS32.fdb umbenannt werden muss. Sollte dieser Vorgang nicht gemacht werden, wird auf der alten Datenbank weiter gearbeitet und man muss das Clear Programm erneut ausführen.
+
<br/> At the end of the clear program, the database is renamed. This step sometimes doesn't work for very large databases. If this is the case, the database (HVS32.fdb) still has the same size as before after the cleanup.
  
 
&nbsp;
 
&nbsp;
Zeile 48: Zeile 48:
 
&nbsp;
 
&nbsp;
  
= '''Datenbankbereinigung (automatisch)''' =
+
= '''Data bank cleanup (automatic)''' =
  
Eine Erläuterung zu dem Zusatzmodul/Erweiterungsmodul&nbsp;HVS32 Datenbak Archivierungs Dienst finde Sie [http://www.heidler-strichcode.de/wikiextern/index.php?title=HVS32_Datenbank_Archivierungs_Dienst hier].&nbsp;
+
An explanation of the add-on module/expansion module&nbsp;HVS32 Database archiving service can be found [http://www.heidler-strichcode.de/wikiextern/index.php?title=HVS32_Datenbank_Archivierungs_Dienst here].&nbsp;

Aktuelle Version vom 5. September 2022, 13:38 Uhr


 

Database cleaning


For performance reasons, the productive database should be cleaned up in terms of content and the number of records posted. Only the most recent shipping data from a specific period in the database.
Access to older data for information research purposes is guaranteed by prior storage of a copy of the database in an archive directory.
 


Method

All steps must be performed on the server 

  • Check available disk space with the HVS32 directory. Temporarily three times the current database size (HVS32.FDB) should be available as free storage space.
  • Terminate all running HVS32 dispatch programs, if available also the currently running monitoring instances
  • Rename the HVS32.FDB file in the HVS32\DATABASE directory to HVS32AKT.FDB as a test. If this is possible, no more processes are accessing the database and you can continue
  • Copy the content of "clear.zip" into the \DATABASE directory
  • Copy the HVS32AKT.FDB file to the HVS32\ARCHIV folder and rename it to HVS32_jjjjmmdd.FDB. For the sake of clarification, the intended cleansing date should be used here for naming (i.e. the date by which the shipping data should later be cleaned)
  • Rename the original file in the HVS32\DATABASE folder to HVS32.FDB and restart the Firebird services
  • Switch to the DOS prompt and navigate to the HVS32\DATABASE directory
  • The clear program must be called with 4 parameters:
    clear <Starting date-Cleanup limit Format yyyy.mm.tt> <Print date-print date f. Storage Format yyyy.mm.tt> <Database user> <Database password>Bsp: clear 2006.01.01 2006.01.01 dbUser dbPassword


Parameter explanation

  • Starting Date Purge Limit: Date by which all booked packages with an older starting date are deleted
  • Print date-Cleanup Limit: Date by which all booked packages without an exit date (i.e. with the status Stored) with an older print date are deleted.
  • Data base user: Please ask support
  • Data base password: Please ask support



Program Sequence

The previous call is the last step that must be performed interactively by the user. The following operations are automatic. However, the screen messages should be used to check whether it is possible to log on to the database with the entered user/password.

  • Cleanup of the pre-package table
  • Cleanup of the reservation delivery table
  • Run through the booked shipping data and delete process based on the entered date limits, the entries can be made here in particular: 
    "writing data for table SHIPPING UNIT"
    "writing data for table ACCOUNTING UNIT"
    "writing data for table DELIVERY"
    it may take some time with no visible progress. This is not an error in the process, but skipping the deleted records requires a certain amount of time here.
  • Backup swapping to a temporary swap file with the GBAK extension
  • Creation of a new temporary database RESTORED_HVS32.FDB by restoring the
  • Backup swapping (to achieve a reduction in the size of the database.)
  • After successful restore renaming of HVS32.FDB in HVS32.FDB.tt_mm_jj_hh_nn_ss.BAK
  • Remaining of RESTORED_HVS32.FDB in HVS32.FDB


At the end of the clear program, the database is renamed. This step sometimes doesn't work for very large databases. If this is the case, the database (HVS32.fdb) still has the same size as before after the cleanup.

 

 

Data bank cleanup (automatic)

An explanation of the add-on module/expansion module HVS32 Database archiving service can be found here