Previous Topic

Next Topic

Standard Flags and Parameters

The following parameters and flags are common to many commands. Each command description in this guide shows whether these parameters or flags are valid for that command.

The following syntax is typical for many commands:

command dbname|vnode::dbname[/server_class] [-fproduct]
[-uusername] [-Ggroupid] [-Rroleid] [other flags] [other parameters]

Previous Topic

Next Topic

Dynamic Vnode Specification—Connect to Remote Node

When connecting to a remote node, you can specify a dynamic vnode instead of a vnode name. The dynamic vnode specification includes the connection data, user authorization, and attributes that are associated with a remote node.

Note: A dynamic vnode can be used wherever a vnode is allowed, unless otherwise stated.

A dynamic vnode specification has the following format:

@host,protocol,port[;attribute=value{;attribute=value}][[user,password]]

Examples of dynamic vnode specification:

This command runs the terminal monitor (sql) and connects to node hosta using protocol tcp_ip to remote Ingres symbolic port II. The login and password are Johnny and secretpwd. The remote database name is customerdb:

sql @hosta,tcp_ip,II[Johnny,secretpwd]::customerdb

This command does the same as the previous example and uses an attribute to set up a direct connection:

sql @hosta,tcp_ip,II;connection_type=direct[Johnny,secretpwd]::customerdb

Previous Topic

Next Topic

Uppercase Flags

Flags that must be entered in uppercase may need special input syntax when the host operating system is case-insensitive.

Windows: The Windows operating system passes uppercase flags with no special formatting needed. For example, to invoke Interactive Terminal Monitor with a group of sales, you could enter:

isql dbname -Gsales

UNIX: UNIX is case-sensitive and passes uppercase flags with no special formatting needed. For example, to invoke Ingres Menu with a group of sales, you could enter:

ingmenu dbname -Gsales

VMS: OpenVMS is case-insensitive and requires the addition of double-quotation marks around the uppercase flags. In OpenVMS, you must enclose all uppercase Ingres flags in double quotation marks. For example, to invoke Ingres Menu with a group of sales, use double quotes around the -G designation:

ingmenu dbname "-Gsales"

Previous Topic

Next Topic

Schema Qualifier—Specify Ownership

A schema is a collection of database objects, such as tables. Each table, view, and synonym belongs to a schema that is determined when the object is created. The schema name corresponds to the user who owns the object. The schema name allows you to distinguish between objects with identical names but different owners.

You can specify a schema name for a table, view, or synonym on the command line to specify ownership. You use the following syntax:

schema.objectname

The period (.) must immediately follow the schema name and precede the object name, with no intervening spaces. Both the schema name and the object name can be delimited identifiers.

For example, to specify the table named "empinfo" having a schema name of dave, you would specify the table name as:

dave.empinfo

You do not use a schema name when referencing a table, view, or synonym; for example, you specify the table name as:

empinfo

The search looks first for an object with a schema corresponding to the current user; then it looks for an object owned by the DBA to which you have access. Lastly, if the object name begins with ii, the search looks for a system catalog with that name. For more information on schemas, see the Database Administrator Guide.

Previous Topic

Next Topic

Delimited Identifiers on the Command Line

Delimited identifiers are database object names that are identical to reserved words, words that contain spaces, and non-alphanumeric characters that are disallowed in a regular identifier. If the installation allows mixed case names, you can also use delimited identifiers to distinguish among identical names with different case (for example, SALES and Sales).

On the command line, you use delimited identifiers if needed for names of tables, views, synonyms, schema, and authorization names (users, groups, and roles). For more information on allowable characters in delimited identifiers, see the SQL Reference Guide.

To create a delimited identifier, you must enclose the name in double quotation marks ("), dereference any embedded quotes, and use the appropriate number and type of delimiting quotes to pass it through your operating system. Use delimited identifiers on the operating system command line to specify database object names:

report my_database "Jane's table"

You must observe any operating system requirements for specifying quoted parameters, parameters containing embedded quotes, and parameters containing other characters that could be interpreted differently by the operating system. Depending on your operating system, you add delimiting and dereferencing quotes to a delimited identifier on the command line in order to pass it through the operating system with its own delimiting and embedded quotes (if any).

Previous Topic

Next Topic

Examples: Delimited Identifiers

The following examples use the table names shown here:

Table Stored in Database

Delimited Identifier

Jane's table

"Jane's table"

"Expert" Table

"""Expert"" Table"

Windows: Surround delimited identifiers and their delimiting quotes with double quotes on the command line, and dereference the delimited identifier quotes, preceding them with a backslash (\):

report my_database "\"Jane's table\""

report my_database "\"\"\"Expert\"table\""

UNIX:

Bourne shell:
Surround delimited identifiers and their delimiting quotes with double quotes on the command line, and dereference the delimited identifier quotes, preceding them with a backslash (\):

report my_database "\"Jane's table\""

report my_database "\"\"\"Expert\"\" table\""

C shell:
Delimit all delimited identifier quotes and all other special shell characters, such as single quotes ('), spaces ( ), and colons (:), preceding them with a backslash (\):

report my_database \"Jane\'s\ table\"

report my_database \"\"\"Expert\"\" table\"

In some cases, strings contained inside delimited identifiers that contain special characters can be surrounded by double quotes instead:

report my_database \""Jane's table"\"

VMS: Surround delimited identifiers with a set of dereferenced double quotes on the command line. Also, you must dereference each embedded quote by doubling it (including any quotes required to dereference an embedded quote):

report my_database """Jane's table"""

report my_database """""""Expert"""" table"""

Previous Topic

Next Topic

Authorization Parameters

You can use delimited identifiers to specify a username for the
-u flag, a groupid parameter for the –G flag, or a roleid for the –R flag on the command line. A general example is:

sreport my_database myfile –u"user 5" –G"group 2"

Here are specific examples:

Windows:

sreport my_database myfile –u'"user 5"' –G'"group 2"'

Windows NT:

sreport my_database myfile –u'"user5'""-G'"group 2'"

UNIX:

sreport my_database myfile –u'"user 5"' –G'"group 2"'

VMS: In OpenVMS, you must also enclose the entire –Ggroupid parameter in double quotes:

sreport my_database myfile–u"""user 5""""-G"""group2""""

Previous Topic

Next Topic

Case Sensitivity

By default, identifiers are forced to lowercase, and are therefore case-insensitive. The casing rules can be specified at installation time for delimited identifiers. The following settings are allowed:

If complying with ISO Entry SQL-92 standards, the system administrator should set delimited identifiers to mixed case.


© 2007 Ingres Corporation. All rights reserved.