Subject | Re: [firebird-support] environment variables in ddl/dml scripts |
---|---|
Author | Mike Dewhirst |
Post date | 2005-05-03T14:08:17Z |
Helen Borrie wrote:
I'm looking at an XP machine having typed 'set' at the command prompt.
In this case I have ...
COMPUTERNAME=xyz
USERDOMAIN=xyz
LOGONSERVER=\\xyz
Could I use '127.0.0.1:phooey' ??
You nzers stay up late
Mike
> At 11:10 PM 3/05/2005 +1000, you wrote:Helen - thanks for that. In Windows, what is the server name?
>
>>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' ;
I'm looking at an XP machine having typed 'set' at the command prompt.
In this case I have ...
COMPUTERNAME=xyz
USERDOMAIN=xyz
LOGONSERVER=\\xyz
Could I use '127.0.0.1:phooey' ??
You nzers stay up late
Mike