Subject Re: Creating database through a script and later updating it
Author georgethenorge
I can suggest what I have done, which has worked for me really well. I
have a lot of little databases that need to be kept up to date. Doing
it by hand is a really bad idea.

I store all of the SQL data definition code in text files, one text
file per table, and these statements are added with a version number.
Each database has a version table that keeps track of the version.
When the database is attached to by the client, the versions are
compared, and if necessary the newer commands are run, after which the
database version number is updated.

The text files are compiled as a resource, and this resource is
included in the exe. Wherever the app goes, the database can be

The only thing I haven't managed with straight SQL is creating a new
user (help?), but I could do that with Delphi if I needed to.

It works great, and has been the backbone of my app for more than two

George Helmke, Kameleon Systemer, Norway.

--- In, João Dorival Daniel
<jdaniel@s...> wrote:

> I think what he wants is generate a script from a database like we
do with mssql server for instance.

> I know a way using a case too like power desing or case studio (www. may it helps you , bit i hope firebird has it's own
way to do it.



> ----- Original Message -----

> From: Alexander V.Nevsky

> To:

> Sent: Wednesday, January 28, 2004 3:47 PM

> Subject: [firebird-support] Re: Creating database through a script
and later updating it



> --- In, Venus Software Operations

> <venussoftop@m...> wrote:

> > Hi all

> >

> > For eg. I have created a FireBird database on the development

> machine. Now

> > I want to deploy it for the first time to a client machine. How

> it

> > possible to recreate the database by a junior support tech
person on

> the

> > clients machine.


> Make backup and send it to this person together with BAT file

> containing proper gbak call to restore. If you don't want to send

> data, make metadata-only backup.


> > For eg. 2 Now I have modified the data structures on the

> development

> > machine. Now I want to change the structures on the clients

> > machine. Please note there are no formal changes track record,
so I

> just

> > have to have the current data structures and apply a script at

> clients

> > site onto the existing FireBird database and it should come upto

> speed

> > without loosing the data.


> Don't understand clearly. You have debugged script which bring

> target database structure to source one? Send it together with BAT

> file containing proper isql call. Or you are interested how to

> this script if you don't remember what changes you did? If so,

> have structure of client's database at hand and look at



> Best regards,

> Alexander






> Yahoo! Groups Links


> a.. To visit your group on the web, go to:



> b.. To unsubscribe from this group, send an email to:



> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of




> [Non-text portions of this message have been removed]