Eloquence B.07.00 Release Notes
Eloquence B.07.00 - Database DBUTIL Script Syntax[ Main document | Back ]The DBUTIL program runs in batch mode when a script file is specified on the command line. This document specifies the dbutil script syntax. Script file format:
Statement syntax:
CONNECTSyntax:CONNECT TO "server" [AS "user" [PASSWORD "password"]]; CONNECT AS "user" [PASSWORD "password"]; Specifies the server to contact and the user and password to logon to the server. Server is specified with a [host][:service] syntax where host defaults to the local system and service defaults to the "eloqdb" service name. Alternatively, a server may be defined from the command line (using the -h option), or the EQ_DBSERVER environment variable may be used. User and password can be a reference to a file if prepended by "file:". User and password may also be defined by either command line options or the EQ_DBUSER and EQ_DBPASSWORD environment variables. Notes:
Examples: CONNECT TO "server"; CONNECT TO "server:eloqdb"; Legacy syntax (deprecated, do not use in new scripts): CONNECT "server[:service]"; LOGON "user" [PASSWORD "password"];
EXITSyntax:EXIT; Exit parser, the rest of the script file will be ignored.
CREATE USERSyntax:CREATE USER "user" [PASSWORD "password"] [PRIVILEGES [user-priv-list]]; Create a new user with the specified password, if any. The PRIVILEGES clause, if included, defines the privileges associated with the user. Multiple privileges can be specified, separated by a comma. The following user privileges are available:
Notes:
Example: CREATE USER "mike" PASSWORD "secret" PRIVILEGES CONNECT;
CHANGE USERSyntax:CHANGE USER "user" [NAME "name"] [PASSWORD "password"] [PRIVILEGES [user-priv-list]]; Changes a user. If the NAME clause is present, it specifies a new user name. If the PASSWORD clause is present, it specifies the new password or removes the password if empty (""). If the PRIVILEGES clause is specified, it defines the privileges associated with the user; if empty, all privileges will be reset. Notes:
Example: CHANGE USER "mike" PASSWORD "sesame";
DROP USERSyntax:DROP USER "user1" [,"user2"]; Removes the user and all references. Notes:
Example: DROP USER "mike","marc";
CHANGE PASSWORDSyntax:CHANGE PASSWORD FOR USER "user" TO "password"; Change the password (or remove if empty) for the specified user. Notes:
Example: CHANGE PASSWORD FOR USER "mike" TO "sesame"; Legacy syntax (deprecated, do not use in new scripts): ALTER PASSWORD FOR USER "user" TO "password";
RENAME DATABASESyntax:RENAME DATABASE ["Name"] TO "NewName"; Renames a database. If the previous name is not specified the current database is used. Notes:
Example: RENAME DATABASE "db" TO "db2";
DATABASESyntax:DATABASE "database"; Specifies the database context. Notes:
Example: DATABASE "db";
CREATE GROUPSyntax:CREATE GROUP "group" [PRIVILEGES [group-priv-list]]; Create a new group in the current database. If the PRIVILEGES clause is specified, it defines the privileges associated with the group (could be empty). Group capabilities which are not data set specific are specified by group privileges. Multiple privileges can be specified, separated by a comma. The following group privileges are available:
Notes:
Example: CREATE GROUP "users";
CHANGE GROUPSyntax:CHANGE GROUP "group" [NAME "name"] [PRIVILEGES [group-priv-list]]; Changes a group. If the NAME clause is present, it specifies the new group name. If the PRIVILEGES clause is specified, it defines the privileges associated with the user (could be empty to reset all privileges). Notes:
Example: CHANGE GROUP "uers" NAME "users";
DROP GROUPSyntax:DROP GROUP "group" [,"group" ...]; Removes the group and all references. Notes:
Example: DROP GROUP "users";
GRANT and REVOKE user privilegesSyntax:GRANT user-priv-list TO {ALL|"user" [,"user" ...]}; REVOKE user-priv-list FROM {ALL|"user" [,"user" ...]}; Grant or revoke privileges to or from a user. Multiple privileges can be specified, separated by a comma. The following user privileges are available:
Either a list of user names, separated by comma, or the keyword ALL or PUBLIC can be specified to indicate all users. Notes:
Example: REVOKE CONNECT FROM ALL; GRANT CONNECT TO "mike","marc"; This will disallow all users except "mike" and "marc" to connect the database server. Legacy syntax (deprecated, do not use in new scripts): GRANT user-priv-list TO {PUBLIC|"user" [,"user" ...]}; REVOKE user-priv-list FROM {PUBLIC|"user" [,"user" ...]};
GRANT and REVOKE group privilegesSyntax:GRANT group-priv-list TO {ALL|"group" [,"group" ...]}; REVOKE group-priv-list FROM {ALL|"group" [,"group" ...]}; Grant or revoke privileges to or from a group. Group capabilities which are not data set specific are specified by group privileges. Multiple privileges can be specified, separated by a comma. The following group privileges are available:
Either a list of group names, separated by comma, or the keyword ALL can be specified to indicate all groups (user "dba" and "public" are excluded). Notes:
Example: REVOKE DBPRIV FROM "users"; GRANT DBPRIV,DADMIN TO "dba"; Legacy syntax (deprecated, do not use in new scripts): GRANT group-priv-list TO {PUBLIC|"group" [,"group" ...]}; REVOKE group-priv-list FROM {PUBLIC|"group" [,"group" ...]};
GRANT and REVOKE member privilegesSyntax:GRANT "group" [,"group" ...] TO {ALL|"user" [,"user" ...]}; REVOKE "group" [,"group" ...] FROM {ALL|"user" [,"user" ...]}; Grant or revoke privileges assigned to a group to or from a user. A list of group names can be specified, separated by comma. A list of user names can be specified, separated by comma, or the keyword ALL or PUBLIC can be used to indicate all users. Notes:
Example: GRANT "users" TO "mike",marc"; This will make the users "mike" and "marc" members of the group "users". Legacy syntax (deprecated, do not use in new scripts): GRANT "group" [,"group" ...] TO {PUBLIC|"user" [,"user" ...]}; REVOKE "group" [,"group" ...] FROM {PUBLIC|"user" [,"user" ...]};
GRANT and REVOKE data set privilegesSyntax:GRANT {ALL PRIVILEGES|dataset-priv-list} ON {ALL|dataset-list} TO {ALL|"group" [,"group" ...]}; REVOKE {ALL PRIVILEGES|dataset-priv-list} ON {ALL|dataset-list} TO {ALL|"group" [,"group" ...]}; Grant or revoke data set access privileges to or from a group. Access privileges include READ, WRITE and ERASE. Multiple privileges can be specified, separated by a comma. If ALL is specified as the data set name, this will apply to all data sets. If PUBLIC or ALL is specified as the group name, this will apply to all groups. Notes:
Example: REVOKE ALL PRIVILEGES ON ALL FROM "users"; GRANT WRITE ON "CUSTOMERS","PARTS" TO "users"; GRANT READ ON ALL TO "users"; GRANT ERASE ON "HISTORY" TO "priv"; This will provide read access on all data sets to all members of the group "users" and write access to the data sets CUSTOMERS and PARTS. Members of the group "priv" are allowed to erase the data set HISTORY. Legacy syntax (deprecated, do not use in new scripts): GRANT {ALL PRIVILEGES|dataset-priv-list} ON {ALL|dataset-list} TO {PUBLIC|"group" [,"group" ...]}; REVOKE {ALL PRIVILEGES|dataset-priv-list} ON {ALL|dataset-list} TO {PUBLIC|"group" [,"group" ...]};
CREATE PROPERTYSyntax:CREATE PROPERTY "key" VALUE "value" [FLAGS [property-flag-list]]; Create a database property. The VALUE clause specifies the associated value. The FLAGS clause can be used to specify additional flags for this property, including SYSTEM and IMAGE3K. Notes:
CHANGE PROPERTYSyntax:CHANGE PROPERTY "key" VALUE "value" [FLAGS [property-flag-list]]; Change a database property. The VALUE clause specifies the new associated value. The FLAGS clause can be used to modify flags (or remove all flags if empty) for this property. Notes:
DROP PROPERTYSyntax:DROP PROPERTY "key" [,"key" ...]; Delete the database property. A comma separated list of property keys can be specified. Notes:
TurboIMAGE compatible database propertiesThe following statements provide a compatible syntax to set commonly used TurboIMAGE database properties.
CHANGE DATABASESyntax:CHANGE DATABASE [NAME NewDatabaseName ;] [LANGUAGE "collseq" ;] CHANGE DATABASE { ... } Change database settings. If NAME clause is present, is specifies the new database name. If the LANGUAGE clause is present, it specifies the new default collating sequence for the database. Multiple item definitions can be enclosed in curly braces ({}). Notes:
Examples: CHANGE DATABASE LANGUAGE "german@nofold";
CREATE ITEMSyntax:CREATE ITEM Name, [count] type [(format)] ; CREATE ITEM { ... } Create new item. Multiple item definitions can be enclosed in curly braces ({}). Notes:
Examples: CREATE ITEM matchcode,x10; CREATE ITEM { description1,X20; description2,X20; }
CHANGE ITEMSyntax:CHANGE ITEM ItemName [NAME NewItemName ;] [TYPE [count] type [(format)] ;] [TYPE (format) ;] [FORMAT format ;] CHANGE ITEM ItemName { ... } Change item definition. If NAME clause is present, is specifies the new item name. If the TYPE clause is present, it specifies the new item type or the format number. Multiple item definitions can be enclosed in curly braces ({}). Notes:
Examples: CHANGE ITEM matchcod NAME matchcode; CHANGE ITEM descr1 { NAME description1; TYPE x20; }
DROP ITEMSyntax:DROP ITEM ItemName [,ItemName ...]; Delete a list of item definitions. Notes:
Example: DROP ITEM matchcode;
CREATE IITEMSyntax:CREATE IITEM [iItemName = ItemName[:length] [, ...]] ; CREATE IITEM { [iItemName = ItemName[:length] [, ...]] ; ... } Create new index item. Multiple item definitions can be enclosed in curly braces ({}). Notes:
Examples: CREATE IITEM imatchcode = matchcode; CREATE IITEM { imatchcode = matchcode; idescription = description1:10, description2:10; }
CHANGE IITEMSyntax:CHANGE IITEM iItemName [NAME NewiItemName] [TYPE ItemName[:length] [, ...]]; CHANGE IITEM iItemName { ... } Change index item definition. Multiple item definitions can be enclosed in curly braces ({}). If NAME clause is specified, the index item name is changed. If the TYPE clause is present, the index item definition is replaced. Note:
Example: CHANGE IITEM imatchcode = matchcode:8;
DROP IITEMSyntax:DROP IITEM iItemName [, ...]; Delete a list of index item definitions. Notes:
Example: DROP IITEM imatchcode;
CREATE SETSyntax:CREATE SET SetName, SetType { [ADD ITEM ... ;] [ADD INDEX ... ;] [ADD PATH ... ;] } Create new data set. SetType is one of AUTOMATIC (A), MANUAL (M) or DETAIL (D). Specifying curly braces ({}) allows multiple change clauses. Please see below for the syntax of the ADD ITEM, ADD INDEX and ADD PATH clauses. Notes:
Example: CREATE SET custmers { ADD ITEM custno(*),matchcode,name1,name2; ADD INDEX imatchcode; }
CHANGE SETSyntax:CHANGE SET SetName { [NAME ... ;] [ADD ITEM ... ;] [DELETE ITEM ... ;] [ADD INDEX ... ;] [DELETE INDEX ... ;] [ADD PATH ... ;] [DELETE PATH ... ;] [SET|UNSET ...;] } Change data set definition. Specifying curly braces ({}) allows multiple change clauses. Please see below for the syntax of the NAME, ADD ITEM, DELETE ITEM, ADD INDEX, DELETE INDEX, ADD PATH and DELETE PATH and SET and UNSET clauses. Notes:
Examples: CHANGE SET custmrs NAME customers; CHANGE SET custmers { ADD ITEM matchcode; ADD INDEX imatchcode; }
DROP SETSyntax:DROP SET SetName [, ...]; Delete the specified data sets from the database. Any paths or indexes are deleted automatically. Note:
Example: DROP SET customers,parts;
SET clauses
© Copyright 2002-2003 Marxmeier Software AG. All rights reserved. Revision: 2003-03-19 |