Home > SAP software/management Tips > SAP tips and best practices > Configuring the JDBC Connector Service to perform database lookups
SAP Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SAP TIPS AND BEST PRACTICES

Configuring the JDBC Connector Service to perform database lookups


Varadharajan Krishnasamy
03.09.2007
Rating: -4.38- (out of 5)


SAP news, tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


This Weblog describes how to activate the JDBC Connector Service in order to perform database lookups (without JDBC adapter) in XI. The standard how-to guide covers almost all steps but falls short in describing some configuration steps.
This weblog outlines the steps that are required to configure the JDBC Connector service for an Oracle database.
The following reference documents were used; this weblog explains the steps that were missed in those documents.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9aedca11-0d01-0010-3b90-9ea04182875f
http://help.sap.com/saphelp_nw2004s/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm

Steps to configure JDBC connector service

1.Download the oracle JDBC driver ojdbc14.jar from the Web site
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
2.Use Visual Administrator to upload the ojdbc14.jar against the JDBC connector service.
3.Select the Service node from the list of nodes shown below.
[IMAGE]
4.Select the JDBC Connector from the list of services.
[IMAGE]
5.Place the cursor in the Drivers node in the Runtime tab. Click the create button to add the drivers.
[IMAGE]
6.Place the cursor in the DataSources to create a new data source.
Enter the following parameters
Application Name
Data source Name
Add alias name ( Do not add jdbc/Name)

since whatever name you add will be registered in the JNDI Registry under jdbc context, while writing the java code access the alias by (jdbc/aliasname).
Subsequent...

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
SAP tips and best practices
Minimizing business disruptions during an SAP upgrade or implementation
Retrieving content from an SAP workflow attachment
Updating URLs in SAP SRM
How to change default settings in SAP SRM
What are the benefits of implementing SAP SRM?
Increase column width in a transaction screen
Updating an RT table entry in SAP HR Payroll -- without the ADDWTE option
Is this the quickest way to find a BADI?
Adding custom fields for retail product comparisons in SAP BW
Improving performance with ABAP Objects in SAP Workflow

SAP PI/XI
NetWeaver PI 7.1 easier to implement than earlier versions, SAP says
Getting started with SAP NetWeaver PI (formerly XI)
Bucking the economic trend, HSBC embarks on NetWeaver PI project
How to be a self-taught NetWeaver and ABAP expert
An ABAP user wants to learn XI
What are the benefits of EAI?
Quiz: SAP XI for beginners
XI: Search through the payload of a message... without TREX!
Automate the process of uploading catalogs using XI
Using Folders in PI 7.1
SAP PI/XI Research

SAP Java and J2EE
SAP CTO Sikka: SAP's innovation gets overlooked
SAP CTO expects today's SAP applications to be running in 2020
Tips on SAP ABAP
How to provide an SAP R/3 4.5B application server with a Web service interface
Consuming a Web service from an SAP 4.6c R/3 application server
SAP NetWeaver Configuration and Customization
Is C, C++ and Java knowledge required when learning SAP?
How to be a self-taught NetWeaver and ABAP expert
Getting started with a NetWeaver career
An ABAP user wants to learn XI

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
SAP Exchange Infrastructure  (SearchSAP.com)
SAP Integration Adapter  (SearchSAP.com)
SAP Integration Repository  (SearchSAP.com)
SAP Integration Server  (SearchSAP.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


ly, to check if the alias is registered with JNDI, you can browse to the JNDI Registry node in Visual administrator and locate the alias.
[IMAGE]
Select the appropriate driver from the list of drivers (from step 5).
Select JDBC Version.
If the version is JDBC 2.0 compliant (Oracle 10.x drivers are compliant), then enter
Object factory - oracle.jdbc.pool.OracleDataSourceFactory
DataSource type – XADataSource
XADS Class name - oracle.jdbc.xa.client.OracleXADataSource
[IMAGE]
7.Select the additional tab to the enter parameters to connect to the database.
Enter the following parameters:
KeyValue
urljdbc:oracle:thin:@<hostname>:<listner portnumber>:<database name>
user<username to access the database>
password<password>

SQL Engine : Select Native SQL

[IMAGE]
8.How to test the data source to be sure it's working fine
In the DB initialization tab, enter a SQL statement to query the table, & press execute butto; it should return the results.
Do not forget to remove the statement after the test.
[IMAGE]
9.Develop Java code that performs DBLookup, the sample code for the performing the DBLook up is given in the How To Guide Appendix.
10.Follow the procedure as given in the how to guide to Create UDF's.

Varadharajan Krishnasamy is working for April Business Technology Consulting Pvt. Ltd.


This content is reposted from the SAP Developer Network.
Copyright 2007, SAP Developer Network

SAP Developer Network (SDN) is an active online community where ABAP, Java, .NET, and other cutting-edge technologies converge to form a resource and collaboration channel for SAP developers, consultants, integrators, and business analysts. SDN hosts a technical library, expert blogs, exclusive downloads and code samples, an extensive eLearning catalog, and active, moderated discussion forums. SDN membership is free.

Want to read more from this author? Click here to read Varadharajan Krishnasamy's Weblog. Click here to read more about SAP XI on SDN.



Rate this Tip
To rate tips, you must be a member of SearchSAP.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



NetWeaver SAP White Papers
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts