Description
To optimize database processing, EAServer provides support for connection caching. Connection caching allows EAServer components to share pools of preallocated connections to a remote database server, avoiding the overhead imposed when each instance of a component creates a separate connection. By establishing a connection cache, a server can reuse connections made to the same data source.
PowerBuilder 8 introduces support for retrieving a connection by proxy from an EAServer connection cache. Regardless of whether you access a cache by user or name, you can retrieve a connection by proxy. Retrieving a connection by proxy means that you can assume the identity and privileges of another user by providing an alternate login name.
Usage
To use proxy connections, you must identify the alternative login name using a new DBParm called ProxyUserName. Enter the alternative login name in the Proxy User Name box on the EAServer tab. Here's some sample code for a PowerBuilder component that shows how to retrieve a connection by proxy:
SQLCA.DBMS = "ODBC" SQLCA.DBParm = "CacheName='MyEAServerCache', UseContextObject='Yes',ProxyUserName='pikachu'"
This feature can be used with any database that recognizes the SQL command set session authorization. In order for user A to use the ProxyUserName DBParm to assume the identity of another user B, user A must have permission to execute this statement. For example, for ASA, user A must have DBA authority, and for ASE, user A must have been granted permission to execute set session authorization by a System Security Officer.
Before you can use a connection by proxy Set-proxy support must be enabled in the cache properties file before components can take advantage of it. Jaguar Manager does not automatically create an individual cache properties file when you create a cache so you must create this file manually. Name the file cachename.props and put it in the Jaguar\Repository\ConnCache directory. Once you have created the cache properties file, add the following line:
com.sybase.jaguar.conncache.ssa=true
For this setting to take effect, you must refresh EAServer. For more information on managing connection caches, see the Jaguar CTS System Administration Guide.
You must also set up your database server to recognize and give privileges to the alternate login name defined in the ProxyUserName DBParm.
|