DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2001
    Phoenix, AZ


    I wanted to pass along an Oracle tip I discovered, and have passed along to
    other websites...

    When I was creating a database link the other day, I could create the link
    ok but could not get it to work. After exhausting all research thru the
    Oracle manuals, I found an article on Oracle's Metalink that explained what
    I needed to do. This tip is undocumented in the Oracle manuals.

    The following is pasted from a Word document I put together...ENJOY !

    Found this in a Metalink article (DocID=1024124.6)

    This is not documented in the Oracle manuals and can be useful (even required) when the init.ora parameter GLOBAL_NAMES is set to TRUE.....
    Note that if GLOBAL_NAMES is set to FALSE, you can name the dblink anything you desire.

    Database Links
    Database links are created using the following syntax:

    SQL> create database link
    connect to identified by
    using '';

    The name of the database link should match the global name of the target
    database if GLOBAL_NAMES=TRUE. This may seem restricting since then there can
    be only one database link per schema to a given database if global_names is
    set to true. To overcome this use database link qualifiers. For example:

    SQL> create database link oradb@link1
    using 'D:BOSTON-MFG';

    NOTE: in this example, 'link1' is database link qualifier
    and 'D:BOSTON-MFG' is the connect string

    My NOTE : your select to the remote database would look like this :
    select * from table_name@oradb@link1;

  2. #2
    Join Date
    Jun 2001
    Helsinki. Finland
    You are right that the documentation of Oracle about DB links is messy and incomplete (for example DB links in OPS). I usually set GLOBAL_NAMES to false. That way you might have some problems with advanced replications, etc. but you don't have to use DB link qualifiers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.