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.)

Similar Messages

  • Having trouble connecting SQL Developer to database on LINUX machine

    Having trouble connecting SQL Developer to database on LINUX machine
    Hello,
    I am trying to connect my windows 7 home premium machine to an oracle database 11g on a RedHat 5 machine using SQL Developer. i got this error message on SQL Developer
    Status : Failure - Test failed :The Network Adapter could not establish the connection
    on Linux
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date                03-APR-2013 16:13:13
    Uptime                    7 days 22 hr. 16 min. 41 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/product/11.2.0/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.X.X.X)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "orc11g" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    Service "orc11gXDB" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    Service "orc11g_XPT" has 1 instance(s).
    Instance "orc11g", status READY, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL> and TNSPING
    tnsping 172.x.x.x
    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 11-APR-2013 14:32:17
    Copyright (c) 1997, 2005, Oracle.  All rights reserved.
    Used parameter files:
    /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
    Used EZCONNECT adapter to resolve the alias
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=172.x.x.x))(ADDRESS=(PROTOCOL=TCP)(HOST=172.x.x.x)(PORT=1521)))
    OK (0 msec)
    [oracle@ltebilling ~]$Tnsnames.ora On Linux ,
    ORC11G =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orc11g)
    )Listner on Linux ,
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x.x)(PORT = 1521))
    )/ect/hosts Linux ,
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1               localhost.localdomain localhost
    172.x.x.x             LTEBillingand there is no problem of ping linux from windows
    Edited by: user11309581 on Apr 11, 2013 3:16 PM

    yes really i'm already enaple the port 1521 and SELINUX=disabled
    [root@ltebilling ~]# /etc/init.d/iptables status
    Table: filter
    Chain INPUT (policy ACCEPT)
    num  target     prot opt source               destination
    1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0
    Chain FORWARD (policy ACCEPT)
    num  target     prot opt source               destination
    1    RH-Firewall-1-INPUT  all  --  0.0.0.0/0            0.0.0.0/0
    Chain OUTPUT (policy ACCEPT)
    num  target     prot opt source               destination
    Chain RH-Firewall-1-INPUT (2 references)
    num  target     prot opt source               destination
    1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
    2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
    3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
    4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
    5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
    6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
    7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
    8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:1521
    10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
    11   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibitedbut from windows system when i'm try tnsping i got this error
    C:\Windows\system32>tnsping orc11g
    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-APR-2
    013 14:44:09
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    Used parameter files:
    D:\app\ubai\product\11.2.0\dbhome_2\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.x.x
    .x)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orc11g))
    TNS-12535: TNS:operation timed out
    C:\Windows\system32>

  • Running different databases with different users OpenVMS?

    Hi,
    We run a few databases 9.2.0.5 in OpenVMS 8.2.
    Is there any problems running the different databases with different accounts?
    Anything to think about, more than to create a different account with same credentials as the original ORACLE user?
    BR
    BjörnR

    Hi,
    I'm not sure if I understood your question, but from my experience I can tell that YES, you can have different accounts - belonging to the same DBA group - on different oracle installations and this can be the case even if you're running a cluster.
    Hope this helps.
    Regards,
    Naveed.

  • How to run two different databases on different ports?

    I just created a second database on my machine with SID=B on which there was already a database with SID=A.
    Currently, the listeners for both DB instances work on the same default port 1521. How can i configure my Oracle instances so that the listener for A remains on port 1521 and listener for B listens on port 1531? I am new to database stuff so this might be a dumb question. Apologies in advance!
    Jimit

    Jimit wrote:
    I want it because when i am trying to create an informatica repository on database B, i am getting the error
    TNS 12154 - could not resolve the connect identifier specified.
    And what research led you to believe that creating another listener was the solution?  With a 12154, the request never left the client process .. it never got to the listener for the listener configuration to even matter.
    see: http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/ (ora-12154 TNS:could not resolve the connect identifier specified)
    The Listener service for database B is up and running, i am able to connect to database B through cmd and the tnsnames.ora file also has the TNS entry for database B.
    See the many previous comments regarding multiple listeners or listeners "dedicated" to a specific database.
    When i try to create my Informatica repository on database A which i installed earlier, it succeeds, however i cannot use database A because of certain restrictions.
    And what are those "certain restrictions"?  How can someone help if you hide the parameters under which you are working?
    Since there is no difference in database A and B except the SID, and the user ids i am using to create the repository have same privileges, i could not think of any other option.
    I can think of another option.  "Work the error message".   If you would research ora-12154 (tns-12154) you would find it has nothing whatsoever to do with listeners.
    Hence, do you think i should go for different ports for both listeners? Maybe it can help.
    It won't help.  It will just make matters worse.

  • Reuse Dimdate across different database for different data models

    Hi,
    I am designing a new data model for a data mart. I need to add dimdate dimension in this data model. I noticed that dimdate already exists in another database and being used by another
    data model. Is it possible to re-use the existing dimdate table for my new data model? If so, what about the foreign key constraints? Normally we link the date columns from fact table to the dimdate keys. How would we achieve that in case we are using the
    same table across different databases?
    Any opinion on this will be highly appreciated.
    Thanks in Advance.
    Cheers!!

    You can create a copy of dimdate table to your new data warehouse.
    If both data marts were in a single data warehouse, then you don't required to copy. but as these are in two different databases then you just copy that.
    regarding FK relationship. you can connect any fact table to you date dimension. even if you want to use more than one instance of your date dimension, it would be simply adding multiple FK columns in your fact table (role playing dimension).
    For date dimension be sure that your date dimension covers most of the attributes required. here is an example of date dimension:
    http://www.rad.pasfu.com/index.php?/archives/156-Script-to-Generate-and-Populate-Date-Dimension-Version-2-Adding-Multiple-Financial-Years.html
    Regards,
    Reza
    SQL Server MVP
    Blog:  
    http://rad.pasfu.com  Twitter:
      LinkedIn:
    SQL Server Integration Services 2012 Tutorial Videos:
    http://www.radacad.com/CoursePlan.aspx?course=1

  • Connecting to 2 Oracle databases on different port

    Hi,
    Oracle Version : 11G
    Database SIDs : test and testnew
    Listener name: LISTENER
    Port number: 1521
    Net Services name: TEST and TESTNEW
    I opened ./netca and I was able to test the service TEST successfully. But when i try to test the service TESTNEW, i get the error
    ORA-03135: Connection Lost
    How do i solve this.
    Iam new to Database handling. Please help me...
    Thanks in advance.

    o/p: tnsping testnew
    TNS Ping Utility for Linux: Version 11.0.0.1.0 - Production on 19-MAR-2013 04:50:28
    Used Parameter files:
    /data/ora/oracledb/product/11.2.0/db_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    (HOST = ----myip---)(PORT = 1522))) (CONNECT_DATA = (SERVICE_NAME = testnew)))
    OK (0 msec)
    o/p: lsnrctl status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=---myip---)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date 19-MAR-2013 02:17:22
    Uptime 0 days 2 hr. 39 min. 8 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /data/ora/oracledb/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File /data/ora/oracledb/diag/tnslsnr/MA35ITLAB03/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=---myip---)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=---myip---)(PORT=1522)))
    Services Summary...
    Service "testnew" has 1 instance(s).
    Instance "testnew", status READY, has 1 handler(s) for this service...
    Service "testnewXDB" has 1 instance(s).
    Instance "testnew", status READY, has 1 handler(s) for this service...
    Service "test" has 1 instance(s).
    Instance "test", status READY, has 1 handler(s) for this service...
    Service "testXDB" has 1 instance(s).
    Instance "test", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • Different database in different languages....

    Hi Experts,
         I am facing an unusual problem.In my project,there are two languages English & French.I am doing the coding by logging in English.But the database maintained for the same query in French is different.Now the testing is being done in French.How can i take care of this?Good answers will be suitably rewarded....

    Hi Shaheen,
       Normaly databse values are mentained in same table, and if there is requirement of maintaining texts or values in different languages then there is always a laguage key in database table.
    in your case as you have specified that there are two different tables , then u need to eitherfind a function moduel which automatically checks for language and do the required data fetch from tables.
    or if you dont  find any such function module then you have to code different select statements for each language.
    you can check the laguage using system field sy-langu to get the language then call appropriate select statement.
    hope ths helps
    award forum points to helpful answers

  • How to connect to an Oracle database on one machine from another client machine?

    I installed oracle database 11g (server and client) on one machine. It works perfectly. Then I installed oracle client (ODTwithODAC1120320) in another machine. Now I want to connect to the database of the previous machine. I tried to connect but It failed. I think .ORA files should be configured. What should I do to fulfill this.
    thanks...

    thank you for the quick response..
    this link Installing Oracle Database Client for oracle client installation. But the content refers all oracle database installation. could you please get know me that oracle client means only the OdtWithODAC or some thing else? This link Installing Oracle Database Client explain but not the OdtWithODAC. Please let me know clearly.
    Please let me know the exact name of the software that I should download from the oracle website that refers the oracle database client.
    thanks
    Priyashantha hp

  • Different databases for different local repositories

    Hi Experts,
    we configured a local repository with a database from Oracle 11g , which is using by user "Administrator"
    I want to create 5 designer users.Can we use databases from SQL server as local repositories for this users?
    Will there be any impact when sharing /using central repository .

    Hi Sathish,
    Understand the concept,
    RFC Program ID will connect BODS and BW and this will be available whole DS.
    Datastore for BW will be created under particular repository and available only on particular repository
    A central repository is an optional component that can be used to support multi-user development. The central repository provides a shared object library allowing developers to check objects in and out of their local repositories. i guess, it may be helpful for you.

  • How to migrate files from different databases to sharepoint 2013?

    Hello everyone,
    I need to migrate files of various formats from two databases to SharePoint 2013 ? How should I pursue? Please explain..
    Scenario : Two different databases on different systems have loads of files. I need to migrate them to SharePoint?
    Any suggestions/ Answers

    Hi,
    You need to copy the database into your network shared folder or SharePoint Server where you wanted to attach this content DB to your newly created web application.
    Hope and Afraid,
    Same Domain has been used. I mean if you move the content db from the server 1 which using the AD1 for authenticate the users,
    So your new server 2 and web application must have configured to authenticate the AD 1 users.Otherwise user not found exception will be thrown. 
    If not  still you can change the site collection administrator for the site which is migrated from the server 1.
    Murugesa Pandian., SharePoint 2010 | MCPD | MCTS |Configure

  • Form in a different database

    Can I create a form region based on a table that residedes in a different database?

    Yes, it should be possible.
    You need te create a databaselink, and have access-rights to the data you want to show in your form.
    Suggestion: search on this forum with "databaselink"
    Hope this helps.
    Leo

  • Using two MySQL databases at once

    I have a situation where one PHP page needs to access two
    MySQL databases
    for different functions (it's in integration thing). I don't
    think I can
    combine the databases because two different programs are set
    up and using
    them separately. Is there a way to do this without PHP
    getting as confused
    as it's getting? Obviously I'm no MySQL and PHP expert.....
    Mad Dog

    David Powers wrote:
    > Mad Dog wrote:
    >> That's the problem, both of these are programs that
    automatically
    >> set up their own MySQL databases and make the
    connections (Wordpress
    >> and EasyPHPCalendar), so it's not so easy to control
    the
    >> connections. Each works fine, but if I call the
    calendar from within
    >> Wordpress, it doesn't know to switch to another
    connection and gets
    >> all confused.
    >
    > It sounds as though one or both of those applications
    has been badly
    > set up (although not necessarily by you - it's more
    likely the way it
    > has been designed).
    >
    > Most programs, including Dreamweaver, use the original
    MySQL extension
    > within PHP to connect to MySQL. Specifying which
    connection to use is
    > optional with the original MySQL extension; if no
    connection is
    > specified, PHP uses whichever was opened last. To use
    two separate
    > connections, the correct connection must be specified.
    Dreamweaver
    > does this automatically. You need to look at the PHP
    code in
    > WordPress and EasyPHPCalender to see if either of them
    specifies the
    > connection. The easy way to tell is by looking at any
    line containing
    > mysql_query(). If it contains two arguments, the
    connection is being
    > properly specified. If it contains just one, that's the
    program
    > that's causing the problem.
    I think I've got it. There might be other tweaks needed, but
    I moved the
    EasyPHPCalendar table into the same database as the Wordpress
    table. With
    luck (I'll know tomorrow when I mess with it) that should cut
    the confusion
    factor!
    Thanks,
    MD

  • How to configure connectivity between two vm linux hosts

    Hello All,
    i have installed vm workstation with two RHEL4 linux installation.
    Node 1:RHEL4
    Node 2:RHEL4
    i have configured 2 ethernet cards am able to ping in a host but not each other.
    i have tried to ping from Node 1 to Node 2 am getting icmp_seq=0 Destination Host Unreachable .....
    kindly suggest how to configure connectivity between two host permanently.please explain with example if possible. or suggest any link.
    thanks,
    Mike.

    1003614 wrote:
    thanks for quick reply ....Oracle vm workstation 4.2 am using.
    ... then your post is now moved to the appropriate forum space for your question (Oracle VM for x86).

  • 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...

  • 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.

Maybe you are looking for

  • I am done editing in Develop; how do I save edited images for web?

    I get the import and development options in Lightroom but I was told by a LR representative when I called for assistance that LR does not retain any data.  So, if I import photos from my camera (NEF files) and edit in Develop; where do I save the edi

  • TS4006 icloud is not showing up in my system preferences.

    I cant see iCloud in my computer and i have the latest updates. What do i do??

  • So my Psychotic now Ex-Boyfriend locked my Macbook Pro using " Find my iPhone"

    I need to ask how to get my Macbook unlocked. My now Ex-Boyfriend decided since I broke up with him, it was a good idea to Hijack my Macbook Pro and lock it with the 4 digit pin number. I just got to my mothers house and I am now trying to figure out

  • Related to website

    hello, want to know once i create the registration form how do i take them to a new page like this website or facebook or a amazon that once people register they have there own page and can design there page and also have different categories and stu

  • Many pages broken after db9206 and as9041 patch

    We are running HTMLDB 1.5. We just patched our db from 9205 to 9206 and our as from 9040 to 9041. After the patches many of our HTMLDB screens (and many HTMLDB builder screens) are broken. Many screen widgets (dropdowns, buttons,etc) are returning pa