Connection Between Two Databases

Hi,
I have two databases called DBS1 and DBS2. Both are in one system. I need link between these two databases. I want a query as follows.
select * from cust@DBS2; # from DBS1
select * from temp_cust@DBS1; # from DBS2
Is possible link between DBS1 and DBS2.
Can any one tell me how to link these two databases each other.
Best Regards,
Nilopher.
null

Nilopher,
You can connect to two different Oracle databases by creating a database link. When you say that both databases are in one system I assume you mean two databases on the same server. To create a database link you can do the following:
While logged onto DBS1:
create database link dbs2
connect to username identified by password
using 'dbs2.world'
Username and password are the user and password you want to connect as in dbs2.
If you want everyone to be able to access the database link you can say create public database link... otherwise only the user that created the database link can use it.
This should work assuming the database server tnsnames.ora file looks like this:
dbs2.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= hostname)(Port= 1521))
(CONNECT_DATA = (SERVICE_NAME = dbs2))
If your databases are on two different servers you'd have to look at each one's tnsnames.ora file and make sure each one had an entry for the other's database.
I believe the database link name must be the same as the SERVICE_NAME if the parameter GLOBAL_NAMES=TRUE, if it's FALSE you can name it something else. By default this parameter is set to TRUE so I called the database link in the example dbs2.
You can then access data from dbs2 while logged into dbs1 exactly how you said:
select * from cust@DBS2;
You can then repeat the process to do the same thing on dbs2 to connect to dbs1.
Hope this helps.

Similar Messages

  • Connecting between two database of various version

    Hi,
    we are using apex 3.0.1 and 3.2.1 which has 9i and 10g database .
    We have different application in different servers.
    Now i want access a table in apex version 3.2.1 from apex version 3.0.1 via a trigger.
    what are the process i have to perform to connect the database
    Thanks & Regards,
    Gomathi

    >
    via a trigger
    >
    Sounds like a very bad idea - what exactly are you trying to achieve?
    Either way, you need to look up database links. Here's the docs for 10g...
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_5005.htm
    Cheers
    Ben

  • How to ...synchronization between two databases

    Hi,
    I want to set up automatic synchronization between two databases. For example, database DB1 and DB2 have table t1 and t2 with the same columns. If someone updates a record in table t1, I want automatically update the record in t2 or vice-versa.
    How can I make an automatic system like that?

    1) What is the business goal you're trying to satisfy? Failover, reporting, replication, geographic co-location, etc. each have their own set of technologies. Explaining what you're trying to accomplish from a business perspective will help us identify which technology (or technologies) to focus on.
    2) Are you synchronizing a single table? Or multiple tables? Or all the tables in a schema? Or all the tables in a database?
    3) Is there a stable network connection between the boxes?
    4) What version of Oracle do you have (10.2, 10.1, 9.2, 9.0.1, etc)? What edition (standard, express, enterprise, etc)?
    5) How quickly after a change has been made on DB1 does the change need to reflect on DB2?
    6) Am I correct in understanding that you want to be able to change the same row of data on either DB1 or DB2? So the replication needs to go in both directions?
    Justin

  • How to make a connection between two wireless sensor networks of different groups through gateway?did any external device or coding is needed?

    my objective is to make a connection between two wireless sensor networks....i am using two nodes and one gateway for each wireless sensor network.....what is the procedure for connecting these two wireless sensor networks of different groups

    my objective is to make a connection between two wireless sensor networks....i am using two nodes and one gateway for each wireless sensor network.....what is the procedure for connecting these two wireless sensor networks of different groups

  • How to check the Network Connectivity between two systems.

    Hello Everyone,
    Please let me know different ways to check the network connectivity between two systems other than ping/traceroute commands.
    Thank You.
    Edited by: 835435 on Jan 20, 2012 11:43 AM
    Edited by: 835435 on Jan 20, 2012 11:44 AM

    Use snoop.
    snoop -d <nic> - will give requests and replies coming/going in/out of the specified NIC.
    snoop -d <nic> <MAC address of the target host> - will give requests coming from the required host.

  • RFC connection between two SAP systems (with SAP router)

    Hi!
    I would like to set up a RFC-connection from SAP Solution Manager to other SAP system.
    The network connection between the servers is VPN.
    How can I set up this RFC-connection, if my connection between two SAP systems looks as follows,
    (I use the following SAP routers)?
    my server  --> customer
    my server --> internal SAP Router server xy (10.101....) --> SAP Router customer 2 (10.1....) --> SAP System customer (134....)
    Back-way
    SAP Systeme customer --> SAP Router customer (134.1....) --> internal SAP router (212.6....) --> my server
    How can I set up this RFC-connection, if my connection between two SAP systems looks as follows,
    (I use the following SAP routers)?
    something like:
    /H/10.101..../S/sapdp99/H/10.1.4..../S/sapdp99/H/134...
    Thank you very much!
    regards
    Thom

    Same answer as in the other forum where you cross posted....

  • The connection between two Tuxedo machines

    We want to locate our servers(services) onto different machines, we want to know
    :whether the connection,between two machines, is built up at the first time the
    servers booted and kept persistently connectted, or just build up the connection
    when there comes a request.

    Remote machines connect to one another lazily. If you have machines A
    (master), B and C, then B and C do not connect until a request is made
    between B and C. All machines connect to the master at boot time.
    roopesh wrote:
    >
    The connection is persistent and is not request based.
    The machines communicate using BRIDGE.The DBBL which runs
    on the primary master machines keep doing sanity checks
    and health of BBL at all the machines connected and if
    any BBL does not respond for the specified time(set by
    DBBLWAIT) in RESOURCES section.then that machine gets partitioned by DBBL.
    for more info you can read tuxedo documentation.
    Thanks
    Roopesh
    "YANG YI" <[email protected]> wrote:
    We want to locate our servers(services) onto different machines, we want
    to know
    :whether the connection,between two machines, is built up at the first
    time the
    servers booted and kept persistently connectted, or just build up the
    connection
    when there comes a request.

  • Gprs connection between two mobile phones

    Hi
    is it possible to make a gprs connection between two mobile phones without a server(pc...)? when the answer "yes" please give me an exapmle...

    I'm not sure, I'm just connecting some facts. I'm talking about Siemens S55. It has implemented sockets (both client sockets and server sockets). The phone, when connected via GPRS has IP address (Siemens' netmonitor reports it..). But i've never tried to use server-socket on my mobile.
    So it seems that it is in fact possible on some handsets. (AFAIK nokia 6610 and similar does not support sockets...)

  • Connection between two views

    Hi Experts,
    Please give me some inputs related to connection between two views ???

    Hi
    http://help.sap.com/saphelp_46c/helpdata/de/39/7dfeaaac6011d189c60000e829fbbd/frameset.htm
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2cceb190-0201-0010-be88-acdbeb2ad65f
    How to acces context of view B from view A without using the controller?
    http://help.sap.com/saphelp_nw04s/helpdata/en/7b/67eaa71bdf2645be6e811eee980a04/frameset.htm

  • Connection between two clients

    Hi,
    I want to get some guidance on connection between two clients. Suppose I need to connect client 500 with client 900 in the same system without changing the logical names.
    Thanks & Regards
    Nabarun

    Nabarun -
    It almost sounds as if you just want an RFC to go from one client to the other.  RFCs (SM59) are not client dependant so you can create one in any client.  You can create one with the system name and point it to the client number using a specific user and password.  I would recommend for security it be a communications user and not a dialog user depending on what you will be sending between the clients.  However, the user will need the correct permissions and again, depending on what you are trying to accomplish, it may have to be a DIAG user although I would be wary.  Then create a 2nd RFC pointing back to the other client.  For example...
    RFC 1
    System Name = <System>
    Client = 500
    User = <userid in clnt 500>
    RFC 2
    System Name = <System>
    Client = 900
    User = <userid in clnt 900>
    Then when you are in client 500, there is a path/connection to client 900 via that clients ID and password and vice versa using the appropriate RFC.  Again, with out more info on what you are attempting, this may be your solution.  Hope this helps.  Good luck
    Regards,
    Zecher

  • SNC connection between two SAProuter

    Hi Guys,
    Please give me the procedure to establish the SNC connectivity between two SAProuter.
    Thanks and Regards,
    Atul

    Hi Atul,
    have tried the SDN Search Function with "snc AND saprouter"? It gave me this Links:
    SNC User Guide:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/snc user guide.pdf
    Configure Secure Network Communication SNC:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/configure secure network communication snc.pdf
    Regards
    Gregor

  • Connecting to two database simulteneously

    I am writing code to get data out of an existing customer database and put this data into a new database as part of a product update. I am told I can start one database server, and use it to get connections to both databases. My problem is that the database are in essence the same - they are just in different directories. My directory structure looks like this:
    c:\myapplication\my.db
    c:\old_myapplication\my.db
    To access the first database I do the following:
    // initialize the database driver
    String dbDriver = properties.getProperty("database_driver","com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource");
    String URL = "jdbc:sybase:Tds:127.0.0.1:2638";
    try {
      Class.forName(dbDriver);
    } catch(Exception e) {}
    originalDBConnection = DriverManager.getConnection(URL, "username","password");.....
    This works fine and I connect to the first database. My problem is that I can't figure out how to connect to
    the second database! I don't see where the path to the database is ever specified, and since both
    databases use the same driver it seems I need to use the same URL.

    Thanks fun_one, you were right, I did need to create two connections. I'm using jconnect...I'll post the final solution for posterity :-).
    To connect to two databases (and one server) using jconnect...
    1. When starting the database server, specify the names and paths of your databases. Here is my command:
    start dbsrv8.exe %2 %3 %4 -n %DBNAME% -c 32M -x tcpip -gkall -gdall -gx 30 c:\myapp\database\mydb.db -n db2 c:\myapp\database\mydb.db -n db1
    ....where db1 and db2 are the names of my databases.
    2. Then initialize the database driver as normal:
                // initialize the database driver
                String dbDriver = properties.getProperty("database_driver","com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource");
                try {
                    Class.forName(dbDriver);
                } catch(Exception e) {
                    e.printStackTrace(System.out);
                }3. Now, when getting a connection add the database name to the url
    //Connect to db1
    String urlOne = "jdbc:sybase:Tds:127.0.0.1:2638?ServiceName=db1";
    Connection db1connection = DriverManager.getConnection(urlOne, dbUserName, dbPassword);
    //Connect to db2
    String urlTwo = "jdbc:sybase:Tds:127.0.0.1:2638?ServiceName=db2";
    Connection db2connection = DriverManager.getConnection(urlTwo, dbUserName, dbPassword);I found the following webpage very useful:
    http://manuals.sybase.com/onlinebooks/group-sas/awg0703e/dbugen7/@Generic__BookTextView/47925

  • How to check similarity between two Databases 9i & 10g after imp in 10g

    Dear all,
    Source
    =======
    OS server     ==>     HP-UX
    Oracle version     ==>     Oracle 9.2.0.8
    DB Name          ==>     MSST
    DB total users     ==>     320
    Full export in     ==>     /u02/export/Jan09.dmp
    Tablespaces     ==>     SC, SC_I, SA, SA_I, PP, PP_I, AC, AC_I, SD
    Destination
    ============
    OS server          ==>     HP-UX
    DB Name               ==>     CHDB
    Existg DB users          ==>     20
    Oracle version          ==>     Oracle 10.2.0.4
    copied 9i dump file in     ==>     /u03/export
    Tablespaces created same as Oracle 9i i.e;          
    Tablespaces     ==>     SC, SC_I, SA, SA_I, PP, PP_I, AC, AC_I, SD
    I had run full import on Destination server i.e; Oracle 10g & following is the command i used:
    imp system/pwd@conn_string file=/u03/export/Jan09.dmp log=/u03/export/Jan09_imp.log full=y ignore=y statistics=none
    *=== Imported successfully with few errors like ====*
    IMP-00017: following statement failed with ORACLE error 2299:
    "ALTER TABLE "EMP_PROMOTIONS_ORD" ADD CONSTRAINT "EMP_PROMOTIONS_ORD_UK" UN"
    "IQUE ("EMP_NO", "RANK_NO_FOLLOW") USING INDEX PCTFREE 10 INITRANS 2 MAXTRAN"
    "S 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "PP" "
    "LOGGING ENABLE "
    IMP-00003: ORACLE error 2299 encountered
    ORA-02299: cannot validate (PP.EMP_PROMOTIONS_ORD_UK) - duplicate keys found
    ORA-02299: cannot validate (PP.EMP_PROMOTIONS_ORD_UK) - duplicate keys found
    . . importing table "EMP_PROMOTION_DETAILS" 13333 rows imported
    . . importing table "EMP_PROMOTION_MAST" 725 rows imported
    . . importing table "EMP_PUNISHMENT" 271 rows imported
    . . importing table "EMP_REPORT_BOOKS" 60528 rows imported
    . . importing table "EMP_SALARY_HISTORIES" 120871 rows imported
    . . importing table "EMP_SALARY_HISTORIES_TEMP" 77044 rows imported
    . . importing table "EMP_TRANSACTIONS" 96536 rows imported
    IMP-00017: following statement failed with ORACLE error 2299:
    "ALTER TABLE "EMP_TRANSACTIONS" ADD CONSTRAINT "TRANS_UK" UNIQUE ("EMP_NO","
    " "DIR_NO", "DIR_DATE", "TRN_CODE") USING INDEX PCTFREE 10 INITRANS 2 MAXTRA"
    "NS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "PP_"
    "I" NOLOGGING ENABLE "
    IMP-00003: ORACLE error 2299 encountered
    ORA-02299: cannot validate (PP.TRANS_UK) - duplicate keys found
    Now my question is
    ===================
    How to check everything is same/similar like Oracle 9i database ( source ), for example ( i used this technique ):
    Can anyone tell me how to check similarity between two Databases 9i & 10g after import in 10g.
    MSST_DB>SHOW USER
    MSST_DB>SA
    MSST_DB>select object_type, count(*) from user_objects group by objects;
    OBJECT_TYPE     COUNT(*)
    DATABASE LINK     2
    FUNCTION     23
    INDEX          1795
    LOB          6
    PACKAGE          8
    PACKAGE BODY     8
    PROCEDURE     30
    SEQUENCE     67
    SYNONYM          60
    TABLE          644
    TRIGGER          3
    VIEW          20
    CHDB_DB>SHOW USER
    CHDB_DB>SA
    CHDB_DB>select object_type, count(*) from user_objects group by objects;
    OBJECT_TYPE     COUNT(*)
    INDEX          1794
    PROCEDURE     30
    TABLE          644
    TRIGGER          3
    VIEW          20
    FUNCTION     23
    SYNONYM          60
    PACKAGE BODY     8
    SEQUENCE     67
    PACKAGE          8
    LOB          6
    Edited by: VIKHARAHMED on Jan 10, 2012 3:02 AM

    [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_export.htm#sthref67]Guide.

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

  • Synchronisation of data between two databases

    i have two databases having tables with same fields and i would like to transfer the data from one database to the other , how do i do that? is there any link which talks about synchronisation of data between two databases?

    Make the database name same in both databases and use Veritas tools for data copy.

Maybe you are looking for

  • Draft Documents View is empty for a specific user

    Hi, For a specific user, when he goes on the Document Draft Reports, the Sales Document sub-form is empty. Meaning that when he ticks the "Sales Documents" option, the boxes to choose specific Sales Document does not exist (e.g. Sales Quotation, Sale

  • Supplier portal-Event terms default to accept

    Hi, When the supplier login for to respond RFx, the current default setting for supplier event terms is decline. We need this default setting to be changed to accept.if script changes need to be done,please let us know how to do the same. Please let

  • How do you know what version methods became available ?

    A reply to another one of my posts informed me that String.replaceAll did not become available until version 1.4. How could I find out what version methods became available? I think I'm experiencing a similar situation with String.ValueOf. Thanks in

  • How do i get the password to my restrictions?

    how do i get the password to my restrictions?

  • Possible to go full-screen without "Spaces"? To disable "Spaces"?

    I never found Leopard's "Spaces" feature to be intuitive or useful. I specifically dislike that it doesn't work with the command-tab application switching and the command-h application hiding functionalities that I've used heavily since Jaguar. In th