ConnectAs database parameter
Description
Allows the user to connect to the Oracle Server with SYSOPER or SYSDBA system
privileges. Supports proxy authentication
with additional user names (ORA driver only) when connecting to
Oracle 10.2 or higher database servers.
Controls
-
O90 Oracle9i
-
O10 Oracle 10g
-
ORA Oracle 11g
Syntax
1 |
ConnectAs='<span>value</span>' |
Parameter |
Description |
---|---|
value |
Values are:
|
Default
Normal
Usage
If ConnectAs=’Normal’, this parameter
is not used. If ConnectAs =’SYSDBA’ or
ConnectAs =’SYSOPER’, Oracle allows the
user to connect with SYSDBA or SYSOPER privileges,
respectively, provided that these privileges have been granted the
user.
If you connect using ConnectAs =’SYSDBA’,
Oracle uses the SYS schema instead of the schema
that might already be associated with the user ID. If you connect
using ConnectAs =’SYSOPER’, Oracle uses
the PUBLIC schema.
The PowerBuilder ORA driver supports the proxy authentication
feature that was introduced in Oracle 10.2. With proxy authentication,
the end user typically authenticates to a middle tier (such as a
firewall), that in turn logs into the database on the user’s
behalf as a proxy user. After logging into the database, the proxy
user can switch to the end user’s identity and perform operations
using the authorization accorded to that user.
The ConnectAs DBParm parameter allows you to take advantage
of this proxy connection feature. For example, if the user’s
Transaction object LogID is “Scott” and you set
the ConnectAs DBParm parameter to “John”, the
OCI client logs in to database as the proxy user (“Scott”),
then switches to the end user identity (“John”).
If you are using connection or session pooling, the proxy
user name is the connection or session pooling creator (which you
can provide in the PoolCreator and PoolPwd DBParm parameters), and
the Transaction object’s LogID is ignored. No proxy session
can be created if pooling is set to homogeneous session mode.

Connection pooling cannot be used with this parameter. Do
not select Use Connection Pool in the Database Profile Setup dialog
box or set CnnPool to ‘Yes’.
Examples
To use the SYS schema instead of the schema
associated with the User ID:
-
Database
profileSelect SYSDBA from the Connect As drop-down list on the Connection
page in the Database Profile Setup dialog box, and make sure Use
Connection Pool is deselected. -
Application
Type the following in code:
1SQLCA.DbParameter="ConnectAs='SYSDBA'"
To connect as a proxy user (Scott) for the end user named
John:
-
Database profile
Type
John
in the Login
ID text box on the Connection page in the Database Profile Setup
dialog box, and typeScott
in
the Connect As drop-down list. -
Application
Type the following in code:
1sqlca.logid = "scott"1sqlca.dbparm="ConnectAs='john'"