IBM Support

How to return schemas related to differing owners

How To


Summary

How can you retrieve schemas related to different owners IBM® Rational® Business Developer (RBD)?

Objective

In the Data perspective of RBD, when a database connection is defined, the schema columns returned via the SQL Retrieve option are by default qualified by the user name applied within the SQL Database Connection wizard.
RBD has an option to change the applied user to return other schemas within the database.

Steps

To return the respective SQL columns in Enterprise Generation Language (EGL), use the following code:
record EmployeeRecord type SQLRecord{ tableNames=[["Emp_Resume"]]}

     // Right click -> SQL Record -> SQL Retrieve

end
When you implement the SQL Retrieve, it applies the default user credential, in this instance db2admin, to the schema.  If the table name is not found, the following error dialog results:
IWN.VAL.4582.e 0/0 Retrieve SQL failed because table db2admin.Emp_Resume 
is not defined in database or because the user ID lacks 
SELECT authority as the applicable is in a differing schema.
To change the user name for the schema within the RBD Data Perspective, select Preferences > EGL > SQL Database Connections > Secondary Authentication ID and enter the applicable user name for the respective schema.
If you then apply the SQL Retrieve operation, RBD successfully generates the applicable columns with the SQLRecord definition as follows:
record EmployeeRecord type SQLRecord{ tableNames=[["Emp_Resume"]], 
keyItems=[EMPNO, RESUME_FORMAT], fieldsMatchColumns = yes}

    EMPNO string                {column="EMPNO", maxLen=6};
    RESUME_FORMAT string        {column="RESUME_FORMAT", 
sqlVariableLen=yes, maxLen=10};
    RESUME clob                 {column="RESUME", isSqlNullable=yes};
        
end

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB35","label":"Mainframe SW"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"ARM Category":[{"code":"a8m0z0000000Cj9AAE","label":"Rational Business Developer-\u003EData Tooling"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Product Synonym

RBD

Document Information

Modified date:
17 January 2022

UID

ibm16513224