How to create the database links

Hello

We have two databases on two servers differenet and we want both of the databases to be synchronized and application runs only on a single server.

It is possible through links DB if yes then how.

If a better solution than DB links is pl tell.

Hello

Edit the tnsmaes.ora file and add the entry to the database and verify the connection using tnsping .if connection is ok and then create a database link in oracle

CREATE DATABASE LINK link_name - name of the link
CONNECT username - user name
IDENTIFIED BY password - password of the user
With the HELP of "Database_sid" - name of the database

Created database link

Select * from owner.table_name @ link_name

Tags: Database

Similar Questions

  • How to create the database link between the production and the test server

    You will need to create a link between Test and prod DB access. We need only select access from user@prod to user1@test.

    Could someone please answer for example?




    Thank you
    sRII

    You will need to create a link between Test and prod DB access. We need only select access from user@prod to user1@test.

    Could someone please answer for example?

    If test for prod

    create public database link to_prod connect to the user identified by password using 'to_prod ';

    Check that to_prod is directed to your production database.

  • Create the database link

    Hi guys!

    I'm having problems creating a data link...
    I enter something like < IP >: < PORT > / < SID > in the SERVICE NAME field and the Assistant returns me error message.
    This structure for THE SERVICE NAME is correct?

    Thank you.

    Hello

    I think the nomenclature might be a little better. During create/edit the entry box is marked but the Service name in outdoor, HOMEtab, and in fact both are misleading.

    Looks like you want to use the format EZConnect [host: port / service name].
    http://www.orafaq.com/wiki/EZCONNECT

    Service_name is generally SID.domain, but you can get away with only SID since many products add the local domain name. It can work if you leave off of the area, but local and remote domain names are the same.

    It's really much easier to use a TNS alias if you have a local listener running with the appropriate entry in the tnsnames.ora file. Thus, for example, in my environment my sqlnet.ora file contains this line:

    NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)

    My remote database THAT SID is ora1122 on, say, xyz1234567 to the remote computer and I have a TNS alias entry of the xyz1122 in my local tnsnames.ora file. Given these parameters, I am able to create the database to help link

    xyz1122

    or

    xyz1234567:1521/ora1122.us.Oracle.com

    Thus the first case depends on all: the local listener running, the tnsnames.ora and sqlnet.ora parameters. The second case only on rethinking the host, port, and service. And, in my environment, I actually couldn't give up the domain name. us.Oracle.com.

    I hope that this more detailed example is aid,
    Gary

  • How to create the database using the command line?

    Hi all

    Win7
    10g or 11g

    I want to create a new database using a script.

    I set up my new SID and oracle_home.

    Then sqlplus / DBA.

    then I execute a common script...
    startup nomount;
    create database PRODB
           logfile group 1 ('z:\oradata\PRODB\redo01.log',
                            'z:\oradata\PRODB\redo01b.log') size 50M,
                   group 2 ('z:\oradata\PRODB\redo02.log',
                            'z:\oradata\PRODB\redo02b.log') size 50M,
                   group 3 ('z:\oradata\PRODB\redo03.log',
                            'z:\oradata\PRODB\redo03b.log') size 50M,
                   group 4 ('z:\oradata\PRODB\redo04.log',
                            'z:\oradata\PRODB\redo04b.log') size 50M
           character set AL32UTF8
           datafile 'z:\oradata\PRODB\sysPRODB.dbf' size 500M
           sysaux datafile 'z:\oradata\PRODB\auxPRODB.dbf' size 300M
           undo tablespace undo
                   datafile 'z:\oradata\PRODB\undoPRODB.dbf' size 100M
           default temporary tablespace temp
                   tempfile 'z:\oradata\PRODB\tempPRODB.dbf' size 150M;
    @/opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql;
    @/opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql;
    connect system/manager;
    @/opt/app/oracle/product/10.2.0/db_1/sqlplus/admin/pupbld.sql;
    exit;
    
    
    
    SQL> startup nomount;
    ORA-12560: TNS:protocol adapter error
    SQL> create database PRODB
      2         logfile group 1 ('z:\oradata\PRODB\redo01.log',
      3                          'z:\oradata\PRODB\redo01b.log') size 50M,
      4                 group 2 ('z:\oradata\PRODB\redo02.log',
      5                          'z:\oradata\PRODB\redo02b.log') size 50M,
      6                 group 3 ('z:\oradata\PRODB\redo03.log',
      7                          'z:\oradata\PRODB\redo03b.log') size 50M,
      8                 group 4 ('z:\oradata\PRODB\redo04.log',
      9                          'z:\oradata\PRODB\redo04b.log') size 50M
     10         character set AL32UTF8
     11         datafile 'z:\oradata\PRODB\sysPRODB.dbf' size 500M
     12         sysaux datafile 'z:\oradata\PRODB\auxPRODB.dbf' size 300M
     13         undo tablespace undo
     14                 datafile 'z:\oradata\PRODB\undoPRODB.dbf' size 100M
     15         default temporary tablespace temp
     16                 tempfile 'z:\oradata\PRODB\tempPRODB.dbf' size 150M;
    I always hit it

    SQL > startup nomount;
    ORA-12560: TNS:protocol adapter error

    But if I run it on Linux is good.


    Help, please...


    Thank you very much

    zxy

    yxes2013 wrote:

    I want to create a new database using a script.

    Suggestion. DBCA allows to generate the database model and use the option "+ Save as scripts + ' (no need to create the database).

    In the scripts directory, there will be a couple of shell and SQL scripts to create the database. Use them as your CLI model for the creation of a custom database. (I guess that DBCA works the same on Windows as it does on Linux).

    Another option, if you are using Oracle XE, is to copy ORACLE_HOME/bin/createdb.sh (probably a + .cmd on Windows) script and change for use. If you manually add non-XE features to the script (such as the installation of the Java virtual machine) If you want a database of SE or EE. (whereby DBCA scripts are a better answer).

  • How to create a database link to another workspace

    Hi all

    Run now, I'm two workspaces in apex.oraclecorp.com.

    For example, one is one, the other is b. In the space of only one I need used data in the workspace b,.

    So, how can I create a link of database for b in the workspace one?

    Kind regards

    Patricia

    Database of links are created between the databases. In my case, the schema are the same database and I own both the schema.

    Thus,.

    workspace: one, scheme: (default)

    workspace: b, diagram: b (by default)

    Connect to the workspace of b -> SQL Workshop:

    Grant select on b.table to aDB.

    Connect to a -> SQL Workshop workspace:

    Select * from b.table;

    the precondition is that you must have grant privligle on workspace b.

    Kind regards

    Patricia

  • How to create the database of integrated security

    Hello
    I should create a database and in the next step, install oraclefailsafe to use another server to pass if the first crash. Then I created the SERVER1 database (with all the files on a shared file system).

    Now how can we establish the 'same' database on SERVER2?

    Thank you.

    I'm reading: Oracle® Fail Safe
    Concepts and Administration Guide
    Version 3.3.3 for Windows
    Reference No.. B12070-01
    December

    But do not see the answer to my question.
    Thank you.

    Please tell me if my question is clear?

    http://download.Oracle.com/docs/CD/E10736_01/doc/install.341/e10720/ofsman.htm

    Hope that you will help, as far as failsafe is concerned, you must install the oracle software on the servers participating in the cluster and the database created in the common storage space. That the file password and init copied to servers. You must also create the service in the second server. Then, as mentioned above link to the needs of service created to monitor and start kick on the other node in the cluster.

  • How to create the database and a tablespace?

    Hello experts,

    I want to create a database named influx as tablespace influx.

    for this that I login under the sys account.

    now, I'm trying to run the following command:


    CREATE DATABASE WORKFLOWS
    LOGFILE GROUP 1 ("G:\app\dhirender\oradata\INFLUX\redo01.log") SIZE 100 M,
    GROUP 2 ("G:\app\dhirender\oradata\INFLUX\redo02.log") SIZE 100 M
    GROUP 3 ("G:\app\dhirender\oradata\INFLUX\redo03.log") SIZE 100M
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 100
    DEFAULT TABLESPACE users
    DATAFILE 'G:\app\dhirender\oradata\INFLUX\INFLUX01.dbf '.
    SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED

    FOLLOWING ERROR IS COMING:

    ORA-01501 datbase remote.

    database ORA-01100 already mount

    also help me create tablespace.

    Please help me.

    Thank you

    Yoann

    Follow, you will get help!

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_5004.htm

    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_7003.htm

    https://forums.Oracle.com/thread/2481617

    https://forums.Oracle.com/thread/661075

    See you soon,.

    Manik.

  • How to create the database of video/photo thumbnails file

    I notice that there is a thumbnails db file in some of my folders containing video/photos while others do not.  Those who seem to have miniature views of video/photo pop up much faster than the others when we look at the extra large icons in windows Explorer.

    Is this faster thumbnail upload because the db file "thumbnails"?  If so how can I get this file created in all my photo and video files?

    Thank you.

    Hello

    Which popup you are referring to?

    Each time seen miniature is enabled or has been enabled in Microsoft Windows the hidden thumbs.db file is automatically created in the same directory than where thumbnails have been read. This file contains the information required by Windows to display thumbnails for each of the icons and will be placed in each model file are read. Thumbs.DB looks a lot like its name. It stores the graphics, the film and some document files, and then generates an overview of the content of file using a cache of thumbnails. This file can be deleted safely from any directory, however, it will be automatically recreated if thumbnail display is always on and you open this directory again. Thus, it is not related to upload faster thumbnail.

    Let us know if you have other questions related to the issue. We would be happy to help you.

  • How to create the 'More' link to show/hide button the rest of the text

    Hi everyone thanks for reading, I am currently working on Adobe Contribute CS5 and I want to set up a button link 'More' to view the rest of the text or to hide. The existing file, it is in php and html and according to experts of Adobe Contribute CS5 is not feature or tool to achieve this in CS5, but they suggested that I can do that by using Dreamweaver, however, I am new to it. Any help to get me started will be much appreciated.  Currently, the page is very long and we would like to do better.

    Screen Shot 2016-06-14 at 3.33.08 PM.png

    I want to do is something like this:

    Screen Shot 2016-06-14 at 3.54.23 PM.png

    Is there any plugin or tool as Simple author box - WordPress Plugins

    What can I do?

    Thank you very much!

    You can't do things advanced with Contribute.  Without coding skills, you're kind of stuck with what you have until you switch to something more robust.  WordPress plugins only work with WordPress web sites.

    Below, an example of a MORE or LESS simple with jQuery.

    jQuery Toggle list - JSFiddle

    Nancy O.

  • How to create the database for setting up connection

    Hello
    I'm trying to pass on the values of the variables from a database instead of the usual .csv file. I need to connect to a database for this. When I try to connect to the Oracle XE (installed with the ATS) he invites me to put in the following:

    -SID
    -Service name
    -Alais

    I don't know what is the SID or Service name values.

    Concerning

    Hello

    -SID: XE
    -Name Service: even
    -Alais: what you want

    You must also put the host name somewhere (you can put localhost)

    JB

  • strange problem with the database link

    Hello world

    I have a strange problem with the link of database in Oracle 11 g Express Edition;
    There are two computers: computer-server and the client computer. Tnsnames.ora are the same on both computers IE.

    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = XE)
    )
    )

    I created the database link:

    Create database link zdalny
    Connect to < user_id > identified by < password >
    using "CT".

    Customer cannot connect with server when I do not use above the command. But when I change 'use' for using "krzysztof:1521" or by using "krzysztof" or "server IP:1521" - everything is ok.

    Why I ask. Because in all the materials that I read about Oracle command with the help of "CT" should work correct. But there is no. Do you know why?

    Thanks in advance and apologize me for my English.

    Rgds
    Krzysztof

    Here's the tnsnames of your server, but to connect to the oracle server db (any client or to another instance of db oracle), you must install oracle client.
    However, in your condition, you want to connect the DB1 Oracle OracleDB2 using a link db, I'm right? In this case you should always set the entry in the tnsnames.ora
    To verify that you can connect to Oracle DB2 from DB1 Oracle, you can use tnsping in the command line.
    In your case

    c:\tnsping CT
    

    Krzysztof Szymaniak wrote: CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )
    )

    Check your tnsnames entry in the machine, you are trying to connect to. And check if the tnsping is successful.
    Sometimes the error message says not everything, which means that you need to troubleshoot yourself and learn from the experience.
    Always in the opposite case, refer to the documentation.

    See you soon.

    Published by: Spongebob December 14, 2011 09:30

  • How to create a database in the server-2 based on the game of RMAN backup in server-1

    Hi all

    I need help related to RMAN backup in the following scenario, my server-1 details are given below.

    * Operating system-Windows server 2012 R2 Standard Edition

    * Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    CORE 11.2.0.1.0 Production

    AMT for 64-bit Windows: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production,

    I have configured RMAN and level 0 and backup of level 1 with on the external HARD drive.

    all the RMAN backup is located in this drive external HARD only, same archivelog.

    My question is,

    How to create a database to Server-2 based on the RMAN backup I took in server-1.

    It's to help me create a server test and even if the server-1 crash, then I can create a database in the new server-2 with backup I took on the external HARD drive.

    Is it possible to achieve the same or not. Kindly suggest me or share a good Internet link or document and share your knowledge to achieve my need of stimulus.  This will really help me

    It does not matter whether you use ASM. The link above should guide you on how to change the file names of data before restoring if the location of the data file on server 2 will be different from server 1.

    Since you asked for 11g binding, it is here

    http://shivanandarao-Oracle.com/2012/04/28/duplicating-database-without-connecting-to-target-database-or-catalog-database-in-Oracle-11g/

    Kind regards

    Shivananda

  • How s/n know when and what account perform a function using the database link?

    Dear,

    My application of the CIM team asked DBA to create new function and run it. Function must use the database link for remote database data. So I need to create a new database to their licensing link. Cause we guess we'll experience the performance issue after the user performs this function, or another question and errors may occur. So we want to know when and who use this feature that connects to a remote database through the new database connection in advance. And I also need to know when and which connect to the remote database using this new database link. We have no idea to get this information?  Can anyone recommend how do? Thank you very much.

    Best reqards, Otis.

    Check what business purpose, it will solve.  If the function is so safe, why everyone will use. Only admin people should access.

    All of these additional controls of this kind must be avoided as much as possible to improve the overall performance of the application.

    Still if you need, see the database audit mechanism, specifically designed for this type of activity.

    Kind regards

    Harman

  • creating user using the database link

    Hello

    I have 11g installed on one of the server
    I created the database BUGAU to bugau.us.oracle.com link
    link works fine

    "Select * from table@"Bugau "gives the expected result

    I ran the Sub statement to my server using the dblink.but do not know how to use the dblink to that effect. Please sat down

    CREATE USER ABC IDENTIFIED BY welcome TEMPORARY by DEFAULT TABLESPACE USERS_001 temp123 TABLESPACE;

    GRANT DEFAULT TO abc;

    ALTER USER abc PROFILE LEVEL_1;

    Thank you
    Archana

    Bravid wrote:

    You cannot create a user on a remote database using a database link.

    You can, but it is not a good design:

    SQL> exec dbms_utility.exec_ddl_statement@orcl('CREATE USER ABC IDENTIFIED BY ABC');
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dbms_utility.exec_ddl_statement@orcl('GRANT CREATE SESSION TO ABC');
    
    PL/SQL procedure successfully completed.
    
    SQL> connect abc@orcl/ABC
    Connected.
    SQL> 
    

    Of course, the user in the database unite ORCL must have EXECUTE on DBMS_UTILITY privilege.

    SY.

  • How to create an action link that goes to a section that is 'hidden' in the same page

    Hello

    OBIEE 11, I have a dashboard page that has section 1 as a guest, 2 which shows an analysis that contains a chart and article 3 that shows the details of the graph. I have an action to link this graphic article 2 connection to the details in section 3. However, I would like my report to the do not appear in article 3 as long as you press the link of action. Is there a way to 'Hide section 3 until you press the link action?' Thank you!

    Hello

    Try to avoid the double-display: How to create an action link that goes to a section that is 'hidden' in the same page

    Felipe_Idalgo meets the other post (and he posted the best answer to your needs), in order to continue the other thread instead of opening another.

Maybe you are looking for

  • How to remove the region lock on the DVD player?

    Hello My laptop has a pioneer dvr-k16a. I had looked at a few DVD borrowed from my friend who asked the region 1 to play, so I switched it to region 1 and now I can't go back there more. Apparently my DVD - RW being locked in region I don't know afte

  • I have a problem with the connection to the computer.

    Original title: Help - changed the password and can not log in I just changed password. Today I tried to log in, it wouldn't let me.  He said that I had to put in a disk or external to reset devices? What's new? Moved from feedback Original title: he

  • Loss of drivers for HP 2000-2202 YOU product-C0P22PA #ACJ

    Hello I have laptop HP 2000-2202TU. Due to some problems, I lost windows 8 recovery and formatted with windows7 ultimate. I am now unable to connect to WIFI. Cannot add the WIFI device to my laptop. I tried many things to get the drivers for same, ut

  • OptiPlex 755 Mini Tower does not, no outdoor lighting

    I can not get an OptiPlex 755 minitower to light. It ran quite constantly in a desktop environment on a battery backup/surge protector APC until it failed Monday morning. Then, there was little orange light flashing or continuous. When the computer w

  • (Redirected) XPS 8700 in autofix Mode continues?

    Hi I had a power outage at my house last night and reboot was a problem... Finally, after electrical disconnection and start-up, the machine came to life. Only to show me the blue screen with Option and choose in the upper part. None of the options w