日本語マニュアル
2.4.1 ACCEPT
2.4.2 APPEND
2.4.3 CHANGE
2.4.4 CLEAR
2.4.5 COLUMN
2.4.6 CONNECT
2.4.7 DEFINE
2.4.8 DEL
2.4.9 DESCRIBE
2.4.10 DISCONNECT
2.4.11 EDIT
2.4.12 EXECUTE
2.4.13 EXIT
2.4.14 GET
2.4.15 HELP
2.4.16 HOST
2.4.17 INPUT
2.4.18 LIST
2.4.19 PASSWORD
2.4.20 PAUSE
2.4.21 PROMPT
2.4.22 QUIT
2.4.23 REMARK
2.4.24 SAVE
2.4.25 SET
2.4.26 SHOW
2.4.27 SPOOL
2.4.28 START
2.4.29 UNDEFINE
This guide describes how to connect to an Advanced Server database using EDB*Plus. EDB*Plus provides a command line user interface to EDB Postgres Advanced Server that accepts SQL commands that allow you to:
In the following descriptions a term refers to any word or group of words which may be language keywords, user-supplied values, literals, etc. A term’s exact meaning depends upon the context in which it is used.
•
Italic font introduces a new term, typically, in the sentence that defines it for the first time.
•
Fixed-width (mono-spaced) font is used for terms that must be given literally such as SQL commands, specific table and column names used in the examples, programming language keywords, etc. For example, SELECT * FROM emp;
•
Italic fixed-width font is used for terms for which the user must substitute values in actual usage. For example, DELETE FROM table_name;
•
Square brackets [ ] denote that one or none of the enclosed term(s) may be substituted. For example, [ a | b ], means choose one of “a” or “b” or neither of the two.
•
Braces {} denote that exactly one of the enclosed alternatives must be specified. For example, { a | b }, means exactly one of “a” or “b” must be specified.
•
Ellipses ... denote that the proceeding term may be repeated. For example, [ a | b ] ... means that you may have the sequence, “b a a b a”.
EDB*Plus is a utility program that provides a command line user interface to EDB Postgres Advanced Server. EDB*Plus accepts SQL commands, SPL anonymous blocks, and EDB*Plus commands.
EDB*Plus commands are compatible with Oracle SQL*Plus commands and provide various capabilities including:
Before installing EDB*Plus, you must first install Java (version 1.7 or later). On a Linux system, you can use the yum package manager to install Java. Open a terminal window, assume superuser privileges, and enter:
The package resides in the edbas10 repository. You must create and enable the edbas10 repository to install EDB*Plus. The package that creates the repository is named edb-repo; the package is available from EnterpriseDB at:
After downloading and invoking the edb-repo package, navigate to the repository configuration file (/etc/yum.repos.d/edb.repo), and enable the edbas10 repository:
By default, the pg_hba.conf file for the RPM installer enforces IDENT authentication. Before invoking EDB*Plus, you must either modify the pg_hba.conf file, changing the authentication method to a form other than IDENT (and restarting the server), or perform the following steps to ensure that an IDENT server is accessible:
You must confirm that an identd server is installed and running. You can use the yum package manager to install an identd server by invoking the command:
The command should create a file named /etc/xinetd.d/auth that contains:
Note: if the file includes a -E argument at the end of the server arguments, please erase the -E.
Open the pg_ident.conf file and create a user mapping:
The name specified in the map_name column is a user-defined name that will identify the mapping in the pg_hba.conf file.
The name specified in the system_username column is enterprisedb.
The name specified in the postgres_username column is enterprisedb.
Then, open the pg_hba.conf file and modify the IDENT entries:
Use the Installation Directory field to specify the directory in which you wish to install the EDB*Plus software (see Figure 2.2). Then, click Next to continue.
Use fields on the EDB Postgres Advanced Server Installation Details window (see Figure 2.3) to identify the location of the Advanced Server host:
•
Use the Host field to identify the system on which Advanced Server resides.
•
Use the Port field to identify the listener port that Advanced Server monitors for client connections.
Then, click Next to continue.
The Ready to Install window (see Figure 2.4) notifies you when the installer has all of the information needed to install EDB*Plus on your system. Click Next to install EDB*Plus.
To open an EDB*Plus command line, navigate through the Applications (or Start) menu to the Advanced Server menu, to the Run SQL Command Line menu, and select the EDB*Plus option. You can also invoke EDB*Plus from the operating system command line with the following command:
edbplus [ -S[ILENT ] ] [ login | /NOLOG ] [ @scriptfile[.ext ] ]
If specified, the EDB*Plus sign-on banner is suppressed along with all prompts.
Login information for connecting to the database server and database. login takes the following format. (There must be no white space within the login information.)
username[/password][@{connectstring | variable } ]
username is a database username with which to connect to the database.
password is the password associated with the specified username. If a password is not provided, but a password is required for authentication, a password file is used if available. If there is no password file or no entry in the password file with the matching connection parameters, then EDB*Plus will prompt for the password. For more information on using password files and authentication methods, see Section 2.4.6.
connectstring is the database connection string with the following format:
host[:port][/dbname][?ssl={true | false}]
host is the hostname or IP address on which the database server resides. If neither @connectstring nor @variable nor /NOLOG is specified, the default host is assumed to be the localhost. port is the port number receiving connections on the database server. If not specified, the default is 5444. dbname is the name of the database to connect to. If not specified the default is edb. If Internet Protocol version 6 (IPv6) is used for the connection instead of IPv4, then the IP address must be enclosed within square brackets (that is, [ipv6_address]). The following is an example using an IPv6 connection:
The pg_hba.conf file for the database server must contain an appropriate entry for the IPv6 connection. The following example shows an entry that allows all addresses:
For more information about the pg_hba.conf file, see the PostgreSQL core documentation at:
If an SSL connection is desired, then include the ?ssl=true parameter in the connection string. In such a case, the connection string must minimally include host:port, with or without /dbname. If the ssl parameter is not specified, the default is false. See Section 2.3 for instructions on setting up an SSL connection.
variable is a variable defined in the login.sql file that contains a database connection string. The login.sql file can be found in the edbplus subdirectory of the Advanced Server home directory.
Specify /NOLOG to start EDB*Plus without establishing a database connection. SQL commands and EDB*Plus commands that require a database connection cannot be used in this mode. The CONNECT command can be subsequently given to connect to a database after starting EDB*Plus with the /NOLOG option.
scriptfile[.ext ]
scriptfile is the name of a file residing in the current working directory, containing SQL and/or EDB*Plus commands that will be automatically executed after startup of EDB*Plus. ext is the filename extension. If the filename extension is sql, then the .sql extension may be omitted when specifying scriptfile. When creating a script file, always name the file with an extension, otherwise it will not be accessible by EDB*Plus. (EDB*Plus will always assume a .sql extension on filenames that are specified with no extension.)
The following example shows user enterprisedb with password, password, connecting to database edb running on a database server on the localhost at port 5444.
The following example shows user enterprisedb with password, password, connecting to database edb running on a database server on the localhost at port 5445.
Using variable hr_5445 in the login.sql file, the following illustrates how it is used to connect to database hr on localhost at port 5445.
The following is the content of the login.sql file used in the previous example.
The following example executes a script file, dept_query.sql after connecting to database edb on server localhost at port 5444.
The following is the content of file dept_query.sql used in the previous example.
The Java truststore is the file containing the Certificate Authority (CA) certificates with which the Java client (EDB*Plus) uses to verify the authenticity of the server to which it is initiating an SSL connection.
The Java keystore is the file containing private and public keys and their corresponding certificates. The keystore is required for client authentication to the server, which is used for the EDB*Plus connection.
Step 1: Create the certificate signing request (CSR).
In the following example the generated certificate signing request file is server.csr. The private key is generated as file server.key.
Note: When creating the certificate, the value specified for the common name field (designated as CN=enterprisedb in this example) must be the database user name that is specified when connecting to EDB*Plus.
In addition, user name maps can be used as defined in the pg_ident.conf file to permit more flexibility for the common name and database user name. Steps 8 and 9 describe the use of user name maps.
Step 2: Generate the self-signed certificate.
The following generates a self-signed certificate to file server.crt using the certificate signing request file, server.csr, and the private key, server.key, as input.
Step 3: Make a copy of the server certificate (server.crt) to be used as the root Certificate Authority (CA) file (root.crt).
Step 4: Delete the now redundant certificate signing request (server.csr).
Step 5: Move or copy the certificate and private key files to the Advanced Server data directory (for example, /opt/edb/as10/data).
Step 6: Set the file ownership and permissions on the certificate files and private key file.
Set the ownership to the operating system account that owns the data subdirectory of the database server. Set the permissions so that no other groups or accounts other than the owner can access these files.
Step 7: In the postgresql.conf file, make the following modifications.
Step 8: Modify the pg_hba.conf file to enable SSL usage on the desired database to which EDB*Plus is to make the SSL connection.
In the pg_hba.conf file, the hostssl type indicates the entry is used to validate SSL connection attempts from the client (EDB*Plus).
The authentication method is set to cert with the option clientcert=1 in order to require an SSL certificate from the client against which authentication is performed using the common name of the certificate (enterprisedb in this example).
The map=sslusers option specifies that a mapping named sslusers defined in the pg_ident.conf file is to be used for authentication. This mapping allows a connection to the database if the common name from the certificate and the database user name attempting the connection match the SYSTEM-USERNAME/PG-USERNAME pair listed in the pg_ident.conf file.
The following is an example of the settings in the pg_hba.conf file if the database (edb) must use SSL connections.
Step 9: The following shows the user name maps in the pg_ident.conf file related to the pg_hba.conf file by the map=sslusers option. These user name maps permit you to specify database user names edbuser, postgres, or enterprisedb when connecting with EDB*Plus.
Step 10: Restart the database server after you have made the changes to the configuration files.
Step 1: Using files server.crt and server.key located under the database server data subdirectory, create copies of these files and move them to the host where EDB*Plus is to be running.
Store these files in the desired directory to contain the trusted certificate and keystore files to be generated in the following steps. The suggested location is to create a .postgresql subdirectory under the home user account that will invoke EDB*Plus. Thus, these files will be under the ~/.postgresql directory of the user account that will run EDB*Plus.
For this example, assume file edb.crt is a copy of server.crt and edb.key is a copy of server.key.
Step 2: Create an additional copy of edb.crt.
Step 3: Create a Distinguished Encoding Rules (DER) format of file edb_root.crt. The generated DER format of this file is edb_root.crt.der. The DER format of the file is required for the keytool program used in Step 4.
Step 4: Use the keytool program to create a keystore file (postgresql.keystore) using edb_root.crt.der as the input. This process adds the certificate of the Postgres database server to the keystore file.
Note: The file name postgresql.keystore is recommended so that it can be accessed in its default directory location ~/.postgresql/postgresql.keystore, which is under the home directory of the user account invoking EDB*Plus. Also note that the file name suffix can be .jks instead of .keystore (thus, file name postgresql.jks). However, in the remainder of these examples, file name postgresql.keystore is used.
For Windows only: The path is %APPDATA%\.postgresql\postgresql.keystore
The keytool program can be found under the bin subdirectory of the Java Runtime Environment installation.
You will be prompted for a new password. Save this password as it must be specified with the PGSSLCERTPASS environment variable.
Step 5: Create a PKCS #12 format of the keystore file (postgresql.p12) using files edb.crt and edb.key as input.
Note: The file name postgresql.p12 is recommended so that it can be accessed in its default directory location ~/.postgresql/postgresql.p12, which is under the home directory of the user account invoking EDB*Plus.
For Windows only: The path is %APPDATA%\.postgresql\postgresql.p12
You will be prompted for a new password. Save this password as it must be specified with the PGSSLKEYPASS environment variable.
Step 6: If files postgresql.keystore and postgresql.p12 are not already in the ~/.postgresql directory, move or copy them to that location.
For Windows only: The directory is %APPDATA%\.postgresql
Step 7: If the default location ~/.postgresql is not used, then the full path (including the file name) to file postgresql.keystore must be set with the PGSSLCERT environment variable, and the full path (including the file name) to file postgresql.p12 must be set with the PGSSLKEY environment variable before invoking EDB*Plus.
In addition, if the generated file from Step 4 was not named postgresql.keystore or postgresql.jks then, use the PGSSLCERT environment variable to designate the file name and its location. Similarly, if the generated file from Step 5 was not named postgresql.p12 then, use the PGSSLKEY environment variable to designate the file name and its location.
•
The postgresql.conf file for the database server contains the updated configuration parameters as shown in Step 7 of Section 2.3.1.
•
The pg_hba.conf file for the database server contains the required entry for permitting the SSL connection as shown in Step 8 of Section 2.3.1.
•
For the client host, either the client’s certificate and keystore files have been placed in the user account’s ~/.postgresql directory or the environment variables PGSSLCERT and PGSSLKEY are set before invoking EDB*Plus.
•
The PGSSLCERTPASS environment variable is set with the password created from Step 4 in Section 2.3.2.
•
The PGSSLKEYPASS environment variable is set with the password created in Step 5 in Section 2.3.2.
When invoking EDB*Plus, include the ?ssl=true parameter in the database connection string as shown for the connectstring option in Section 2.2.
The postgresql.conf file of the database server contains the following modified parameters:
The pg_hba.conf file of the database server contains the following entry for connecting from EDB*Plus on the remote host:
On the remote host where EDB*Plus is to be invoked, the Linux user account named user contains the certificate and keystore files in its ~/.postgresql directory:
Logged into Linux with the account named user, EDB*Plus is successfully invoked with the ssl=true parameter:
Alternatively, without placing the certificate and keystore files in ~/.postgresql, but in a different directory, EDB*Plus can be invoked in the following manner:
Note that in both cases the database user name used to log into EDB*Plus is enterprisedb as this is the user specified for the common name field when creating the certificate in Step 1 of Section 2.3.1.
Other database user names can be used if the pg_hba.conf file with the map option and the pg_ident.conf file are used as described in steps 8 and 9 of Section 2.3.1.
2.4.1 ACCEPT
The ACCEPT command displays a prompt and waits for the user’s keyboard input. The value input by the user is placed in the specified variable.
ACC[EPT ] variable
The following example creates a new variable named my_name, accepts a value of John Smith, then displays the value using the DEFINE command.
2.4.2 APPEND
APPEND is a line editor command that appends the given text to the end of the current line in the SQL buffer.
In the following example, a SELECT command is built-in the SQL buffer using the APPEND command. Note that two spaces are placed between the APPEND command and the WHERE clause in order to separate dept and WHERE by one space in the SQL buffer.
2.4.3 CHANGE
CHANGE is a line editor command performs a search-and-replace on the current line in the SQL buffer.
C[HANGE ] /from/[to/ ]
If to/ is specified, the first occurrence of text from in the current line is changed to text to. If to/ is omitted, the first occurrence of text from in the current line is deleted.
2.4.4 CLEAR
The CLEAR command removes the contents of the SQL buffer, deletes all column definitions set with the COLUMN command, or clears the screen.
Clears the SQL buffer.
2.4.5 COLUMN
The COLUMN command controls output formatting. The formatting attributes set by using the COLUMN command remain in effect only for the duration of the current session.
If the COLUMN command is specified with no subsequent options, formatting options for current columns in effect for the session are displayed.
If the COLUMN command is followed by a column name, then the column name may be followed by one of the following:
2.
3.
Any combination of FORMAT, HEADING, and one of OFF or ON
Name of a column in a table to which subsequent column formatting options are to apply. If no other options follow column, then the current column formatting options if any, of column are displayed.
The CLEAR option reverts all formatting options back to their defaults for column. If the CLEAR option is specified, it must be the only option specified.
Format specification to be applied to column. For character columns, spec takes the following format:
n is a positive integer that specifies the column width in characters within which to display the data. Data in excess of n will wrap around with the specified column width.
For numeric columns, spec is comprised of the following elements.
If OFF is specified, formatting options are reverted back to their defaults, but are still available within the session. If ON is specified, the formatting options specified by previous COLUMN commands for column within the session are re-activated.
2.4.6 CONNECT
CON[NECT] username[/password][@{connectstring | variable } ]
username is a database username with which to connect to the database.
password is the password associated with the specified username. If a password is not provided, but a password is required for authentication, a search is made for a password file, first in the home directory of the Linux operating system account invoking EDB*Plus (or in the %APPDATA%\postgresql\ directory for Windows) and then at the location specified by the PGPASSFILE environment variable. The password file is .pgpass on Linux hosts and pgpass.conf on Windows hosts. The following is an example on a Windows host:
If a password file cannot be located, or it does not have an entry matching the EDB*Plus connection parameters, then EDB*Plus will prompt for the password. For more information about password files, see the PostgreSQL core documentation at:
Note: When a password is not required, EDB*Plus does not prompt for a password such as when the trust authentication method is specified in the pg_hba.conf file. For more information about the pg_hba.conf file and authentication methods, see the PostgreSQL core documentation at:
connectstring is the database connection string. See Section 2.2 for further information on the database connection string.
variable is a variable defined in the login.sql file that contains a database connection string. The login.sql file can be found in the edbplus subdirectory of the Advanced Server home directory.
In the following example, the database connection is changed to database edb on the localhost at port 5445 with username, smith.
From within the session shown above, the connection is changed to username enterprisedb. Also note that the host defaults to the localhost, the port defaults to 5444 (which is not the same as the port previously used), and the database defaults to edb.
2.4.7 DEFINE
The DEFINE command creates or replaces the value of a user variable (also called a substitution variable).
DEF[INE ] [ variable [ = text ] ]
If the DEFINE command is given without any parameters, all current variables and their values are displayed.
If DEFINE variable is given, only variable is displayed with its value.
DEFINE variable = text assigns text to variable. text may be optionally enclosed within single or double quotation marks. Quotation marks must be used if text contains space characters.
Note: The variable EDB is read from the login.sql file located in the edbplus subdirectory of the Advanced Server home directory.
2.4.8 DEL
DEL is a line editor command that deletes one or more lines from the SQL buffer.
DEL [ n | n m | n * | n L[AST ] | * | * n | * L[AST ] |
n is an integer representing the nth line
n m
n and m are integers where m is greater than n representing the nth through the mth lines
In the following example, the fifth and sixth lines containing columns sal and comm, respectively, are deleted from the SELECT command in the SQL buffer.
2.4.9 DESCRIBE
The DESCRIBE command displays:
The DESCRIBE command will also display the structure of the database object referred to by a synonym. The syntax is:
DESC[RIBE] [ schema.]object
2.4.10 DISCONNECT
The DISCONNECT command closes the current database connection, but does not terminate EDB*Plus.
2.4.11 EDIT
The EDIT command invokes an external editor to edit the contents of an operating system file or the SQL buffer.
ED[IT ] [ filename[.ext ] ]
filename[.ext ]
filename is the name of the file to open with an external editor. ext is the filename extension. If the filename extension is sql, then the .sql extension may be omitted when specifying filename. EDIT always assumes a .sql extension on filenames that are specified with no extension. If the filename parameter is omitted from the EDIT command, the contents of the SQL buffer are brought into the editor.
2.4.12 EXECUTE
The EXECUTE command executes an SPL procedure from EDB*Plus.
EXEC[UTE ] spl_procedure [ ([ parameters ]) ]
2.4.13 EXIT
The EXIT command terminates the EDB*Plus session and returns control to the operating system. QUIT is a synonym for EXIT. Specifying no parameters is equivalent to EXIT SUCCESS COMMIT.
[ COMMIT | ROLLBACK ]SUCCESS | FAILURE |WARNING
A variable created with the DEFINE command whose value is returned as the return code.
If COMMIT is specified, uncommitted updates are committed upon exit. If ROLLBACK is specified, uncommitted updates are rolled back upon exit. The default is COMMIT.
2.4.14 GET
The GET command loads the contents of the given file to the SQL buffer.
GET filename[.ext ] [ LIS[T ] | NOL[IST ] ]
filename[.ext ]
filename is the name of the file to load into the SQL buffer. ext is the filename extension. If the filename extension is sql, then the .sql extension may be omitted when specifying filename. GET always assumes a .sql extension on filenames that are specified with no extension.
If LIST is specified, the content of the SQL buffer is displayed after the file is loaded. If NOLIST is specified, no listing is displayed. The default is LIST.
2.4.15 HELP
The HELP command obtains an index of topics or help on a specific topic. The question mark (?) is synonymous with specifying HELP.
The name of a specific topic – e.g., an EDB*Plus command, for which help is desired.
2.4.16 HOST
The HOST command executes an operating system command from EDB*Plus.
2.4.17 INPUT
The INPUT line editor command adds a line of text to the SQL buffer after the current line.
I[NPUT ] text
The following sequence of INPUT commands constructs a SELECT command.
2.4.18 LIST
LIST is a line editor command that displays the contents of the SQL buffer.
L[IST] [ n | n m | n * | n L[AST] | * | * n | * L[AST] | L[AST] ]
n represents the buffer line number.
n m displays a list of lines between n and m.
n * displays a list of lines that range between line n and the current line.
n L[AST] displays a list of lines that range from line n through the last line in the buffer.
* displays the current line.
* n displays a list of lines that range from the current line through line n.
* L[AST] displays a list of lines that range from the current line through the last line.
L[AST] displays the last line.
2.4.19 PASSWORD
Use the PASSWORD command to change your database password.
PASSW[ORD] [user_name]
You must have sufficient privileges to use the PASSWORD command to change another user's password. The following example demonstrates using the PASSWORD command to change the password for a user named acctg:
2.4.20 PAUSE
The PAUSE command displays a message, and waits for the user to press ENTER.
PAU[SE] [optional_text]
optional_text specifies the text that will be displayed to the user. If the optional_text is omitted, Advanced Server will display two blank lines. If you double quote the optional_text string, the quotes will be included in the output.
2.4.21 PROMPT
The PROMPT command displays a message to the user before continuing.
PRO[MPT] [message_text]
message_text specifies the text displayed to the user. Double quote the string to include quotes in the output.
2.4.22 QUIT
The QUIT command terminates the session and returns control to the operating system. QUIT is a synonym for EXIT.
[SUCCESS | FAILURE | WARNING | value | sub_variable]
The default value is QUIT SUCCESS COMMIT.
2.4.23 REMARK
Use REMARK to include comments in a script.
REM[ARK] [optional_text]
2.4.24 SAVE
Use the SAVE command to write the SQL Buffer to an operating system file.
SAV[E] file_name
[CRE[ATE] | REP[LACE] | APP[END]]
file_name specifies the name of the file (including the path) where the buffer contents are written. If you do not provide a file extension, .sql is appended to the end of the file name.
Include the CREATE keyword to create a new file. A new file is created only if a file with the specified name does not already exist. This is the default.
Include the REPLACE keyword to specify that Advanced Server should overwrite an existing file.
Include the APPEND keyword to specify that Advanced Server should append the contents of the SQL buffer to the end of the specified file.
2.4.25 SET
Use the SET command to specify a value for a session level variable that controls EDB*Plus behavior. The following forms of the SET command are valid:
Use the SET AUTOCOMMIT command to specify commit behavior for Advanced Server transactions.
{ON | OFF | IMMEDIATE | statement_count}
Specify ON to turn autocommit behavior on.
Specify OFF to turn autocommit behavior off.
IMMEDIATE has the same effect as ON.
Include a value for statement_count to instruct EDB*Plus to issue a commit after the specified count of successful SQL statements.
Use the SET COLUMN SEPARATOR command to specify the text that Advanced Server displays between columns.
SET COLSEP column_separator
The default value of column_separator is a single space.
Use the SET ECHO command to specify if SQL and EDB*Plus script statements should be displayed onscreen as they are executed.
The SET FEEDBACK command controls the display of interactive information after a SQL statement executes.
Specify an integer value for row_threshold. Setting row_threshold to 0 is same as setting FEEDBACK to OFF. Setting row_threshold equal 1 effectively sets FEEDBACK to ON.
Use the SET FLUSH command to control display buffering.
Set FLUSH to OFF to enable display buffering. If you enable buffering, messages bound for the screen may not appear until the script completes. Please note that setting FLUSH to OFF will offer better performance.
Set FLUSH to ON to disable display buffering. If you disable buffering, messages bound for the screen appear immediately.
Use the SET HEADING variable to specify if Advanced Server should display column headings for SELECT statements.
The SET HEADSEP command sets the new heading separator character used by the COLUMN HEADING command. The default is '|'.
Use the SET LINESIZE command to specify the width of a line in characters.
SET LIN[ESIZE] width_of_line
The default value of width_of_line is 132.
Use the SET NEWPAGE command to specify how many blank lines are printed after a page break.
SET NEWP[AGE] lines_per_page
The default value of lines_per_page is 1.
Use the SET NULL command to specify a string that is displayed to the user when a NULL column value is displayed in the output buffer.
SET NULL null_string
Use the SET PAGESIZE command to specify the number of printed lines that fit on a page.
SET PAGES[IZE] line_count
Use the line_count parameter to specify the number of lines per page.
The SET SQLCASE command specifies if SQL statements transmitted to the server should be converted to upper or lower case.
Specify UPPER to convert the command text to uppercase.
Specify LOWER to convert the command text to lowercase.
Specify MIXED to leave the case of SQL commands unchanged. The default is MIXED.
The SET PAUSE command is most useful when included in a script; the command displays a prompt and waits for the user to press Return.
If SET PAUSE is ON, the message Hit ENTER to continue… will be displayed before each command is executed.
Use the SET SPACE command to specify the number of spaces to display between columns:
SET SPACE number_of_spaces
Use SET SQLPROMPT to set a value for a user-interactive prompt:
By default, SQLPROMPT is set to "SQL> "
Use the SET TERMOUT command to specify if command output should be displayed onscreen.
The SET TIMING command specifies if Advanced Server should display the execution time for each SQL statement after it is executed.
Use the SET TRIMSPOOL command to remove trailing spaces from each line in the output file specified by the SPOOL command.
2.4.26 SHOW
Use the SHOW command to display current parameter values.
SHO[W] {ALL | parameter_name}
2.4.27 SPOOL
The SPOOL command sends output from the display to a file.
SP[OOL] output_file | OFF
Use the output_file parameter to specify a path name for the output file.
2.4.28 START
Use the START command to run an EDB*Plus script file; START is an alias for @ command.
STA[RT] script_file
2.4.29 UNDEFINE
The UNDEFINE command erases a user variable created by the DEFINE command.
UNDEF[INE] variable_name [ variable_name...]
Use the variable_name parameter to specify the name of a variable or variables.
The WHENEVER SQLERROR command provides error handling for SQL errors or PL/SQL block errors. The syntax is:
WHENEVER SQLERROR
{CONTINUE
[COMMIT|ROLLBACK|NONE]
|EXIT
[SUCCESS|FAILURE|WARNING|n|sub_variable]
[COMMIT|ROLLBACK]}
Include the CONTINUE clause to instruct EDB*Plus to perform the specified action before continuing.
Include the COMMIT clause to instruct EDB*Plus to COMMIT the current transaction before exiting or continuing.
Include the ROLLBACK clause to instruct EDB*Plus to ROLLBACK the current transaction before exiting or continuing.
Include the NONE clause to instruct EDB*Plus to continue without committing or rolling back the transaction.
Include the EXIT clause to instruct EDB*Plus to perform the specified action and exit if it encounters an error.
[SUCCESS|FAILURE|WARNING|n|sub_variable]

Table of Contents