Often we need to connect to database during MDM development from RAD. Here we will see how to add Oracle 11g jdbc thin driver jar and create data source from there.

Steps:
1. Download oracle ojdbc6.jar from oracle site and save in your local drive:

oracle1

2. Open RAD in administrator mode (right click on RAD icon and choose ‘Run as Administrator’).  Go to Window > Preferences:

oracle2

3. From Preferences, go to Data Management > Connectivity > Driver Definitions. Then on right pane select Oracle from the drop down list:

oracle3

4. Click Add button on right:

oracle4

5. On ‘Specify a Driver Template and Definition Name’ page, select Oracle from the Vendor Filter drop down list:

oracle5

6. Select ‘Oracle This Driver’ as below. Here is have selected version 11. Give the driver a name or use default. Driver Type is not editable:

oracle6

7. Go to JAR List tab and add the jar file that was downloaded in step 1:

oracle7

8. Now change to ‘Database Development’ perspective in RAD or go to ‘Data Source Explorer’. In Data Source Explorer, right click on ‘Database Connection’.

oracle8

9. On ‘Connection Parameters’ page, select ‘Oracle’ on left and then select ‘Oracle This Driver’ (or whatever name you provided in step #6):

oracle9

Provide connection values on right according to your settings. Here is a sample setting:

oracle10

And the click on ‘Test Connection’. If everything is good, then connection should be successful and you should a new connection in ‘Data Source Explorer’ pane as below (this is a sample):

 

oracle11

Here is how to get SID and database name:

Use below sql to get ORACLE_SID:
(select instance from v$thread;)

Use below sql to get database name (DB_NAME):
(select name from v$database;)
Hope it helps you. Enjoy db object exploration.

 

 

 

 

 

Advertisements