<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oracle Database Tips blog &#187; hide oracle database link complexity</title>
	<atom:link href="http://oracle-database-tips.com/wp/tag/hide-oracle-database-link-complexity/feed" rel="self" type="application/rss+xml" />
	<link>http://oracle-database-tips.com/wp</link>
	<description>News for Oracle professionals</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:37:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Hide Oracle database link</title>
		<link>http://oracle-database-tips.com/wp/dblinks/hide-oracle-database-link</link>
		<comments>http://oracle-database-tips.com/wp/dblinks/hide-oracle-database-link#comments</comments>
		<pubDate>Fri, 23 Oct 2009 12:07:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DB Links]]></category>
		<category><![CDATA[2 ways]]></category>
		<category><![CDATA[database note]]></category>
		<category><![CDATA[hide oracle database link complexity]]></category>
		<category><![CDATA[note database]]></category>
		<category><![CDATA[optimal solution]]></category>
		<category><![CDATA[select count]]></category>
		<category><![CDATA[time response]]></category>

		<guid isPermaLink="false">http://oracle-database-tips.com/wp/?p=118</guid>
		<description><![CDATA[Want to spare yourself the db link syntax in daily use ?
Hide it with a view or a synonym. ]]></description>
			<content:encoded><![CDATA[<p><!-- ============================================================================================================================================================ --></p>
<div class="large"><strong>Use a view or synonym to hide distributed database complexity<br />
from your user</strong></div>
<p>There are 2 ways you can hide the complexity involved with Oracle database          links from your user:<br />
create a <em>synonym</em> or a <em>view</em>.</p>
<p>This will allow your user to access the data she needs without worrying<br />
about the syntax requirements of database links.</p>
<p>Your user may even be unaware of the fact that she is accessing some          data in a remote database.</p>
<p>Note:<br />
Database links are notoriously slow, not an optimal solution for          applications needing real-time response.<br />
Expect the database link to cause a delay in accessing the remote data.</p>
<p>Here is an example of creating a synonym for scott&#8217;s database link.<br />
<!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   --></p>
<div id="textbox">
<div>
<pre class="large">SQL&gt; create  synonym rem_emp for emp@remotedb;

Synonym created.

SQL&gt; select count(*) from rem_emp;

  COUNT(*)
----------
        14</pre>
</div>
</div>
<p><!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   -->The other method is to create a view on your remote database&#8217;s data.<br />
<!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   --></p>
<div id="textbox">
<div>
<pre class="large">SQL&gt; create view v_emp as select * from emp@remotedb;

View created.

SQL&gt; select count(*) from v_emp;

  COUNT(*)
----------
        14</pre>
</div>
</div>
<p><!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   --></p>
<h3>Recommended reading:</h3>
<div id="content">
<li><a title="opens new window" onclick="window.open('http://www.oracle-database-tips.com/cgi-bin/counter.pl?url=http%3A%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fserver.102%2Fb14231%2Fds_admin.htm%23i1007820&amp;referrer=http%3A%2F%2Fwww.oracle-database-tips.com%2Fhide_oracle_database_link.html'); return false;" href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_admin.htm#i1007820" target="_blank">Oracle Online Documentation : Administrator&#8217;s Guide, Creating Database Links</a></li>
<li><a title="opens new window" onclick="window.open('http://www.oracle-database-tips.com/cgi-bin/counter.pl?url=http%3A%2F%2Fdownload.oracle.com%2Fdocs%2Fcd%2FB19306_01%2Fserver.102%2Fb14200%2Fstatements_5005.htm%23SQLRF01205&amp;referrer=http%3A%2F%2Fwww.oracle-database-tips.com%2Fhide_oracle_database_link.html'); return false;" href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5005.htm#SQLRF01205" target="_blank">Oracle Online Documentation : SQL Reference, Create Datatabase Link syntax</a></li>
</div>
]]></content:encoded>
			<wfw:commentRss>http://oracle-database-tips.com/wp/dblinks/hide-oracle-database-link/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

