Subject Re: [firebird-support] environment variables in ddl/dml scripts
Author Helen Borrie
At 11:10 PM 3/05/2005 +1000, you wrote:
>Is it possible for Firebird to read arbitrary environment variables
>while processing ddl and dml scripts?

In the scripts themselves, no. Script can only contain SQL and certain
ISQL statements.


>I'm specifically interested in using a variable to indicate the database
>to create and/or connect to.
>
>I know the conf file will do it but I think I need this before the conf
>file gets created.


The conf files are installed when the server is installed. You won't be
able to run any scripts if the server isn't installed and running.

The conf file doesn't do it, anyway. DatabaseAccess in firebird.conf lets
you specify the tree roots where it's "legal" to create and access
databases; it doesn't contain any database filespecs.

You can just deploy aliases.conf with the database path preconfigured, e.g.

phooey = /data/phooey.fdb

Then, in your script:

create database 'yourservername:phooey' ;

./hb