<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>My Oracle on Linux Blog</title>
	<atom:link href="http://oracleonlinux.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oracleonlinux.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 12 Feb 2010 18:15:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='oracleonlinux.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>My Oracle on Linux Blog</title>
		<link>http://oracleonlinux.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oracleonlinux.wordpress.com/osd.xml" title="My Oracle on Linux Blog" />
	<atom:link rel='hub' href='http://oracleonlinux.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How linux LVM snapshots work, part 1</title>
		<link>http://oracleonlinux.wordpress.com/2010/02/12/how-linux-lvm-snapshots-work-part-1/</link>
		<comments>http://oracleonlinux.wordpress.com/2010/02/12/how-linux-lvm-snapshots-work-part-1/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 18:15:26 +0000</pubDate>
		<dc:creator>mkaluza</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[snapshots]]></category>

		<guid isPermaLink="false">http://oracleonlinux.wordpress.com/?p=23</guid>
		<description><![CDATA[Contents: Introduction Creating an example volume Creating a snapshot Data consistency Usage Introduction Since everything I&#8217;ll show is based on linux LVM, If you haven&#8217;t used any LVM before, it is necessary to read LVM HOWTO to familiarize yourself with LVM concepts, and if you used one, but not on linux, it&#8217;s still good have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=23&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Contents:</p>
<p><a href="#intro">Introduction</a></p>
<p><a href="#createvolume">Creating an example volume</a></p>
<p><a href="#createsnap">Creating a snapshot</a></p>
<p><a href="#dataconsistency">Data consistency</a></p>
<p><a href="#usage">Usage</a></p>
<p><a name="intro"></a></p>
<h3>Introduction</h3>
<p>Since everything I&#8217;ll show is based on linux LVM, If you haven&#8217;t used any LVM before, it is necessary to read <a href="http://www.tldp.org/HOWTO/LVM-HOWTO/index.html" target="_blank">LVM HOWTO</a> to familiarize yourself with LVM concepts, and if you used one, but not on linux, it&#8217;s still good have a look there for available commands and naming.</p>
<p>Before we can talk about all the cool things that can be done with Oracle and LVM, we&#8217;ll need to talk about LVM snapshots themselves. Not only what they do, but also how they work.</p>
<p>And since in linux LVM is just a frontend (much more user-friendly) to a subsystem called Device Mapper, we&#8217;ll focus on that backend part more, because at some point we&#8217;ll reach the limits of LVM and will be forced to use device mapper only.</p>
<p>In part one we&#8217;ll create a small test environment to show how snapshots work and in part two I&#8217;ll discuss the internals and more specific snapshot features.<br />
<a name="createvolume"></a></p>
<h3>Creating an example volume</h3>
<p>First, let&#8217;s create a demo volume and take a look at it.</p>
<p><code>[root@tullus ~]# lvcreate -n demo -L 100M vg00<br />
Rounding up size to full physical extent 128,00 MB<br />
Logical volume "demo" created</code></p>
<p>And since LVM is just a frontend to device mapper, let&#8217;s have a look what our command really did:<br />
it created an entry in /dev/mapper directory named VolumeGroupName-LogicalVolumeName</p>
<p><code>[root@tullus ~]# ls -l /dev/mapper/*demo*<br />
brw-rw---- 1 root disk 253, 11 feb 11 10:56 /dev/mapper/vg00-demo<br />
</code></p>
<p>This entry coresponds to the following map</p>
<p><code>[root@tullus ~]# dmsetup table /dev/mapper/vg00-demo<br />
0 262144 linear 9:2 872677760<br />
</code><br />
The fields mean:<br />
0 – first block of device vg00-demo that the entry describes<br />
262144 – number of blocks in the entry<br />
linear – type of mapping – linear means 1:1 block mapping<br />
9:2 – major and minor of the source device<br />
872677760 starting block on the source device</p>
<p>So what this map really means? It means that block 0 of vg00 will really be block 872677760 of device 9:2 (/dev/md2 in my case) and so on. The map can contain many entries. If we extend our volume by another 128MB, we&#8217;ll see it</p>
<p><code>[root@tullus ~]# lvextend -L+128M /dev/vg00/demo /dev/hdb5<br />
Extending logical volume demo to 256.00 MB<br />
Logical volume demo successfully resized<br />
[root@tullus ~]# dmsetup table vg00-demo<br />
0 262144 linear 9:2 872677760<br />
262144 262144 linear 3:69 628752768<br />
</code><br />
So now there are two entries with the second saying, that 262144 blocks (128MB) of device vg00-demo starting from block 262144 are really mapped to device 3:69 starting from block 628752768 of /dev/hdb5 and so on.</p>
<p>We can now create a filesystem on it and put some contents there.</p>
<p><code>[root@tullus ~]# mkfs.ext3 -m 0 /dev/vg00/demo<br />
mke2fs 1.39 (29-May-2006)<br />
Filesystem label=<br />
OS type: Linux<br />
Block size=1024 (log=0)<br />
Fragment size=1024 (log=0)<br />
65536 inodes, 262144 blocks<br />
0 blocks (0.00%) reserved for the super user<br />
First data block=1<br />
Maximum filesystem blocks=67371008<br />
32 block groups<br />
8192 blocks per group, 8192 fragments per group<br />
2048 inodes per group<br />
Superblock backups stored on blocks:<br />
8193, 24577, 40961, 57345, 73729, 204801, 221185</code></p>
<p><code>Writing inode tables: done<br />
Creating journal (8192 blocks): done<br />
Writing superblocks and filesystem accounting information: done</code></p>
<p><code> </code></p>
<p><code>This filesystem will be automatically checked every 26 mounts or<br />
180 days, whichever comes first.  Use tune2fs -c or -i to override.<br />
[root@tullus ~]# mkdir /mnt/demo<br />
[root@tullus ~]# mount /dev/vg00/demo /mnt/demo<br />
[root@tullus ~]# echo "This is the first file" &gt; /mnt/demo/first<br />
[root@tullus ~]# echo "This is the second file" &gt; /mnt/demo/second<br />
[root@tullus ~]# ls /mnt/demo -l<br />
total 14<br />
-rw-r--r-- 1 root root    23 feb 11 11:12 first<br />
drwx------ 2 root root 12288 feb 11 11:11 lost+found<br />
-rw-r--r-- 1 root root    24 feb 11 11:12 second<br />
</code><br />
<a name="createsnap"></a></p>
<h3>Creating a snapshot</h3>
<p>When we have out test subject ready, we can briefly look at what snapshots do.</p>
<p><code>[root@tullus ~]# lvcreate -s -n demo_snap -l 1 /dev/vg00/demo<br />
Logical volume "demo_snap" created<br />
[root@tullus ~]# lvscan | grep demo<br />
ACTIVE   Original '/dev/vg00/demo' [256,00 MB] inherit<br />
ACTIVE   Snapshot '/dev/vg00/demo_snap' [64,00 MB] inherit<br />
</code><br />
As we can see, the snapshot was created and is one extent in size. From the operating system point of view it&#8217;ll be a block device containing the information from /dev/vg00/demo from the moment the snapshot was taken.</p>
<p>Let&#8217;s mount it and make some changes to our files.</p>
<p><code>[root@tullus ~]# mkdir /mnt/demo_snap<br />
[root@tullus ~]# mount /dev/vg00/demo_snap /mnt/demo_snap<br />
[root@tullus ~]# df -hP | grep demo<br />
/dev/mapper/vg00-demo  248M   11M  238M   5% /mnt/demo<br />
/dev/mapper/vg00-demo_snap  248M   11M  238M   5% /mnt/demo_snap<br />
[root@tullus ~]# ls -l /mnt/demo_snap/<br />
total 14<br />
-rw-r--r-- 1 root root    23 feb 11 11:12 first<br />
drwx------ 2 root root 12288 feb 11 11:11 lost+found<br />
-rw-r--r-- 1 root root    24 feb 11 11:12 second<br />
</code><br />
The contents are the same – it even claims that there&#8217;s the same amount of free space as on the original volume, which may be illusive, but we&#8217;ll get to that.</p>
<p><code>[root@tullus ~]# echo "changing second file on snapshot" &gt;&gt; /mnt/demo_snap/second<br />
[root@tullus ~]# echo "changing first file on original volume" &gt;&gt; /mnt/demo/first<br />
</code><br />
So we changed one file on the original volume and the other on the snapshot. The results are:<br />
<code>[root@tullus ~]# cat /mnt/demo/first<br />
This is the first file<br />
changing first file on original volume<br />
[root@tullus ~]# cat /mnt/demo_snap/first<br />
This is the first file<br />
</code></p>
<p><code>[root@tullus ~]# cat /mnt/demo/second<br />
This is the second file<br />
[root@tullus ~]# cat /mnt/demo_snap/second<br />
This is the second file<br />
changing second file on snapshot<br />
</code><br />
So we can see that both devices are independent from each other and changes made on one of them don&#8217;t show up on the other.</p>
<p><a name="dataconsistency"></a></p>
<h3>Data consistency</h3>
<p>I won&#8217;t discuss this issue in details because this subject generally is quite broad, but a few words have need to be said. When taking a snapshot, from a filesystem&#8217;s point of view it&#8217;s like pulling the plug on the drive at that moment, so similar restrictions apply, since we mostly take snapshots of mounted filesystems. Therefore in the beginning it will be in an inconsistent state on the snapshot. For journaled filesystem like ext3 it is not a problem, since automatic recovery will take place upon mount, but i.e. ext2 will complain about it:<br />
<code>EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended<br />
</code><br />
It is (or at least I think so) safe if ext3 is mounted with data=ordered (default) or data=journal options, but I&#8217;m not sure what will happen when data=writeback is used &#8211; the man page for mount says that it may cause data (not internal metadata) consistency issues after a crash, so the same probably applies to snapshots, but for the same reason you probably don&#8217;t want to use it to store your database in the first place;)</p>
<p>Another thing worth thinking about is <em>sync</em>. I&#8217;m not sure, but I think that lvm syncs the volume before taking a snapshot, and personally I don&#8217;t call sync before creating snapshots, but it may be worth considering.</p>
<p>Summing up &#8211; when using default settings on Centos for ext3 (data=ordered) I&#8217;ve never had and data corruption problems so far,  but it&#8217;s always a good idea to have data consistency in mind.<br />
<a name="usage"></a></p>
<h3>Usage</h3>
<p>Ok, so what are snapshots good for? Very many things</p>
<ul>
<li>consistent filesystem/database backups &#8211; at least thats what I see people most often do</li>
</ul>
<ol>
<li>Create a snapshot</li>
<li>Take a backup based on a snapshot</li>
<li>Delete a snapshot</li>
</ol>
<p>It&#8217;s probably the reason snapshots were created in the first place, and it doesn&#8217;t even require them to be writeable &#8211; in fact in AIX they are read only by design, unfortunately.</p>
<ul>
<li> <a title="Samba shadow copy" href="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/VFS.html#id2651813" target="_blank">samba and it&#8217;s shadow_copy module</a> is another place, where snapshots are useful</li>
</ul>
<p>This usage however implies that snapshots have mostly short lifespan and don&#8217;t contain important data. It is probably the reason snapshot handling in LVM lacks few features that could be very useful. Most painful is that you can&#8217;t move a snapshot using pvmove, you can&#8217;t mirror a snapshot and they don&#8217;t grow automatically when they fill up, so if they fill up, they will fail, but in those usage cases it won&#8217;t matter anyway. You also can&#8217;t copy a snapshot and take a snapshot of a snapshot (but the other is device mapper limit, not LVM).</p>
<p>But since in linux they are writeable, more interesting things can be done with them, but that is also when lack of above mentioned features becomes a pain&#8230;</p>
<p>to be continued&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleonlinux.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleonlinux.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleonlinux.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=23&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleonlinux.wordpress.com/2010/02/12/how-linux-lvm-snapshots-work-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8b85650ddd41ab688bd6975cd74fb86d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkaluza</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring Oracle Gateway 10.2 for ODBC for PostgreSQL</title>
		<link>http://oracleonlinux.wordpress.com/2010/02/04/configuring-oracle-gateway-10-2-for-odbc-for-postgresql/</link>
		<comments>http://oracleonlinux.wordpress.com/2010/02/04/configuring-oracle-gateway-10-2-for-odbc-for-postgresql/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 21:17:15 +0000</pubDate>
		<dc:creator>mkaluza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Gateway]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Postgres]]></category>

		<guid isPermaLink="false">http://oracleonlinux.wordpress.com/?p=12</guid>
		<description><![CDATA[I&#8217;ll describe here how to configure an Oracle ODBC gateway to connect to a postgres database. As it turns out, it&#8217;s fairy straightforward &#8211; if it works With 10.2 these are three simple steps and voila With 11.1 there are very similar steps, but so far I didn&#8217;t manage to make it work . The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=12&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll describe here how to configure an Oracle ODBC gateway to connect to a postgres database. As it turns out, it&#8217;s fairy straightforward &#8211; if it works <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  With 10.2 these are three simple steps and voila <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  With 11.1 there are very similar steps, but so far I didn&#8217;t manage to make it work <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>The process involves three steps and it&#8217;s good to complete and test them one at a time, so that any occurring problems are easier to locate and fix.</p>
<h3>#1. Check connectivity with the database</h3>
<p>Ensure that we can connect to the database with a native client:</p>
<p><code> [root@ora ~]# psql -h 10.132.28.183 -p 5432 -d callcenter -U cc<br />
Welcome to psql 8.3.1 (server 8.1.11), the PostgreSQL interactive terminal.<br />
Type:  \copyright for distribution terms<br />
\h for help with SQL commands<br />
\? for help with psql commands<br />
\g or terminate with semicolon to execute query<br />
\q to quit<br />
WARNING:  You are connected to a server with major version 8.1,<br />
but your psql client is major version 8.3.  Some backslash commands,<br />
such as \d, might not work properly.</code></p>
<p><code> </code></p>
<p><code>callcenter=&gt;</code></p>
<p>So this works. Most common problems here could be firewalls not allowing the connection or missing configuration entry in the pg_hba.conf</p>
<h3>#2. Configure and check ODBC</h3>
<p>Next we have to configure ODBC connectivity. I&#8217;m using unixODBC package supplied with Centos 5. It&#8217;s system-wide configuration is in /etc/odbc.ini and I&#8217;ll be using that file, but if you don&#8217;t have access to it, you can use ~/.odbc.ini in oracle owner home directory. Actually you can use any filename as long as you configure Oracle to use it too, but only these two are seen by isql and operating system ODBC tools.</p>
<p>We add a  section describing our datasource:</p>
<p><span style="text-decoration:underline;">/etc/odbc.ini</span></p>
<p><code>[cctest]<br />
Driver = PostgreSQL<br />
Database = callcenter<br />
Servername = 10.132.28.183<br />
Port = 5432<br />
ReadOnly = No<br />
Username = cc<br />
Password = xxxxx<br />
</code></p>
<p>We could also use the ODBCConfig tool from unixODBC-kde to configure it &#8220;the clicky way&#8221;. Anyway, now we can test if ODBC works:</p>
<p><code> </code></p>
<pre><code>
[root@ora ~]# isql cctest
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL&gt;
</code></pre>
<p>And it works. At least for me &#8211; I really don&#8217;t have any troubleshooting experience with ODBC, because it worked for me out-of-the-box, but if something is wrong at this point, recheck the config file and if it&#8217;s ok &#8211; strace is your friend &#8211; this tool can sometimes provide some answers really quickly.</p>
<h3>#3. Configure Oracle Gateway</h3>
<p>Configuring Oracle is also a three step process:</p>
<ul>
<li>create initSID.ora file for the agent</li>
<li>setup a listener and a service</li>
<li>add a TNS entry pointing to our listener</li>
</ul>
<p>First I&#8217;ll show it for the 10.2 engine and then point out the differences between 11.1.</p>
<h4>Create initSID.ora</h4>
<p>In $ORACLE_HOME/hs/admin we create initSID.ora file, where SID is the name for an instance of Heterogeneous Services Agent that will serve out ODBC datasource. It doesn&#8217;t have to be the same as datasource name, but here it is for simplicity sake.</p>
<p><span style="text-decoration:underline;">$ORACLE_HOME/hs/admin/initcctest.ora</span></p>
<p><code>HS_FDS_CONNECT_INFO = cctest<br />
HS_FDS_TRACE_LEVEL = 0<br />
HS_FDS_SHAREABLE_NAME = /usr/lib/libodbcpsql.so<br />
set ODBCINI=/etc/odbc.ini</code></p>
<p>The HS_FDS_CONNECT_INFO however points to our datasource and so it has to be the same as in /etc/odbc.ini and HS_FDS_SHAREABLE_NAME should point to the actual driver.</p>
<h4>Configure the listener</h4>
<p>Next we add a new listener and a service (we can also use an existing listener if we want)</p>
<p><span style="text-decoration:underline;"> $ORACLE_HOME/network/admin/listener.ora</span></p>
<p><code> </code></p>
<p><code></p>
<pre>LISTENERHS =
        (ADDRESS_LIST =
                (
                        ADDRESS= (PROTOCOL=tcp)
                        (HOST = ora)
                        (PORT = 1526)
                )
        )

SID_LIST_LISTENERHS =
        (SID_LIST =
                (SID_DESC =
                        (SID_NAME = cctest)
                        (ORACLE_HOME = /u00/oracle/product/10.2.0/db_1)
                        (PROGRAM = hsodbc)
                )
        )</pre>
<p></code></p>
<p>The SID_NAME parameter must match the SID from initSID.ora file, not necessarily the name of a datasource</p>
<p>And now start the listener:</p>
<p><code> </code></p>
<p><code></p>
<pre>oracle@ora[DB25]:/u00/oracle/product/10.2.0/db_1/network/admin&gt; lsnrctl start listenerhs 

LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 04-LUT-2010 21:41:02

Copyright (c) 1991, 2006, Oracle.  All rights reserved.

Starting /u00/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.3.0 - Production
System parameter file is /u00/oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u00/oracle/product/10.2.0/db_1/network/log/listenerhs.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora)(PORT=1526)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=ora)(PORT=1526))
STATUS of the LISTENER
------------------------
Alias                     listenerhs
Version                   TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date                04-LUT-2010 21:41:02
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u00/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u00/oracle/product/10.2.0/db_1/network/log/listenerhs.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora)(PORT=1526)))
Services Summary...
Service "cctest" has 1 instance(s).
  Instance "cctest", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
oracle@ora[DB25]:/u00/oracle/product/10.2.0/db_1/network/admin&gt;</pre>
<p></code></p>
<h4>Add a TNS entry</h4>
<p>And all that&#8217;s left is to add a line to tnsnames.ora pointing to our listener:</p>
<p><code>cctest = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora) (PORT = 1526)) (CONNECT_DATA = (SID = cctest)) <strong>(HS = OK)</strong>)</code></p>
<p>For Heterogeneous Services to work, the HS = OK part must be present.</p>
<p>Now we can create a database link to a Postgres  database:<br />
<code><br />
CREATE PUBLIC DATABASE LINK cctest CONNECT TO <span style="text-decoration:underline;">"cc"</span> IDENTIFIED BY "xxxxx" USING 'cctest';</code></p>
<p>And now we can do SELECT * from &#8220;sometable&#8221;@cctest;</p>
<h3><span style="font-weight:normal;">User and object names must be quoted. I&#8217;ll explain why at a later time.</span></h3>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleonlinux.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleonlinux.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleonlinux.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=12&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleonlinux.wordpress.com/2010/02/04/configuring-oracle-gateway-10-2-for-odbc-for-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8b85650ddd41ab688bd6975cd74fb86d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkaluza</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://oracleonlinux.wordpress.com/2010/01/27/hello-world/</link>
		<comments>http://oracleonlinux.wordpress.com/2010/01/27/hello-world/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 21:02:56 +0000</pubDate>
		<dc:creator>mkaluza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The title says it all But &#8211; the main reason for this blog is that finally, after all those years of reading and learning from everyone else&#8217;s articles, manuals and blogs, I want to share a few things myself. At first it&#8217;ll be mostly about  Oracle Database, RMAN, Linux, LVM snapshots, Device Mapper, backups and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=1&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The title says it all <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But &#8211; the main reason for this blog is that finally, after all those years of reading and learning from everyone else&#8217;s articles, manuals and blogs, I want to share a few things myself. At first it&#8217;ll be mostly about  Oracle Database, RMAN, Linux, LVM snapshots, Device Mapper, backups and open source virtualization&#8230; stuff like that. Mostly things I use (or I&#8217;d like to use) a lot at work for maintaining our development  environment that help me. About few of them I couldn&#8217;t find much on the net, so they&#8217;ll come first.</p>
<p>I hope someone will find it usefull&#8230;</p>
<p>Martin</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oracleonlinux.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oracleonlinux.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oracleonlinux.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oracleonlinux.wordpress.com&amp;blog=11696321&amp;post=1&amp;subd=oracleonlinux&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oracleonlinux.wordpress.com/2010/01/27/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8b85650ddd41ab688bd6975cd74fb86d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkaluza</media:title>
		</media:content>
	</item>
	</channel>
</rss>
