Table of Contents Previous Next


2 EDB*Plus : 2.1 Starting 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.2.6.
connectstring is 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.
host[:port][/dbname ] ]
host is the hostname 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.
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.

2 EDB*Plus : 2.1 Starting EDB*Plus

Table of Contents Previous Next