Skip to Content
author's profile photo Former Member
Former Member

How to get the DB Connection Properties from within a Backend System

We have defined a backend system "MyBackendAlias" which connects to our Oracle Database from within the Sap portal.We have also performed User Mapping which maps the alias to a User Id and Passwd .

Within our JSP Iview we can access the username and passwd using the User Mapping Code :

String systemalias = "myBackendAlias";

// get the current login user

IUser iuser = request.getUser();

// get the User Mapping service

IUserMappingService iums =

(IUserMappingService) PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

// get raw user mapping data for the current user and the system alias

IUserMappingData iumdata = iums.getMappingData(systemalias, iuser);

Map map = new HashMap();

try {

// convert the raw user mapping data into a map

iumdata.enrich(map);

} catch (NoLogonDataAvailableException nldex) {

nldex.printStackTrace();

}

String userid = (String) map.get("user");

String pwd = (String) map.get("mappedpassword");

Now we are able to get the userid and passwd within our JSP Iview using this .

<b>The question is how do we access the Oracle SID and the Server Address/Name which we have defined in the System Connection Properties when we created our BackEnd System and Alias.

Just like we get the Userid and Passwd from the User Mapping Fields how do we extract the Database SID and Server Address / Name to get the connection to the database and execute our SQL Query within the Iview.</b>

Any help would be greatly appreciated.

Thanks

Ravi

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 14, 2005 at 09:49 AM

    Hi Ravi,

    see getting information from a system

    Hope it helps

    Detlev

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Detlev ,

      Thank you very very much . We could figure out how to get the URL and Driver information from there .I have rewarded the points also.

      Thanks

      Ravi

      Message was edited by: Ravi Krishnan

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.