Subject | Re: [firebird-support] Implicit path for Database |
---|---|
Author | Helen Borrie |
Post date | 2017-09-01T23:41:40Z |
Saturday, September 2, 2017, 9:35:20 AM, Neagu wrote:
You can (and should) configure which directories the server is allowed
to search for databases to connect to. The parameter for this, in
firebird.conf, is DatabaseAccess. By default, it is set to 'Full',
meaning the server can accept connections to databases anywhere. The
alternative settings are:
None. This takes no arguments. The server can connect only to
databases whose full paths are specified in databases.conf.
Restrict. This takes a list of one or more filesystem paths where the
server may connect to databases located there. If you have databases
in sub-directories of that path, you must list each path separately.
Use semicolons to separate multiple paths.
database in Firebird's root directory *AND* that path is specified as
a parameter of DatabaseAccess Restrict (or DatabaseAccess FULL is the
current setting). In general, though, storing a database amongst the
software components is not a brilliant idea.
Read the built-in documentation for DatabaseAccess in firebird.conf.
Did you know that you can create an alias for a database that does not
yet exist? For example.
myNewDB = d:\databases\development.fdb
After that is saved, you can create a new database named
'development.fdb' in d:\databases by passing the alias as the database
name parameter in your CREATE DATABASE statement. In this case, your
DatabaseAccess configuration can be NONE (because the database is
known through databases.conf) or FULL (server does not care where a
database is located). RESTRICT will work, too, if d:\databases is
included in the list of allowed directories.
Don't forget that any changes you do in firebird.conf will take effect
only after restarting the Firebird service.
Helen
> In databases.conf I can put the lists of alias of Known databases, but IAnd, on POSIX, it will search in the current working directory (cwd).
> look for a way to specify only the alias of path where the databases are
> store.
> Now, If I not specify a path in connect string, the databases is search
> in C:\Windows\System32
You can (and should) configure which directories the server is allowed
to search for databases to connect to. The parameter for this, in
firebird.conf, is DatabaseAccess. By default, it is set to 'Full',
meaning the server can accept connections to databases anywhere. The
alternative settings are:
None. This takes no arguments. The server can connect only to
databases whose full paths are specified in databases.conf.
Restrict. This takes a list of one or more filesystem paths where the
server may connect to databases located there. If you have databases
in sub-directories of that path, you must list each path separately.
Use semicolons to separate multiple paths.
> Will be good also a way to specify the path where the databses are storeSomething like this is possible, as long as you want to store the
> if I not specify a path in connect string.
database in Firebird's root directory *AND* that path is specified as
a parameter of DatabaseAccess Restrict (or DatabaseAccess FULL is the
current setting). In general, though, storing a database amongst the
software components is not a brilliant idea.
Read the built-in documentation for DatabaseAccess in firebird.conf.
Did you know that you can create an alias for a database that does not
yet exist? For example.
myNewDB = d:\databases\development.fdb
After that is saved, you can create a new database named
'development.fdb' in d:\databases by passing the alias as the database
name parameter in your CREATE DATABASE statement. In this case, your
DatabaseAccess configuration can be NONE (because the database is
known through databases.conf) or FULL (server does not care where a
database is located). RESTRICT will work, too, if d:\databases is
included in the list of allowed directories.
Don't forget that any changes you do in firebird.conf will take effect
only after restarting the Firebird service.
Helen