Difference between revisions of "DB DATADIR"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
− | Used to define a default data directory | + | Used to define a default data directory |
==See Also== | ==See Also== | ||
− | [[CREATE DATABASE]], [[CREATE TABLE]], [[dbexec]], [[DROP DATABASE]], [[DROP TABLE]], [[SET PATH]], [[SQL USE|USE]] | + | [[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[:Category:Databases|Databases]], [[dbexec]], [[DISPLAY SCHEMAS]], [[DROP DATABASE]], [[DROP TABLE]], [[GETENV()]], [[LIST SCHEMAS]], [[SET DATADIR]], [[SET PATH]], [[SQL USE|USE]] |
==Description== | ==Description== | ||
− | The DB_DATADIR environment variable | + | The DB_DATADIR environment variable is used to define the default data directory. Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directory is a sub-directory of the Recital data directory as set in DB_DATADIR. Databases are created using the SQL CREATE DATABASE command. |
− | + | ||
− | + | ||
==Example== | ==Example== | ||
− | |||
− | |||
− | |||
− | |||
<code lang="recital"> | <code lang="recital"> | ||
// create_dat.prg | // create_dat.prg | ||
Line 28: | Line 18: | ||
// end of create_dat.prg | // end of create_dat.prg | ||
> ? getenv([DB_DATADIR]) | > ? getenv([DB_DATADIR]) | ||
− | / | + | /opt/recital/data |
> do create_dat | > do create_dat | ||
> ? default() | > ? default() | ||
− | / | + | /opt/recital/data/hr |
</code> | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Configuration]] | [[Category:Configuration]] | ||
[[Category:Environment Variables|DATADIR]] | [[Category:Environment Variables|DATADIR]] | ||
+ | [[Category:Databases]] |
Latest revision as of 14:25, 26 October 2011
Contents
Purpose
Used to define a default data directory
See Also
COPY DATABASE, CREATE DATABASE, CREATE TABLE, Databases, dbexec, DISPLAY SCHEMAS, DROP DATABASE, DROP TABLE, GETENV(), LIST SCHEMAS, SET DATADIR, SET PATH, USE
Description
The DB_DATADIR environment variable is used to define the default data directory. Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directory is a sub-directory of the Recital data directory as set in DB_DATADIR. Databases are created using the SQL CREATE DATABASE command.
Example
// create_dat.prg CREATE DATABASE hr; USE hr; // end of create_dat.prg > ? getenv([DB_DATADIR]) /opt/recital/data > do create_dat > ? default() /opt/recital/data/hr
Products
Recital, Recital Server