Focal Point
DB2 Access via Multiple User IDs in WebFOCUS

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5401092442

August 28, 2007, 04:15 PM
<Steven>
DB2 Access via Multiple User IDs in WebFOCUS
I am currently using WebFOCUS 5.2.3 and we are doing DB2 SQL pass-thrus for data acquisition.

In the edasprof.prf file, we have defined several connection attributes, each consisting of the database alias, the application id and the password.

As an example:

ENGINE DB2 SET CONNECTION_ATTRIBUTES MISTDATA/xxxxxx,yyyyy

Then, in our FEX programs, we have the following code to connect to the database to run SQLs:

SET SQLENGINE=DB2
SQL DB2 SET DEFAULT_CONNECTION MISTDATA
SQL DB2
SELECT .....
END
;
TABLE FILE....

We need to find out a way to access the same database, but through a different user ID. We require this because on our production month-end day, we want to use DB2 governor to block all access to the database through that application id, meanwhile, our team can continue to run reports using this alternative id.

Is there anyway in the FEX program to hard-code the DB2 connection string directly? We have a flag variable that we can manually set to enable or disable this special access. We don't mind to expose the user id and password in the program.

Thanks.
August 28, 2007, 04:27 PM
Francis Mariani
I've used the following syntax for MS SQL Server db's and it may work for DB2.

SET SQLENGINE=DB2
SQL SET SERVER server-name
SQL SET CONNECTION_ATTRIBUTES server-name/user-id,password
-RUN

On the other hand, you may be able to simply add the Set Connection line in the FEX, something like this:

ENGINE DB2 SET CONNECTION_ATTRIBUTES MISTDATA/diff-user-id,password
SET SQLENGINE=DB2
SQL DB2 SET DEFAULT_CONNECTION MISTDATA
-RUN



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
August 28, 2007, 05:40 PM
Darin Lee
there is a lot of information on DB2 security settings (Explicit, passthru, trusted) and primary/secondary ID usage in the adapter section of help. You can access this from the console by clicking on the little green ? next to security in the adapter configuration windows. If Francis' suggestion doesn't do it (which I think it should) try ready through that section. Looks like some of it may apply to your situation.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat