<?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; manage oracle database links</title>
	<atom:link href="http://oracle-database-tips.com/wp/tag/manage-oracle-database-links/feed" rel="self" type="application/rss+xml" />
	<link>http://oracle-database-tips.com/wp</link>
	<description>News for Oracle professionals</description>
	<lastBuildDate>Fri, 11 May 2012 12:12:40 +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>Manage Oracle database links</title>
		<link>http://oracle-database-tips.com/wp/dblinks/manage-oracle-database-links</link>
		<comments>http://oracle-database-tips.com/wp/dblinks/manage-oracle-database-links#comments</comments>
		<pubDate>Fri, 23 Oct 2009 12:10:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DB Links]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[commited]]></category>
		<category><![CDATA[communications protocol]]></category>
		<category><![CDATA[database link]]></category>
		<category><![CDATA[database query]]></category>
		<category><![CDATA[dblink]]></category>
		<category><![CDATA[manage oracle database links]]></category>
		<category><![CDATA[open cursors]]></category>
		<category><![CDATA[open database]]></category>
		<category><![CDATA[owner id]]></category>
		<category><![CDATA[public database]]></category>
		<category><![CDATA[s communications]]></category>

		<guid isPermaLink="false">http://oracle-database-tips.com/wp/?p=124</guid>
		<description><![CDATA[How many database links are in existence on your database, how many are in use ? ]]></description>
			<content:encoded><![CDATA[<div class="large"><strong>Know your open links</strong></div>
<p><!-- ============================================================================================================================================================ -->Once you have created and made use of a database link in Oracle,<br />
you might want to keep an eye on the number of concurrent open database links<br />
in your database so you can tune the <em>open_links</em> initialization parameter.</p>
<p>Read more <a href="http://www.oracle-database-tips.com/limit_oracle_database_links.html">here</a> on limiting concurrent open links.</p>
<p>You will need to query <em>v$dblink</em> to see how many links are open in your          session:</p>
<div id="textbox">
<div>
<pre class="large">SQL&gt; select in_transaction, count(*) from v$dblink
     group by in_transaction;

IN_   COUNT(*)
--- ----------
YES          1</pre>
</div>
</div>
<p><!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   -->Here are some interesting columns and descriptions of <em>v$dblink</em>:</p>
<pre class="large">db_link           Db link name
owner_id          Owner name
logged_on         Is the database link currently logged on?
protocol          Dblink's communications protocol
open_cursors      Are there any cursors open for the db link ?
in_transaction    Is the db link part of a transaction which
                  has not been commited or rolled back yet ?
update_sent       Was there an update on the db link ?</pre>
<div class="large"><strong>dba_db_links</strong></div>
<p>To gather information on all database links in your database, query <em>dba_db_links</em>.<br />
You will need dba privileges to see this view, the alternatives are <em>user_db_links</em> and <em>all_db_link</em>s.</p>
<p>A user who does not have dba privileges can query <em>all_db_links</em> to see<br />
which db links are available to him.</p>
<p><!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   --></p>
<div id="textbox">
<div>
<pre class="large">SQL&gt; select * from dba_db_links;

OWNER      DB_LINK     HOST       CREATED
---------- ----------  ---------- ----------
SCOTT      REMOTEDB    remotedb   23-feb-2008 23:59:05</pre>
</div>
</div>
<p><!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   -->Some interesting columns:</p>
<pre class="large">owner           User who owns the db link,
                will state 'PUBLIC' if it is a public database link.
db_link         Db link name.
username        The username that was specified if it was hardcoded
                during the create statement, null if not specified
                during the create statement.
host            The tnsnames alias specified during the create
                statement.
created         Date and time of link creation.</pre>
<p><!-- ============================================================================================================================================================ --></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%2Fmanage_oracle_database_links.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%2Fmanage_oracle_database_links.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/manage-oracle-database-links/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

