The following post is not a hack. It just describes the method which is used by Oracle EBS to connect to APPS schema without providing username and password.
The method will work only with Oracle Application EBS environment. Standalone Oracle databases have nothing to do with it. Also you need to understand that this method is for obtaining JDBC Connection object only
Lets start straight with a code, because it is very simple.
public class ConnectionToApps
public static void main(String args)
String dbcFile = "Enter Here The Path To Dbc File";
AppsContext ac = new AppsContext(dbcFile);
_conn = ac.getJDBCConnection();
Only 4 lines of code.
But the trick is to get the path to DBC file.
It is also simple. DBC files are located under $FND_SECURE directory (if connected to the server with application owner OS user)
Bellow is the shell example
Obviously the correct file is DVIS12.dbc. But many times there are a lot of files in this directory. So how do you know the correct one.
It is also not a problem. The file name (without .dbc) always can be found by looking into “Applications Database ID” profile in EBS or by just running the following query
select fnd_profile.VALUE('APPS_DATABASE_ID') from dual
To summarize it , the path is $FND_SECURE/ + select fnd_profile.VALUE('APPS_DATABASE_ID') from dual +/.dbc