cancel
Showing results for 
Search instead for 
Did you mean: 

error connecting to portal database using alias

Former Member
0 Kudos

i am using Connector framework api to connect to portal database.

in <b>visual administrator -> JDBC connector</b>. I click on <b>runtime</b> tab

Under <b>Resources</b> i find <b>Data Sources</b> and <b>Drivers</b>.

Under Data sources I see SAPSR3DB. In Main tab on right hand pane I find many other aliases called SAP/BC_UME and SAP/BC_WDDR etc. Which one do I use in creating a connection.

IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService("com.sap.portal.ivs.connectorservice.connector");
ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
IConnection connection = cgService.getConnection("SAPSR3DB",cp);

No system found for alias SAPSR3DB.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you want to use the PortalService IConnectorGatewayService you will have to create a JDBC System in the System Landscape of the Portal and create a System Alias with usermapping.

You can then create a c connection to this JDBC System with the IConnectorGatewayServcie using the specified System alias.

But if you want to directly connect to the System Database you can also use OpenSQL in your Portalapplication and lookup the Connection using JNDI:


      InitialContext ctx= new InitialContext();
      ds= (DataSource) ctx.lookup("jdbc/SAPSR3DB");
      java.sql.Connection conn= ds.getConnection();
// ...
// user your connection here and close all jdbc objects finally!

Best regards,

Stefan Brauneis