Oracle database tips logo
Article categories | Blog and News Page | SQL | SQL*Plus | DBA Scripts | Standby dbs | Database Links | Techno webcasts | Oracle Magazine | Free IT Magazines | Oracle Database Hosting Companies | Site Search |
RSS
XML RSS
What is this?
AddThis Feed Button

Social Bookmarking


-- FREE --
IT Magazine
Subscriptions

Oracle Magazine Oracle Magazine Contains technology strategy articles, sample code, tips, Oracle and partner news, how-to articles for developers and DBAs

WebSite Magazine WebSite Magazine Practical advice, helpful tools and insights for website owners

Dr Dobb's Journal Dr Dobb's Journal enables coders to write the most efficient programs and help in daily programming quandaries

DM Review DM Review is recognized as the premier business intelligence, analytics and data warehousing publication
Various other Free IT magazine subscriptions
NoAdware Free Trial

NoAdware Remove
harmful
adware,
spyware,
trojans,
dialers
and worms!
- Featured ebook -

Database Normalization
by Alf Pedersen

Database Normalization ebook Understand and master how to normalize a database using methods richly documented with graphical ERD and server diagram examples

Hide Oracle Database Link

Always test these 'hide oracle database link' commands on a test server
before implementing them on a production server.



Use a view or synonym to hide distributed database complexity
from your user

There are 2 ways you can hide the complexity involved with Oracle database links from your user:
create a synonym or a view.

This will allow your user to access the data she needs without worrying
about the syntax requirements of database links.

Your user may even be unaware of the fact that she is accessing some data in a remote database.

Note:
Database links are notoriously slow, not an optimal solution for applications needing real-time response.
Expect the database link to cause a delay in accessing the remote data.

Here is an example of creating a synonym for scott's database link.


SQL> create  synonym rem_emp for emp@remotedb;

Synonym created.

SQL> select count(*) from rem_emp;

  COUNT(*)
----------
        14


The other method is to create a view on your remote database's data.


SQL> create view v_emp as select * from emp@remotedb;

View created.

SQL> select count(*) from v_emp;

  COUNT(*)
----------
        14


Next: How to limit database link usage in your database

Click here to read about troubleshooting database link errors.

Recommended reading:

  • Oracle Online Documentation : Administrator's Guide, Creating Database Links
  • Oracle Online Documentation : SQL Reference, Create Datatabase Link syntax



  • Return from 'hide oracle database link' back to 'oracle database link tutorials'