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.
1. Download oracle ojdbc6.jar from oracle site and save in your local drive:
2. Open RAD in administrator mode (right click on RAD icon and choose ‘Run as Administrator’). Go to Window > Preferences:
3. From Preferences, go to Data Management > Connectivity > Driver Definitions. Then on right pane select Oracle from the drop down list:
4. Click Add button on right:
5. On ‘Specify a Driver Template and Definition Name’ page, select Oracle from the Vendor Filter drop down list:
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:
7. Go to JAR List tab and add the jar file that was downloaded in step 1:
8. Now change to ‘Database Development’ perspective in RAD or go to ‘Data Source Explorer’. In Data Source Explorer, right click on ‘Database Connection’.
9. On ‘Connection Parameters’ page, select ‘Oracle’ on left and then select ‘Oracle This Driver’ (or whatever name you provided in step #6):
Provide connection values on right according to your settings. Here is a sample setting:
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):
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.