Difference between revisions of "DB DATADIR"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Used to define a default data directory for SQL database creation and for the dbexec utility
+
Used to define a default data directory
  
  
 
==See Also==
 
==See Also==
[[COPY DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[:Category:Databases|Databases]], [[dbexec]], [[DISPLAY SCHEMAS]], [[DROP DATABASE]], [[DROP TABLE]], [[LIST SCHEMAS]], [[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 PATH]], [[SQL USE|USE]]
  
  
 
==Description==
 
==Description==
The DB_DATADIR environment variable / symbol is used to define a default data directory for SQL database creation and the dbexec utilitySQL 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 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.
  
 
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.
 
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.
Line 24: Line 24:
 
// end of create_dat.prg
 
// end of create_dat.prg
 
> ? getenv([DB_DATADIR])
 
> ? getenv([DB_DATADIR])
/usr/recital/data
+
/opt/recital/data
 
> do create_dat
 
> do create_dat
 
> ? default()
 
> ? default()
/usr/recital/data/hr
+
/opt/recital/data/hr
 
</code>
 
</code>
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Configuration]]
 
[[Category:Configuration]]
 
[[Category:Environment Variables|DATADIR]]
 
[[Category:Environment Variables|DATADIR]]
 
[[Category:Databases]]
 
[[Category:Databases]]

Revision as of 14:59, 3 March 2010

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 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.

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])
/opt/recital/data
> do create_dat
> ? default()
/opt/recital/data/hr

Products

Recital, Recital Server