3 Replies Latest reply on Jul 1, 2014 8:57 AM by amrit_pandey-Oracle

    Not able to access db account at the remote host from the local db account from java application using database link.


      Hello Everyone,
         My project access data from different database account to run datamining and produce statistical results. Previously all the account used to be created and populated on one machine. Now the decision is to create and populate commonly used or accounts having huge data on a common machine and  access the data remotely from the local database account in the application.
         Let us assume the following scenario:
      1.    the application is using 3 db accounts i.e. acc1 , acc2 and acc3.
      2.    acc1, acc2 are present on say Machine1 and acc3 is having common data which will be used by multiple deployed applications and has been created on Machine2.
      3.    acc1 is the primary db account to which application connects.
      4.    acc1 has been granted permission to connect to acc2 through proxy authentication/Authorization so that application can access data in acc2 through acc1 (ofcourse locally)
            i.e.  ALTER USER acc2 GRANT CONNECT THROUGH acc1
      5.    To access the data , application sets up connection with database accounts (configuration) and imports/retrieves the data.
         Now , the requirement is to access the acc3 which is on remote machine.
      Things, I have tried:

      1. I have created a Database link in acc1 to access acc3 on the remote machine.
          USING 'ORCL_REMOTE';

      WHERE ORCL_REMOTE is the entry in tnsnames.ora to connect to the remote data base where acc2 has been created.

      Application sets up the connection to acc1 (local), when we want to import configuration at remote host application tries to search the account/configuration name on the local database and fails to find it.  Even if the acc1 has dblink 'LOCAL_ACC1_REMOTE_ACC2', I am not able to make application search the account at the remote host. Your kind suggestions will be of great help!!


      Please let me know if any other option apart from Database link can be used in this scenario.

      Please let me know if any point is not clear.

      Thanks ,