Subject Can't access FB 2.0 database using alias
Author Rick Debay
Alias.conf contains: inventory = "c:\databases\tstdb_1-0-0.fdb"
On startup, this file does not exist and server log contains: 'Value
"c:\databases\tstdb_1-0-0.fdb" configured for alias
"c:\databases\tstdb_1-0-0.fdb" is not a fully qualified path name,
ignored'
Database is created and committed with: CREATE DATABASE
'localhost/3051:c:\databases\tstdb_1-0-0.fdb'
After this all connections attempted to 'localhost/3051:inventory' do
not attach to the new file, instead they go to a file called 'inventory'
in the current working directory.

If the aliased database doesn't exist when the server starts, the alias
is never used. Nor, as the attached email shows, can the database be
created by referencing an alias.
Therefore to create new databases on our production server, we have to
change the configuration from None to Restrict, restart, run scripts
using the fully qualified path, and then restart again setting access
back to None.
What should be done is a new alias is created, the database is created
and DDL executed with the alias, and then the alias published. The
server shouldn't need to be restarted.

If I have any steps wrong, let me know as this makes it a pain to
administer.

Rick DeBay

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Rick Debay
Sent: Monday, February 26, 2007 1:29 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Can't create database using alias

I'm using FB 2.0 on Windows XP, and I'm trying to pass an alias in to
CREATE DATABASE in isql. I don't want the script to determine the
database location, I want that set by the server admin.

isql -user inventory -password test -input "c:\DBCreate.sql"
Strangely enough returns
'Use CONNECT or CREATE DATABASE to specify a database'
But the database is created.

isql -user inventory -password test -input "c:\DBCreate.sql"
Fails with
Use CONNECT or CREATE DATABASE to specify a database Statement failed,
SQLCODE = -902 I/O error for file "localhost/3051:tstdb"
-database or file exists
can't format message 17:120 -- message text not found

DBCreate.sql contents:

SET SQL DIALECT 3;
CREATE DATABASE 'localhost/3051:c:\databases\tstdb_1-0-0.fdb'
--CREATE DATABASE 'localhost/3051:tstdb'
USER 'inventory'
PAGE_SIZE 16384
DEFAULT CHARACTER SET UTF8;

Alias.conf contents:

# List of known database aliases
# ------------------------------
inventory = "c:\databases\tstdb_1-0-0.fdb"

Disclaimer: This message (including attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. RxStrategies, Inc. shall not be liable for the improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system. RxStrategies, Inc. does not guarantee that the integrity of this communication has been maintained nor that this communication is free from viruses, interceptions or interference.