Subject RE: [firebird-support] Can I corrupt a database by just stopping firebird guardian while many processes are running.
Author Peter Ypenburg
> What should this script do?
I am not sure but if I get the gist of it, it is to backup and restore the
database, done in a funny way, I will most likely need to rewrite the thing.

> Did you know you can block access by shutting down a database?
When you say shutting down the database do you mean the (NET STOP "Firebird
guardian - defaultinstance") line of code?

>Why create a backup with "gbak"?
The bat file was not written by a programmer but a user who know command
prompts (the most dangerous kind of user). I suspect that the copy of the
database is faster than a gbak but there are other problems like garbage is
not collected. This is a weird bat file.


-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Martijn Tonies
Sent: Thursday, May 19, 2005 3:35 PM
Subject: Re: [firebird-support] Can I corrupt a database by just stopping
firebird guardian while many processes are running.

Peter,

> The following code is in a bat file written by someone and I am concerned
> about the impact it will have on our database:
> ***********Bat file code start***************
>
> REM *** removes the fb_inet_server process from the task manager
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe
> pskill fb_inet_server.exe

This is nasty - you're killing the process.

> REM *** Stops the Firebird Services for database renaming purposes ***
> NET STOP "Firebird server - defaultinstance"
> NET STOP "Firebird guardian - defaultinstance"
>
> REM *** Renaming of restore file ***
> IF EXIST "\Optimiza\Data\Client1.gdb" DEL "\Optimiza\Data\Client.gdb"
> IF EXIST "\Optimiza\Data\Client1.gdb" REN "\Optimiza\Data\Client1.gdb"
> Client.gdb
> IF EXIST "\Optimiza\Data\Client.gdb" DEL "\Optimiza\Data\Client1.gdb"
>
> REM *** Restarts the Firebird Services ***
> NET START "Firebird server - defaultinstance"
> NET START "Firebird guardian - defaultinstance"
>
> ***********Bat file code end*****************
>
> Could some one confirm my concerns and the are as follows:
> 1.) Just killing fb_inet_server.exe processes could caused data
corruptions.
> 2.) To stop firebird it is only the guardian that needs to be stopped not
> the server as when guardian is stopped then the server will be stopped as
> well.
> 3.) To start firebird the same as point 2 applies.
> 4.) Are the command lines to stop and start firebird OK or should it be
done
> differently?

What should this script do?

Did you know you can block access by shutting down a database?

Why create a backup with "gbak"?

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links