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.
Applies to
O90 Oracle9i
O10 Oracle 10g
ORA Oracle (for 11g and later)
Syntax
|
1 |
ConnectAs='value' |
|
Parameter |
Description |
|---|---|
|
value |
Values are:
|
Default value
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.
Do not use with CnnPool=’Yes’
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
Example 1
To use the SYS schema instead of the schema associated with the
User ID:
-
Database profile
Select 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.DBParm="ConnectAs='SYSDBA'"
Example 2
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 type Scott in the Connect
As drop-down list. -
Application
Type the following in code:
12sqlca.logid = "scott"sqlca.dbparm = "ConnectAs='john'"