Multiple Database Connectivity

How do we establish connectivity to multiple databases from within one Java Application. And how do we so without any File DSN? We are developing an application which requires dynamic changing of databases located at remote locations. Please help.

you can use a properties file to load the DB details on runtime based on the criteria.
Just put your DB details in a TEXT file and store it as .properties file. You can read it using any input methods from java and pass the parameters to your connection.
Hope this helps.Cheers,
Sekar

Similar Messages

  • Multiple DataBase Connection in a Single Form

    hi all
    Is it Possible to have Multiple Database Connection With a Single Form
    Block a : Retriving data from a database Service a/Schema A.
    Block b : Retriving data from a Remote Database Service b / Schema B.
    If yes how to do this.
    regards
    jai
    email:[email protected]

    Sure you can access a database this way,
    but can you base a block on this database connect? No you can't.
    Frank

  • Multiple Database Connections

    Trying to develop a functionality wherein we can view data of a remote database (not the database instance where APEX is installed) using the Report.
    As APEX doesnot support multiple database instance access from a single workspace/applciation.. any workarounds .. I'v used dblinks previously.. but was on a lookout for a more roboust solution..Dont find db links a reliable opiton.

    Hi,
    how about delving into the wonderful world of Web Services and XML?
    APEX is quite powerful in that realm.
    Of course WS adds a little overhead to communication and is a bit slower than a database link, but there are lots of benefits on the other hand. In my opinion it's the perfect option if you plan on loosely coupling your applications (not only APEX - ask the Java folks :-)
    It always depends on what your expectations are concerning "Quality of Service". A typical APEX page wouldn't load like a million of rows and therefore Web Services might be the right way.

  • Multiple Database Connections in ADF?

    Hi,
    For school we have a project. The goal of this project is to create an application that can generate business rules in PL/SQL. The application must be build using JDeveloper 11g 11.1.1.3.0 with ADF and must be a swing application. We didn't have very much experience with ADF swing.
    Within this swing application you must enter the data which is needed to connect to the specific database. When you connect, it will get all the metadata of the connecting database/schema, because we can create a user friendly UI which shows the tables and when saving this it must be stored into another database (repository). So we only need the first connection to get all the data, then the connection could be broken. The second connection is more important, because we nee to save the data to the repository.
    Both databases are Oracle databases.
    I have been looking how we can achieve this, but with no result (I saw a solution like this: How do I use dynamic credentials in a J-Client App? but don't now how to implement it.)
    Thanks in advance

    The ADF model layer usually takes care of handling instances of you Application Modules, and here, you are doing it manually. This brings some risk, and be careful to release the Application Module after use.
    More Information:
    Link: http://jdeveloperandadf.blogspot.com/2011/02/adf-application-with-multiple-data.html
    Edited by: user12968134 on Feb 27, 2011 7:32 AM

  • Using Java within a stored proc to access multiple database connections

    Hi List;
    We have an environment where we have needs to provide cross database visibility between Oracle, Sql Server and PostgreSQL. So we need the capability for Oracle to query PostgreSQL and Sql Server tables, PostgreSQL must be able to query Oracle and Sql Server tables and Sql Server must be able to query Oracle and PostgreSQL tables.
    I'm thinking that we can implement stored procs which are either written in java or call a java process . The java code in turn should be able to connect to any DBMS desired via JDBC query the tables in question and return the result set to the calling database.
    Any thoughts on how feasable this is would be appreciated. Does this seem like a solid solution? Any initial concerns or red flags? what about performance via JDBC?
    Thanks in advance for your help.

    John,
    from your description I understand that you essentially program the VO yourself. So I suggest that you read chapter 35.9 of the 'Fusion Developer’s Guide for Oracle Application Development Framework' (I guess you know where to find it). Since you still call the actual SQL not all of the chapter apply, but you get the idea how it works.
    And yes you analyzed the behavior correct. executeQueryForCollection() is allways called bevore getQueryHitCount().
    Timo

  • Problem about financial reporting studio(assign multiple db connection)

    Hi,
    I need to assign multiple database connections to a grid in Oracle Hyperion Financial Reporting Studio
    To do this, I performed the following steps:
    - Open a report.
    - In a grid, select one column for which I want to change the database connection.
    - In the Column Properties sheet, click the Select Database Connection button, .
    - In the Select a Database Connection dialog box, select a database connection from the Database Connection drop-down list, then Click OK.
    - In the Map Dimensions Between... dialog box, map dimensions between the default database connection and the selected database connection. I do this by selecting a dimension from the pull-down list in the right column for each dimension in the left column.
    - Optional: Select an alias table for the new database connection.
    - Click OK.
    But after last step I have received next error:
    *; nested exception is:*
    java.lang.NullPointerException
    Can someone explain the source of this error?
    And help me please solve this problem because I didn’t receive figures in that column where I changed database connection.
    Thank you in advance!

    I'm sure that both DB connections has the same dimension hierarchy. I can open the repot, but in it I don't see figures in that column where I've changed database connection...

  • Multiple database in the same ADF application

    In my application I have to access a legacy database, in addition to the main database. How do I handle multiple database connections. Do I need to manage the JDBC connection to the legacy database myself.
    Pranab

    Use an AM for each dataconnection and then share the AMs so then can see each others datamodels.
    Or you can use jdbc in your code to access the databases.
    If would be nice if the adf had a way to connect to any data source set up in the configuration and app server on the fly.

  • Multiple db connections for one report

    Hi all,
    I am using Oracle Reports 10g R2. Could someone tell me if Oracle Reports supports multiple database connections for one rdf file, like this (using servlet)
    http://your_web_server:port_num/reports/rwservlet?server=server_name&report=myreport.rdf& userid1=username/password@my_db1&userid2=username/password@my_db2 &desformat=pdf&destype=cache
    I am asking this question because my report needs data from two separate Oracle databases.
    Edited by: user12239004 on Apr 27, 2010 2:14 AM

    No, you can only have one login.
    However, this is simple to resolve by creating a database link in one database to the other database.

  • ODI database connection - session question

    Hi,
    I have a package, where I have used a procedure.
    In my procedure, I open a database connection.
    My question is - In my next procedure - will I be able to use my same database connection which I created in previous step?
    Re-phrasing the question - for any number of database transaction happening in a package, will ODI opens multiple database connection per step or will there be only one single database connection?
    Thank you,
    Paras

    I believe its one per session so one connection inside the package. I think you should be , although i have not tried it practically.

  • Connection to multiple databases using a single EJB

    How can I connect to multiple Databases (using @PersistenceContext) using an EJB?
    Did I need to connect various Entity Managers corresponding to the each database and simply send my Queries?
    I am using Glassfish Application Server
    Netbeans IDE
    Java Derby Database
    Oracle Database
    Java Persistence API
    Thanks in Advance

    Yes, you need a persistence context and thus entity manager per database. Depending on what you want to achieve you may also need to go to the next level in your skill set and learn all about distributed transactions.

  • Application that connects to multiple databases.

    I am developing an application that performs many task, but one in particular is connecting to multiple databases and creating user accounts in each all with the push of a single button. I have tried putting connect statements in the trigger code but I don't get the desired results.
    How would I get my application to switch database connections while in execution?
    Please reply to the forum, or email me @ [email protected]
    Thank you.
    Travis

    Hi
    The only possible way which I could find for your requirement is that of DB Links. Establish DataBase Links among the multible databases, with which you want to work in one session. Peform all your actions through the DB Links.

  • Does BO 4.1 enable universe to connect to multiple database?

    Using BO 3.1, we can only connect an universe to single database. However, with BO 4.1 will it be possible to connect a single universe to multiple database?
    Regards
    Vinay

    Vinay, You can connect Universe to multiple databases using IDT (Information Design Tool). Find the below link for reference.
    SAP Business Objects Multi Source Universe - Information Design Tool - YouTube
    Regards,
    Sujitha

  • Including multiple databases per connection

    I have linked tables accross multiple databases and would
    like to include all applicable tables (from multiple databases) in
    a single dreamweaver database connection. Is this possible. I can't
    put all tables in a single database because one of the databases is
    a mirror of a quoting application and gets backed up to regularly
    which is why I need to keep intact.

    >microsoft access, is this what you are asking
    Yes, that is what I was asking. But I really don't know the
    answer for MS Access as I've never tried. I've worked with linked
    tables in Access, but not from ASP. Why don't you just give it a
    try. It should take a few minutes to test.

  • Connecting to Multiple database

    Hi how could i use Dreamweaver CS3 to connect to multiple
    databases in phpmyadmin?

    Maneet Puri wrote:
    > Hi,
    >
    > I have used a lot the extensions of Dreamweaver for
    implementing various
    > dynamic features with connectivity to MySQL databases,
    and I don't think there
    > is any extension which allows connecting to the multiple
    MySQL database. To do
    > this you will have to make changes to scripts, at one
    point of time from one
    > script in one instance there can just be one connection
    to one MySQL database,
    > what you can do is switch between the users and database
    of mysql. PHP offers a
    > function mysql_change_user() to switch users and connect
    to various different
    > MySQL database.
    What is stopping you from having more than one database
    connection
    string? You can select the connection from each behaviour
    that needs
    different databases.
    Or is then intent to combine the data from 2 database into
    one recordset?
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • JDBC  - Connecting Multiple Databases

    Hi JDBC's
    I would like to know if it is possible to retrive a data from different tables and from different databases using a single query, which mean can I retrive data from multiple tables multiple databases in a single JDBC connection?
    If not, How do I implement it?
    Any Ideas or please point me to any related solution if you have.
    Thanks.

    Although theoretically possible in fact a single JDBC connection cannot work with several databases. To implement this feature somebody has to write another aggregating JDBC driver which parse SQL statement and work with other databases in background. I like this idea, but currently there is no such driver available.
    Scriptella ETL (http://scriptella.javaforge.com) offers an interesting solutions for cross-database operations. See example on how -to copy a table from oracle to hsqldb: http://snippets.dzone.com/posts/show/3511
    If you want to join 2 tables from different databases and copy the result to a third database use the following code:
    <query connection-id="db1">
    SELECT * FROM Table1
    <query connection-id="db2">
    SELECT * FROM Table2 WHERE Table2_ID=?Table1_ID
    <script connection-id="db3">
    INSERT INTO Table3 VALUES (?rownum, ?Table1_Field, ?Table2_Field);
    </script>
    </query>
    </query>
    Message was edited by:
    ejboy

Maybe you are looking for

  • :( Second R/3 S/M configuration error in content administrator  :O

    Hi I have a WebAS 640 Java Preview installation.  I have successfully configured two R/3 system in SLD.  But when trying to create the corresponding JCo connections in the content Administrator, it works only for one R/3 system.  It does not even pin

  • Median Filtering using JAI

    Hi, I am not so familiar with JAI API but I do use some of it sometimes in my coding. I am trying to figure out why I keep receiving the same error message when applying MedianFiltering to my image as in the following code snippet: public BufferedIma

  • How to expose event handlers of the TextBox in a NumericUpDown?

    The NumericUpDown control contains a TextBox object that I have exposed by creating a class that inherits from NUD and references the TextBox as the second control in the Base class, like this: Public Class clsNumericUpDownExt Inherits NumericUpDown

  • Getting count from ldapseaarch results

    Hi, I am using Netscape Directory Server 4.16. I am using ldapsearch command to search for specific attributes. When I execute ldapsearch I am getting the results properly. I would like to know how to get the result count instead of results. At the e

  • My ipod touch fourth generation keyboard and unlock button are not working

    my ipod touch fourth generation was working at one moment and then when i went to unlock the screen and type in the passcode it would not let me swype the unlock button and when i turned it off and back on again and the passcode section popped up it