Connecting to two different database instances from a swing application.

Hi All,
I am developing a swing application which needs to interact with two different database instances of two different weblogic servers.
More eloborately,
I have some data in DB_Instance1 running on[b] Weblogic_Server1 and I need to insert the same data into DB_instance2 running on Weblogic_server2. Is it possible. Could some explain me how to do that..
Thanks in advance...
Sreekanth.

Hi Rick,
Try logging onto both Server first. You'll have to use either 2 separate ODBC DSN's or 2 separate OLE DB connections. Set them both for Trusted Authentication, you'll have to configure that on the Server also.Then try your query.
If that doesn't work then you'll have to create a Stored Procedure or View that can link the 2 Server side.
Thank you
Don

Similar Messages

  • EM connecting to two different databases

    How do I connect to a second database?
    I can connect to the first database ...
    then I create a second database...
    but can't find the second database so
    I can administer it.

    You have to use the Grid Control to get connection to several databases from the same application. Although you can get connection to several databases separately with the database control.
    Joel Pérez

  • Connecting to two different databases on different machine ..is it Possibl?

    Hi EveryBody:
    In My application I'm pulling some files from one server to another server useing FTP and then inserting the file data in one Oracle database on UNIX Machine1 and at the same time updating another Oracle database table on another UNIX Machine2 ...Below I posted the method foe database connection, I also provided the code for calling that method twice it works fine for the first database and connect successfully but the second one it hangs ....I don't know why ...
    public void DB_connect(Database db,String dbip,String dbport,
              String dbsid,String dbuser, String dbpass){
    //Conecting to Database
    try{
    db=new Database(dbip,dbport,dbsid);
              db.connect(dbuser,dbpass);
              System.out.println("Connection to Database Successful");
    catch(Exception e){
    System.out.println("Error Connecting to Database.");
    //Calling the method in the main
    DB_connect(db1,db1ip,db1port,db1sid,db1user,db1pass);
    System.out.println("Successfully connected to the First DataBase ...");
    DB_connect(db2,db2ip,db2port,db2sid,db2user,db2pass);
    System.out.println("Successfully connected to Second DataBase ...");
    Thanks in Advance

    Can we display aprogress bar in
    the User Interface till we get the connection
    available ....Yes.
    How ??? You create a second thread that does something. When the connection is established (or fails) it sets a flag so the other thread knows it is time to terminate.
    Can u please provide code
    snippet That I can't do. There are probably plenty of examples in one of the forums that deal with GUIs (which this is not.)

  • Problem connecting to two different databases from form

    Hi all,
    i am using 6i forms which needs to be connected to oracle 9i and 10g databases which is having different ip address(residing in different machines).i can connect to 10g database after configuring tnsnames.ora in my machine but still i cannot connect to 9i database. could anyone tell me what could be the reason.
    thanks
    mish

    Hi Paul.
    thanks for your help. i could able to solve the problem. since there was a change in the ip address (administrators do it sometimes!!) i couldn't connect. now its fine. thanks once again . have a great day.
    thanks
    mish

  • JDBC connection to two different machines from the same program

    I want to use JDBC to connect to two different databases that are on two different MySQL installations on two different machines.
    One of the installations is MySQL 4.1.12 and the other is 4.1.14-nt
    For some reason, all my statements seem to be going only to one machine, even though I am very clearly set it up to go to two different machines.
    Does anyone know whether connecting to two different installations from one program presents any unusual problems?
    Thanks.

    Unless there is some horrible defect in the MySQL JDBC driver (which I doubt!), there should be no problem and like the other poster says, please post snippits of your code so we can see what your doing...

  • Connecting to two database instances from the same TopLink

    Hi,
    We are trying to create a process using BPEL where data from one database instance needs to be passed to the other. The process is compiling properly and we could deploy it in BPEL Process Manager. But when we try to run the process, the data is not getting inserted into the second instance. There is no error /exception being thrown at most of the time, but at times we are getting a 'Unique constraint error' eventhough there is no duplication of data.
    Can we connect to two different instances using the same toplink. How can we achieve this.
    Thanks in advance
    Pratheusha

    You need to use two different sessions with two different mapping descriptors

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • CONNECTING FORM WITH TWO DIFFERENT DATABASES

    HELLO ALL
    Is there any way I can connect to 2 different databases at the same time. What I have is 2 different database for two different payroll systems. Now what I want to do is if user press a button I send some data from this payroll database to second payroll database using insert and update command.
    I am using Form 5, one database is Personal Oracle 7 and second is Oracle 7.3. (I don't think versions matters but anyway)
    Thanks
    null

    Hello,
    Yes u can connect to with several database at a time using ODBC connection and Exex_Sql package supplied with Forms6i as a built-in. There is no Exec_Sql built-in supplied with Forms5, but there is a library named exec_sql.pll (Check it out) supplied with Forms5.
    using this package u can connect with multiple DB at the same time.
    here is an example-
    Declare
    v_ConnHandle Exec_Sql.ConnType;
    v_CursHandle Exec_Sql.CursType;
    v_NumRows Pls_Integer;
    Begin
    v_ConnHandle := Exec_Sql.Open_Connection('Scott', 'Tiger', 'ODBC:DBName');
    v_CursHandle := Exec_Sql.Open_Cursor(v_ConnHandle);
    Exec_Sql.Parse(v_CursHandle,'Select ename From emp');
    Exec_Sql.Define_Column(v_ConnHandle, v_CursHandle, 1, v_EmpNAme);
    v_NumRows := Exec_Sql.Execute(v_ConnHandle, v_CursHandle);
    While Exec_Sql.Fetch_Rows(v_ConnHandle, v_CursHandle) > 0 Loop
    Exec_Sql.Column_Value(v_CursHandle, 1, v_EmpName);
    End Loop;
    Exec_Sql.Close_Cursor(v_ConnHandle, v_CursHandle);
    Exception
    When Exec_Sql.Package_Error Then
    If Exec_Sql.Is_Open(v_ConnHandle, v_CursHandle) Then
    Exec_Sql.Close_Cursor(v_ConnHandle, v_CursHandle);
    End If;
    Message('Error ('| |Exec_Sql.Last_Error_Code(v_ConnHandle)| |') : '| |Exec_Sql.Last_Error_Mesg(v_ConnHandle));
    End;
    hope this help you.
    best of luck.
    null

  • How to add two different database connections on Model

    Hi,
    In my application, I need to create View Objects on different databases. So I need to add two different database connections on the Model.
    But it seems like Model can be connected to only one database. I tried adding another project to add the second db connection. But after I created a read-only View Object in the second project, it didn't generate corresponding data control in the Data Controls panel.
    Could anyone help me on this?
    Thanks!

    Do you mean adding the second project folder in ViewController->Project Properties->Libraries and Classpath?Yes, either that or: ViewController -> Project Properties -> Dependencies
    And I didn't see the first Model project in the ViewController classpath. Otherwise it wouldn't work. The first model project IS in 'classpath'. Here's how:
    ViewController -> Project Properties -> Dependencies
    I tried this and recreated the View Object. Still didn't generate the datacontrol. No idea why you had to recreate the VO.
    Is your VO in an application module inside the SECOND project?
    After you are sure that everything is in the ViewController's classpath, just try restarting JDeveloper.
    This is very basic. has to work.

  • Accessing two different wls instances in Apache

    Hi!
    Does anyone know if it is possible to connect to two different instances of wls
    5.1 sp 6 (same IP, different ports) from an apache front-end under the same <VirtualHost>-instance,
    using mod_wl_ssl.so?

    Thanks for your reply.
    It's not the CuCo being initial but my attribute and the collection wrapper of the value node has only one entry, the empty one which is added in the INIT-method of the context node. So it feels like a second instance of my CuCo as inside the other view I have my collection, attribute etc.
    This is my coding to get the CuCo:
    DATA: lr_cucosearch       TYPE REF TO   zl_iccmp_bp_cucosearch_impl.
    lr_cucosearch ?= get_custom_controller( 'ICCMP_BP_SEARCH/CuCoSearch' ).
    This coding I use in both views. This is wrong? I debugged and it looked like it would search for an instance and then return it instead of creating a second one.
    Am I mistaken?
    Thanks.

  • Connecting to two different SQLServers present on different Locations

    Hi,
    How can i connect to two different SQL Servers which are at different locations in the same session? IS there any way to do this without disconnecting from the first server?
    cheers,
    Sachin

    Well,
    actually my problem is that im reading Database
    e Properties through a file which contains multiple
    database entries. And i have only one Connection
    Object so if im logged into one ex SQLServer in
    London, I have a class which will allow me to loginto
    another database SQL Server at New York. Now how do i
    keep my connection as well as connect to New York
    Database Server with the same Connection Object. If
    possible, I need to logoff from the Server at London.
    How do i do this? Any Ideas?Redesign. You have a connection object that can only have one connection. Either you have to close that connection and reconnect to the other one, or you need two of them. Those are your choices.

  • Can I use two different database with DBSystemLoginModule?

    Finally I can login with Database user id by DBSystemLoginModule on Embedded oc4j server.
    But I confused between [b]jazn-data.xml and system-jazn-data.xml.
    Which xml do I have to edit for jdbcUrl and jdbcDriver?
    Now I would like to use two different database(such as only sid is different).
    In this case I want to show specific database name as realm name.
    What should I do?
    When I use DBSystemLoginModule, I edit JdbcUrl in system-jazn-data.xml.
    So can I pass the parameter for sid programmatically?
    And also I tried to run my application with other database with DBSystemLoginModule on Embedded oc4j server.
    I changed few things(jdbcUrl at system-jazn-data.xml,jazn-data.xml in embedded-oc4j-server/config and database connection for BusinessComponents at Project Properties of Model/ViewController.
    But I got some error.
    Did I miss something?
    ----< my error messgae >------
    500 Internal Server Error
    JBO-30003: The application pool (customer.model.datamodel.CMAppModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)     Message was edited by:
    Message was edited by:
    sdcsdc

    I think I understand now, you are modifing the custom login modules configuration within the system-jazn-data.xml file. This is a bit dangerous! Didn't you register the login module in your orion-application.xml? For example, this is the way I do it:
    <web-module id="customProv-web" path="customProv-web.war" />
    <persistence path="persistence" />
    <!--data-sources path="./data-sources.xml"/-->
    <security-role-mapping name="sr_developer">
    <group name="developers" />
    </security-role-mapping>
    <security-role-mapping name="sr_manager">
    <group name="managers" />
    </security-role-mapping>
    <jazn provider="XML">
    <property name="custom.loginmodule.provider" value="true"/>
    <property name="role.mapping.dynamic" value="true"/>
    <property name="role.compare.ignorecase" value="true"/>
    </jazn>
    <!-- Configuring a Login Module in an Application EAR file. -->
    <jazn-loginconfig>
    <application>
    <name>customProv</name>
    <login-modules>
    <login-module>
    <class>oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule</class>
    <control-flag>required</control-flag>
    <options>
    <option>
    <name>data_source_name</name>
    <value>jdbc/OracleDS2</value>
    </option>
    <option>
    <name>roles_fk_column</name>
    <value>userName</value>
    </option>
    <option>
    <name>table</name>
    <value>userinfo</value>
    </option>
    <option>
    <name>groupMembershipTableName</name>
    <value>groupinfo</value>
    </option>
    <option>
    <name>groupMembershipGroupFieldName</name>
    <value>role</value>
    </option>
    <option>
    <name>usernameField</name>
    <value>userName</value>
    </option>
    <option>
    <name>user_pk_column</name>
    <value>username</value>
    </option>
    <option>
    <name>passwordField</name>
    <value>passWord</value>
    </option>
    </options>
    </login-module>
    </login-modules>
    </application>
    </jazn-loginconfig>
    <log>
    <file path="application.log" />
    </log>
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="administrators" />
    </security-role-mapping>
    </namespace-resource>
    </write-access>
    </namespace-access>
    </orion-application>

  • How to handle transactions when two different databases are involved.

    consider two tables namely Table-A and Table-B part of two different databases namely ORACLE and MYSQL.
    Now the project requirement is updating the Table-A(ORACLE) and Table-B (MYSQL) as one transaction. i.e. either update both the tables or rollback both the tables.
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.

    NareshAnkuskani wrote:
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.No, that is not true.
    But anyway, you need to use distributed (XA) transactions. i believe that the latest version (5.0) of mysql actually has support for XA transactions. you need to use a to setup a distributed transaction and attach the connections for the two databases to that transaction. then it should function as you desire.

  • Synch Between Tables in Two different Databases

    Synch between Two Tables in two different Databases.
    I have two identical tables, table T1 in Database D1 and table T1 in Database D2. User can insert/update/delete/select from both of these tables in respective databases. Being said that how can keep them in Synch? Any thing added/modified/deleted should reflect in other. We like this to be Real-Time.
    We are thinking of creating a cross (two way) DB link between them and then update/insert/delete both the tables when changing one. Any suggestions?
    Thanks

    One of my colleagues used snapshot in their previous projects, but he told me that the performance of it wind down while the records in tables increase. I have no idea about the exact situation, but I'm believing we'd think twice about it.
    eilison
    [email protected]

  • Comparing Tables In Two Different Databases

    Hi,
    As part of our project, we need to perform table comparisons in two different databases. I am currently looking for various options to accomplish this.
    One of them is doing minus operation between these two tables.
    Also, i have looked at the data compare option in toad utility.
    Please suggest me any other options that makes my job easy.
    Thanks in advance,
    Sue

    Then just adapt the select that is there
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1)  count(src2)
       order by stid;Best regards
    Mohamed Houri

Maybe you are looking for

  • Error message -70012 A valid DVD drive could not be found.

    For several months now we cannot use the DVD player. After inserting a DVD- new or otherwise, it makes a bit of noise, then spits the dvd back out. Help needed for non tech-savvy person please!

  • Do Leopard icons increase the file size?

    In programs like Photoshop you have the option of including a preview or a thumbnail icon for the image you're saving. This is important to know because, if you are making a web page or trying to fit as many files as possible on a disk, you want the

  • Overwrite material BOM component

    Hi, I am trying to over-write the component of a material BOM with another component in the same position. I am using FM CSAP_MAT_BOM_MAINTAIN for this. I am passing values to the the below parameters. MATERIAL                            H.1013.2476

  • How to Convert SMO Date property to a SQL DateTime

    Hi, I am retrieving the SMO Database CreateDate property and trying to insert this into a T-SQL DateTime column.   The following is a sample of Powershell code to retrieve this property: $serverA.Databases[0].CreateDate  The format of the CreateDate

  • Display trouble on OSX

    Hello, I have a bug on OSX. Check this video: http://www.youtube.com/watch?v=iJe1V7wbQg0 I have a white macbook 13". Core duo 2ghz. Intel GMA 950 (0x27a2) I think it's because of the configuration or inter graphic card driver but i don't understand w