Difference between revisions of "DB DATADIR"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 25: | Line 25: | ||
# dbexec myapp</pre> | # dbexec myapp</pre> | ||
− | < | + | <code lang="recital"> |
// create_dat.prg | // create_dat.prg | ||
CREATE DATABASE hr; | CREATE DATABASE hr; | ||
Line 35: | Line 35: | ||
> ? default() | > ? default() | ||
/usr/recital/data/hr | /usr/recital/data/hr | ||
− | </ | + | </code> |
==Products== | ==Products== |
Revision as of 16:42, 12 March 2009
DB_DATADIR
Class
Environment Variables / Symbols
Purpose
Used to define a default data directory for SQL database creation and for the dbexec utility
See Also
CREATE DATABASE, CREATE TABLE, DROP DATABASE, DROP TABLE, USE, DBEXEC, SET PATH
Description
The DB_DATADIR environment variable / symbol is used to define a default data directory for SQL database creation and the dbexec utility. SQL 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. SQL databases are created using the SQL CREATE DATABASE command.
The dbexec utility is used to run program files via the Recital Database and Mirage Servers without connecting from a client. If DB_DATADIR is set to a directory, this directory will be added to the search path and is equivalent to using the SET PATH command.
Example
# DB_DATADIR="/usr/recital/data"; export DB_DATADIR # dbexec myapp
// create_dat.prg CREATE DATABASE hr; USE hr; // end of create_dat.prg > ? getenv([DB_DATADIR]) /usr/recital/data > do create_dat > ? default() /usr/recital/data/hr
Products
Recital Database Server, Recital Mirage Server