[firebird-support] GBak and ERRORLEVEL

2017-05-10 Thread michael.vilhelm...@microcom.dk [firebird-support]
Hi

On one of our servers, we do 3 firebird backup each nigth.
There are made from a batchfile, which is run via scheduled jobs.

On this server, I get ERRORLEVEL=1 every once in a while on either one of them.
Whenever I afterwards restores the dump file there is no problem with it.

The 3 dump lines are like this:

gbak -v -b -user %1 -password %2 -se db06:service_mgr "secdb" 
"G:\FBDump\security2.fbk"
if %ERRORLEVEL% EQU 0 goto SLUT_SECURITY2

errorhandling

:SLUT_SECURITY2

"GBak" -Backup -User %1 -Password %2 "LocalHost:H:\db\Kaufmann\OCCLicens.fdb" 
"G:\FBDump\OCCLicens.fbk" -v -g -y %log%
if %ERRORLEVEL% EQU 0 goto SLUT_KAUFMANN_LICENS

errorhandling 

:SLUT_KAUFMANN_LICENS

"GBak" -Backup -User %1 -Password %2 "LocalHost:H:\db\Kaufmann\OCCEasyPos.fdb" 
"G:\FBDump\OCCEasyPos.fbk" -v -g -y %log%
if %ERRORLEVEL% EQU 0 goto SLUT_KAUFMANNDB

errorhandling

:SLUT_KAUFMANNDB

Sometimes it failes on the first dump (security). Other times on one of the 
others.
but the logfiler and a restore afterwards doesnt fail. 

Am I doing anything wrong here?


CONTENT OF BACKUP.BAT
Echo Off

: *** Parameter %1 angiver administrator konto til database.
: *** Parameter %2 angiver administrator password til database.
: *** Patch til Firebird BIN ("c:\program files\firebird\firebird_2_1\bin") 
biblioteket skal være sat.
: *** Bemærk at stien til security2.fdb SKAL tilrettes i jobbet inden afvikling 
foretages første gang.
: *** Dette batchjob behøver sendmail.exe og sendmail.ini.
: *** sendmail.ini skal tilrettes mht. mail adresser og smtp server inde jobbet 
kan tages i brug.
: *** Dette job kan afvikles fra planlagte opgaver i Windows kontrolpanel.

PATH=%PATH%;C:\Program Files\Firebird\Firebird_2_5\Bin
set log="c:\fbbackup\resultat.txt"
set startdato=%DATE%
set starttime=%TIME%
set fejllog=g:\fbbackup\fejllog.txt
set server=db06

: --- HER KOPIERES SECURITY2.FDB FIREBIRD BRUGER DATABASEN 


: *** Sletter resultatsfil
Echo Sletter evt. tidligere resultsfil
Del %log%
Del %fejllog%


: *** Tager backup af SECURITY2.FDB
Echo Foretager backup af SECURITY2.FDB databasen
Echo Vent venligst.. .. ..
gbak -v -b -user %1 -password %2 -se db06:service_mgr "secdb" 
"G:\FBDump\security2.fbk"

: *** Test resultaty af Security backup
if %ERRORLEVEL% EQU 0 goto SLUT_SECURITY2

Echo "%DATE% - %TIME% : Security2 backup fejlede på %server%." > %fejllog%

: Opret advarsel i eventloggen på db06. Denne fanges af SYSORB som scanner 
Application evntlog for Firebird Gbak
eventcreate /L Application /T ERROR /SO "Firebird Gbak" /ID 305 /D "Firebird 
dump rutine fejlede for Security2.fdb database på %server% med fejlkode: 
%ERRORLEVEL%."


:SLUT_SECURITY2

: - HER KOPIERES Kaufmanns Database 
---

set startdato=%DATE%
set starttime=%TIME%

: *** Sletter resultatsfil
Echo Sletter evt. tidligere resultsfil
set log="G:\FBDump\resultat-lic.txt"
Del %log%

: *** Dump backup af LICENS-FIL
Echo Foretager backup af licens fil
Echo Vent venligst.. .. ..
"GBak" -Backup -User %1 -Password %2 "LocalHost:H:\db\Kaufmann\OCCLicens.fdb" 
"G:\FBDump\OCCLicens.fbk" -v -g -y %log%

: *** Test resultaty af Kaufmann licens backup
if %ERRORLEVEL% EQU 0 goto SLUT_KAUFMANN_LICENS

Echo "%DATE% - %TIME% : Kaufmann licens backup fejlede på %server%." >> 
%fejllog%

:SLUT_KAUFMANN_LICENS

Echo "--" >> %log%
Echo " Tider på backup af Kaufmanns lic database ---" >> %log%
Echo "--" >> %log%
ECHO "Starttidspunkt: %startdato% - %starttime%" >> %log%
ECHO "Sluttidspunkt:  %DATE% - %TIME%" >> %log%
Echo "--" >> %log%


set startdato=%DATE%
set starttime=%TIME%
set log="G:\FBDump\resultat-dba.txt"

: *** Sletter resultatsfil
Echo Sletter evt. tidligere resultsfil
Del %log%


: *** Dump backup af DATABASE
Echo Foretager backup af database fil
Echo Vent venligst.. .. ..
"GBak" -Backup -User %1 -Password %2 "LocalHost:H:\db\Kaufmann\OCCEasyPos.fdb" 
"G:\FBDump\OCCEasyPos.fbk" -v -g -y %log%

: *** Test resultaty af Kaufmann database backup
if %ERRORLEVEL% EQU 0 goto SLUT_KAUFMANNDB

Echo "%DATE% - %TIME% : Kaufmann DB backup fejlede på %server%." >> %fejllog%

: Opret advarsel i eventloggen på db06. Denne fanges af SYSORB som scanner 
Application evntlog for Firebird Gbak
eventcreate /L Application /T ERROR /SO "Firebird Gbak" /ID 305 /D "Firebird 
dump rutine fejlede for Kaufmann database på %server% med fejlkode: 
%ERRORLEVEL%."


:SLUT_KAUFMANNDB

Echo "--" >> %log%
Echo "- Tider på backup af Kaufmanns database --" >> %log%
Echo "--" >> %log%
ECHO "Starttidspunkt: %startdato% - %starttime%" >> %log%
ECHO "Sluttidspunkt:  %DATE% - %TIME%" >> %log%
Echo "

[firebird-support] How to do a local backup with TIBBackupService?

2017-05-10 Thread Sergio Garcia sergiogarciar...@gmail.com [firebird-support]
Hi. We are using Firebird v2.5.7, with Delphi 2007 and its native controls
for Interbase (TIB ...). Using the TIBBackupService control we do not get
the file to be stored on the client station. It seems that it looks for the
paths in the server. So it only works on the station where the Firebird
server is. Is this how it is supposed to work?
Best regards,
Sergio


Re: [firebird-support] How to do a local backup with TIBBackupService?

2017-05-10 Thread Tony Christiansen t...@adegroup.com.au [firebird-support]













Re: [firebird-support] Table Size

2017-05-10 Thread dres...@tbinc.com [firebird-support]
Thank you. Running 15. 
 

 The results are pretty raw data--something like a pie chart would be nice.
 

 Any way of getting the API calls to know tables and their sizes? I don't mind 
creating something like this.