SQL$HELP_OLD72.HLB  —  CONNECT  Arguments

1  –  ALIAS alias

    Specifies a name for a particular attach to a database.
    Specifying an alias in the connect expression lets your program
    or interactive SQL statements refer to more than one database.

    You do not have to specify an alias in the CONNECT statement if
    you are referring only to the default database.

    If you specify an alias, but do not specify a FILENAME or
    PATHNAME, SQL uses the path name or file name in the DECLARE
    ALIAS statement for that database by default. The alias must be
    part of the default environment.

2  –  AS

    Specifies an identifier for the association between the group of
    databases being attached (the environment) and the database and
    request handles that reference them (the connection).

    The connection name must be unique within your application. Use
    a literal string enclosed within single quotation marks, for
    example:

    CONNECT TO 'ALIAS CORP FILENAME corporate_data' AS 'JULY_CORP_DATA'

    If you do not specify a connection name, SQL generates a unique
    connection name. For example:

    SQL> CONNECT TO
    cont> 'ATTACH FILENAME mf_personnel';
    SQL> SHOW CONNECTIONS
            RDB$DEFAULT_CONNECTION
    ->      SQL$CONN_00000000

3  –  ATTACH attach expression

    Specifies an alias that is not part of the default environment.
    See the ATTACH statement for details about the FILENAME 'attach-
    spec', PATHNAME path-name, database-options, and attach-options.

4  –  CATALOG

    Specifies the default catalog for dynamic statements in the
    connection.

    You can supply a parameter marker from dynamic SQL, a host
    language variable from a precompiled SQL program, a parameter
    from an SQL module language module, or a string literal. The
    argument that you supply must be a character string that contains
    a connect expression that is interpreted at run time.

5  –  db-specification

    Specifies one or more valid aliases. An alias, which identifies
    a particular database, is valid only if that database is either
    declared in any of the modules in the current application or
    attached with the ATTACH statement. You can issue an ATTACH
    statement as part of the db-specification.

6  –  FILENAME

    A quoted string containing full or partial information needed to
    access a database.

    When you use the FILENAME argument, any changes you make to
    database definitions are entered only to the database system
    file, not to the repository. If you specify FILENAME, your
    application attaches to the database with that file name at run
    time.

    For information regarding node-spec and file-spec, see Oracle Rdb
    Attach Specifications.

7  –  literal-user-auth

    Specifies the user name and password for the specified alias
    in the connection. This clause enables access to databases,
    particularly remote databases.

    This literal lets you explicitly provide user name and password
    information for each alias in the CONNECT statement. For more
    information about when to use this clause, see the statement
    ATTACH.

8  –  NAMES

    Specifies a character set name that is used as the default,
    identifier, and literal character sets for the session of the
    current connection. The value of runtime-options must be one of
    the character sets listed in the Supported_Characters_Sets HELP
    topic .

    You can supply a parameter marker from dynamic SQL, a host
    language variable from a precompiled SQL program, a parameter
    from an SQL module language module, or a string literal. The
    argument that you supply must be a character string that contains
    a connect expression that is interpreted at run time.

9  –  PATHNAME

    <OpenVMS>

    A full or relative repository path name that specifies the source
    of the schema definitions. When you use the PATHNAME argument,
    any changes you make to schema definitions are entered in the
    repository and the database system file. Oracle Rdb recommends
    using the PATHNAME argument if you have the repository on your
    system and you plan to use any data definition statements.

    The path name that you specify overrides the path name associated
    with the alias at run time.

    If you specify PATHNAME at run time, your application attaches to
    the database file name extracted from the repository.

10  –  runtime-options

    'literal' | parameter | parameter-marker

    Specifies a character set name that is used as the default,
    identifier, and literal character sets for the session of the
    current connection. The value of runtime-options must be one of
    the character sets listed in

11  –  SCHEMA

    Specifies the schema for dynamic statements in the connection.

    You can supply a parameter marker from dynamic SQL, a host
    language variable from a precompiled SQL program, a parameter
    from an SQL module language module, or a string literal. The
    argument that you supply must be a character string that contains
    a connect expression that is interpreted at run time.

12  –  TO

    Syntax options:

       connect-string-literal
       connect-parameter
       connect-parameter-marker

 Specifies the database environment. You can supply a parameter
 marker from dynamic SQL, a host language variable from a precompiled
 SQL program, a parameter from an SQL module language module, or a
 string literal. The argument that you supply must be a character
 string that contains a connect expression that is interpreted at run
 time.

13  –  USER clause

    Syntax options:

    USER 'username' | USER parameter

    A character string literal that specifies the operating system
    user name that the database system uses for privilege checking.

14  –  USING clause

    Syntax options:

    USING 'password' | USING parameter

    A character string literal that specifies the user's password for
    the user name specified in the USER clause.

15  –  user-authentication

    Specifies the user name and password to enable access to
    databases, particularly remote databases.

    This clause lets you explicitly provide user name and password
    information in the CONNECT statement. If you do not specify user
    name and password information in the ALIAS clause or the ATTACH
    clause, SQL uses the user name and password specified in this
    clause as the default for each alias specified.

    For more information about when to use this clause, see the
    ATTACH statement.
Close Help