Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
dba creates database link the london database

Dba creates database link the lon-don database

68

Chapter 3

A database link has two components—a link name, which is stored in the local data dictionary, and an associated TNS alias, which is the external name that Oracle uses to connect to the remote database associated with the link name. You’ve probably noticed that the two link creation statements didn’t specify a TNS alias to identify the remote database to connect to because there is no USING clause present in the SQL. That’s another advantage of this naming standard. If you don’t specify the USING clause, then Oracle silently defaults it to be the same as the link name. So if you create a link named sales.uk.big.com and use it in a query, Oracle will connect to the remote data-base identified by the alias sales.uk.big.com. That’s exactly what we want based on our naming standard. The db_domain setting is also used if you select from the database link without using a fully qualified link name. In this case, Oracle will silently suffix the db_domain setting for you. So the following SQL statements are equivalent, using a db_domain value of uk.big.com:

select * from all_users@sales;

select * from global_name;

alter database rename global_name to sales.us.big.com;

Configuring Oracle Networking 69

Another New York DBA comes along and creates another link to the London database:

create database link nonstandard.uk.big.com;

By setting global_names�true in your init.ora file, you enforce the global naming standard that any database link name in the local database must match the global_name of the remote database. If it doesn’t, Oracle will refuse to run the SQL and return an ORA-02085 error. If you’re familiar with database links, you’ll know that you might have several database links to a remote database, each with different authenti-cation at the remote end. For example, one link might connect to the SALES account at the remote end and one might connect to the MANAGERS account. How do you enforce the global naming standard while still allowing multiple links with different authentication? The answer is that you use connection qualifiers. Connection qualifiers enable you to enforce global naming and at the same time allow multiple links with different properties connecting to the same remote database. You create such qualified links as follows and use them just like a regular link:

create database link sales.uk.big.com@q1

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Reece Burrows-Jones

PageId: ELI2249713