This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
dev:sql:statements:create_environment:home [2010/07/02 08:05] tdo |
dev:sql:statements:create_environment:home [2010/07/03 16:30] tdo |
||
---|---|---|---|
Line 23: | Line 23: | ||
IN “filename” /* must be after all previous clauses */ | IN “filename” /* must be after all previous clauses */ | ||
[WITH options] /* if used, must be the very last clause */ | [WITH options] /* if used, must be the very last clause */ | ||
- | |||
===== Discussion ===== | ===== Discussion ===== | ||
- | The CREATE ENVIRONMENT statement is used in conjunction with the [[dev:sql:statements:drop_environment:home | DROP ENVIRONMENT]] statement but typically the WITH DELETE option is used instead of DROP ENVIRONMENT. | + | The CREATE ENVIRONMENT statement can be used in conjunction with the [[dev:sql:statements:drop_environment:home | DROP ENVIRONMENT]] statement but typically the WITH DELETE option is used instead of DROP ENVIRONMENT. |
create environment in "odx.xml" with delete; | create environment in "odx.xml" with delete; | ||
Line 49: | Line 48: | ||
The NODE clause declares a node in an Omnidex Grid. Nodes can then be referenced in subsequent CREATE DATABASE and CREATE TABLE statements. | The NODE clause declares a node in an Omnidex Grid. Nodes can then be referenced in subsequent CREATE DATABASE and CREATE TABLE statements. | ||
+ | |||
+ | The //node_name// uniquely identifies the node within this environment. It may be up to 32 characters long, and can contain letters, digits and the following special characters: ! @ # $ % ^ _. It must begin with a letter and is case-insensitive. The //node_name// must be unique within the environment. | ||
=== <PARTITIONED | UNPARTITIONED> === | === <PARTITIONED | UNPARTITIONED> === | ||
Line 103: | Line 104: | ||
in "sales.xml"; | in "sales.xml"; | ||
</code> | </code> | ||
- | ==== IN "filename" ==== | + | ==== IN "env_filespec" ==== |
- | The IN clause is required and specifies the location of the physical XML Environment File. | + | The IN clause is required and specifies the location of the physical XML Environment File. The IN clause must be specified after all other clauses except the WITH clause. |
- | The IN clause must be specified after all other clauses except the WITH clause. | + | //Env_filespec// can be either an absolute or relative path. When using a relative file path , it will be relative to the current working directory for the program that is being run. Typically in a production environment, absolute paths are used. When using Omnidex's Network Services and the OdxNet process, absolute paths should always be used. |
- | The filespec can be specified either as an absolute or a relative file specification. When using a relative file specification, it will be relative to the current working directory for the program that is being run. Typically in a production environment, absolute filespecs are used. When using Omnidex's Network Services and the OdxNet process, absolute filespecs should always be used. | + | The //env_filespec// must be enclosed within double quotes. |
- | + | ||
- | The IN filespec must be enclosed within double quotes. | + | |
<code> | <code> | ||
Line 140: | Line 139: | ||
CREATE ENVIRONMENT IN "C:\data\daily_trans.xml"; | CREATE ENVIRONMENT IN "C:\data\daily_trans.xml"; | ||
</code> | </code> | ||
- | ==== WITH DELETE option ==== | ||
- | CREATE ENVIRONMENT IN "C:\data\daily_trans.xml" WITH DELETE; | + | |
==== With All Clauses ==== | ==== With All Clauses ==== | ||
<code> | <code> |