<?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>Rants &#38; Raves - The Blog!</title>
	<atom:link href="http://qdosmsq.dunbar-it.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://qdosmsq.dunbar-it.co.uk/blog</link>
	<description>My blogspace for rants and raves about anything I like! (or don&#039;t like!)</description>
	<lastBuildDate>Fri, 24 May 2013 08:19:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Astell &amp; Kern &#8211; AK100 Review</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/astell-kern-ak100-review/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/astell-kern-ak100-review/#comments</comments>
		<pubDate>Thu, 23 May 2013 14:38:13 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Gadgets & Gizmos]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1261</guid>
		<description><![CDATA[My wife bought me one of these because my old iRiver H340 has begun eating batteries. It&#8217;s on its third replacement now, plus I have more music than fits the H340&#8242;s hard drive. I do not buy Apple products, so any iWhatever (other than iRiver) was out of the question. Nothing personal, I just don&#8217;t [...]]]></description>
				<content:encoded><![CDATA[<div id="attachment_1266" class="wp-caption alignleft" style="width: 235px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/05/ak100.jpeg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/05/ak100.jpeg" alt="Astell &amp; Kern AK100" width="225" height="225" class="size-full wp-image-1266" /></a><p class="wp-caption-text">Astell &#038; Kern AK100</p></div>
<p>My wife bought me one of these because my old iRiver H340 has begun eating batteries. It&#8217;s on its third replacement now, plus I have more music than fits the H340&#8242;s hard drive. I do not buy Apple products, so any iWhatever (other than iRiver) was out of the question. Nothing personal, I just don&#8217;t like them.<span id="more-1261"></span></p>
<p>Finding a suitable replacement music player with decent storage, no hard drive, and Linux compatibility (64 bit essential) was very difficult especially if you are not fond of Apple kit. (Have I mentioned that I&#8217;m not?)</p>
<p>The package contains the device, a nice little fabric pouch, a demo micro SD card (2 Gb) with 5 tracks on it, a screen protector for the touch screen on front and one for the back, and a charging lead. There is no charger &#8211; you can use your PC&#8217;s USB slot, your Kindle charger, your phone charger or whatever you have that is fitted with a standard USB slot to plug the lead into. </p>
<p>You must supply your own (decent quality) headphones &#8211; or use the optical output to feed into a quality Hi-Fi system. The headphone socket can also supply line-out levels, so can be fed directly into an amp.</p>
<p>The manual is in various languages, and lives on the device itself. Save space by deleting the one(s) you don&#8217;t need. Or all of them. Don&#8217;t try and print it off on A4 paper, the pages are tiny &#8211; as is the print. Use a PDF reader to view the pages.</p>
<p>There is a copy of &#8220;iRiver Plus 4&#8243; for Windows on the device. Delete it. (See below!) and download the latest from iRiver.com. If you have a 32 bit Windows computer that is!</p>
<p>The supplied software (iRiver Plus 4) will not work on Windows 7 Professional 64 bit. It is 32 bit only. On 64 bit, it will not recognise that the device is plugged in. However, the software is not actually very good, so you are better off just using Windows Explorer and mounting the device as a USB drive. That works.</p>
<p>The two micro USB cards are valid up to 32 Gb but with the latest software and careful formatting, 64 Gb micro cards can be used giving a huge 160 Gb of storage. At least, that&#8217;s what I&#8217;m told, I haven&#8217;t got any 64Gb cards to try&#8230;&#8230;yet!</p>
<p>Linux users, don&#8217;t worry. The device, and cards is recognised as USB storage. Simply drag and drop files to the (up to three) drives. Works just fine. The manual says that only Windows and Mac (32 bit) are supported by iRiver Plus 4 and even then, only the card in slot 1 is recognised. Go figure.</p>
<p>The supplied iRiver Plus 4 software doesn&#8217;t work under Wine on a 64 bit Linux system. It doesn&#8217;t work under Windows 64bit, so there&#8217;s not much chance of it working under Wine on a 64 bit system. 32 bit users may find that it does work under Wine. (Good Luck!)</p>
<p>Updating the firmware without iRiver Plus 4 is simple: </p>
<ul>
<li>Download the zip file from <a href="http://www.iriver.com/support/download_list.asp" title="http://www.iriver.com/support/download_list.asp" target="_blank">http://www.iriver.com/support/download_list.asp</a>. (Release 1.33 is available at the time of writing).</li>
<li>Unzip it to give you a hex file. </li>
<li>Copy the hex file to the root of the main drive of the device &#8211; the same location where you see Music, Manual, AlbumArt and System directories.</li>
<li>Unmount the USB drive that the device is pretending to be. Windows users, this means &#8220;safely remove&#8221;. Don&#8217;t just pull the plug!</li>
<li>It will notice the new hex file and will install it. After a power off and back on, which it does automagically, you are now running the latest release.</li>
</ul>
<p>Make sure you have a fully charged battery though, you do not want to expire half way through the upgrade. That would make an expensive brick!</p>
<p>Sound quality is excellent, I&#8217;ve heard stuff on my ripped CDs that I&#8217;ve never heard before. The device plays all sorts of formats, but the best ones are FLAC, WMA and OGG. Take my advice, don&#8217;t even think about putting MP3 on this device &#8211; why would you bother, unless you really need the space savings.</p>
<p>The AK100 is solidly built. The chassis is a solid billet of aluminium which gives the device a decent weight. It is certainly not at all plasticy &#8211; and at the price, it shouldn&#8217;t be!</p>
<p>Don&#8217;t so as I did &#8211; spend ages trying to get the supplied screen protector on the front and the back case protector on the back. There is one already fitted on each side, so the ones you get in the package are spares! However, if you do do as I did, the touch screen works perfectly well through two protectors! </p>
<p>Controls are minimal. On the top is the power switch, input and output sockets. </p>
<p>The right side has only the volume knob. When playing, turning that increases or decreases the volume &#8211; but, if the screen is on, it shows the volume screen on the device and you can easily adjust the volume using the touch screen. Just drag the pointer where you want it to be.</p>
<p>The left side has three tiny buttons. Rewind, play, forward. Each has two functions as per the manual.</p>
<p>The bottom has the micro USB socket and the two slots for the micro USB cards under a heavy duty slide to open cover. </p>
<p>BEWARE! The manual shows only 1 micro card being inserted and shows how to align it. The bottom slot matches the diagram in the manual. However, the top slot requires the card to be inverted (turned upside down!) and put in the other way round.</p>
<p>So, in the bottom slot it&#8217;s as per the manual. In the top slot, turn the card over so that the contacts are showing, and put it in that way. Be very very careful, the slots are very small, and putting the cards in the wrong way round might damage things and prevent you using them.</p>
<p>Also, the cards have to be pushed in until they click, and the same to get them out. Use another card to do this, because it&#8217;s quite fiddly to get them in with fingers like mine. Ladies with decent nails will have no problem!</p>
<p>Building play lists on the device itself is interesting. You have to be playing a track to add it. It&#8217;s not impossible, just fiddly. The supplied software is apparently better to use, but as it doesn&#8217;t work on my system, I&#8217;m a tad up that creek! However, I&#8217;m a programmer and I&#8217;ll be writing my own sometime soon. Cross platform Windows, Linux and Mac (hopefully) &#8211; so drop me an email or get me on Twitter for a progress report (@NormanDunbar).</p>
<p><em>Actually, I&#8217;ve determined that the playlist is nothing more than a list of the paths to the files I want in the playlist. So, building one in a text editor is relatively simple. I&#8217;m still going to build a proper cross platform playlist builder though!</em></p>
<p>I loaded up the internal memory to almost full with a pile of FLACs, and on turning the device back on, the Auto Scan Database Rebuild told me that there wasn&#8217;t enough room to rescan the tracks to put into the database. This is interesting.</p>
<p>I moved a pile of directories and files onto one of the SD cards and still got the same error, however, moving a few more directories resolved the problem. I think it&#8217;s caused by the scan attempting to build the entire database in memory and <em>then</em> write it to the file &#8211; or something like that &#8211; and it&#8217;s unable to do it with all the tracks I have loaded. Once again, I&#8217;ll be writing something cross platform to do the needful myself.</p>
<p>Until I got the scan to work, I couldn&#8217;t select tracks by Album, Artists, Genre etc, only by Folder. It&#8217;s not a huge problem, my folders are arranged quite nicely by Artist then Album(s) beneath that and finally, the tracks. </p>
<p>I don&#8217;t do album art, and because I have the screen configured to turn off after 10 seconds anyway, I really can&#8217;t see the point of Album Art while a track is playing. I wonder if playing the same track on repeat for long enough will cause screen burn after a while? Plus, of course, it hogs valuable space for more music! Mind you, some music formats these days embed the art in the track &#8211; so if you were to purchase three tracks from Amazon, for example, you&#8217;d most likely end up with three duplicates of the same album art, embedded in your MP3s. Wonder if the art can be removed from the tracks. Hmmm.</p>
<p>The equaliser function is probably best left turned off. No matter what I did with it, I found the default sound settings better then anything I chose using the equaliser. It updates the sound in real time, when you stop moving your finger on the screen for a second, the sound will change. Keep moving your finger and it will patiently wait for you before changing anything sound wise.</p>
<p>The pouch supplied is good for protecting the device from scratches, and such like, but it is quite light and won&#8217;t take too much stress. It is certainly not suitable for attaching to a belt for portability. This device is better off locked in an inside pocket or similar. I will be on the lookout for a small sturdy case to attach this to my belt.</p>
<p>Talking of which, if you do want to go portable with this player, and why not, get a headphone that comes out at 90 degrees rather than a straight in plug. It makes better sense, especially if you ever bend over while wearing it around your waist. The sticky out plug gets bent over by your bending body and could knacker the socket and/or headphone plug. My Sony active noise cancelling headphones have a 90 degree plug and work great.</p>
<p>So, in summary:</p>
<ul>
<li>It&#8217;s excellent, a little pricey, but it&#8217;s not Apple.</li>
<li>Quality of build and sound is excellent.</li>
<li>It handles optical in and out, if you have it.</li>
<li>The software is described on a Hi-Fi forum as a &#8220;steaming POS&#8221; &#8211; it is. It doesn&#8217;t work at all on 64 bit Windows systems, but to be fair, the manual does say that it must be 32 bit. It won&#8217;t run on Linux, but under Linux, you don&#8217;t actually need it.</li>
<li>It doesn&#8217;t play video, or allow you to read text or word files, it&#8217;s a quality music player! If you want the other stuff, buy a tablet or a smart phone!</li>
<li>Without the software, creating playlists is fiddly. </li>
<li>The database rebuild scanner cannot cope with a huge amount of files all at once.</li>
<li>I love it!</li>
</ul>
<p>And finally, I used to get around 4-6 hours playback from a fully charged battery on my H340. With this AK100, I&#8217;m past that already and I still show a full charge! I&#8217;m still on the very first (5 hour) charge. </p>
<p>Do you think I&#8217;ve been going on too long? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>As I said, because the supplied software is pants, I&#8217;ll be building my own at some point, if you are interested in a (free) copy when it&#8217;s done, contact me at the email above (assuming my email is published) which is &#8220;norman (at) dunbar-it (dot) co (dot) uk&#8221; &#8211; or @NormanDunbar on Twitter for details. But, for Windows 32 bit users &#8211; probably most of you out there &#8211; you might be ok with iRiver Plus 4.</p>
<p>I did have a problem with the AK100 after a few weeks of almost constant use. The volume knob on the side became intermittent. I contacted my dealer &#8211; <a href="http://www.soundfidelity.co.uk" title="http://www.soundfidelity.co.uk" target="_blank">Sound Fidelity</a> &#8211; and they were extremely helpful and had the unit returned for investigation. When it was returned to me, I noticed that the iRiver Service Centre had updated the software to 1.33 and the knob feels a lot more substantial than before in operation.</p>
<p>I tried the bluetooth function on the device and it hung! I had to do a power off reset (press the ^ button on the side, and the power button on top for 7 seconds) which wiped my settings but not the music or the database. Trying bluetooth again resulted in another hang and another reset. Maybe something in 1.33 is a problem?</p>
<p>Time to contact iRiver support.</p>
<p>Cheers,<br />
Norm.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/astell-kern-ak100-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spatial Indexes and Oracle Errors. How to fix.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/spatial-indexes-and-oracle-errors-how-to-fix/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/spatial-indexes-and-oracle-errors-how-to-fix/#comments</comments>
		<pubDate>Mon, 20 May 2013 13:32:44 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1251</guid>
		<description><![CDATA[If, like me, you have suffered from ORA-29902 Error in executing ODCIIndexStart() routine errors where Spatial indexes are involved, the following might help you fix it. The error involved in the following has been extracted from a log file for a system which doesn&#8217;t use Spatial or Locator itself, but calls out to a separate [...]]]></description>
				<content:encoded><![CDATA[<p>If, like me, you have suffered from <em>ORA-29902 Error in executing ODCIIndexStart() routine errors</em> where Spatial indexes are involved, the following might help you fix it. <span id="more-1251"></span></p>
<p>The error involved in the following has been extracted from a log file for a system which doesn&#8217;t use Spatial or Locator itself, but calls out to a separate database which does have Locator installed. This latter database was created using Transportable Tablespaces, exported from 10.2.0.5 Enterprise Edition on HP-UX and imported into 11.2.0.3 Standard Edition on Linux x86-64.</p>
<p>There were a number of errors creating a few of the spatial indexes on tables, like the one that follows in the example, that had zero rows in them. Oracle Support assured us that this was not a problem. And we believed them. Sigh!</p>
<h2>The Problem</h2>
<p>The following query demonstrates the problem. </p>
<pre>
CONNECT CADDBA/password

SELECT * FROM TEXT_FORESHORE A
WHERE MDSYS.SDO_RELATE( A.GEOM, 
                        MDSYS.SDO_GEOMETRY(2003,81989,
                        NULL,
                        MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
                        MDSYS.SDO_ORDINATE_ARRAY(362000,600000,363000,601000)),
                        'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE';
SELECT * FROM TEXT_FORESHORE A
*
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13203: failed to read USER_SDO_GEOM_METADATA view
ORA-13203: failed to read USER_SDO_GEOM_METADATA view
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
</pre>
<h2>Working Out</h2>
<p>I am definitely not a Spatial guru, but the above doesn&#8217;t look right to me. Looking at Google, the problem is caused by the Spatial Index being not there, missing, absent. Ok, let&#8217;s create it.</p>
<pre>
CREATE INDEX IDX_T142_GEOM ON TEXT_FORESHORE(GEOM)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS('TABLESPACE=CAD_PRSN_IDX_SPAT SDO_RTR_PCTFREE=0')
NOPARALLEL;

CREATE INDEX IDX_T142_GEOM ON TEXT_FORESHORE
                    *
ERROR at line 1:
ORA-00955: name is already used by an existing object
</pre>
<p>Ok, to me, that says that the index is actually present. DBA_INDEXES shows this to be the case. Apparently, it needs to be dropped and recreated, so I carry on:</p>
<pre>
DROP INDEX IDX_T142_GEOM ;
Index dropped.

CREATE INDEX IDX_T142_GEOM ON TEXT_FORESHORE(GEOM)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS('TABLESPACE=CAD_PRSN_IDX_SPAT SDO_RTR_PCTFREE=0')
NOPARALLEL;

CREATE INDEX IDX_T142_GEOM ON TEXT_FORESHORE
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13203: failed to read USER_SDO_GEOM_METADATA view
ORA-13203: failed to read USER_SDO_GEOM_METADATA view
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
</pre>
<p>Aha. Something different this time. Still not working though. It might be as simple as the CADDBA user not having the correct privileges. Create table and create sequence is required to create a spatial index &#8211; whether directly in the schema or as another user creating on in the schema in question. So:</p>
<pre>
CONNECT / AS SYSDBA

SELECT PRIVILEGE
FROM DBA_SYS_PRIVS
WHERE PRIVILEGE IN ('CREATE TABLE', 'CREATE SEQUENCE' )
AND GRANTEE = 'CADDBA';

PRIVILEGE
---------------
CREATE SEQUENCE
CREATE TABLE

2 rows selected.
</pre>
<p>So that&#8217;s not the problem this time. Looking into the USER_SDO_GEOM_METADATA view, for this user (every user with Spatial data should have this view) I see nothing for this table_name and column_name:</p>
<pre>
CONNECT CADDBA/password

SELECT * FROM USER_SDO_GEOM_METADATA
WHERE TABLE_NAME = 'TEXT_FORESHORE'
AND COLUMN_NAME = 'GEOM';

no rows selected
</pre>
<p>Ok, a clue. I (vaguely) know that in order to create a spatial index, that view needs some data telling it all about the column in question. As this database had been created from a legacy database (which very very rarely gets updated) I was ok to extract the data from legacy and insert it directly here.</p>
<p>Did I mention, each time the commands fail to create the index in question, they create the index in question? So after each failure, you have to drop it again. Sigh!</p>
<pre>
DROP INDEX CADDBA.IDX_T142_GEOM ;
Index dropped.

INSERT INTO USER_SDO_GEOM_METADATA
VALUES ('TEXT_FORESHORE','GEOM',
        mdsys.SDO_DIM_ARRAY(
             mdsys.SDO_DIM_ELEMENT('Easting', 0, 700000, .0005),
             mdsys.SDO_DIM_ELEMENT('Northing', 0, 1300000, .0005)
        ), 81989);

1 row created.

COMMIT;
Commit complete.
</pre>
<p>Now can I create the index?</p>
<pre>
CREATE INDEX IDX_T142_GEOM ON TEXT_FORESHORE(GEOM)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
PARAMETERS('TABLESPACE=CAD_PRSN_IDX_SPAT SDO_RTR_PCTFREE=0')
NOPARALLEL;

Index created.
</pre>
<p>And success at long last. Spatial, I hate you! Does the query work now?</p>
<pre>
SELECT * FROM TEXT_FORESHORE A
WHERE MDSYS.SDO_RELATE( A.GEOM, 
                        MDSYS.SDO_GEOMETRY(2003,81989,
                        NULL,
                        MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
                        MDSYS.SDO_ORDINATE_ARRAY(362000,600000,363000,601000)),
                        'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE';

no rows selected
</pre>
<p>After all that work, no rows selected is exactly the correct answer. The table is empty, so I would have been very surprised to see anything other than that response.</p>
<h2>The Solution</h2>
<p>The solution to my particular problem was to:</p>
<ul>
<li>Drop the so called missing index.</li>
<li>Make sure correct data is in USER_SDO_GEOM_METADATA for the table and column in question. Each user with Spatial data will have one of these views, so you need to be in the appropriate user.</li>
<li>Create the index again.</li>
<li>Test the failing query, and it should work.</li>
</ul>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/spatial-indexes-and-oracle-errors-how-to-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Need to Compile a 32 bit Application on a 64 bit Linux System?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/need-to-compile-a-32-bit-application-on-a-64-bit-linux-system/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/need-to-compile-a-32-bit-application-on-a-64-bit-linux-system/#comments</comments>
		<pubDate>Mon, 13 May 2013 19:27:03 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1243</guid>
		<description><![CDATA[I have a small utility that I need to use from time to time. I wrote it back in 2009 when 32 bit systems were all the rage. It reads a certain type of data file and outputs lots of, ahem, interesting information about the contents. When I compiled it on my 64 bit laptop, [...]]]></description>
				<content:encoded><![CDATA[<p>I have a small utility that I need to use from time to time. I wrote it back in 2009 when 32 bit systems were all the rage. It reads a certain type of data file and outputs lots of, ahem, <em>interesting</em> information about the contents. When I compiled it on my 64 bit laptop, it produced complete and utter rubbish! How did I fix it? <span id="more-1243"></span></p>
<p>The data file that the utility reads is a <a href="http://firebirdsql.org" title="Firebird Databases" target="_blank">Firebird database</a> file which has a number of <code>long</code> fields in various <code>struct</code>s. On a 32 bit Linux system, a <code>long</code> is the same size as an <code>int</code> &#8211; both are 32 bit.</p>
<p>Thanks to Vlad Khorsun, one of the Firebird Development team (of volunteers) I realised that under a 64 bit system, <code>int</code>s remained as 32 bit while <code>long</code>s got a wee bit bigger at 64 bits &#8211; hence my <code>struct</code>s were complete nonsense under a 64 bit system.</p>
<p>There are two solutions, well, at least two:</p>
<ul>
<li>Rewrite the code to take account of the world of 32 and 64 bit development systems. This would involve discovering, somehow, if the utility was being built on a 32 or 64 bit system, and changing the definition of a long variable or struct member accordingly.</li>
<li>Compile the system and make it believe it&#8217;s running on a 32 bit system. No code changes required!</li>
</ul>
<p>Being lazy, and because there&#8217;s only a slim possibility of this code being released into the wild, I chose the latter option. It turned out to be quite simple.</p>
<p>First, I needed to install the gcc multilib support packages on my Mint KDE system:</p>
<pre>
sudo apt-get install gcc-multilib
</pre>
<p>Now, when I compile the code, I use the <code>-m32</code> option to gcc, as follows:</p>
<pre>
gcc -m32 -o fbdump32 fbdump.c
</pre>
<p>Simple, and it works. However, the correct solution would be to correctly define my <code>struct</code>s with proper C/C++ standard data types that guarantee that the width will always be 32 bits and/or determine whether I&#8217;m compiling on 32 or 64 bit systems. For example:</p>
<pre>
// Data types that guarantee specific widths:

[u]int8_t are 8 bit.
[u]int16_t are 16 bit.
[u]int32_t are 32 bit.
[u]int64_t are 64 bit.


// Maximum and minimum for these are defined as:

[U]INT8_MIN and [U]INT8_MAX
[U]INT16_MIN and [U]INT16_MAX
[U]INT32_MIN and [U]INT32_MAX
[U]INT64_MIN and [U]INT64_MAX


// Am I compiling on a 64 bit system by any chance? 
#if __WORDSIZE==64
... // Do 64 bit stuff here.
#else
... // Do 32 bit stuff here.
#endif
</pre>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/need-to-compile-a-32-bit-application-on-a-64-bit-linux-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Listener Problem is Driving Me Mad!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/this-listener-problem-is-driving-me-mad/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/this-listener-problem-is-driving-me-mad/#comments</comments>
		<pubDate>Fri, 10 May 2013 16:39:28 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1225</guid>
		<description><![CDATA[I have been looking at this far too long, and I&#8217;m stumped. I resolved a similar problem yesterday on another server. That was down to the ORACLE_HOME setting in listener.ora having a &#8217;1&#8242; in it rather than a &#8217;2&#8242;. Took ages to spot that. Anyway, here the stuff you&#8217;ll need to know to sort this [...]]]></description>
				<content:encoded><![CDATA[<p>I have been looking at this far too long, and I&#8217;m stumped. I resolved a similar problem yesterday on another server. That was down to the ORACLE_HOME setting in listener.ora having a &#8217;1&#8242; in it rather than a &#8217;2&#8242;. Took ages to spot that. <span id="more-1225"></span></p>
<p>Anyway, here the stuff you&#8217;ll need to know to sort this for me, or suggest stuff. It&#8217;s a question on Oracle L seeing as there is a lot of evidence to post.</p>
<p>As ever, server names etc have been changed to protect the innocent!</p>
<p><strong>Update</strong> We have a solution! Scroll to the bottom for details.</p>
<h2>Oracle and OS Versions</h2>
<pre>
Oracle Database: Standard Edition, 11.2.0.3 64 bit.
Server: SLES 10 sp 4
Uname -r: 2.6.16.60-0.97.1-smp
hostname: orcl11gserver 
</pre>
<h2>The Problem</h2>
<p>In a word, setting ORACLE_SID and connecting to a user/password works fine. Connecting to user/password@alias gives the following error:</p>
<pre>
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
</pre>
<h2>Database Info</h2>
<p>I can connect to the database, both as sysdba and as a non-sysdba user provided I don&#8217;t use the listener:</p>
<pre>
$ sqlplus / as sysdba
...
Connected.

SQL> show parameter listener

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
listener_networks                    string
local_listener                       string
remote_listener                      string


SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      orcl11g


SQL> show parameter service

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      orcl11g.world


SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
orcl11g.WORLD
</pre>
<h2>Listener.ora</h2>
<pre>
lsnr_orcl11g =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = orcl11gserver)(PORT = 1521))
      )
    )
  )

SID_LIST_lsnr_orcl11g =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl11g)
      (ORACLE_HOME = /opt/oracle/product/11.2.0.3/db_1)
      (SID_NAME = orcl11g)
    )
)

DYNAMIC_REGISTRATION_lsnr_orcl11g = off
SUBSCRIBE_FOR_NODE_DOWN_EVENT_lsnr_orcl11g=OFF
</pre>
<h2>Tnsnames.ora</h2>
<pre>
orcl11g,orcl11g.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(Host = orcl11gserver)(Port = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl11g)
    )
  )</pre>
<h2>Sqlnet.ora</h2>
<pre>
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, HOSTNAME)
</pre>
<h2>Oratab</h2>
<pre>
orcl11g:/opt/oracle/product/11.2.0.3/db_1/:N
</pre>
<h2>Tnsping</h2>
<pre>
$ tnsping orcl11g:

Used parameter files:
/opt/oracle/product/11.2.0.3/db_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(Host = orcl11gserver)(Port = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl11g)))
OK (0 msec)</pre>
<h2>Listener Status</h2>
<pre>
$ lsnrctl status lsnr_orcl11g
...
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /opt/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/orcl11gserver/lsnr_orcl11g/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl11gserver.testds.ntnl)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl11gserver)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     lsnr_orcl11g
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                10-MAY-2013 16:51:52
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/11.2.0.3/db_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/orcl11gserver/lsnr_orcl11g/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl11gserver.testds.ntnl)(PORT=1521)))
Services Summary...
Service "orcl11g" has 1 instance(s).
  Instance "orcl11g", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully</pre>
<h2>Where is Listener Running From?</h2>
<pre>
ps -ef|grep -i ls[n]r_cds

oracle   21180     1  0 16:51 ?        00:00:00 /opt/oracle/product/11.2.0.3/db_1/bin/tnslsnr lsnr_orcl11g -inherit</pre>
<h2>Listener Log</h2>
<p>The listener log shows the connection attempt being made, and established ok witha result code of zero.</p>
<pre>
&lt;msg time='2013-05-10T17:25:56.866+01:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='orcl11gserver'
 host_addr='10.57.18.116'&gt;
 &lt;txt&gt;10-MAY-2013 17:25:56 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl11g)(CID=(PROGRAM=sqlplus)(HOST=orcl11gserver)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.57.18.116)(PORT=12633)) * establish * orcl11g * 0
 &lt;/txt&gt;
&lt;/msg&gt;</pre>
<h2>Client Trace</h2>
<p>Don&#8217;t worry, I&#8217;m not about to paste an entire ADMIN level trace here. But looking in one, I saw this extract:</p>
<pre>
nsbasic_brc:type=12, plen=11
nsbasic_brc:what=17, tot =11
nsbasic_brc:packet dump
nsbasic_brc:00 0B 00 00 0C 00 00 00  |........|
nsbasic_brc:01 00 01                 |...     |
nsbasic_brc:exit: oln=0, dln=1, tot=11, rc=0
nioqrc: found a break marker...
nioqrc: Recieve: returning error: 3111</pre>
<p>This is sort of interesting, as it seems to indicate I got a break from somewhere or something! I saw this on my other similar problem as well, so it&#8217;s the same in the two trace files, but I solved the other problem by correcting the Oracle Home in listener.ora. Not this time!</p>
<h2>The Solution</h2>
<p>There are many people on oracle-l who took the time to look at the problem, so thanks to all. There are, however, two people to whom I am extremely grateful. They took mere minutes to discover what had been staring me in the face all day, and the winners are:</p>
<ul>
<li>@martinberx on Twitter.</li>
<li>David Barbour on oracle-l.</li>
</ul>
<p>Both noticed that in /etc/oratab, the Oracle Home path had a trailing slash, while in the listener.ora, it did not. Sheesh!</p>
<p>Thanks to both.</p>
<h2>The Fix</h2>
<p>The fix was relatively simple:</p>
<ul>
<li>With the current (wrong) oratab settings in force, shut down the database and the listeners. (The problem affected a number of databases/listeners on this server, not just the one I used in the above example.)</li>
<li>Edit oratab to remove the trailing slash.</li>
<li>Restart the listeners and databases with the new improved oratab.</li>
<li>Test &#8211; it all &#8220;just works&#8221;.</li>
</ul>
<p> <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/this-listener-problem-is-driving-me-mad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA-03262 While Dropping Empty Datafile</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/ora-03262-while-dropping-empty-datafile/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/ora-03262-while-dropping-empty-datafile/#comments</comments>
		<pubDate>Thu, 02 May 2013 14:37:28 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1219</guid>
		<description><![CDATA[Tired of trying to drop empty datafiles from a tablespace, which you know is empty? Keep getting errors telling you the data file isn&#8217;t empty? Getting frustrated with the whole thing? Me too. This link has the reason and solution.]]></description>
				<content:encoded><![CDATA[<p>Tired of trying to drop empty datafiles from a tablespace, which you know is empty? Keep getting errors telling you the data file isn&#8217;t empty? Getting frustrated with the whole thing? Me too. <a href="http://nadeemmohammed.wordpress.com/2012/03/10/ora-03262-while-dropping-empty-datafile/trackback/" title="http://nadeemmohammed.wordpress.com/2012/03/10/ora-03262-while-dropping-empty-datafile/" target="_blank">This link</a> has the reason and solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/ora-03262-while-dropping-empty-datafile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer Won&#8217;t Upload Files to MOS?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/internet-explorer-wont-upload-files-to-mos/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/internet-explorer-wont-upload-files-to-mos/#comments</comments>
		<pubDate>Thu, 02 May 2013 08:55:18 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1213</guid>
		<description><![CDATA[Are you forced to use Internet Explorer at work? Are you, like me, forced to use an old, insecure, broken version of IE at work, because it&#8217;s the Government Standard version? And are you, like me, unable to upload evidence files to My Oracle Support? You need to go to Tools, then Internet Options. On [...]]]></description>
				<content:encoded><![CDATA[<p>Are you forced to use Internet Explorer at work? Are you, like me, forced to use an old, insecure, broken version of IE at work, because it&#8217;s the Government Standard version? And are you, like me, unable to upload evidence files to My Oracle Support? <span id="more-1213"></span></p>
<ul>
<li>You need to go to <em>Tools</em>, then <em>Internet Options</em>.</li>
<li>On the <em>Security</em> tab, click the <em>Custom Level</em> button.</li>
<li>Now find and enable the <em>Include Local Directory Path</em> option.</li>
<li>OK your way back out, restart IE, and Robert is your mother&#8217;s brother.</li>
</ul>
<p>This works fine and has been tested on IE7, IE8, IE9 and possibly (but untested) IE10. Other browsers are not affected, but I&#8217;m told that Chrome also has problems.</p>
<p>Firefox, on the other hand, just works.</p>
<p>Hope this helps, unlike me, you may be able to find and click the above options. Our (Government) security policies have that option disabled and I&#8217;m <em>not allowed</em> to change it. I&#8217;m <em>not allowed</em> to use Firefox either. Go figure.</p>
<p>Security &#8211; sometimes it&#8217;s there to stop you doing your job.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/internet-explorer-wont-upload-files-to-mos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statspack Snapshot Fails ORA-01400 Cannot Insert NULL &#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/statspack-snapshot-fails-ora-01400-cannot-insert-null/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/statspack-snapshot-fails-ora-01400-cannot-insert-null/#comments</comments>
		<pubDate>Wed, 01 May 2013 10:13:45 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1198</guid>
		<description><![CDATA[Oh hum. An 11.2.0.3 Enterprise Edition production database has statspack taking a regular snapshot under the control of a dbms_scheduler job. For no apparent reason, the snapshot started failing with ORA-01400 Cannot insert NULL into PERFSTAT.STATS$SYSTEM_EVENT.EVENT. This was an interesting one to fix. The following is the investigative process, in brief. Test the snapshot process [...]]]></description>
				<content:encoded><![CDATA[<p>Oh hum. An 11.2.0.3 Enterprise Edition production database has statspack taking a regular snapshot under the control of a dbms_scheduler job. For no apparent reason, the snapshot started failing with <em>ORA-01400 Cannot insert NULL into PERFSTAT.STATS$SYSTEM_EVENT.EVENT</em>. This was an interesting one to fix. <span id="more-1198"></span></p>
<p>The following is the investigative process, in brief.</p>
<ul>
<li>Test the snapshot process with a manual one &#8211; same error.</li>
<li>Google and My Oracle Support aka MOS, were no help whatsoever. I was on my own! Twitter was useful and Noons (<a href="https://twitter.com/wizofoz2k" title="Noon's Twitter profile" target="_blank">@wizofoz2k</a>) suggested a statspack mismatch could cause this error.</li>
<li>Knowing that I had reinstalled statspack on this database a few weeks ago led me to drop and reinstall statspack and to recreate the jobs required to take regular snapshots and to purge old data. No joy, same problem.</li>
<li>Hunt down the code in <code>V$SQL</code> to see what&#8217;s going on here. A quick script helped out:
<pre>SELECT sql_fulltext
FROM   v$sql
WHERE  DBMS_LOB.INSTR(sql_fulltext, 'SYSTEM_EVENT') <> 0
AND    DBMS_LOB.INSTR(sql_fulltext, 'INSERT') <> 0;
</pre>
<p>That showed an insert statement, as expected, reading the <code>EVENT</code> column from <code>V$SYSTEM_EVENT</code> – which, given half a brain, makes sense! I didn&#8217;t have half a brain at the time – as will become obvious!</li>
<li>Another quick script showed that there were 5 rows in <code>V$SYSTEM_EVENT</code> that were NULL:
<pre>SELECT count(*) 
FROM sql_fulltext
WHERE event IS NULL;

COUNT(*)
--------
       5
</pre>
<p> WTF?</li>
<li>Looking at the <code>EVENT</code> column, showed a huge load of crud and nothing much like a proper Oracle event. Some of the data were:
<pre>rwp err: No dash in error string
r removing error %d is [ ][ ]
rrupt, error stack is [ ][ ]
down and process is starting up
indicate must count [ ][ ]
...
</pre>
<p>WTF? (The sequel!)</li>
<li>The next stop &#8211; I did say I didn&#8217;t have half a brain didn&#8217;t I &#8211; was the alert log, <em>where I should have been looking in the first place</em>! Bingo!:
<pre>WARNING: Oracle executable binary mismatch detected.
Binary of new process does not match binary which started instance.
</pre>
</li>
<p>And there we have it. Noons was correct in as much as the version of statspack in use &#8211; 11.2.0.3 EE &#8211; didn&#8217;t match the running database binary which was 11.2.0.3 SE. Somehow, someone (no, not me &#8211; but thanks for asking!) had managed to start the database running on SE rather than EE. </p>
<p>I&#8217;m thinking that this could have been done when an SE environment was enabled in a session, and someone simply did an <code>export ORACLE_SID=whatever</code> not realising that EE was required. <a href="http://qdosmsq.dunbar-it.co.uk/blog/2013/03/setting-oracle-environment-in-scripts/" title="Setting Oracle Environment in Scripts" target="_blank">This posting</a> might help in that case! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>After shutting down the database, making sure that the correct environment was set, a restart of the database got rid of the messages in the alert log, and a snapshot was successfully executed.</p>
<p>So, an interesting challenge that could have been resolved earlier if I&#8217;d gone straight to the alert log rather than dicking about thinking I knew that it must have been the reinstall I did previously! That&#8217;ll teach me to think then!</p>
<p>And by the way, I know (oops) from previous experience, that the snapshot code in V$SQL will have table names and commands in upper case, which is why I used upper case tests for INSERT and SYSTEM_EVENT in the script above. If I wasn&#8217;t so sure, I&#8217;d have done this instead:</p>
<pre>SELECT sql_fulltext
FROM   v$sql
WHERE  DBMS_LOB.INSTR(upper(sql_fulltext), 'SYSTEM_EVENT') <> 0
AND    DBMS_LOB.INSTR(upper(sql_fulltext), 'INSERT') <> 0;
</pre>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/05/statspack-snapshot-fails-ora-01400-cannot-insert-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Step-Father&#8217;s Cremation</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/my-step-fathers-cremation/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/my-step-fathers-cremation/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 15:33:22 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1190</guid>
		<description><![CDATA[Antonio Enrico Martini was cremated on 19th April 2013. He had been a chef for many years and one of his friends, whose name I shall add here when I remember it &#8211; read this Address to a chef when Enrico retired in 1987. The version below, was amended from the 1987 version. Both are [...]]]></description>
				<content:encoded><![CDATA[<p>Antonio Enrico Martini was cremated on 19th April 2013. He had been a chef for many years and one of his friends, whose name I shall add here when I remember it &#8211; read this <em>Address to a chef</em> when Enrico retired in 1987. The version below, was amended from the 1987 version. Both are based on <em>Address to a Pudding</em> by Rabbie Burns.<span id="more-1190"></span></p>
<h2>Address To A Chef</h2>
<pre>
Fair fa' your honest sonsie face,
Great Enrico o' th' Italian Race,
Ye cam' amang us lang years since, an' did enthrall,
Wi' savoury dish o' string an' mince, cried Spaggi Bol!

Mony's the nicht we've supped your fare
Chosen frae menu wi lovin' care;
Aft times tempted tae hae some mair, o' Tagliatelli.
The end result, ye can be share – an ower-full belly!

Aye, greed's a tempter, there's nae doot,
When faced wi' grub that's unco' good,
Tae get stuck in tae favoured food, like Canelloni,
An' then consume, in reckless mood, Zabaglione!

That menu's fu' o' names exotto,
Like Lasagne and Risotto,
Try them a'! - That's been my motto – have nae fear,
This chef, say I, (no voce sotto), has nae peer.

Now every king must hae his queen,
Wha better then than Bonnie Jean!
Her work, it seems, is nivver deen, an' man she's fleet,
The quickest thing ye've ivver seen on jist twa feet!

Well, that wis then – his course is run,
The time has come; it waits for none,
Sae fare-thee-well tae San Remo's son, oor heart's wi' Jeannie,
Rest aye in peace the only one full-proof Martini.
</pre>
<p><em>As Amended 19th April 2013</em></p>
<p>Rest in peace Enrico. Your Lasagne will always be the best.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/my-step-fathers-cremation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Swap 2 Values, in SQL, Without Using a Temporary Variable</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/swap-2-values-in-sql-without-using-a-temporary-variable/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/swap-2-values-in-sql-without-using-a-temporary-variable/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 11:44:28 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1174</guid>
		<description><![CDATA[Recently, I saw a mention of an interview question for SQL developers. It was something along the lines of: There is a table with a sex column. It has been discovered that the values are swapped around and need to be corrected. How would you swap all &#8216;M&#8217; values to &#8216;F&#8217; and all &#8216;F&#8217; values [...]]]></description>
				<content:encoded><![CDATA[<p>Recently, I saw a mention of an interview question for SQL developers. It was something along the lines of:</p>
<blockquote><p>There is a table with a sex column. It has been discovered that the values are swapped around and need to be corrected. How would you swap all &#8216;M&#8217; values to &#8216;F&#8217; and all &#8216;F&#8217; values to &#8216;M&#8217;, while leaving the other values untouched, <em>in one single SQL statement and without requiring the use of any temporary variables</em>.</p></blockquote>
<p>So, how would you do it? Here&#8217;s my example. <span id="more-1174"></span></p>
<p>First, the before look:</p>
<pre>
select sex, forename from bedrock;

S  FORENAME
-  --------
M  Wilma
   Dino
M  Betty
F  Fred
F  Barney
U  Pebbles

6 rows selected.
</pre>
<p>I think we can safely say that the sex column is somewhat back to front. My solution was to use the <code>CASE</code> statement in an SQL <code>UPDATE</code> command:</p>
<pre>
update bedrock
set sex =
  case sex 
    when 'F' then 'M'
    when 'M' then 'F'
  end;
</pre>
<p>Finally, the after look:</p>
<pre>
select sex, forename from bedrock;

S  FORENAME
-  --------
F  Wilma
   Dino
F  Betty
M  Fred
M  Barney
U  Pebbles

6 rows selected.
</pre>
<p>It appears to be safe to commit!</p>
<p>Using the <code>CASE</code> statement is useful. In the old days, we would need something like the following:</p>
<pre>
Update bedrock set sex = 'T' where sex = 'M';
Update bedrock set sex = 'M' where sex = 'F';
Update bedrock set sex = 'F' where sex = 'T';
</pre>
<p>For huge tables, that could have taken a while, and it&#8217;s highly unlikely  that a sex column would be indexed, so three full table scans would have been the order of the day.</p>
<p>Using <code>CASE</code> we get away with a single scan, plus, the statement <em>short circuits</em> when it hits the first matching <code>WHEN</code> clauses. So, if the first sex value was &#8216;F&#8217; it would be changed to &#8216;M&#8217; however it would then stop checking and would <em>not</em> change the newly set &#8216;M&#8217; back to an &#8216;F&#8217;.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/swap-2-values-in-sql-without-using-a-temporary-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ever deleted a Data File From a Running Database?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/ever-deleted-a-data-file-from-a-running-database/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/ever-deleted-a-data-file-from-a-running-database/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 11:07:08 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1170</guid>
		<description><![CDATA[http://jarneil.wordpress.com/2013/04/23/recovering-from-rm-rf-on-a-datafile/ has all you need to know to help avert a total disaster. Tanel Poder, who knows these things, advises that the file should be quiesced or made read only before attempting the recovery.]]></description>
				<content:encoded><![CDATA[<p><a href="http://jarneil.wordpress.com/2013/04/23/recovering-from-rm-rf-on-a-datafile/" title="http://jarneil.wordpress.com/2013/04/23/recovering-from-rm-rf-on-a-datafile/" target="_blank">http://jarneil.wordpress.com/2013/04/23/recovering-from-rm-rf-on-a-datafile/</a> has all you need to know to help avert a total disaster. Tanel Poder, who knows these things, advises that the file should be quiesced or made read only before attempting the recovery.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/ever-deleted-a-data-file-from-a-running-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Running Extremely Slowly?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/firefox-running-extremely-slowly/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/firefox-running-extremely-slowly/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 13:50:03 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1165</guid>
		<description><![CDATA[Firefox starts off ok, but soon starts running slower and slower, until it eventually starts to time out on connecting to some pages. The error messages is &#8220;the server took too long to respond&#8221; however, Firefox might be telling porkies. If you attempt to access the same URL in Opera, Chrome or, if you must, [...]]]></description>
				<content:encoded><![CDATA[<p>Firefox starts off ok, but soon starts running slower and slower, until it eventually starts to time out on connecting to some pages. The error messages is &#8220;the server took too long to respond&#8221; however, Firefox might be telling porkies. <span id="more-1165"></span></p>
<p>If you attempt to access the same URL in Opera, Chrome or, if you must, Internet Explorer, you may find that it is responding quite happily and speedily, while another try in Firefox takes ages to connect or fail again.</p>
<p>You need to sort out a couple of options:</p>
<ul>
<li>Edit->Preferences (on Linux) or Tools->Options (I think, on Windows)</li>
<li>Click Advanced</li>
<li>Click General tab</li>
<li><strong>Uncheck</strong> <em>Use hardware acceleration when available</em></li>
<li>Click Network tab</li>
<li>Click Settings button beside <em>Configure how Firefox connects to the internet</em></li>
<li><strong>Check</strong> <em>No proxy</em> but be aware that this option might be restricted if you use Firefox at work.</li>
<li>Click OK button</li>
<li>Click Close button</li>
</ul>
<p>You might need to restart Firefox after this, I didn&#8217;t on Linux, but try a link without restarting first and see what happens. On my system, it works perfectly quickly again.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/04/firefox-running-extremely-slowly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TNS-01189: The listener could not authenticate the user</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/tns-01189-the-listener-could-not-authenticate-the-user/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/tns-01189-the-listener-could-not-authenticate-the-user/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 14:31:53 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1154</guid>
		<description><![CDATA[Ever see this error? I have, just today. An interesting one to debug. I got there in the end though. The database is running on a two node VERITAS cluster. To protect the innocent, I shall refer to these as node_04 and node_05, for that is similar to their real names! The database is not [...]]]></description>
				<content:encoded><![CDATA[<p>Ever see this error? I have, just today. An interesting one to debug. I got there in the end though. <span id="more-1154"></span></p>
<p>The database is running on a two node VERITAS cluster. To protect the innocent, I shall refer to these as node_04 and node_05, for that is similar to their real names! The database is not RAC, it runs on one node or the other, but never both. There is one instance and one database.</p>
<p>The DNS and/or whatever they use to ensure that traffic goes to the correct node (I have a good grasp of the technicalities, haven&#8217;t I?) uses a host name of sgxxxx where xxxx is the database name. Tnsnames.ora and listener.ora use this special hostname in the configuration for the database alias resolution, and the listener.</p>
<p>The database is running on node_04 right now, but can be forced to run on node_05 due to a failure or a manual fail over. The listener follows the database and runs on the same node &#8211; wherever that happens to be. It is not possible for the listener to run on node_04 with the database on node_05, and vice versa.</p>
<p>I was attempting to get a status from lsnrctl for the listener:</p>
<pre>
Node_04> lsnrctl status lsnr_xxxx

LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 19-MAR-2014 10:11:03

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sgxxxx)(PORT=1603)))
TNS-01189: The listener could not authenticate the user
</pre>
<p>It failed, as shown above. Interesting because it has been working &#8220;forever&#8221;.</p>
<p>Running a tnsping on the database had no problems. It returned with a zero millisecond response time. Pretty quick. So we know the listener is up and running, and responding, we just can&#8217;t get a status.</p>
<pre>
Node_04> tnsping xxxx

TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 19-MAR-2014 10:12:23

Copyright (c) 1997, 2010, Oracle. All rights reserved.


Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = sgxxxx)(PORT = 1603)(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = xxxx)))
OK (0 msec)
</pre>
<p>Next step was to check the listener.ora file to see if there was a password set for the listener &#8211; there was not. Hmmm.</p>
<p>Insert a delay here while various obvious stuff was checked, and found to be ok. Everything works unless we use the listener to access the database. At that point, the TNS error occurs again.</p>
<p>Eventually, I wondered what the sgxxx &#8220;special&#8221; hostname resolved to:</p>
<pre>
Node_04> ssh oracle@sgxxxx
password: 

(lots of login information, disclaimers, legal warnings etc here)

Node_05> exit
Node_04>
</pre>
<p>Did you notice? I did, straight away. The special host name resolves to the other node in the VERITAS cluster. It should be resolving to the same node as the database &#8211; node_04.</p>
<p>The solution is to get the network guys and gals to fix it. It&#8217;s a cluster of two nodes and should work accordingly. Sgxxxx needs to resolve to the cluster node where the database is running. It wasn&#8217;t.</p>
<p>Nasty, but fun to debug. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/tns-01189-the-listener-could-not-authenticate-the-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Oracle Environment in Scripts</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/setting-oracle-environment-in-scripts/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/setting-oracle-environment-in-scripts/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 09:56:52 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1145</guid>
		<description><![CDATA[A quickie! How do you set the correct Oracle environment in scripts? Do you hard code? You better not. I&#8217;ve lost count of the times I&#8217;ve ended up with, for example, a 10g database running with bits of the 9i software hanging around. It leads to monumental problems that can be hard to track down. [...]]]></description>
				<content:encoded><![CDATA[<p>A quickie! How do you set the correct Oracle environment in scripts? Do you hard code? You better not. <span id="more-1145"></span></p>
<p>I&#8217;ve lost count of the times I&#8217;ve ended up with, for example, a 10g database running with bits of the 9i software hanging around. It leads to monumental problems that can be hard to track down.</p>
<p>Moral: <em>Do not hard code Oracle environment details.</em> </p>
<p>This is what I usually do:</p>
<pre>
#!/usr/bin/env bash

export ORAENV_ASK=NO
export ORACLE_SID=my_sid
. oraenv
export ORAENV_ASK=YES

# Rest of bash script goes here....
</pre>
<p>Reagrdless of how many times the database version gets an update, you will still always have the correct Oracle software on the path and in the environment when the script runs.</p>
<p>Today, I learned a new way to do the above, with much less typing. You can see an example <a href="http://www.gokhanatil.com/2013/03/bash-script-to-upload-rman-backups-via-ftp.html" title="http://www.gokhanatil.com/2013/03/bash-script-to-upload-rman-backups-via-ftp.html" target="_blank">here</a>.</p>
<pre>
#!/usr/bin/env bash

. oraenv &lt;&lt;EOF
my_sid
EOF

# Rest of bash script goes here....
</pre>
<p>All those years of Oracle and I never figured out that I could user a &#8220;here&#8221; document. Thanks Gokhan.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/setting-oracle-environment-in-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux Command to Retrieve Hardware Serial Numbers etc</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/linux-command-to-retrieve-hardware-serial-numbers-etc/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/linux-command-to-retrieve-hardware-serial-numbers-etc/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 09:34:40 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1139</guid>
		<description><![CDATA[Ever needed to obtain the serial number (or other details) for a remote server? Couldn&#8217;t be bothered to walk/run/drive/fly all the way there just to read a sticky label on the back or bottom of said server? Read on then. The command you want to run, as root, is dmidecode. For example, to get the [...]]]></description>
				<content:encoded><![CDATA[<p>Ever needed to obtain the serial number (or other details) for a remote server? Couldn&#8217;t be bothered to walk/run/drive/fly all the way there just to read a sticky label on the back or bottom of said server? Read on then. <span id="more-1139"></span></p>
<p>The command you want to run, as root, is <code>dmidecode</code>. For example, to get the make and model and serial number of a server, do this:</p>
<pre>
dmidecode -t system
</pre>
<p>The result will be similar to:</p>
<pre>
# dmidecode 2.11
SMBIOS 2.5 present.

Handle 0x0002, DMI type 1, 27 bytes
System Information
        Manufacturer: Dell Inc.
        Product Name: Vostro 1720
        Version: Null
        Serial Number: 996C4L1
        UUID: Not Settable
        Wake-up Type: Power Switch
        SKU Number: Null
        Family: Vostro

Handle 0x000F, DMI type 12, 5 bytes
System Configuration Options
        Option 1: Jumper settings can be described here.

Handle 0x0018, DMI type 32, 20 bytes
System Boot Information
        Status: No errors detected
</pre>
<p>Other options for the -t parameter are:</p>
<ul>
<li><code>bios</code> &#8211; tells you all about your bios.</li>
<li><code>system</code> &#8211; tells you about the system hardware.</li>
<li><code>baseboard</code> &#8211; all about the mother board.</li>
<li><code>chassis</code> &#8211; all you need to know about the &#8220;box&#8221; the system is made up of.</li>
<li><code>processor</code> &#8211; fairly obvious.</li>
<li><code>memory</code> &#8211; again, fairly obvious.</li>
<li><code>cache</code> &#8211; information about your CPU cache.</li>
<li><code>connector</code> &#8211; what sockets are present on the computer. USB, firewire, ethernet etc.</li>
<li><code>slot</code> &#8211; appears to be the bus information, and voltages present, supplied etc.</li>
</ul>
<p>There&#8217;s brief help available:</p>
<pre>
dmidecode --help

Usage: dmidecode [OPTIONS]
Options are:
 -d, --dev-mem FILE     Read memory from device FILE (default: /dev/mem)
 -h, --help             Display this help text and exit
 -q, --quiet            Less verbose output
 -s, --string KEYWORD   Only display the value of the given DMI string
 -t, --type TYPE        Only display the entries of given type
 -u, --dump             Do not decode the entries
     --dump-bin FILE    Dump the DMI data to a binary file
     --from-dump FILE   Read the DMI data from a binary file
 -V, --version          Display the version and exit
</pre>
<p>However, to find out the different types you can supply, you need to supply an erroneous type:</p>
<pre>
dmidecode -t left_leg

Invalid type keyword: left_leg
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot
</pre>
<p>I&#8217;ve just used the command to obtain information about a server located 150 odd miles away from my comfy chair, running in an unattended site. That saved me a bit of time!</p>
<p>Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/linux-command-to-retrieve-hardware-serial-numbers-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bee Tragedy</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/bee-tragedy-2/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/bee-tragedy-2/#comments</comments>
		<pubDate>Sun, 03 Mar 2013 15:52:43 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1126</guid>
		<description><![CDATA[Yesterday, Saturday 2nd March 2013, I went to check on my two bee hives. They were fine and healthy with plenty feed stock last time I checked. Yesterday, nothing. Every single bee was dead. There was plenty food, so it seems that the recent damp foggy nasty cold weather must have either killed or severely [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday, Saturday 2nd March 2013, I went to check on my two bee hives. They were fine and healthy with plenty feed stock last time I checked. <span id="more-1126"></span></p>
<p>Yesterday, nothing. Every single bee was dead. There was plenty food, so it seems that the recent damp foggy nasty cold weather must have either killed or severely weakened them.</p>
<p>I have no bees. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<div id="attachment_1128" class="wp-caption alignleft" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/03/TwoDEadHives.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/03/TwoDEadHives-300x179.jpg" alt="Two dead hives" width="300" height="179" class="size-medium wp-image-1128" /></a><p class="wp-caption-text">Two dead bee hives, ready for sterilisation.</p></div>
<p>This is all that remains, two dead hives. I need to clean and sterilise before I even attempt to house any new bees here. You can never be too careful.</p>
<p>I have checked the hives and bodies over, but I saw no signs of disease.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/03/bee-tragedy-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Here be Dragons!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/here-be-dragons/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/here-be-dragons/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 12:33:55 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1115</guid>
		<description><![CDATA[I took this photo in Scotland, along the Crinan Canal, back in March 2009. Anyone know what it is? Click the image for a full screen version. (Warning &#8211; it&#8217;s 4000px by 3000px and 5.6 Mb file-size. The original file-size is even larger &#8211; it&#8217;s almost 12Mb!) Update: it&#8217;s a Southern Hawker. Thanks Howard!]]></description>
				<content:encoded><![CDATA[<p>I took this photo in Scotland, along the Crinan Canal, back in March 2009. Anyone know what it is? Click the image for a full screen version. (<strong>Warning</strong> &#8211; it&#8217;s 4000px by 3000px and 5.6 Mb file-size. The original file-size is even larger &#8211; it&#8217;s almost 12Mb!) <span id="more-1115"></span></p>
<p><strong>Update</strong>: it&#8217;s a <a href="https://www.google.com/search?hl=en&#038;site=imghp&#038;tbm=isch&#038;source=hp&#038;biw=1043&#038;bih=689&#038;q=southern+hawker&#038;oq=southern+hawker&#038;gs_l=img.3..0l2j0i24l3.1155.5725.0.7411.15.10.0.5.5.0.57.468.10.10.0...0.0...1ac.1.5.img.v-CNEuWaN2g" title="Google images - search for Southern Hawker" target="_blank">Southern Hawker</a>. Thanks Howard!</p>
<div id="attachment_1116" class="wp-caption alignleft" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/02/DragonFly.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2013/02/DragonFly-300x225.jpg" alt="Scottish Dragonfly. Crinan Canal, March 2009." width="300" height="225" class="size-medium wp-image-1116" /></a><p class="wp-caption-text">Scottish Dragonfly. Crinan Canal, March 2009.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/here-be-dragons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transportable Tablespace Migrations with Expdp/Impdp</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/transportable-tablespace-migrations-with-expdpimpdp/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/transportable-tablespace-migrations-with-expdpimpdp/#comments</comments>
		<pubDate>Thu, 21 Feb 2013 15:25:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1108</guid>
		<description><![CDATA[In the old days of exp/imp doing a Transportable Tablespace export/import was relatively simple &#8211; unless you had Spatial data, in which case, it wasn&#8217;t. Then we got hold of expdp/impdp and it became &#8220;different&#8220;. It now seems that in order to do a Transportable Tablespace import with impdp, you don&#8217;t tell it to do [...]]]></description>
				<content:encoded><![CDATA[<p>In the old days of <code>exp</code>/<code>imp</code> doing a Transportable Tablespace export/import was relatively simple &#8211; unless you had Spatial data, in which case, it wasn&#8217;t. Then we got hold of <code>expdp</code>/<code>impdp</code> and it became &#8220;<em>different</em>&#8220;. It now seems that in order to do a Transportable Tablespace import with <code>impdp</code>, you <em>don&#8217;t</em> tell it to do one! Confused? <span id="more-1108"></span></p>
<p>In the old days, you told both <code>exp</code> and <code>imp</code> which tablespaces you were transporting using the <code>TRANSPORT_TABLESPACE</code> and <code>TABLESPACES</code> parameters to <code>exp</code>, and the same with <code>imp</code>. Life was good and symmetrical back then!</p>
<p>With <code>expdp</code>, we have a similar parameter whereby we simply list the tablespaces we wish to transport in the <code>TRANSPORT_TABLESPACES</code> (note, plural) parameter.</p>
<p>You would think that a similar arrangement would exist with <code>impdp</code> wouldn&#8217;t you? Well it does. Sort of! </p>
<p>There is indeed a <code>TRANSPORT_TABLESPACES</code> (note, plural) parameter on <code>impdp</code> but, if you use it, you <em>must</em> also specify a database link name in the <code>NETWORK_LINK</code> parameter <em>and</em> that link must exist in the importing database <em>and</em> it must point back to the exporting database. There is no intermediate dump file, the metadata is unloaded from the source database over the database link. Smart?</p>
<p>Not quite. Imagine that you have a production database to export and then import into a QA database, for example. However, the two are on separate networks, and there&#8217;s an air gap between the two. You cannot set up a database link from the QA database to the Production one to get at the metadata for the Transportable Tablespace import.</p>
<p>If you try, without a database link in place and working, <code>impdp</code> will simply barf.</p>
<p>The solution is hidden away in a note attached to the <code>TRANSPORT_TABLESPACES</code> in the Utilities manual, impdp section, in the locked filing cabinet, in the office in the basement, behind the leopard guarding the stairs, down the dark corridor etc. (Douglas Adams.)</p>
<p>What you have to do is <em>not</em> use the <code>TRANSPORT_TABLESPACES</code> parameter as you would imagine, instead, you list the transported data files using the <code>TRANSPORT_DATAFILES</code> and avoid the <code>TRANSPORT_TABLESPACES</code> like the plague! Goodby symmetry, it was nice of you to drop in!</p>
<p>So far, so bad. However, my <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/11/oracles-deferred-segment-allocation-breaks-transportable-tablespace-imports/" title="Oracle’s Deferred Segment Allocation Breaks Transportable Tablespace Imports." target="_blank">original problem with deferred segment creation</a> still exists even with <code>impdp</code> instead of <code>imp</code>.</p>
<pre>
$ impdp directory=... dumpfile=... logfile=... transport_datafiles=file1.dbf ...
...
Processing object type TRANSPORTABLE_EXPORT/TABLE
ORA-39083: Object type TABLE:"NORMAN"."TEST_TABLE" failed to create with error:
ORA-01647: tablespace 'TEST_TABLESPACE' is read-only, cannot allocate space in it
...
</pre>
<p>Of course it&#8217;s read-only, it doesn&#8217;t exist in the database because <code>impdp</code> is supposed to create it, load up the metadata and connect that with the data files etc. Then I have to login and make the tablespace read write when I&#8217;m done. </p>
<p>Sigh!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/transportable-tablespace-migrations-with-expdpimpdp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync &#8211; To Slash or Not To Slash?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/rsync-to-slash-or-not-to-slash/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/rsync-to-slash-or-not-to-slash/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 20:31:37 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1096</guid>
		<description><![CDATA[A quickie! Rsync is great for making sure that a destination directory is synchronised with a source directory. However, do you add a slash to the source and/or destination directory names, or do you not? The answer is, it depends. Without a slash on the source directory means copy both the source directory, and the [...]]]></description>
				<content:encoded><![CDATA[<p>A quickie! Rsync is great for making sure that a destination directory is synchronised with a source directory. However, do you add a slash to the source and/or destination directory names, or do you not? <span id="more-1096"></span></p>
<p>The answer is, it depends. Without a slash on the source directory means <em>copy both the source directory, and the contents (recursively if specified) to the destination directory</em> while adding a trailing slash means <em>only copy the contents of the source directory, recursively if specified, to the destination</em>. Easy?</p>
<p>If we take the following as the source directory:</p>
<pre>
$ tree testing

testing
|-- another
|   |-- wilma
|-- betty
|-- fred
|-- nested
    |-- barney
</pre>
<p>The destination is an empty directory named test_backup. </p>
<h2>No Slashes</h2>
<p>The first test has no slashes on any of the directories.</p>
<pre>
$ rm -r test_backup/*
$ rsync --archive --recursive testing test_backup
$ tree test_backup

test_backup
|--testing
   |-- another
   |   |-- wilma
   |-- betty
   |-- fred
   |-- nested
       |-- barney
</pre>
<p>You can see that the whole hierarchy of the testing directory has been recreated <em>within</em> the destination directory.</p>
<h2>Slash on Destination Only</h2>
<p>The second test, after clearing out the destination directory, adds a slash to the end of the destination directory.</p>
<pre>
$ rm -r test_backup/*
$ rsync --archive --recursive testing test_backup/
$ tree test_backup

test_backup
|--testing
   |-- another
   |   |-- wilma
   |-- betty
   |-- fred
   |-- nested
       |-- barney
</pre>
<p>So, there&#8217;s no difference there. A slash on the destination directory appears to have no effect.</p>
<h2>Slash on Source Only</h2>
<pre>
$ rm -r test_backup/*
$ rsync --archive --recursive testing/ test_backup
$ tree test_backup

test_backup
|-- another
|   |-- wilma
|-- betty
|-- fred
|-- nested
    |-- barney
</pre>
<p>This is different. The <em>contents</em> of the source directory have been duplicated into the destination directory.</p>
<h2>Slashes on Both</h2>
<pre>
$ rm -r test_backup/*
$ rsync --archive --recursive testing/ test_backup/
$ tree test_backup

test_backup
|-- another
|   |-- wilma
|-- betty
|-- fred
|-- nested
    |-- barney
</pre>
<p>And this one again shows that having a slash on the destination directory has no effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/rsync-to-slash-or-not-to-slash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up SSH on Western Digital My Book World Devices</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/setting-up-ssh-on-western-digital-my-book-world-devices/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/setting-up-ssh-on-western-digital-my-book-world-devices/#comments</comments>
		<pubDate>Mon, 11 Feb 2013 16:43:36 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1083</guid>
		<description><![CDATA[I have a network attached 1 Tb hard drive. It&#8217;s a white book, Western Digital &#8220;My Book World&#8221; device. I use it for backups. I needed to set it up to allow the backup scripts ssh access without a password. Here&#8217;s how I did it. The web interface was used in the normal way to [...]]]></description>
				<content:encoded><![CDATA[<p>I have a network attached 1 Tb hard drive. It&#8217;s a white book, Western Digital &#8220;My Book World&#8221; device. I use it for backups. I needed to set it up to allow the backup scripts ssh access without a password. Here&#8217;s how I did it. <span id="more-1083"></span></p>
<ul>
<li>The web interface was used in the normal way to create a user named <em>my_backups</em>.</li>
<li>A share was set up automatically for this new user. The share name is the same as the user name &#8211; my_backups.</li>
<li>using advanced mode->network, I ensured that NFS was enabled and that only devices on my internal network were able to access the shares. This is not necesary for the backups though, but it allows me to NFS mount the share as required.</li>
<li>I logged onto the WD device using ssh, as root. I needed to edit the <code>/etc/passwd</code> file to move the home directory for my new user from <code>/shares</code> to <code>/shares/my_backups</code> otherwise, setttng up ssh affects (potentially) all users. And besides, I want my users to have their own home, not a shared one.</li>
<li>The default permissions on the my_backups share is to allow group writes. Ssh <em>will not work</em> if this is the case, so that has to go, as root:
<pre>
# chmod g-w /shares/my_backups
</pre>
</li>
<li>The ownership of the my_backups share is also dubious. So another quick change is called for, as root:
<pre>
# chown my_backups /shares/my_backups
</pre>
</li>
<li>Now I can login using ssh as the my_backups user, so logout as root, and back in again as my_backups.</li>
<li>Now set up all the stuff (technical term!) required by ssh:
<pre>
$ cd
$ pwd
/shares/my_backups

$ mkdir .ssh backups
$ chmod 600 .ssh
$ ls -al
...
drw-------    2 my_backu jewab           6 Feb 11 15:56 .ssh
drwx------    2 my_backu jewab           6 Feb 11 16:27 backups

$ cd .ssh
$ touch authorized_keys
$ chmod 700 authorized_keys
$ ls -l
-rwx------    1 my_backu jewab           0 Feb 11 15:58 authorized_keys

$exit
</pre>
</li>
<li>Now, I copy my ssh public key to the new <code>authorized_keys</code> file, from my laptop, which is the device I&#8217;m backing up up to the shared drive:
<pre>
$ cd ~/.ssh
$ cat id_dsa.pub | ssh root@wd 'cat >> ~my_backups/.ssh/authorized_keys'
root@wd's password:
</pre>
<p>You will notice that I&#8217;m connecting as root to do this. For some reason, on the device, attempting to do this as my_backups gives me an error <code>sh: cannot create .ssh/authorized_keys: Permission denied</code> which is strange, as the file exists and is correctly owned by the my_backups user. However, there are a few foibles in the OS that is running on the device, so logging in as root works!</li>
<li>Now I can login as my_backups without a password, from my laptop. And more to the point, my backup script can do it too.
<pre>
ssh my_backups@wd


~ $ pwd
/shares/my_backups
</pre>
</li>
<li>Talking of backup scripts, it&#8217;s nothing more than an <code>rsync</code> command. The rsync option <code>--archive</code> cannot be used as it won&#8217;t let the <code>--times</code> part of it run and lots of errors are scrolled up the screen.
<p>To get around this, I&#8217;m using <code>--perms --delete --update --verbose --links --progress --recursive</code> instead. The destination on the rsync command is specified as <code>my_backups@wd:backups</code> which does the job nicely!</p>
<blockquote><p>Ahem, of course, the first time I did this, I neglected to create the backups directory didn&#8217;t I? So what happened on the first actual run? Rsync happily <code>--delete</code>d the .ssh directory holding my keys, so further testing didn&#8217;t work and requested the password that I had worked so hard to get rid of!</blovkquote></p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/setting-up-ssh-on-western-digital-my-book-world-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot Send Emails, or Read Web Servers From Oracle 11g</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/cannot-send-emails-or-read-web-servers-from-oracle-11g/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/cannot-send-emails-or-read-web-servers-from-oracle-11g/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 15:50:43 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1065</guid>
		<description><![CDATA[Accessing a web server or an email server, directly from within a database, used to be quite simple. However, it all stops working at 11g. Why is that and what can be done to fix it? Introduction Prior to Oracle 11g, any user in the database wishing to use the various network packages &#8211; UTL_HTTP, [...]]]></description>
				<content:encoded><![CDATA[<p>Accessing a web server or an email server, directly from within a database, used to be quite simple. However, it all stops working at 11g. Why is that and what can be done to fix it? <span id="more-1065"></span></p>
<h2>Introduction</h2>
<p>Prior to Oracle 11g, any user in the database wishing to use the various network packages &#8211; UTL_HTTP, UTL_SMTP, UTL_TCP, UTL_MAIL etc, and their predecessors, only requires to be granted EXECUTE privileges on the appropriate package(s).</p>
<p>From 11g onwards this is no longer the case. Execute privilege is still required, however, further fine grained access control has been added to the database to restrict the networks reachable, port ranges allowed, and even down to the actual start and end dates and times that the access will be allowed.</p>
<p>This fine grained control is achieved via ACLs. (Access Control Lists.) and the XML Database (XDB) product which must be installed on the database.</p>
<h2>Information Requirements</h2>
<p>If an application wishes to use network resources, then the following information must be obtained, in advance, of the application being set up in the database. It is advised that it be documented in the database and/or application documentation</p>
<h3>Email</h3>
<p>For an application connecting directly to a mail server, not via sendmail, or equivalent:</p>
<ul>
<li>Hostname of the email server, or IP address of same.</li>
<li>Port number(s) in use for the email server.</li>
<li>Database username (ie schema names) of all schemas that will be executing the code that sends emails.</li>
<li>If required, a range of dates and times when the service should be accessible.</li>
</ul>
<h3>HTTP</h3>
<p>For an application connecting directly to a web server or URL:</p>
<ul>
<li>Hostname of the web server, or IP address of same.</li>
<li>Port number(s) in use for the email server.</li>
<li>Database username (ie schema names) of all schemas that will be executing the code that connects to the web or email server.</li>
<li>If required, a range of dates and times when the service must be accessible.</li>
</ul>
<h2>Setting up ACLs</h2>
<p>The SYSDBA, or a user with DBA role granted, must execute the following code to create a new ACL:</p>
<pre>
BEGIN
  DBMS_NETWORK_ACL_ADMIN.create_acl (
    Acl => 'email_http_access.xml',
    Description => 'Allows access to UTL_HTTP, UTL_SMTP etc',
    Principal => 'USERNAME',
    Is_grant => TRUE,
    Privilege => 'connect',
    Start_date => SYSTIMESTAMP,
    End_date => NULL);

  Commit;
End;
/
</pre>
<p>The parameters, and points to note are:</p>
<ul>
<li>ACL &#8211; is the name of an xml file. ACLs are kept in the XML Database product, so XDB must be installed. The data is kept in the table XDB.XDB$ACL and also in a folder on the database server.</li>
<li>Description &#8211; is a meaningful, please, description of what the ACL is created to allow.</li>
<li>Principal &#8211; the main user account in the database which requires access to the network utilities. This may be a role or a user. The parameter is case sensitive. Beware.</li>
<li>Is_grant &#8211; true grants the privilege, false denies the privilege.</li>
<li>Privilege &#8211; use &#8216;connect&#8217; for UTL_TCP, UTL_SMTP, UT:_MAIL and UTL_HTTP. Use &#8216;resolve&#8217; for UTL_INADDR. Beware, this parameter is also case sensitive.</li>
<li>Start_date and End_date are null by default. Set these to a particular TIMESTAMP to prevent the ACL from being active until or after the specific date given.</li>
<li>The commit is mandatory.</li>
</ul>
<h2>Adding Users to ACLs</h2>
<p>Additional users and or roles are added to the ACL using the add_privilege procedure. The parameters are as above with the omission of the description parameter and the addition of the position parameter.</p>
<pre>
BEGIN
  DBMS_NETWORK_ACL_ADMIN.add_privilege (
    Acl => 'email_http_access.xml',
    Principal => 'OTHER_USERNAME',
    Is_grant => TRUE,
    Privilege => 'connect',
    Position => NULL,
    Start_date => NULL,
    End_date => NULL);

  Commit;
End;
/
</pre>
<p>The parameters and points to note are:</p>
<ul>
<li>Position &#8211; defines the position in the list of ACL privileges, for this principal. If an ACL higher up the list denies access and one lower down grants it again, the latter takes precedence.</li>
<li>The commit is mandatory.</li>
</ul>
<h2>Assigning ACLs to a Network Resource</h2>
<p>Once created, the ACL must be assigned to a network using the assign_acl procedure. This is where the principal(s) which have been granted privileges in an ACL, are given access to a network resource for the duration of the ACL.</p>
<pre>
BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    Acl => 'email_http_access.xml',
    Host => 'IP_or_hostname',
    Lower_port => 80,
    Upper_port => 80);

  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    Acl => 'email_http_access.xml',
    Host => 'IP_or_hostname',
    Lower_port => 443,
    Upper_port => 443);

  Commit;
End;
/
</pre>
<p>The parameters and points to note are:</p>
<ul>
<li>ACL &#8211; is the name of an existing ACL xml file.</li>
<li>Host &#8211; defines the network resource allowed. Only those network resources mentioned here will be allowed to be accessed. Wild cards can be used, but are advised against. See below.</li>
<li>Lower_port and upper_port define the port range permitted. For default HTTP servers this will be ports 80 and 443 (for HTTPS access). For email servers, the default SMTP port is 25.</li>
<li><em>Only</em> the specific host(s) and port(s) are accessible via the ACL. If you allow access to a web server on port 80 only, then attempting to use https on port 443 will be rejected.</li>
<li>The commit is mandatory.</li>
</ul>
<h3>Network Resources</h3>
<p>A network can be specified as follows:</p>
<ul>
<li>A hostname &#8211; &#8216;oracle.com&#8217; or &#8216;capgemini.com&#8217;. In this case, only that hostname will be accessible from the database. If the IP address changes, it will continue working once DNS has propagated.</li>
<li>An IP address &#8211; &#8217;84.37.86.172&#8242;. Again, only this network address will be accessible.</li>
<li>An IP range &#8211; &#8217;84.37.86.*&#8217;. All devices on the 84.37.86 network are accessible. The &#8216;*&#8217; indicates &#8220;everything&#8221; and can be used in one or more of the &#8216;dotted quads&#8217;.</li>
<li>Everything &#8211; &#8216;*&#8217; &#8211; <em>best avoided</em> on the grounds that someone could use your database to set up and execute attacks on any device anywhere in the world. Use the principal of <em>least privilege</em> when setting up these ACLs.</li>
</ul>
<h3>Ports</h3>
<ul>
<li>By omitting the upper and lower ports, everything on the host is accessible.</li>
<li>If you specify a range of port numbers then all ports in that range, inclusive, are accessible.</li>
<li>If you need to set up a discontinuous port range, you must call the assign_acl procedure once for each range, as per the example above &#8211; ports 80 and 443 only are accessible.</li>
</ul>
<h2>A Worked Example</h2>
<p>The following example shows the user <em>norman</em> attempting to access an HTTP web site directly to pull down a script, all from within SQL*Plus.</p>
<h3>Initial Test</h3>
<p>The URL shown below is fictitious. The web site does not actually exist. The process shown below, however, <em>does work</em> and I&#8217;m grateful to Tanel Poder for the details, which you can find <a href="http://blog.tanelpoder.com/2013/01/24/sqlplus-is-my-second-home-part-7-downloading-files-via-sqlplus/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sqlplus-is-my-second-home-part-7-downloading-files-via-sqlplus" title="Tanel's blog post" target="_blank">here</a>.</p>
<pre>
SQL> connect norman/secret
Connected.

SQL> set lines 1000
SQL> set trimspool on
SQL> set trimout on
SQL> set pagesize 0
SQL> set long 99999999 longchunksize 99999999
SQL> set feedback off
SQL> set head off
SQL>
SQL> spool useful_script.sql
SQL>
SQL> select httpuritype('http://fictitious.oracle.com/useful_script.sql').getCLOB()
  2> from dual;

ERROR:
ORA-29273: HTTP request failed.
ORA-06512: at "SYS.UTL_HTTP", line 1819
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.HTTPURITYPE", line 34
</pre>
<p>As you can see, it failed due to ACL reasons.</p>
<h3>Setup</h3>
<p>The following script is executed by the SYSDBA:</p>
<pre>
BEGIN
  DBMS_NETWORK_ACL_ADMIN.create_acl (
    Acl => 'email_http_access.xml',
    Description => 'Allows access to UTL_HTTP, UTL_SMTP etc',
    Principal => 'NORMAN',
    Is_grant => TRUE,
    Privilege => 'connect',
    Start_date => SYSTIMESTAMP,
    End_date => NULL);

  Commit;
End;
/

BEGIN
  DBMS_NETWORK_ACL_ADMIN.assign_acl (
    Acl => 'email_http_access.xml',
    Host => 'fictitious.oracle.com',
    Lower_port => 80,	-- Default web server port
    Upper_port => 80);	-- Ditto

  Commit;
End;
/
</pre>
<h3>Successful Test</h3>
<pre>
SQL> connect norman/secret
Connected.

SQL> set lines 1000
SQL> -- etc etc. See above.

SQL> spool useful_script.sql
SQL>
SQL> select httpuritype('http://fictitious.oracle.com/useful_script.sql').getCLOB()
  2> from dual;

-- Lots of output scrolls up the screen here ...

SQL> spool off
</pre>
<h2>Further Details</h2>
<p>Further details are available from Tim Hall&#8217;s web site where he takes the Oracle docs and makes sense of them. Most of the indforation given above is blatently borrowed from <a href="http://www.oracle-base.com/articles/11g/fine-grained-access-to-network-services-11gr1.php" title="Tim Hall's blog post on the subject. Much better than mine!" target="_blank">Tim&#8217;s excellent explanation</a>. </p>
<p>I had to use the above today to allow a database procedure access to an email server. The application is being ported from 10g to 11g and for some unknown reason, emails started failing! Tim&#8217;s blog post was extremely helpful in explaining and helping resolve the problem.</p>
<p>This blog post is simply a reminder to myself as to what had to be done to fix it. I&#8217;ll need it again soon I expect! For the whole story, get over to Tim&#8217;s web site. Don&#8217;t stick around here, trust me, it&#8217;s not worth it!</p>
<p>Thanks Tim.</p>
<p>Update 1st March 2013: There&#8217;s an interesting <a href="https://dbakerber.wordpress.com/2011/06/29/11gr2-network-acl-what-a-nice-feature/" title="https://dbakerber.wordpress.com/2011/06/29/11gr2-network-acl-what-a-nice-feature/" target="_blank">blog post here</a> where a database trigger is used to create the ACLs after a particular user is granted execute on UTL_MAIL. You might find it interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/02/cannot-send-emails-or-read-web-servers-from-oracle-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA$AT_SA_SPC_SY Jobs failing?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/oraat_sa_spc_sy-jobs-failing/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/oraat_sa_spc_sy-jobs-failing/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 15:18:07 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1043</guid>
		<description><![CDATA[Oracle has raised an alert in the alert.log and created a trace file as well, for a failed DBMS_SCHEDULER job with a strange name which doesn&#8217;t appear in DBA_SCHEDULER_JOBS or DBA_SCHEDULER_PROGRAMS &#8211; what&#8217;s going on? An extract from the alert log and/or the trace file mentioned in the alert log shows something like: *** SERVICE [...]]]></description>
				<content:encoded><![CDATA[<p>Oracle has raised an alert in the alert.log and created a trace file as well, for a failed <code>DBMS_SCHEDULER</code> job with a strange name  which doesn&#8217;t appear in <code>DBA_SCHEDULER_JOBS</code> or <code>DBA_SCHEDULER_PROGRAMS</code> &#8211; what&#8217;s going on? <span id="more-1043"></span></p>
<p>An extract from the alert log and/or the trace file mentioned in the alert log shows something like:</p>
<pre>
*** SERVICE NAME:(SYS.USERS) ...
*** MODULE NAME:(DBMS_SCHEDULER) ...
*** ACTION NAME:(ORA$AT_SA_SPC_SY_nnn) ...
</pre>
<p>Where &#8216;nnn&#8217; in the action name is a number.</p>
<p>No matter how hard you scan the <code>DBA_SCHEDULER_%</code> views, you will not find anything with this name. What is actually failing?</p>
<p>Oracle 11.1.0.6 onwards stopped listing these internal jobs in <code>DBA_SCHEDULER_JOBS</code>, as they did in 10g, and instead lists them in <code>DBA_AUTOTASK_%</code> views. However, not by actual name, so don&#8217;t go looking for a TASK_NAME that matches the above action name. You will fail.</p>
<p>There are three different autotask types:</p>
<ul>
<li>Space advisor</li>
<li>Optimiser stats collection</li>
<li>SQl tuning advisor</li>
</ul>
<p>The tasks that run for these autotask &#8216;clients&#8217; are named as follows:</p>
<ul>
<li><strong>ORA$AT_SA_SPC_SY_nnn</strong> for Space advisor tasks</li>
<li><strong>ORA$AT_OS_OPT_SY_nnn</strong> for Optimiser stats collection tasks</li>
<li><strong>ORA$AT_SQ_SQL_SW_nnn</strong> for Space advisor tasks</li>
</ul>
<p>See MOS notes 756734.1, 755838.1, 466920.1 and Bug 12343947 for details. The first of these has the most relevant and useful information.</p>
<blockquote><p><strong>UPDATE</strong>: My original failing autotask has been diagnosed by Oracle Support as <a href="https://support.oracle.com/epmos/faces/ui/km/BugDisplay.jspx?id=13840704" title="https://support.oracle.com/epmos/faces/ui/km/BugDisplay.jspx?id=13840704" target="_blank">bug 13840704</a> for which a <a href="https://updates.oracle.com/Orion/PatchDetails/process_form?patch_num=13840704" title="https://updates.oracle.com/Orion/PatchDetails/process_form?patch_num=13840704" target="_blank">patch exists here</a> for 11.2.0.2 and 11.2.0.3. </p>
<p>Oracle document id 13840704.8 has details, but it involves LOBs based on a user defined type. In this case, Spatial data in an <code>MDSYS.SDO_GEOMETRY</code> column.</p></blockquote>
<p>The view <code>DBA_AUTOTASK_CLIENT</code> won&#8217;t show you anything about a specific task, with the above names, but will show you details of what the overall &#8216;client&#8217; is, There are three:</p>
<pre>
select client_name, status
from dba_autotask_client;

CLIENT_NAME                     STATUS
------------------------------- --------
auto optimizer stats collection ENABLED
auto space advisor              ENABLED
sql tuning advisor              DISABLED
</pre>
<p>I can see from the task name in the alert log and trace file, that my failing task is a space advisor one, so, by looking into the <code>DBA_AUTOTASK_JOB_HISTORY</code> view, I can see what&#8217;s been happening:</p>
<pre>
select distinct client_name, window_name, job_status, job_info
from dba_autotask_job_history
where job_status <> 'SUCCEEDED'
order by 1,2;

CLIENT_NAME        WINDOW_NAME     JOB_STATUS JOB_INFO
------------------ --------------- ---------- -------------------------------------------
auto space advisor SATURDAY WINDOW FAILED     ORA-6502: PL/SQL: numeric or value error...
auto space advisor SUNDAY WINDOW   FAILED     ORA-6502: PL/SQL: numeric or value error...
</pre>
<p>So, in my own example, the auto space advisor appears to have failed on Saturday and Sunday. Given that this is an internal task, and nothing I can do will let me know about the invalid number problem, I need to log an SR with Oracle on the matter. However, as I don&#8217;t want my fellow DBAs to be paged in the wee small hours for a known problem, I have disabled the space advisor task as follows:</p>
<pre>
BEGIN
  dbms_auto_task_admin.disable(
    client_name => 'auto space advisor',
    operation   => NULL,
    window_name => NULL);
END;
/

PL/SQL procedure successfully completed
</pre>
<p>Checking <code>DBA_AUTOTASK_CLIENT</code> again, shows that it is indeed disabled:</p>
<pre>
select client_name, status
from dba_autotask_client
where client_name = 'auto space advisor';

CLIENT_NAME                     STATUS
------------------------------- --------
auto space advisor              DISABLED
</pre>
<p>Enabling it again after Oracle Support have helped resolve the problem is as simple as calling <code>dbms_auto_task_admin.enable</code> with exactly the same parameters as for the disable call:</p>
<pre>
BEGIN
  dbms_auto_task_admin.enable(
    client_name => 'auto space advisor',
    operation   => NULL,
    window_name => NULL);
END;
/

PL/SQL procedure successfully completed
</pre>
<p>When enabling and/or disabling auto tasks, you <em>must</em> use the <code>CLIENT_NAME</code> as found in <CODE>DBA_AUTOTASK_CLIENT</code> view.</p>
<p>The full list of DBA_AUTOTASK_% views is:</p>
<ul>
<li>DBA_AUTOTASK_CLIENT</li>
<li>DBA_AUTOTASK_CLIENT_HISTORY</li>
<li>DBA_AUTOTASK_CLIENT_JOB</li>
<li>DBA_AUTOTASK_JOB_HISTORY</li>
<li>DBA_AUTOTASK_OPERATION</li>
<li>DBA_AUTOTASK_SCHEDULE</li>
<li>DBA_AUTOTASK_TASK</li>
<li>DBA_AUTOTASK_WINDOW_CLIENTS</li>
<li>DBA_AUTOTASK_WINDOW_HISTORY</li>
</ul>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/oraat_sa_spc_sy-jobs-failing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Oracle Java 7 on Linux Mint 13</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/installing-oracle-java-7-on-linux-mint-13/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/installing-oracle-java-7-on-linux-mint-13/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 15:49:51 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1027</guid>
		<description><![CDATA[I use Java only when I have to, and only ever the JRE (Java Runtime Environment) &#8211; there is no way I&#8217;ll use Java for development work. I&#8217;d rather eat my own ear wax to be honest! Linux Mint 13 comes with OpenJDK installed, and a system I use which runs the fop FO Processor, [...]]]></description>
				<content:encoded><![CDATA[<p>I use Java only when I have to, and only ever the JRE (Java Runtime Environment) &#8211; there is no way I&#8217;ll use Java for development work. I&#8217;d rather eat my own ear wax to be honest! </p>
<p>Linux Mint 13 comes with OpenJDK installed, and a system I use which runs the fop FO Processor, barfs with a Java.Lang.NullPointer Exception if OpenJDK is used.</p>
<p>The following is brief instructions on how to install Oracle&#8217;s java on Linux Mint. <span id="more-1027"></span></p>
<h2>Download Java JRE</h2>
<p>Go <a href="https://www.java.com" title="Javacom - java downloads" target="_blank">to here</a> and click on the &#8220;Free Java Download&#8221; button.</p>
<p>Click on Linux or Linux-x64 depending on whether you are running a 32 or a 64 bit Linux system. When prompted, select a suitable place to save the file, and click OK.</p>
<p>Remeber, you don&#8217;t want the various Linux*.rpm packages &#8211; they are for Red Hat/Fedora/Scientific Linux/Centos/OpenSuse/Oracle Linux  distributions.</p>
<p>When the download is complete, you should have a saved copy of something like <code>jre-7u10-linux-x64.tar.gz</code></p>
<h2>Install Java</h2>
<p>In a shell session (don&#8217;t be afraid!), change to the directory where you saved the downloaded file. In my case, that was Downloads/Java in my home directory. Then uncompress the file.</p>
<pre>
$ cd ~/Downloads/Java
$ tar -xvzf jre-7u10-linux-x64.tar.gz
</pre>
<p>Lots of filenames will whizz past on the screen. Wait for the process to finish.</p>
<p>You now need to be root, so, use <code>sudo sh</code> or <code>su -</code> or whatever to get you into a root session. I use <code>su</code> as my root user has been given a secure password.</p>
<p>In a root session, you need to move all the files you just extracted to the /usr/lib/jvm</p>
<pre>
$ su -
password:

$ cd ~norman/Downloads/Java
$ ls
jre1.7.0_10  jre-7u10-linux-x64.tar.gz

$ mv jre1.7.0_10 /usr/lib/jvm/
</pre>
<p>That&#8217;s all done now, Java is in the correct place. All that remains is to configure the system to use it in preference to anything else that is present.</p>
<h2.Configure the System</h2>
<p>Still working as root, run the <code>update-alternatives</code> command, as follows, to tell the system about the new Java version, and to set it as default.</p>
<pre>
$ update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0_10/bin/java 1065

update-alternatives: using /usr/lib/jvm/jre1.7.0_10/bin/java to provide /usr/bin/java (java) in auto mode.
</pre>
<p>And also the following:</p>
<pre>
$ update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jre1.7.0_10/bin/javaws 1065

update-alternatives: using /usr/lib/jvm/jre1.7.0_10/bin/javaws to provide /usr/bin/javaws (javaws) in auto mode.
</pre>
<p>That&#8217;s it, Oracle&#8217;s Java is now installed and will be used as the default.</p>
<p>If, for some strange reason, I had installed a full development kit, rather than just the runtime, I would have required the following two commands to be run as well &#8211; to configure the default java compiler and jar tool.</p>
<pre>
$ update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jre1.7.0_10/bin/javac 1065
$ update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jre1.7.0_10/bin/jar 1065
</pre>
<h2>Changing the Default Java Version</h2>
<p>The above makes my development tool happy as fop no longer barfs with an exception and my FO source code is happily converted into pdf documents. </p>
<p>What happens when some other program doesn&#8217;t like to play with Oracle&#8217;s Java and needs the original OpenJDK version instead?</p>
<p>Simple, change the default again:</p>
<pre>
update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/jre1.7.0_10/bin/java                1065      auto mode
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode
  3            /usr/lib/jvm/jre1.7.0_10/bin/java                1065      manual mode

Press enter to keep the current choice[*], or type selection number: 
</pre>
<p>The <code>update-alternatives</code> displays all known installed versions of Java and lets you choose the one you want. The first entry is the current one, and you simply type in the number of the one you want instead.</p>
<p>Have fun. (If there&#8217;s such a thing as fun where Java is involved!) <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2013/01/installing-oracle-java-7-on-linux-mint-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Travel Sucks!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/travel-sucks/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/travel-sucks/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 14:56:27 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1022</guid>
		<description><![CDATA[WARNING &#8211; If you are easily offended, I would advise that you do not read any further. You have been advised, proceed at your own risk and don&#8217;t bother to complain, because if you do, I will most likely delete your comments. I have the power! As I write this, the temperature outside is minus [...]]]></description>
				<content:encoded><![CDATA[<p><strong>WARNING &#8211; If you are easily offended, I would advise that you do not read any further. You have been advised, proceed at your own risk and don&#8217;t bother to complain, because if you do, I will most likely delete your comments. I have the power! </strong><br />
<span id="more-1022"></span></p>
<p>As I write this, the temperature outside is minus 60C &#8211; minus 76F in old money, or American degrees &#8211; but then again, I am about 36,000 feet up and still have three hours to go until Manchester.</p>
<p>I am heading home, after two weeks in Tenerife over Christmas 2012. It was my Mother in Law&#8217;s idea to go away for Christmas, and she&#8217;s been a right royal PITA for a fortnight! Suffice to say I will <em>not</em> be holidaying with her ever again.</p>
<p>Other than the wittering one, the usual crop of &#8220;chavs&#8221; and other people&#8217;s effing kids are driving me to drink, yet again. </p>
<p>Why is it that so many people think it is acceptable to force about three hundred other people to listen to their whining brat for four and a half hours flying time? Not to mention the three hours of &#8220;hanging about in bloody airport&#8221; time as well.</p>
<p>There is a reason we have kennels you know, next time, leave the noisy little bastard there if you absolutely must have a holiday. (Alternatively, do the environment a huge favour and stop breeding!)</p>
<p>They say travel broadens the mind. I say &#8220;Bullshit!&#8221;</p>
<p>What travel actually does is remind you of how nice it is to stay at home, with the doors locked, and something decent (with David Attenborough or Brian Cox in it) on TV.</p>
<p>Travel is also a great reminder of just how widespread the UK&#8217;s import of the American obesity problem actually is. </p>
<p>If I am allowed only 20Kg luggage allowance and have to pay an extortionate fee for each ounce over my allowance, how come some fat, over-eating, self inflicted &#8211; and most likely diabetic &#8211; person, who probably weighs three times what I do, gets charged the same price per seat as I do? What about their &#8220;excess baggage&#8221; charges?</p>
<p>Especially when they think it&#8217;s ok for their spare blubber to spill over into my seat? And &#8220;do you mind if I raise the seat arm between us so that I can get a bit more comfy?&#8221;</p>
<p>Actually, I do effing mind. I paid for a seat on this plane and so did you. You did not pay half my fare so you are not entitled to half my seat space as well as your own. Two words &#8211; the second one is &#8220;off&#8221; and the first rhymes with &#8220;truck&#8221;! Catch my drift?</p>
<p>Don&#8217;t like my attitude? Guess what? I don&#8217;t like your blubber spilling over and touching me! You deal with your problem and you might find me a bit more agreeable in future. In fact, you <em>will</em> find me more agreeable, because normally I am a considerate, courteous person &#8211; but you have seriously pissed me off!</p>
<p>And smokers, yes you! Your drug habit is your own affair, please keep it that way. </p>
<p>Please do not shut yourself in a telephone box and chain smoke your way through your last 200 because you can&#8217;t last all the way home. You stink! You may not know it, but you are tremendously obnoxious to non-smokers as well as other smokers. It&#8217;s absolutely disgusting. I may puke very soon! (Or spew, as we Jocks normally say!)</p>
<p>The in flight movie on this trip appears to be something called &#8220;Miles To Go&#8221;. It is crap. </p>
<p>It has been on since we left &#8211; almost two hours ago &#8211; and so far, no dialogue. In fact, there has been nothing but what appears to be a satellite view of a small aeroplane, similar to this one, heading roughly North towards Manchester.</p>
<p>I&#8217;ve saw something very similar once before when flying to and from, Australia. It was a crap movie then and this latest version has not improved things at all.</p>
<p>(That last bit was supposed to be amusing &#8211; it may not have worked!)</p>
<p>I have luckily got extra leg room seats. Well, I say luckily, I paid extra for a seat that can accomodate someone over 4&#8217;6&#8243; without their knees being somewhere close to their forehead for the duration of the flight.</p>
<p>Surely a plane should have sufficient leg room in every seat? </p>
<p>Mind you, I have to say that the standard cattle class seat on this Thomson Airways Boeing 737-800, has far more leg room than any Monarch flight I&#8217;ve ever been on. For an excellent rant on that subject, search this blog for &#8220;Monarch&#8221;.</p>
<p>Oh great! The obnoxious brat two seats away has now started playing with one of his bloody &#8220;musical&#8221; toys. Everything he does is now accompanied by plinky-plonky &#8220;music&#8221; and the seemingly obligitory screaming and high pitched squealing so prevalent amongst children these days.</p>
<p>The &#8220;right on&#8221; and so called &#8220;modern&#8221; parents think that whispering &#8220;ssh&#8221; at the screaming little bar steward is helping. Well they must be deaf, because the little darling is paying them no heed, and continues to wake the other sleeping passengers. People actually <em>want</em> these things? What the fuck for?</p>
<p>Have sex for fun, and stuff the &#8220;multiplying&#8221; bit so loved by the Roman Catholic Church!</p>
<p>Two more effing hours to go. What with the human whale next to me and that damned kid not far (enough) away &#8211; like on another planet &#8211; I could be in for a long prison sentence any time soon! I might be out in 15 years or so, if I behave myself.</p>
<p>As for entertainment, there is none. The &#8220;in seat&#8221; entertainment centre ( a place to plug in your specially purchased headset) has nine channels of total silence, and one of what sounds to me to be a 440 Hz sinusoidal tone. Could be an A but wtf do I know about music? The only thing I play is CDs and the odd parp on my didjeridoo!</p>
<p>The tone sound is, unfortunately, not loud enough to drown (now there&#8217;s a thought!) out the din from the wonder child two seats away. I hate him with a vengeance! Not just because of his incredibly ill mannered behaviour, but because the little shit was sat in the same bloody seats on the way out and screamed all the fucking way there as well!</p>
<p>According to the &#8220;movie&#8221;, we are no longer over the sea and have just made landfall over the Spanish coast, somewhere near, or North, of Vigo.</p>
<p>Did I mention the in flight &#8220;meal&#8221;? No? I won&#8217;t bother then, other than over priced, and tasteless!</p>
<p>The human whale did manage two meals, one after the other, then wiped his hands on the seat in front. Disgusting or what? Not as disgusting as his metronomic farting &#8211; fart fart fart fart &#8211; every two minutes. Jesus!</p>
<p>Oh excellent! Now we have a &#8220;wonderful opportunity&#8221; to buy assorted &#8220;stuff&#8221; from the &#8220;duty free&#8221; trolley. I think I shall give it a wide berth.</p>
<p>Noise cancelling headphones are great on flights. They really do cancel out most of the din from the airflow and engines. At least my Sony ones do.</p>
<p>Unfortunately, they don&#8217;t appear to do anything about screaming kids. Now there&#8217;s a market, ready made for a set of headphones that do! I would be first in the queue for those at any price!</p>
<p>I did mention being driven to drink a while back, near the start of this rant. The brandy is not helping much.</p>
<p>I&#8217;ve drunk the whole 5Cl &#8220;bottle&#8221; (which is of course priced similar to a half bottle in normal life) and the screaming brat is no easier to bear.</p>
<p>Over the North coast of Spain now, heading up  towards Biscay, and they have decided to add in some turbulence. That isn&#8217;t helping the brat, nor my typing! </p>
<p>Travel sucks! And I hate it. However, my wife loves it and the threat of divorce finds me stuck on yet another stressful commercial flight. (If I could afford my own plane, say a Honda Jet, I would travel more often but driving myself!)</p>
<p>Another child has just wandered past. He too is sitting two seats away. The difference is, he is quiet, well behaved and a credit to his parents. I can almost see the appeal &#8211; but there&#8217;s no way I will ever, <em>ever</em>, have a child!</p>
<p>Heading towards Brest in France now, some way to go, but for some reason, the turbulence has stopped and so has the screaming child from hell. How long can the peace and quiet possibly last I wonder? </p>
<p>As it happens, oops &#8211; shades of Jimmy Savile there &#8211; not long. The demon son of Satan&#8217;s cat has started squealing again. 30 seconds was the answer. </p>
<p>And now the battery in my noise cancelling headphones is dwindling and the cancellation is fading in and then cutting out. How positively irritating! I wonder how much worse this flight can get.</p>
<p>An hour to go. Is it worth trying to sleep? You never know, sleep might calm me down. They have just dimmed the cabin lights. Let&#8217;s see if it works. Wish me luck.</p>
<p>Happy New Year &#8211; if it comes! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Here&#8217;s to a peaceful, child free 2013.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/travel-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RMAN Active Database Clone &#8211; Different Servers, Same Structure</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/rman-active-database-clone-different-servers-same-structure-2/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/rman-active-database-clone-different-servers-same-structure-2/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 18:18:30 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1010</guid>
		<description><![CDATA[This post is all about cloning an 11g database from one server to another using an RMAN active database clone. This is not being done for Standby Database purposes, only to duplicate an existing database onto another server. The physical structure on both servers is the same, some path names have been changed. Source Structure [...]]]></description>
				<content:encoded><![CDATA[<p>This post is all about cloning an 11g database from one server to another using an RMAN active database clone. This is not being done for Standby Database purposes, only to duplicate an existing database onto another server. </p>
<p>The physical structure on both servers is the same, some path names have been changed. <span id="more-1010"></span></p>
<h2>Source Structure</h2>
<ul>
<li>Database SID: msmdppr</li>
<li>/srv/msmdp/oradata/msmdppr/</li>
<li>/srv/msmdp/flashback_area/msmdppr/</li>
</ul>
<p>Everything hangs off <code>/srv/msmdp/oradata/msmdppr</code> and there are <code>data</code>, <code>index</code>, <code>temp</code>, <code>undo</code>, <code>redo</code>, <code>ctrl</code>, <code>dbs</code>, <code>diag</code> directories there. </p>
<p>The <code>redo</code> and <code>ctrl</code> directories are also to be found under the flashback_area for this database. A copy of the redo files are held there and there are some of the control files as well. This is a separate LUN from the <code>oradata</code> structure.</p>
<p>These are all part of a multi-spindle SAM, so it&#8217;s not as bad as it looks having everything in the &#8220;same place&#8221;.</p>
<h2>Destination Structure</h2>
<ul>
<li>Database SID: msmpr</li>
<li>/srv/msm/oradata/msmpr/<em>all as above</em></li>
<li>/srv/msmdp/flashback_area/msmpr/<em>all as above</em></li>
</ul>
<p>The destination structure will end up the same as the source, and only the names will change. Where the source has <em>/msmdp/</em> or <em>/msmdppr/</em> the destination will be <em>/msm/</em> or <em>/msmpr/</em></p>
<h2>Destination Preparation</h2>
<ul>
<li>Build the desired directory structures for the new database. In this example, I did the following, as the oracle user:
<pre>
$ mkdir -p /srv/msm/oradata/msmpr/
$ mkdir -p /srv/msm/flashback_area/msmpr/

$ cd /srv/msm/oradata/msmpr/
$ mkdir -p data index temp undo redo ctrl dbs changetracking
$ mkdir -p diag/rdbms/msmpr/msmpr/adump

$ cd /srv/msm/flashback_area/msmpr/
$ mkdir redo ctrl
</pre>
</li>
<li>Create a <em>temporary</em> password file for the new database. Set the password to be the same as the source database. It won&#8217;t work otherwise. Ask me how I know?</li>
</ul>
<h2>Source Preparation</h2>
<ul>
<li>Make sure when you start the source database that there are no warnings about any deprecated parameters in the spfile. If there are, check the alert log and remove them. If you don&#8217;t, they will get transferred to the destination database and the clone will fail!</li>
<li>Recreate a pfile from the spfile. You must have an up to date pfile. You can use a minimum pfile on the destination server, but I find it is better to be explicit. I&#8217;ve had problems.</li>
<li>Copy the new pfile over to the destination server. You can put it straight into $ORACLE_HOME/dbs if you wish, or put it somewhere else, and create a symbolic link to $ORACLE_HOME/dbs. The latter is what I did. All individual database startup and password files live in the <code>/dbs/</code> directory and are linked from there.</li>
</ul>
<h2>Further Preparation</h2>
<p>The remainder of the work needs some parts to be done on the source server and others to be done on the destination server.</p>
<ul>
<li>On the destination server, edit the pfile that was created on the source server and copied over. You need to change all occurrences of the source database name to the destination one, and make sure that all your paths etc are correctly defined for the new database</li>
<li>Now add the following two parameters to the pfile:
<ul>
<li>db_file_name_convert=&#8217;/srv/msmdp/oradata/msmdppr/&#8217;,<br />
&#8216;/srv/msm/oradata/msmpr/&#8217;,<br />
&#8216;/srv/msm/flashback_area/msmpr/&#8217;,<br />
&#8216;/srv/msm/flashback_area/msmpr/&#8217;</li>
<li>log_file_name_convert=&#8217;/srv/msmdp/oradata/msmdppr/&#8217;,<br />
&#8216;/srv/msm/oradata/msmpr/&#8217;,<br />
&#8216;/srv/msm/flashback_area/msmpr/&#8217;,<br />
&#8216;/srv/msm/flashback_area/msmpr/&#8217;</li>
</ul>
<p> They will convert the filenames to the destination format. <strong>Beware</strong>, I have found that these parameters only substiture at the start of a parameter, not where the parameter includes the text to be replaced. </li>
<li>Startup the destination database in NOMOUNT mode. </li>
<li>On the destination server, create a listener for this database and start it up.</li>
<li>On the destination server, create a tnsnames.ora entry for the new database.</li>
<li>On the destination server, test that you can connect to the destination database with <code>sqlplus sys/password@msmpr as sysdba</code>. If it works, carry on, otherwise, fix it.</li>
<li>On the source server, create a tnsnames.ora entry for the destination database.</li>
<li>On the source server, test the connection. You need to be able to connect to the database with <code>sqlplus sys/password@msmpr as sysdba</code></li>
<li>On the source server, if the database is running in NOARCHIVELOG mode, shut it down, then restart it in MOUNT mode. If the database is running in ARCHIVELOG mode, it can either be OPEN or MOUNTed.</li>
<li>On the source server, set the environment for the source database (msmdppr) and start RMAN. You may need to specify <code>$ORACLE_HOME/bin/rman</code> to get the correct &#8220;rman&#8221; if you are on a Linux server. There are other rmans!</li>
<li>In the RMAN session, run the following commands:
<pre>
connect target sys/password
connect auxiliary sys/password@msmpr

duplicate target database to msmpr
from active database
nofilenamecheck
password file;
</pre>
<p> then leave RMAN to do its thing. </p>
<p>In my case that meant an overnight job as there was around 6.5Tb to clone. Luckily RMAN, when configured for performance, will skip the completely virgin blocks in a data file which makes things a little quicker.</li>
</ul>
<p>The RMAN commands are saying to clone the source database and copy accross the password file from the source database to the destination one. If you have any users with SYSOPER or SYSDBA roles granted, their passwords will be in the password file, so you&#8217;ll need it on the destination server as well.</p>
<p>When it finishes, you will find the password file and a new spfile for the destination database in $ORACLE_HOME/dbs. if necessary, move them to where you want them, and create symbolic links back to $ORACLE_HOME/dbs.</p>
<h2>When Things Go Wrong</h2>
<p>Problems happen. I&#8217;ve had my share, especially with RMAN clones!</p>
<p>In the event that the clone exercise fails at some point, don&#8217;t panic. Log out of RMAN on the source server, and go back in.</p>
<p>On the destination server, shut down the database, you can ABORT if necessary. Delete the spfile for the new database, if it still exists, then restart the destination database in NOMOUNT mode again.</p>
<p>Fix the problem, and start again from the <code>connect target ...</code> command in RMAN.</p>
<p>One thing I did notice, in my xxxx_file_name_convert parameters, I set it to convert &#8216;/msmdp/&#8217;,'/msm/&#8217;,'/msmdppr/&#8217;,'/msmpr/&#8217; and it ignored the second pair of substitutions. It seems as if it can cope with the first pair being part of the file names in question, but not the second pair, they remained unconverted and my data file copies failed because the /msmdppr/ directory wasn&#8217;t to be found.</p>
<p>in the end I gave up on it completely, and just forced it to convert the entire thing.</p>
<p>Good luck, RMAN, when it&#8217;s working is great. When you struggle with it, you struggle!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/rman-active-database-clone-different-servers-same-structure-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Not a PiBow, It&#8217;s a Raspberry PiBoard!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/its-not-a-pibow-its-a-piboard/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/its-not-a-pibow-its-a-piboard/#comments</comments>
		<pubDate>Mon, 03 Dec 2012 15:17:22 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=985</guid>
		<description><![CDATA[Having a Raspberry Pi is fun, but like the days of my ZX-81, Spectrum and QL (I see a Sinclair habit there!) you get all sorts of bits hanging off and making it all look untidy. Here&#8217;s how to fit a whole pile of &#8220;stuff&#8221; into the space of an A4 sheet of paper. I [...]]]></description>
				<content:encoded><![CDATA[<p>Having a Raspberry Pi is fun, but like the days of my ZX-81, Spectrum and QL (I see a Sinclair habit there!) you get all sorts of bits hanging off and making it all look untidy. Here&#8217;s how to fit a whole pile of &#8220;stuff&#8221; into the space of an A4 sheet of paper. <span id="more-985"></span></p>
<p>I know it&#8217;s the size of an A4 sheet because that&#8217;s what I drew it on before cutting the wood. The image shows the final result. (Click it for a bigger picture.)</p>
<div id="attachment_986" class="wp-caption alignright" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/12/PiBoard.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/12/PiBoard-300x179.jpg" alt="PiBoard" title="PiBoard" width="300" height="179" class="size-medium wp-image-986" /></a><p class="wp-caption-text">The finished PiBoard, everything fits into a space the same size as an A4 sheet of paper.</p></div>
<p>From the top left, working clockwise, we have the following:</p>
<ul>
<li>A 60Gb USB hard drive.</li>
<li>Sitting on the drive, is a 400 pin breadboard currently stuffed full of Adafruit Pi Cobbler breakout connector.</li>
<li>A 4 way powered USB hub. This powers the Pi, the USB drive, the WiFi connector and the wireless keyboard and mouse dongle.</li>
<li>My Pi. It lives in a PiBow case. The GPIO ribbon cable works the Cobbler breakout or the Gertboard. There is just enough room to change the SD card or to remove it for backups. The sound and the composite video outputs are both accessible. The white box on a cable poking out the back is an HDMI to VGA converter box.</li>
<li>My Gertboard. I was lucky enough to get one of the first ones that had to be built from a large kit of parts. I had much fun putting that together, and even more fun when it all &#8220;just&#8221; worked!</li>
<li>The pear shaped &#8220;thing&#8221; in the middle of the PiBoard, partially hidden under the GPIO ribbon cable, is a USB extension, supplied with my wireless router, to plug the WiFi dongle into. You can just make out the dongle standing upright on top of the extension.</li>
</ul>
<p>The board iktself is a half inch, sorry, 12 mm thick piece of MDF which I cut to size and sanded smooth while wearing a face mask to avoid the dust, which can be nasty stuff.</p>
<p>Evenrthings is stuck down with double sided sticky foam that was left over from when the new kitchen was installed (I <em>knew</em> it would come in handy one day!) and, in the case of the Gertboard, it&#8217;s also screwed down.</p>
<p>Underneath, to avoid scratching whatever I place it on, the board has a wide strip of single sided sticky foam, from the same kitchen left overs, down each side to act as non-slip feet.</p>
<p>In use, I plug it it and switch on. It either runs headless or I can connect it to a VGA cable to an old 12&#8243; LED telly with a VGA input. It can be run on WiFi or cabled Ethernet depending on whatever else I have plugged in at  the time!</p>
<p>All this makes moving the Raspberry Pi around the house quite simple. With a quick edit to config.txt, I can have it running on the 22&#8243; HDMI monitor, or another edit and it&#8217;s back to the small VGA telly. Most of the time, it just sits there, running headless.</p>
<p>Raspberry Pi&#8217;s are putting the fun back in computing.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/12/its-not-a-pibow-its-a-piboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where Does OraInventory Live? Can I Move it?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/where-does-orainventory-live-can-i-move-it/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/where-does-orainventory-live-can-i-move-it/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 16:07:06 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=978</guid>
		<description><![CDATA[Looking for the location of oraInventory on a server? Want to know where it is? Read on. There is a file, known to Oracle, which holds the location of the inventory. Of course, it isn&#8217;t in the same place on every server, but the ones I know of have it as follows: Linux: /etc/oraInst.loc HP-UX: [...]]]></description>
				<content:encoded><![CDATA[<p>Looking for the location of oraInventory on a server? Want to know where it is? Read on. <span id="more-978"></span></p>
<p>There is a file, known to Oracle, which holds the location of the inventory. Of course, it isn&#8217;t in the same place on every server, but the ones I know of have it as follows:</p>
<ul>
<li>Linux: <code>/etc/oraInst.loc</code></li>
<li>HP-UX: <code>/var/opt/oracle/oraInst.loc</code></li>
<li>Windows: Registry at <code>HKLM/software/oracle/inst_loc</code></li>
</ul>
<p>For any other Unix, you can find it (as the oracle or root user) with:</p>
<p><code>find / -type f -name oraInst.loc -print</code></p>
<p>Once you know where it lives, you can move it simply. The following example moves it from the current location, found in <code>oraInst.loc</code> to <code>/opt/oracle/oraInventory</code>:</p>
<pre>
$ cat /etc/oraInst.loc

inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

$ cd /opt/oracle
$ cp -Rp /u01/app/oracle/oraInventory ./

$ vi /etc/oraInst.loc
  :1
  s?/u01/app?/opt?
  :wq

$ cat /etc/oraInst.loc

inventory_loc=/opt/oracle/oraInventory
inst_group=oinstall
</pre>
<p>Job done! Although it might be wise to take a backup of the original location, just in case, and then delete it from the old location:</p>
<pre>
$ cd /opt/oracle
$ tar -cvzf u01.app.oracle.tgz /u01/app/oracle
...

$tar -tzf u01.app.oracle.tgz   ## Just checking ...
...

$cd /u01/app/
$pwd                           ## Safety check!
/u01/app

$ls                            ## Another safety check!
oracle

$rm -Rf oracle                 ## Getting nervous yet? I am!
</pre>
<p>And that it, all done.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/where-does-orainventory-live-can-i-move-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using &#8220;chopt&#8221; to Enable and Disable Oracle Options</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/using-chopt-to-enable-and-disable-oracle-options/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/using-chopt-to-enable-and-disable-oracle-options/#comments</comments>
		<pubDate>Fri, 23 Nov 2012 15:52:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=966</guid>
		<description><![CDATA[As you may know, Oracle databases come with a number of options. Some of these cost extra and if inadvertantly installed, Oracle must be paid money &#8211; note, you don&#8217;t have to be using them, only have them installed, to require payment. So what do you do if you need to remove an option? In [...]]]></description>
				<content:encoded><![CDATA[<p>As you may know, Oracle databases come with a number of options. Some of these cost extra and if inadvertantly installed, Oracle must be paid money &#8211; note, you don&#8217;t have to be using them, only have them installed, to require payment. So what do you do if you need to remove an option? <span id="more-966"></span></p>
<p>In the old days, you used to have to rebuild the oracle binaries to add or remove options. To do this you needed to know the names of a number of <em>make targets</em> &#8211; not for the faint hearted.</p>
<p>From 11g onwards, the process is much simpler. Oracle now supply the <code>chopt</code> (change option) utility to make your DBS&#8217;s life simple.</p>
<p>The utility is supplied with Enterprise and Standard Editions. It allows you to enable or disable the following options:</p>
<ul>
<li>Data Mining</li>
<li>Database Vault</li>
<li>Oracle Label Security</li>
<li>OLAP</li>
<li>Partitioning</li>
<li>Real Application Testing</li>
</ul>
<p>You can run the utility with no parameters to see what it does and how you should call it in anger:</p>
<pre>
$ chopt

usage:

chopt &lt;enable|disable> &lt;option>

Options:

                  dm = Oracle Data Mining RDBMS Files
                  dv = Oracle Database Vault option
                lbac = Oracle Label Security
                olap = Oracle OLAP
        partitioning = Oracle Partitioning
                 rat = Oracle Real Application Testing

e.g. chopt enable rat
</pre>
<p>So, for example, to disable partitioning because the junior DBA has mistakenly installed it (all these options are selected and installed by default in Enterprise Edition!) then all you do is set the correct Oracle Home using <code>oraenv</code> in the normal manner, then:</p>
<p><code>chopt disable partitioning</code> as the following example demonstrates:</p>
<pre>
$ chopt disable partitioning

Writing to /srv/oracle/product/11gR1/db/install/disable_partitioning.log...
/usr/bin/make -f /srv/oracle/product/11gR1/db/rdbms/lib/ins_rdbms.mk part_off ORACLE_HOME=/srv/oracle/product/11gR1/db
/usr/bin/make -f /srv/oracle/product/11gR1/db/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/srv/oracle/product/11gR1/db
</pre>
<p>You can check the log file named on the first line of output for details. Enabling an option is just as simple:</p>
<pre>
$ chopt enable partitioning

Writing to /srv/oracle/product/11gR1/db/install/enable_partitioning.log...
/usr/bin/make -f /srv/oracle/product/11gR1/db/rdbms/lib/ins_rdbms.mk part_on ORACLE_HOME=/srv/oracle/product/11gR1/db
/usr/bin/make -f /srv/oracle/product/11gR1/db/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/srv/oracle/product/11gR1/db
</pre>
<p>You can only enable or disable a single option at a time, unlike when you are running the old style <code>make</code> commands where you could specify to turn them all on or off in one go. Progress?</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/using-chopt-to-enable-and-disable-oracle-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Resize a VirtualBox Hard Drive</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/how-to-resize-a-virtualbox-hard-drive/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/how-to-resize-a-virtualbox-hard-drive/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 18:01:23 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=957</guid>
		<description><![CDATA[Have you ever found that the virtual hard drive attached to one of your VirtualBox VMs is getting too small? Want to know how to make it beigger? It&#8217;s simple. The steps are as follows: Disconnect the drive from your VM. The VM should be shut down and not snapshotted for this step. You can [...]]]></description>
				<content:encoded><![CDATA[<p>Have you ever found that the virtual hard drive attached to one of your VirtualBox VMs is getting too small? Want to know how to make it beigger? <span id="more-957"></span></p>
<p>It&#8217;s simple. The steps are as follows:</p>
<ul>
<li>Disconnect the drive from your VM. The VM should be shut down and not snapshotted for this step. You can either use the VMs storage settings to disconnect the hard drive, or go to <code>File->Virtual Media Manager</code>, choose the correct hard drive, and click the <code>release</code> button.</li>
<li>In a command line session, type the following command &#8211; you do not have to be root:
<pre>VBoxManage modifyhd /path/to/vdi/file.vdi --resize nnnn</pre>
<p>The size given, nnnn in the above, is the new size in Mb and must be <em>bigger</em> than the present size. You will then see something like the following example where I resize a virtual hard disc to 12Gb (12288 Mb):</p>
<pre>norman@hubble $ VBoxManage modifyhd /data/VirtualBox/HardDisks/Antix.vdi --resize 12288
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
</pre>
</li>
<li>Go back to the VM&#8217;s storage settings, and re-attach the newly resized hard drive.</li>
<li>Start the VM.</li>
<li>Run the disc partitioner tool of your distro to extend an existing partition into the new free space, or to create a new partition. You may add the extra space to an existing logical volume if you are using LVM devices.</li>
</ul>
<p>As mentioned above, you cannot reduce the size of a virtual disc. If you try, you will see the following:</p>
<pre>norman@hubble $ VBoxManage modifyhd /data/VirtualBox/HardDisks/Antix.vdi --resize 6144
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Resize hard disk operation for this format is not implemented yet!
</pre>
<p>That&#8217;s all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/how-to-resize-a-virtualbox-hard-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle&#8217;s Deferred Segment Allocation Breaks Transportable Tablespace Imports.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/oracles-deferred-segment-allocation-breaks-transportable-tablespace-imports/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/oracles-deferred-segment-allocation-breaks-transportable-tablespace-imports/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 14:04:38 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=953</guid>
		<description><![CDATA[In order to downgrade an 11.2.0.3 Enterprise Edition database to Standard Edition, I had to use a Transportable Tablespace export/import. Because the default setting for DEFERRED_SEGMENT_CREATION is TRUE, the tablespace import barfed with numerous &#8220;IMP-00017: following statements failed with ORACLE error 1647:&#8221; errors. Want to know why? The ORA-01649 error is &#8220;Tablespace is read only, [...]]]></description>
				<content:encoded><![CDATA[<p>In order to downgrade an 11.2.0.3 Enterprise Edition database to Standard Edition, I had to use a Transportable Tablespace export/import. Because the default setting for <code>DEFERRED_SEGMENT_CREATION</code> is <code>TRUE</code>, the tablespace import barfed with numerous &#8220;<em>IMP-00017: following statements failed with ORACLE error 1647:</em>&#8221; errors. Want to know why? <span id="more-953"></span></p>
<p>The ORA-01649 error is &#8220;<em>Tablespace is read only, cannnot allocate space in it</em>&#8221; which is interesting as I&#8217;m imprting a Transportable Tablespace dump file and <em>all</em> the tablespaces are read only after being created, until I manually make then read write.</p>
<p>In the source database, the &#8220;broken&#8221; tables all have zero rows in them, and have no entry in DBA_SEGMENTS which means that the <em>Deferred Segment Allocation</em> feature has indeed done its stuff, and deferred allocating a segment until the first row of data is entered (but not necessarily committed!) into the table.</p>
<blockquote><p>Note. The <code>DEFERRED_SEGMENT_CREATION</code> is also defaulted to <code>TRUE</code> in Standard Edition databases, but the parameter has <em>no effect</em> in these, as the following shows:</p>
<pre>
Connected to:
Oracle Database 11g Release 11.2.0.3.0 - 64bit Production

SQL> show parameter deferred_seg

NAME                       TYPE     VALUE
-------------------------- -------- -------------
deferred_segment_creation  boolean  TRUE

SQL> create table test(a number);
Table created.

SQL> select table_name, segment_created
  2  from user_tables
  3  where table_name = 'TEST';

TABLE_NAME           SEG
-------------------- ---
TEST                 YES
</pre>
<p>So, even with an empty table, in Standard Edition, the deferred segment allocation does not take place. This is exactly why I&#8217;m having problems running a transportable tablespace import from an Enterprise Edition database to a Standard Edition one. It seems that Standard expects everything to have at least one allocated segment.</p>
<p>If the importing database is Enterprise Edition, this problem doesn&#8217;t occur.
</p></blockquote>
<p>The quick workaround is to run a table based export, using <code>exp</code> or <code>expdp</code>, of the affected tables, and import that at the receiving database using <code>imp</code> or <code>impdp</code>.</p>
<p>The longer term workaround is to make sure that <code>DEFERRED_SEGMENT_CREATION</code> is set to <code>FALSE</code> in the spfile.</p>
<p>In the meantime, I&#8217;m logging a bug with Oracle as the <code>DBMS_TTS.TRANSPORT_SET_CHECK</code> procedure should identify these tables and warn about them, or, the import should correctly import them anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/11/oracles-deferred-segment-allocation-breaks-transportable-tablespace-imports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backup &amp; Check a Raspberry Pi SD Card</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/backup-check-a-raspberry-pi-sd-card/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/backup-check-a-raspberry-pi-sd-card/#comments</comments>
		<pubDate>Mon, 22 Oct 2012 18:56:26 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=937</guid>
		<description><![CDATA[Ever wanted to backup your Raspberry Pi&#8217;s SD card, but didn&#8217;t know who to ask? Me too. Read on &#8230;. The first thing to remember is that you should really always have a backup of your SD card. In theory every time you make a change, but in practice, it will be less frequently than [...]]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to backup your Raspberry Pi&#8217;s SD card, but didn&#8217;t know who to ask? Me too. Read on &#8230;. <span id="more-937"></span></p>
<p>The first thing to remember is that you should really always have a backup of your SD card. In theory every time you make a change, but in practice, it will be less frequently than that!</p>
<p>I have had two cards corrupt themselves when I managed to lock my Pi completely, and the only recourse was to pull the power. Unfortunately, in both cases, I was left with a card that the Pi could read the first partition from, but then couldn&#8217;t mount the second, so no operating system.</p>
<p>Luckily I had a backup, but it was of a 4Gb SD card and I&#8217;m running on 8 Gb, so I hjad to restore and then extend the second partition to use the remaining 4 Gb of unallocated space. Normally I&#8217;d restore the 8 Gb image to an 8 Gb card.</p>
<p>These instructions are for Linux only. If you use one of the Windows utilities for writing to your SD card, there should be an option to read from it and write to a file, if so, this is what you need to use. Beware, there may need to be two reads if you have two partitions, with some of these utilities.</p>
<h2>Make a Backup</h2>
<p>Plug your card into your computer, no, not your raspberry Pi <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , and wait a second or two for it to settle down.</p>
<p>If you have a card slot, you most likely have the card on <code>/dev/mmcblk0</code> and if you have it in a USB adaptor of some kind, it&#8217;s most likely going to be <code>/dev/sdx</code> where &#8216;x&#8217; is the digit representing the highest device of this kind.</p>
<p>To find out for certain, do the following, either using <code>sudo</code>, or as root:</p>
<pre>
fdisk -l
...
...
Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dbfc6

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880    15523839     7700480   83  Linux</pre>
<p>The above shows the tail end of the output on my system. I can recognise the card by the size, 8 Gb (or 7948 as listed above) which is the only drive I have of this size, and its two partitions bearing in mind the fact that one of them is small and W95 FAT (LBA) and the other plain old Linux.</p>
<p>In the above, the suffixes &#8216;p1&#8242; and &#8216;p2&#8242; indicate the partitions on the card. The device itself is <code>/dev/mmcblk0</code> and that&#8217;s what we need, the device name, not the partition names.</p>
<p>To take a backup, switch to your backup directory, where you intend to keep the copy of your SD card, and run the following command as the root user (or use <code>sudo</code>):</p>
<pre>
dd if=/dev/mmcblk0 of=Rpi_8gb_backup.img bs=2M 
3790+0 records in
3790+0 records out
7948206080 bytes (7.9 GB) copied, 1369.42 s, 5.8 MB/s
</pre>
<p>That&#8217;s it. The whole 8Gb SD card has been (slowly) copied to my computer. How do I know it worked?</p>
<h2>Check the Backup File</h2>
<p>The output above shows that there were no errors in copying the SD card to disk, but it&#8217;s always best to be sure that it will work when the time comes to carry out a restore.</p>
<p>The first step, as root &#8211; as ever &#8211; is to determine where the partitions begin. Because we have an image copy of the SD card, we can look at the file itself and see the partition table within. </p>
<p>The following commands will be carried out as root, or using the <code>sudo</code> command.</p>
<p>We first list the SD image file to see where the partitions begin and the sizes of the sectors. <code>Fdisk</code> reports sizes in sectors, but handily displays the sector size at the top.</p>
<pre>
fdisk Rpi_8gb_backup.img 
Welcome to fdisk (util-linux 2.21.2).
...
Command (m for help): p

Disk /home/norman/Backups/Rpi_8gb_backup.img: 7948 MB, 7948206080 bytes
255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dbfc6

                                  Device Boot      Start         End      Blocks   Id  System
/home/norman/Backups/Rpi_8gb_backup.img1            8192      122879       57344    c  W95 FAT32 (LBA)
/home/norman/Backups/Rpi_8gb_backup.img2          122880    15523839     7700480   83  Linux
</pre>
<p>We can see from the line starting with &#8216;Units&#8217; or &#8216;Sector size&#8217; that a sector is 512 bytes. We can also see that our two partitions start at sectors 8,192 and 122,880.</p>
<p>Multiplying these start sectors by 512 gives the start position in bytes. This works out at 4,194,304 and 62,914,560 bytes respectively.</p>
<p>On your Raspberry Pi, the first partition is mounted at <code>/boot</code> while the second is the root (/) mount point.</p>
<p>To check these, without needing access to the Pi, we simply proceed as follows on a Linux computer:</p>
<pre>
mkdir /mnt/root /mnt/boot
chmod a=rwx /mnt/root /mnt/boot

mount -t vfat -o loop,offset=4194304 /home/norman/Backups/Rpi_8gb_backup.img /mnt/boot

mount -t ext4 -o loop,offset=62914560 /home/norman/Backups/Rpi_8gb_backup.img /mnt/root
</pre>
<p>The above creates a couple of mount points (directories) and then mounts the first partition within the image file as a <code>vfat</code> file system on <code>/mnt/boot</code> and then mounts the second partition as an <code>ext4</code> file system on <code>/mnt/root</code>.</p>
<p>The first  two commands to create the mount points and set the permissions on them are only required once, the first time you carry out this exercise.</p>
<p>You can now see the files by opening a file manager and looking at the <code>/mnt/boot</code> and <code>/mnt/root</code> directories &#8211; you should see your various files as if you were looking on your Raspberry Pi.</p>
<h2>Restore a Single File</h2>
<p>This method of mounting a disc image as a device is useful for times when you manage to delete a file, accidentally of course, on your Pi, but you know that you have a backup. If the Pi is on your network, you can simply mount the backup image as above, locate the file and check that it is the one you want, then use <code>scp</code> or <code>sftp</code> to copy the file to your Pi, as demonstrated below:</p>
<pre>
mount -t ext4 -o loop,offset=62914560 /home/norman/Backups/Rpi_8gb_backup.img /mnt/root

scp /mnt/root/etc/network/interfaces pi@raspberrypi:
pi@raspberrypi's password: 
interfaces                                                                    100%  183     0.2KB/s   00:00
</pre>
<p>The file is now located in the home directory of the pi user. All you need to do to move it to the correct place is:</p>
<pre>
sudo mv interfaces /etc/network/
sudo chmod u=rw,go=r /etc/network/interfaces
sudo chown root:root /etc/network/interfaces
</pre>
<p>Obviously, if you are like me, you have already given your root user a password, so you could miss out the above and simply <code>scp</code> the file straight into the correct location. You would only need to set the permissions and not the ownership of the file afterward.</p>
<pre>
scp /mnt/root/etc/network/interfaces rooot@raspberrypi:
root@raspberrypi's password: 
interfaces                                                                    100%  183     0.2KB/s   00:00
</pre>
<pre>
sudo chmod u=rw,go=r /etc/network/interfaces
</pre>
<p>So there you have it, how to backup your SD card, how to mount it on the backup computer to check that it is ok, and as a bonus, how to extract a file (or files) for an individual recover. What else could we do?</p>
<h2>Restore a Full Backup</h2>
<p>This is as simple as initialising the SD card for the first time. You can restore a backup file to your SD card provided that the SD card is bigger or the same size as the image file.</p>
<p>As ever, the following commands are executed as root or by using the <code>sudo</code> command.</p>
<pre>
dd if=Rpi_8gb_backup.img of=/dev/mmcblk0 bs=2M
</pre>
<p>It takes a while, but it will restore in the end. All you have to do is wait for the copy to finish and then boot the Pi with the restored SD card in the slot.</p>
<h2>Copy Your Current System to a Larger Card</h2>
<p>We can also use the smaller backup files to initialize a larger SD card, if we were perhaps upgrading. This is what I had to do when I restored a 4 Gb backup to my 8 Gb card. Once that was done, I booted the Pi with the restored SD card in place, and when I logged in, executing <code>sudo raspi-config</code> and selecting the option to <code>Expand root partition to fill SD card</code> extended the current almost 4 Gb partition to the full almost 8 Gb size required (on the next reboot that is.)</p>
<p>You can see that it worked by executing the <code>df</code> command, which does not need to be executed as root!</p>
<pre>
df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  1.6G  5.4G  23% /
/dev/root       7.3G  1.6G  5.4G  23% /
devtmpfs        109M     0  109M   0% /dev
tmpfs            22M  208K   22M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            44M     0   44M   0% /run/shm
/dev/mmcblk0p1   56M   25M   32M  44% /boot
</pre>
<p>The first and last entries in the above show that the root file system, mounted on <code>/</code> is 7.3 Gb while the <code>/boot</code> file system is 56 Mb in size. So, my 4 Gb restore is now happily running on an 8 Gb card and I have all the space available to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/backup-check-a-raspberry-pi-sd-card/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gertboard Parts List</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/gertboard-parts-list/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/gertboard-parts-list/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 08:10:31 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=926</guid>
		<description><![CDATA[The Gertboard doesn&#8217;t come supplied with a parts list that you can cross reference. I created one for myself, and discovered a missing component which Farnell quickly replaced the very next day &#8211; thanks. If you wish, you can download the Gertboard parts list here]]></description>
				<content:encoded><![CDATA[<p>The Gertboard doesn&#8217;t come supplied with a parts list that you can cross reference. I created one for myself, and discovered a missing component which Farnell quickly replaced the very next day &#8211; thanks.</p>
<p>If you wish, you can download the <a href='http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/10/Gertboard-PartsList2.pdf'>Gertboard parts list here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/gertboard-parts-list/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi Sound</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/raspberry-pi-sound/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/raspberry-pi-sound/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 15:10:59 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=921</guid>
		<description><![CDATA[Want to know how to redirect the sound from your Pi to either the HDMI or to the headphone socket? Read on &#8230; Update &#8211; 11 February 2013 I&#8217;ve written a small command line utility &#8211; PiSound &#8211; to control the settings of the audio device on your RaspberryPi. You can download it from https://github.com/NormanDunbar/PiSound. [...]]]></description>
				<content:encoded><![CDATA[<p>Want to know how to redirect the sound from your Pi to either the HDMI or to the headphone socket? Read on &#8230; <span id="more-921"></span></p>
<h2>Update &#8211; 11 February 2013</h2>
<p>I&#8217;ve written a small command line utility &#8211; PiSound &#8211; to control the settings of the audio device on your RaspberryPi. You can download it from <a href="https://github.com/NormanDunbar/PiSound" title="PiSound on GitHub" target="_blank">https://github.com/NormanDunbar/PiSound</a>. Enjoy.</p>
<h2>Deciding on the Output Device</h2>
<p>The following command is all you need:</p>
<pre>
sudo amixer cset numid=3 n
</pre>
<p>Where the final &#8216;n&#8217; is as follows:</p>
<ul>
<li>0 = Auto &#8211; if HDMI is connected, use that, otherwise try the headphone socket.</li>
<li>1 = Sound goes to the headphone socket.</li>
<li>2 = Sound goes to HDMI socket.</li>
</ul>
<blockquote><p>If your current user is a member of the audio group, the sudo parts of the <code>amixer</code> commands is not required.</p></blockquote>
<p>You can make sure that it works by running a command such as:</p>
<pre>
aplay /usr/share/sounds/alsa/Front_Left.wav
</pre>
<p>You should be able to hear the sound if you have set the correct output as above.</p>
<p>Have fun.</p>
<h2>Raspbain 16th December 2012 &#8211; Update</h2>
<p>It appears that something (a technical term) has gone wrong in the 16/12/2012 Raspbian release and/or after <code>sudo apt-get update &#038;&#038; sudo apt-get upgrade</code> &#8211; which stops sound working.</p>
<p>You can tell if you are affected as follows:</p>
<pre>
$ sudo amixer controls

numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
</pre>
<p>If you see the above, then you are affected and nothing you can do will allow you to redirect sound to the headphone socket. When I say <em>nothing</em>, I mean, nothing, except the following, as <a href=" https://github.com/raspberrypi/firmware/issues/139" title=" https://github.com/raspberrypi/firmware/issues/139" target="_blank">explained here</a>, however, read the next section before you start removing stuff that you might need!</p>
<pre>
sudo apt-get purge --yes pulseaudio
...
sudo reboot
</pre>
<p>When your Pi comes back up, login and try again:</p>
<pre>
$ sudo amixer controls

numid=3,iface=MIXER,name='PCM Playback Route'
numid=2,iface=MIXER,name='PCM Playback Switch'
numid=1,iface=MIXER,name='PCM Playback Volume'
</pre>
<p>Now you can use the <code>sudo amixer cset numid=3 1</code> command as described above, to direct the audio output to your headphones.</p>
<h2>But I need PulseAudio &#8230;</h2>
<p>You might be in a situation where you need to keep PulseAudio installed. What to do? The answer is simple, in all the calls to <code>amixer</code> add in a card selector such as <code>-c 0</code>. </p>
<p>Normally, the PCM card is card 0 (zero) and PulseAudio is card 1 (one). Somehow, PulseAudio sets itself as the default card. <em>I haven&#8217;t bothered to discover how or where it does this yet, I deinstalled PulseAudio on my system.</em></p>
<pre>
$ sudo amixer -c 0 controls

numid=3,iface=MIXER,name='PCM Playback Route'
numid=2,iface=MIXER,name='PCM Playback Switch'
numid=1,iface=MIXER,name='PCM Playback Volume'
</pre>
<p>Hooray! If the above works for you, where leaving out the card select options <code>-c 0</code> does not, then you must add <code>-c 0</code> to all the <code>amixer</code> commands below.</p>
<h2>Muting Sound</h2>
<p>Numid=2 determines if sound is muted or not. To mute sound, regardless of its output device, do this:</p>
<pre>
$ sudo amixer cset numid=2 0
</pre>
<p>and to unmute the sound:</p>
<pre>
$ sudo amixer cset numid=2 1
</pre>
<h2>Volume Control</h2>
<p>Numid=1 allows you to set the volume. The range is slightly strange in that it runs from -10239 to +400 with +400 being the maximum. On my system, I have a pair of X-mini powered and amplified speakers attached. A minimum value of -1000 gives a quiet sound, 0 (zero) gives reasonable sound and 400 is a bit too loud.</p>
<p>You adjust the volume as follows:</p>
<pre>
$ sudo amixer cset numid=1  -- -1000
</pre>
<p>Please note the double hyphen. This is required in front of any parameter that has a leading hyphen. In this case, the volume setting I require is -1000, so the double hyphen says &#8220;the following is a value, even though it has a hypen, it is not another flag or option!&#8221;</p>
<p>You can use the double hyphen in front of positive numbers as well, without any adverse effects.</p>
<pre>
$ sudo amixer cset numid=1  -- 234
</pre>
<p>Positive values between 0 and 400 appear unchanged while negative values between -1 and -10239 are rounded up to 0 to -10238.</p>
<p>The only way to get -10239 is to mute the sound. </p>
<p>Of course, being human, it would be nice to set the volume to something easily figured out, like a percentage, wouldn&#8217;t it? This would be nice, for example:</p>
<pre>
$ sudo amixer cset numid=1 60%
</pre>
<p>No need to work out numbers in a weird range, no need for the double hyphens etc. Try it, <em>it works</em>! The range is obviously from 0% to 100%, anything outside of those boundaries will be limited to the appropriate percentage. Setting the volume to 0% effectively mutes the audio output.</p>
<h2>What are my Settings?</h2>
<p>You may, if you wish, view all the settings on your Pi with the following single command:</p>
<pre>
$ sudo amixer contents

numid=3,iface=MIXER,name='PCM Playback Route'
  ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=1
  : values=1
numid=2,iface=MIXER,name='PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=1,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
  : values=-1000
  | dBscale-min=-102.39dB,step=0.01dB,mute=1
</pre>
<p>If you wish to find the settings for one control only, use the same numid as you used to <code>cset</code> the control, but read the setting with the <code>cget</code> command instead:</p>
<pre>
$ sudo amixer cget numid=3

numid=3,iface=MIXER,name='PCM Playback Route'
  ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=1
  : values=1
scale-min=-102.39dB,step=0.01dB,mute=1
</pre>
<p>There doesn&#8217;t appear to be a way of fetching the current setting into a variable for use in, say, a bash script. Not unless you parse the data out of the returned string. The following python code will do this for you:</p>
<pre>
import os
...
volume = None
stdout = os.popen('amixer cget numid=1')
try:
    volume = stdout.read()
finally:
    stdout.close()

# At this point, volume (a string) and contains all the output from
# the amixer cget command. Extract the volume value, if no exceptions
# occurred. It is None if there was an exception

if volume:
    volume = volume.split(':')[1].split('\n')[0].split('=')[1]

# At this point, volume contains the volume setting as a string.
...
</pre>
<p>There isn&#8217;t, as far as I can find, any way of getting the current volume as a percentage. If that&#8217;s what you want or need, I&#8217;m afraid you will have to work it out &#8211; as a slight clue, the following python code might help:</p>
<pre>
...
# volume is a string holding the volume setting or is None. 
# We want it as an integer percentage, or -1 for errors..

if volume:
    percentage = int(((float(volume) + 10240) / 10640) * 100)
else:
    percentage = -1
...
</pre>
<p>You must <code>float</code> the string value or some calculations end up as zero percent due to the division by 10640.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/raspberry-pi-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Index Clustering Factor Explained</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/oracle-index-clustering-factor-explained/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/oracle-index-clustering-factor-explained/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 07:18:41 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=918</guid>
		<description><![CDATA[Some people are confused by the clustering factor of an index in an Oracle database. Be confused no more, just read this article by Tom Kyte on the subject.]]></description>
				<content:encoded><![CDATA[<p>Some people are confused by the clustering factor of an index in an Oracle database. Be confused no more, just <a href="http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52asktom-1735913.html" title="http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52asktom-1735913.html" target="_blank">read this article</a> by Tom Kyte on the subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/10/oracle-index-clustering-factor-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give Your Raspberry Pi Turbo Mode</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/give-your-raspberry-pi-turbo-mode/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/give-your-raspberry-pi-turbo-mode/#comments</comments>
		<pubDate>Wed, 19 Sep 2012 16:29:50 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Gadgets & Gizmos]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=904</guid>
		<description><![CDATA[And while you are at it, no warranty problems when you do so! An announcement on the Raspberry Pi Foundation web site, read it here, explains that it is now possible to use Turbo mode on your Raspberry Pi without invalidating your warranty by over volting the device. Please go and read it and then [...]]]></description>
				<content:encoded><![CDATA[<p>And while you are at it, no warranty problems when you do so! <span id="more-904"></span></p>
<p>An announcement on the Raspberry Pi Foundation web site, <a href="http://www.raspberrypi.org/archives/2008" title="http://www.raspberrypi.org/archives/2008" target="_blank">read it here</a>, explains that it is now possible to use Turbo mode on your Raspberry Pi without invalidating your warranty by over volting the device.</p>
<p>Please go and <a href="http://www.raspberrypi.org/archives/2008" title="http://www.raspberrypi.org/archives/2008" target="_blank">read it</a> and then pop back here for instructions on adding Turbo mode to your own Raspberry Pi.</p>
<p>Back again? Ready to begin? Let&#8217;s do it!</p>
<p>The following assumes that you are running Raspbian as your chosen distro, and that you are logged in as the <code>pi</code> user.</p>
<pre>
sudo apt-get update
sudo apt-get upgrade
sudo raspi-config

    select the "update" option which updates raspi-config and exits.

sudo raspi-config
    select the new "configure overclocking" option and choose one.
    select finish.
    select yes to reboot now.
</pre>
<p>On reboot, your Raspberry Pi will be running [much] faster <em>under load</em> and, if it gets too hot, will slip back to normal non-turbo mode automagically.</p>
<p>It is possible that your raspberry Pi will not boot if the settings are too high for your system. If this is the case, hold down the <code>shift</code> key during the boot.</p>
<p>I set mine to full TURBO mode and it booted, but the CPUFreq Monitor (see below) shows 700 MHz rather than 1 GHz, however, this is because the Pi is now running in automatic gearbox mode &#8211; when the CPU usage gets above 85%, then it switches to a higher gear.</p>
<p>You can see this if you have the CPUFreq Monitor installed (see below) and, in a shell session run something like <code>sudo apt-get update</code> and while that is running, hover over the CPUFreq Monitor icon to see the speed changing up and down as the load comes and goes.</p>
<p>You can see the CPU Frequency in use in a console as per the following example:</p>
<pre>
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000
</pre>
<p>The output from which will be the frequency running now, in KHz. Divide by 1,000 to get the MHz frequency. The example above was taken while an <code>sudo apt-get update</code> was in progress. After the hard work was done, it dropped again:</p>
<pre>
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
700000
</pre>
<p>As mentioned above, if your Pi refuses to boot up with your chosen settings, simply reboot while holding down the <code>shift</code> key to skip the turbo mode setting, then <code>sudo raspi-config</code> to set it to a lower setting again.</p>
<p>You can, if you are running a GUI using XFCE, add the temperature sensor output and the current CPU frequency settings to your task bar, as follows:</p>
<ul>
<li>Right-click the task bar and select &#8220;Panel settings&#8221;</li>
<li>Click on the &#8220;Panel Applets&#8221; tab</li>
<li>Click the &#8220;Add&#8221; button.</li>
<li>Select &#8220;Temperature Monitor&#8221; from the list, and click ADD.</li>
<li>Use the &#8220;Up&#8221; and &#8220;Down&#8221; buttons to put it where you want it to be.</li>
<li>Click the &#8220;Add&#8221; button.</li>
<li>Select &#8220;CPUFreq Frontend&#8221; from the list and click ADD. </li>
<li>Use the &#8220;Up&#8221; and &#8220;Down&#8221; buttons to put it where you want it to be.</li>
<li>Click the &#8220;Close&#8221; button.</li>
</ul>
<p>You should see a couple of new items in the task bar. One is a two digit number (or hopefully two digits) in green text, and the other looks like a, well, I&#8217;m not sure what it looks like in my VNC session!</p>
<p>Anyway, hover the mouse over each and you will get told what&#8217;s what. The CPUFreq Monitor tells you what frequency you are running at and the temperature gauge stays green as long as the Raspberry Pi is running within temperature bounds. If the text turns red, it&#8217;s getting too hot and your Pi should shut down to a slower overclock/overvolt to reduce the temperature.</p>
<p>You can configure these applets by right-clicking on them, and selecting the applet&#8217;s own settings menu option (at the top of the menu).</p>
<p>Again, there is a console tool to allow you to see the current temperature:</p>
<pre>
cat /sys/class/thermal/thermal_zone0/temp
42236
</pre>
<p>The temperature reported in in thousanths of a degree Celsius. Divide by 1,000 to get degrees C. (Subtract 273 for degrees Kelvin!)</p>
<p>See the original article, links above, for full details of what else is included in this release. You can also <a href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&#038;t=17788&#038;p=176847" title="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&#038;t=17788&#038;p=176847" target="_blank">read this article</a> on setting up the other options in the new release.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/give-your-raspberry-pi-turbo-mode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You Are Not Allowed Science Any More</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/you-are-not-allowed-science-any-more/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/you-are-not-allowed-science-any-more/#comments</comments>
		<pubDate>Mon, 17 Sep 2012 11:17:38 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Humour]]></category>
		<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=899</guid>
		<description><![CDATA[Brilliant! Read Tony Ballantyne&#8217;s excellent article. And enjoy.]]></description>
				<content:encoded><![CDATA[<p>Brilliant! <a href="http://www.nature.com/nature/journal/v489/n7414/full/489170a.html" title="If only" target="_blank">Read Tony Ballantyne&#8217;s excellent article</a>. And enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/09/you-are-not-allowed-science-any-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Dangers of Cheap USB Hubs</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/the-dangers-of-cheap-usb-hubs/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/the-dangers-of-cheap-usb-hubs/#comments</comments>
		<pubDate>Sat, 25 Aug 2012 14:26:56 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Gadgets & Gizmos]]></category>
		<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=890</guid>
		<description><![CDATA[As a Raspberry Pi user, I figured I needed a USB hub to allow me to connect stuff (that&#8217;s a technical term by the way) to my Pi without overloading the two on board USB ports as these are limited to a maximum of 100 mA each. I purchased a cheap 7 port externally powered [...]]]></description>
				<content:encoded><![CDATA[<p>As a Raspberry Pi user, I figured I needed a USB hub to allow me to connect stuff (that&#8217;s a technical term by the way) to my Pi without overloading the two on board USB ports as these are limited to a maximum of 100 mA each. I purchased a cheap 7 port externally powered hub and it arrived by next day delivery. <span id="more-890"></span></p>
<p>The <a href="http://www.usb.org/developers/docs/" title="http://www.usb.org/developers/docs/" target="_blank">USB 2.0 specification</a> says that anything advertising compliance should, amongst other things be able to supply <em>500 mA minimum on each and every port</em> while externally powered and <em>should not feed any power back to the computer via the USB interconnect cable</em> &#8211; that&#8217;s the one between the computer and the hub.</p>
<p>This is a <a href="http://www.amazon.co.uk/Hub-Usb-Port-With-Adaptor/dp/B007QT72MC/ref=sr_1_4?ie=UTF8&#038;qid=1345903338&#038;sr=8-4" title="Amazon UK" target="_blank">link to a USB hub</a> that is identical to the one I purchased and there are plenty of others that look exactly like this on Ebay as well as other places. Please note, I did not purchase my hub from Amazon and I certainly didn&#8217;t pay nearly £20 for it either! It looks a whole lot better in the Amazon photo that it does in real life, I can assure you.</p>
<p>They are available new, on Ebay, from around £3.00 to about £9.00. Mine cost £7.75 and was badged with the name Dynamode (only on the packaging though!) and claimed to be fully USB 2.0 compliant. Ha! They all look remarkably like the image to be found on this page somewhere around here! The text on top is &#8220;<strong>[HUB]</strong>&#8221; if you can&#8217;t make it out.</p>
<div id="attachment_892" class="wp-caption alignleft" style="width: 160px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/08/CheapUSBHub.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/08/CheapUSBHub-150x150.jpg" alt="Image of a cheap USB Hub" title="Cheap USB Hub" width="150" height="150" class="size-thumbnail wp-image-892" /></a><p class="wp-caption-text">Don&#8217;t buy one of these! (Click for a bigger image.)</p></div>
<p>Ok, if you read my review on Amazon at the above link, you&#8217;ll know what was wrong with it. If you can&#8217;t be bothered, read on&#8230;</p>
<p>When plugged into the Pi with the USB interconnect cable, and the hub was then powered on (but not yet the Pi), the power LED on my Pi lit up. That should never happen and shows that the hub is allowing power to be sourced from the hub rather than only sunk from the Pi. That fails section 7.2.1 of the USB 2.0 standard and means that the hub is not USB 2.0 complaint at all.</p>
<p>In addition, removing the interconnect cable and powering the Pi from one of the USB ports, didn&#8217;t supply enough power to allow the Pi to boot. Yet again, this fails the USB 2.0 standard which clearly says that all ports must be able to provide a minimum of 500 mA when the hub is externally powered (not on batteries though). It should perhaps be noted that the Pi requires 500 mA to boot and an additional 100 mA per &#8220;in use&#8221; USB port. My Pi had nothing plugged in to the USB so only requires 500 mA.</p>
<p>That&#8217;s two failures so far!</p>
<p>Even worse, given that this was a 7 port hub, each of those ports should have been able to supply a minimum of 500 mA and yet, the power supply that came with the hub was rated at 1000 mA &#8211; which is only just enough for a two port hub and nowhere near enough for a 7 port hub.</p>
<p>And it gets worse!</p>
<p>With this hub attached to the Pi using the interconnect cable, the Pi refused to boot. Removing the hub and booting the Pi was fine, but on connecting  the hub, all networking stopped functioning! My SSH and VNC sessions dropped out and attempting to reconnect just failed. Removing the hub allowed networking to work again.</p>
<p>So, all in all, it&#8217;s not worth the money and it doesn&#8217;t do what it says on the packaging. These things are best avoided. I took it back to the shop for a refund and explained why I was returning it. All the details were marked down on their system and it&#8217;s just possible that they will not be selling these any more.</p>
<p>These things do work with laptops and such like, but are you willing to connect one to your laptop when it supplies power back down the interconnect cable? If your laptop (or computer) doesn&#8217;t have a diode present to prevent a back feed, who knows what it might damage? The Raspberry Pi doesn&#8217;t have such a diode, but why should it have one? The standard is completely clear on the matter &#8211; no power down the interconnect!</p>
<h2>That Power Supply Again</h2>
<p>It appears that someone with better electronic skills than myself has taken the power supply on one of these hubs apart. Watch the video and listen carefully to the commentary on <a href="https://www.youtube.com/watch?v=T88ej64aXUM&#038;feature=plcp" title="https://www.youtube.com/watch?v=T88ej64aXUM&#038;feature=plcp" target="_blank">this You Tube video</a>. (Opens in a new window/tab.) Stick with it to the end and be amazed at how close you come to stuffing mains voltage down your USB devices!</p>
<h2>A Working, Tested USB Hub</h2>
<p><div class="wp-caption alignleft" style="width: 160px"><img alt="ModMyPi&#039;s working USB Standards compliant hub" src="https://www.modmypi.com/shop/image/cache/data/raspberry-pi-accessories/raspberry-pi-usb-hub-500x500.png" title="ModMyPi&#039;s working USB Standards compliant hub" width="150" height="150" /><p class="wp-caption-text">Buy this hub instead!</p></div>I have finally found a working hub for my Raspberry Pi. I purchased it from <a href="https://www.modmypi.com/index.php" title="https://www.modmypi.com/index.php" target="_blank">ModMyPi</a> and <a href="https://www.modmypi.com/shop/raspberry-pi-accessories/New-Link-4-Port-USB-Hub-%28USB-2.0-with-Mains-Adaptor%29" title="https://www.modmypi.com/shop/raspberry-pi-accessories/New-Link-4-Port-USB-Hub-%28USB-2.0-with-Mains-Adaptor%29" target="_blank">this link</a> takes you directly to the product in their shop. Delivery was next day by Royal Mail and it just works.</p>
<p>My Pi is running now with a 60Gb USB hard drive, a USB Floppy Drive (don&#8217;t ask!) and is powered by the hub itself. The power supply is 2A and the hub is a 4 port one which works out at 500 mA per port which is exactly correct according to the standards. There is no back feed of power via the interconnect &#8211; so, it&#8217;s perfect.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/the-dangers-of-cheap-usb-hubs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Oracle 11g Adrci for Incident Reporting</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/using-oracle-11g-adrci-for-incident-reporting/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/using-oracle-11g-adrci-for-incident-reporting/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 11:49:56 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=875</guid>
		<description><![CDATA[Adrci is a new tool in Oracle 11g which makes life a little easier when gathering evidence to send off to Oracle Support, but it can make life easier when you simply wish to view the alert log, for example. As ever, you need to be logged in to the database server and have the [...]]]></description>
				<content:encoded><![CDATA[<p><code>Adrci</code> is a new tool in Oracle 11g which makes life a little easier when gathering evidence to send off to Oracle Support, but it can make life easier when you simply wish to view the alert log, for example. <span id="more-875"></span></p>
<p>As ever, you need to be logged in to the database server and have the environment set in the normal <code>oraenv</code> manner. This is how we used to do it in the old, pre 11g, days:</p>
<pre>
SQL> connect / as sysdba
connected

SQL> show parameter background_dump_dest

NAME                  TYPE    VALUE
--------------------  ------  -----------------------------------------
background_dump_dest  string  /srv/xxx/oradata/yyyyy/diag/rdb
                              ms/yyyyy/yyyyy/trace
SQL> exit

$ view /srv/xxx/oradata/yyyyy/diag/rdbms/yyyyy/yyyyy/trace/alert_yyyyy.log
</pre>
<p>In modern times, with 11g of course, we no longer have to do this, as we have <code>adrci</code> instead, as follows:</p>
<pre>
$ adrci

ADRCI: Release 11.2.0.3.0 - Production .....
...
ADR base = "/srv/xxx/oradata/yyyyy"

adrci> show alert
</pre>
<p>That&#8217;s all there is to it. The alert log is, on my server, displayed in the <code>vi</code> editor and when you quit with the <code>:q</code> command, you return to <code>adrci</code>.</p>
<p>While you are there, you can check for any incidents recorded in the alert log:</p>
<pre>
adrci> show incident

ADR Home = /srv/xxx/oradata/yyyyy/diag/rdbms/yyyyy/yyyyy
**********************************************************************
INCIDENT_ID  PROBLEM_KEY       CREATE_TIME
------------ ----------------- ---------------------------------
145          ORA 227           2012-08-06 16:22:40.026000 +01:00
40165        ORA 600           2012-08-10 13:14:23.033000 +01:00
</pre>
<p>Given that ORA-600, I can get more detail about it with the following command:</p>
<pre>
show incident -mode detail -p "incident_id=40165"

ADR Home = /srv/xxx/oradata/yyyyy/diag/rdbms/yyyyy/yyyyy
**********************************************************************

**************************************
INCIDENT INFO RECORD 1
**************************************
  INCIDENT_ID       40165
  STATUS            ready
  PROBLEM_ID        4
...
</pre>
<p>The <code>-mode</code> option can be one of:</p>
<ul>
<li>Basic &#8211; simply lists the appropriate line(s) that you would see in a <code>show incident</code> command output. Not much use to be honest. </li>
<li>Brief &#8211; gives a bit more detail that basic. Doesn&#8217;t include details of any trace files created for this incident.</li>
<li>Detail &#8211; gives lots of information including details of all trace files created for this incident.</li>
</ul>
<p>The <code>-p</code> option is simply a <code>where</code> clause on any of the columns in the incident table. You can obtain a list of columns as follows:</p>
<pre>
adrci> describe incident

Name          Type          NULL?
------------- ------------- ------
INCIDENT_ID   number
PROBLEM_ID    number
CREATE_TIME   timestamp
CLOSE_TIME    timestamp
STATUS        number
FLAGS         number
....
</pre>
<p>The <code>-p</code> options can be ANDed and/or ORed together:</p>
<pre>
adrci> show incident -p "incident_id = 40165 or incident_id = 145"
</pre>
<p>Given that incident 40165 is an ORA-600, it should be sent off to Oracle Support for diagnosis, so I need to gather all the evidence together. Remember how that was done in the old days? Well, this is how simple it is with <code>adrci</code>:</p>
<p>First, create a new package:</p>
<pre>
adrci> ips create package
Create package 7 without any contents, correlation level typical
</pre>
<p>That creates a blank package, with nothing in it. You now add all the incidents you need to add:</p>
<pre>
adrci> ips add incident 40165 package 7
Added incident 40165 to package 7
</pre>
<p>That has added the incident to the package&#8217;s metadata only, there are still no actual package files created. You may add further incidents to the package as desired.</p>
<p>When done adding incidents, generate a physical package for support:</p>
<pre>
adrci> ips generate package 7
Generate package 7 in /home/oracle/IPSPKG_20120820104439_COM_7.zip, mode complete
</pre>
<p>The zip file name created contains everything Oracle Support will need, all the trace files, the alert log, various metadata files and so on. This file can be uploaded to Oracle Support.</p>
<p>The file is created in the current working directory. If you want to specify where to put it, the following command will help:</p>
<pre>
adrci> ips generate package 7 in '/srv/xxx/oradata/yyyyy'
Generate package 7 in /srv/xxx/oradata/yyyyy/IPSPKG_20120820104842_COM_7.zip, mode complete
</pre>
<p>That concludes this <em>very</em> brief overview of the <code>adrci</code> utility. For more details check out the <em>Database Administrator&#8217;s Guide</em>, Chapter 9 &#8211; <em>Managing Diagnostic Data</em> Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/using-oracle-11g-adrci-for-incident-reporting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Oracle Multimedia on 11g</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/installing-oracle-multimedia-on-11g/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/installing-oracle-multimedia-on-11g/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 12:42:41 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=866</guid>
		<description><![CDATA[Installing Oracle Multimedia, which is required for Spatial and/or Locator is quite simple. All of the following must be carried out while logged in as a SYSDBA user. SQL> spool ordinst.log SQL> @?/ord/admin/ordinst SYSAUX SYSAUX ... ... SQL> spool off SQL> spool catim.log SQL> @?/ord/im/admin/catim ... ... SQL> spool off Lots of stuff will scroll [...]]]></description>
				<content:encoded><![CDATA[<p>Installing Oracle Multimedia, which is required for <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/05/installing-locator-or-spatial-on-11g/" title="Installing Locator or Spatial on 11g" target="_blank">Spatial and/or Locator</a> is quite simple. <span id="more-866"></span></p>
<p>All of the following must be carried out while logged in as a SYSDBA user.</p>
<pre>
SQL> spool ordinst.log
SQL> @?/ord/admin/ordinst SYSAUX SYSAUX
...
...
SQL> spool off

SQL> spool catim.log
SQL> @?/ord/im/admin/catim
...
...
SQL> spool off
</pre>
<p>Lots of <em>stuff</em> will scroll up the screen but will also be copied to the spool files named. Check those for obvious errors, then check to see if it worked as follows:</p>
<pre>
SQL> select comp_id, version, status
  2  from dba_registry
  3  where comp_id = 'ORDIM';

COMP_ID    VERSION        STATUS
---------- ----------     ---------
ORDIM      11.2.0.3.0     VALID
</pre>
<p>You can also force check the validity as follows, should you ever need to:</p>
<pre>
SQL> set serveroutput on

SQL> execute sys.validate_ordim;
PL/SQL procedure successfully completed.
</pre>
<p>If there are any invalid objects in the ORDIM component, the above procedure will display a message about them and set the status column in the <code>DBA_REGISTRY</code> to INVALID. You should check the status after running the above.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/installing-oracle-multimedia-on-11g/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rename an Oracle 10g or 11g Database &#8211; Part 2</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/rename-an-oracle-10g-or-11g-database-part-2/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/rename-an-oracle-10g-or-11g-database-part-2/#comments</comments>
		<pubDate>Thu, 09 Aug 2012 15:21:01 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=850</guid>
		<description><![CDATA[So, you renamed your database using the nid utility as outlined here but now you need (or want) to change all the file system names to suit. Read on. In the following example, we have two mount points for the database. Files on these mounts are spread all over a pile of separate discs making [...]]]></description>
				<content:encoded><![CDATA[<p>So, you renamed your database using the <code>nid</code> utility as outlined <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/03/rename-an-oracle-10g-or-11g-database/" title="Rename an Oracle 10g or 11g Database" target="_blank">here</a> but now you need (or want) to change all the file system names to suit. Read on. <span id="more-850"></span></p>
<p>In the following example, we have two mount points for the database. Files on these mounts are spread all over a pile of separate discs making up the LUN &#8211; so it&#8217;s not as bad as it looks!</p>
<p>The two mounts are wrongly named at the moment since we changed the database name using <code>nid</code> and we would like to tidy things up. The current names are:</p>
<ul>
<li><code>/srv/old_name/oradata/old_sid/</code></li>
<li><code>/srv/old_name/flashback_area/old_sid</code></li>
</ul>
<p>What we would like to see after the renaming is the following:</p>
<ul>
<li><code>/srv/new_name/oradata/new_sid/</code></li>
<li><code>/srv/new_name/flashback_area/new_sid</code></li>
</ul>
<p>First of all, you need a current pfile. If you don;t have one already (from the rename exercise) then create one as follows:</p>
<p><code>create pfile='/home/oracle/initnew_sid.ora' from spfile;</code></p>
<p>We also need a control file trace taking, so we do this next:</p>
<p><code>alter database backup controlfile<br />
to trace as '/home/oracle/new_sid_controlfile.sql';</code></p>
<blockquote><p>It should be obvious that you wouldn&#8217;t want the pfile and control file trace to be located on the file system that is about to be moved. If they are, you will have to wait for the Sys Admins to complete the remounting exercise before you can do your own editing in preparation for restarting the database.</p></blockquote>
<p>The next thing to do is backup the database. Shut it down and take a cold backup in your preferred manner &#8211; <code>RMAN</code> or some other utility. Better safe than sorry after all.</p>
<p>In a shell session, as the oracle user, remove (or move) the <code>initnew_sid</code> and <code>spfilenew_sid.ora</code> files, if present, from $ORACLE_HOME/dbs:</p>
<p><code>rm $ORACLE_HOME/dbs/initnew_sid.ora</code><br />
<code>rm $ORACLE_HOME/dbs/spfileold_sid.ora</code></p>
<p>Edit the newly generated parameter file as required and move it from <code>/home/oracle/initnew_sid.ora</code> to <code>$ORACLE_HOME/dbs/initnew_sid.ora</code>. Things to change will include some or all of the following:</p>
<ul>
<li><code>audit_file_dest</code></li>
<li><code>control_files</code></li>
<li><code>db_recovery_file_dest</code></li>
<li><code>diagnostic_dest</code></li>
<li><code>log_archive_dest</code></li>
<li><code>etc</code></li>
</ul>
<p>Anything that has been moved (or will be moved) by renaming the mount points will require changing.</p>
<p>Next, the control file trace that was created needs to be edited. There is much waffle to be removed and a choice of script to generate. Edit the file <code>/home/oracle/new_sid_controlfile.sql</code> and:</p>
<ul>
<li>Find the section of the trace file that is applicable to your wish to start the database with <code>RESETLOGS</code> or not. For <code>NORESETLOGS</code> it is the first section, near the top of the trace, otherwise it is the second section near the bottom.
<p>For my own databases, I have chosen not to reset the logs, so I use the top section of the trace file.</li>
<li>Delete all the comment lines above the section you want. You need to start the script from the <code>STARTUP NOMOUNT</code> command in the appropriate section.</li>
<li>Scroll down, but retain all the lines from (and including) <code>STARTUP NOMOUNT</code> until you find a comment line that looks something like <code>-- End of tempfile additions</code>. Delete that line, and everything else to the end of file.</li>
</ul>
<p>You should now be in possession of a script that begins with <code>STARTUP NOMOUNT</code> and ends with a few lines adding your <code>TEMPFILE</code>s back into your temporary tablespace9s).</p>
<ul>
<li>Run a global search and replace to ensure that all filenames match with the new locations.</li>
<li>If the database is in ARCHIVELOG mode, pay particular attention to the commented out commands to <code>ALTER DATABASE REGISTER LOGFILE</code> and make sure you enter the full path to an existing log file. You can ignore this part if your database is running in NOARCHIVELOG mode.</li>
<li>Save the file.</li>
</ul>
<p>When the Sys Admins have given you back the file systems mounted on their new locations, it&#8217;s a simple matter to:</p>
<ul>
<li>Connect to the database <code>as sysdba</code>.</li>
<li><code>@/home/oracle/new_sid_controlfile.sql</code></li>
</ul>
<p>When that has finished, everything should now be in order. You may create a new spfile in the usual manner:</p>
<p><code>create spfile='/home/oracle/spfilenew_sid.ora' from pfile;<br />
shutdown<br />
host cp /home/oracle/spfilenew_sid.ora $ORACLE_HOME/dbs/<br />
startup</code></p>
<p>Nothing to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/rename-an-oracle-10g-or-11g-database-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Beware of Listener Port 1521 and Dynamic Registration</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/beware-of-listener-port-1521-and-dynamic-registration/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/beware-of-listener-port-1521-and-dynamic-registration/#comments</comments>
		<pubDate>Fri, 03 Aug 2012 10:04:46 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=842</guid>
		<description><![CDATA[As you already know, an Oracle database&#8217;s PMON process will register your database with a listener without you having to do anything about it. However &#8230; This will only happen if the listener in question is running on port 1521. And it doesn&#8217;t have to be named LISTENER either &#8211; as I mistakenly thought, it [...]]]></description>
				<content:encoded><![CDATA[<p>As you already know, an Oracle database&#8217;s <code>PMON</code> process will register your database with a listener without you having to do anything about it. However &#8230;<span id="more-842"></span></p>
<p>This will only happen if the listener in question is running on port 1521. And it doesn&#8217;t have to be named <code>LISTENER</code> either &#8211; as I mistakenly thought, it only has to be port 1521.</p>
<p>If you have a listener running on this port, and you have configured other listener(s) to listen on different ports, you will still have them dynamically register with the listener running on port 1521.</p>
<p><code>Lsnrctl status</code> shows this for a non-1521 listener on the same server as a listener running on port 1521 (names changed to protect the guilty):</p>
<pre>
...
Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test_server)(PORT=1525)))
Services Summary...
Service "test5" has 1 instance(s).
  Instance "test5", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
</pre>
<p>For the listener running on port 1521, we can see it&#8217;s grabbed everything!</p>
<pre>
...
Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test_server)(PORT=1521)))
Services Summary...
Service "test1" has 1 instance(s).
  Instance "test1", status READY, has 1 handler(s) for this service...
Service "test1XDB" has 1 instance(s).
  Instance "test1", status READY, has 1 handler(s) for this service...
Service "test2" has 1 instance(s).
  Instance "test2", status UNKNOWN, has 1 handler(s) for this service...
Service "test3.world" has 1 instance(s).
  Instance "test3", status READY, has 1 handler(s) for this service...
Service "test4" has 1 instance(s).
  Instance "test4", status READY, has 1 handler(s) for this service...
Service "test5" has 1 instance(s).
  Instance "test5", status READY, has 1 handler(s) for this service...
The command completed successfully
</pre>
<p>If you want to prevent this from happening, you can add the following to the listener.ora for the listener you wish to have listening on port 1521:</p>
<p><code><br />
DYNAMIC_REGISTRATION_lsnr_name = off<br />
</code></p>
<p>That way, the listener is prevented from accepting dynamic registration requests from the other databases&#8217; <code>PMON</code> process.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/08/beware-of-listener-port-1521-and-dynamic-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Screw Up DB Upgrade Assistant</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/06/how-to-screw-up-db-upgrade-assistant/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/06/how-to-screw-up-db-upgrade-assistant/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 15:58:47 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=827</guid>
		<description><![CDATA[It was my own fault, but in case it proves even slightly useful&#8230;. I was upgrading from 11202 to 11203 Enterprise using the DB Upgrade Assistant utility. When I said &#8216;go do it&#8217; it went off, chugged for a bit, then barfed. DBUA informed me that the database wasn&#8217;t running. I checked, it was. Cutting [...]]]></description>
				<content:encoded><![CDATA[<p>It was my own fault, but in case it proves even slightly useful&#8230;.<span id="more-827"></span></p>
<p>I was upgrading from 11202 to 11203 Enterprise using the <em>DB Upgrade Assistant</em> utility. When I said &#8216;go do it&#8217; it went off, chugged for a bit, then barfed. DBUA informed me that the database wasn&#8217;t running. I checked, it was.</p>
<p>Cutting a long story short, I checked the indicated logfile and discovered that DBUA had connected to the database but then got a couple of errors telling it that &#8216;oracle was not available&#8217;. Hmm.</p>
<p>Turns out that I&#8217;d added a couple of SQL statements to <code>glogin.sql</code>, with</p>
<pre>alter session set nls_date_format = 'dd/mm/yyyy hh24:mi:ss';</pre>
<p>being one of the offending statements. This works perfectly as long as you connect while the database(s) are open but, if a database is shut, and you login as sysdba to start it, <code>glogin.sql</code> is still executed, and because the database is down, the SQL statement(s) fail.</p>
<p>DBUA picked up the failure and refused to carry on.</p>
<p>Removing the SQL statement(s) from <code>glogin.sql</code> fixed the problem.</p>
<p>The moral to this tale is simple, don&#8217;t put SQL in <code>glogin.sql</code> (or <code>login.sql</code>) if you ever shut down your databases!</p>
<p>In case you are wondering, <code>glogin.sql</code> lives in <code>$ORACLE_HOME/sqlplus/admin</code> and will be executed on each successful connection to a database with SQL*Plus. <code>Login.sql</code> will also be executed on every successful connection to a database (at least, from 10g onwards) <em>after</em> <code>glogin.sql</code>, but only if it is found on <code>$SQLPATH</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/06/how-to-screw-up-db-upgrade-assistant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners &#8211; Part 8</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-rman-for-beginners-part-8/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-rman-for-beginners-part-8/#comments</comments>
		<pubDate>Tue, 15 May 2012 15:24:33 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=807</guid>
		<description><![CDATA[In the previous instalment of this exciting series, we completed the full (complete) recovery of the database, tablespaces and data files, as well as looking at recovering individual blocks. In this article, we will perform incomplete recovery where we restore and recover the databases to a specific point in time that is previous to &#8220;now&#8221;. [...]]]></description>
				<content:encoded><![CDATA[<p>In the <a title="Oracle RMAN for Beginners – Part 7" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/03/oracle-rman-for-beginners-part-7/" target="_blank">previous instalment</a> of this exciting series, we completed the full (complete) recovery of the database, tablespaces and data files, as well as looking at recovering individual blocks. <span id="more-807"></span></p>
<p>In this article, we will perform incomplete recovery where we restore and recover the databases to a specific point in time that is previous to &#8220;now&#8221;.</p>
<blockquote><p>Note that in the following examples I&#8217;m using the until time option and specifying a date and time. You can restore to a particular SCN, or archive log number etc. See the manual for all the options.</p></blockquote>
<p>It is possible that data will be lost with this kind of recovery. It is not possible to perform incomplete recovery on tablespaces or data files, you are limited to restoring and recovering the entire database. Although, this is not quite true, read on &#8230;</p>
<h2>Incomplete Recovery of the Database</h2>
<p>As the whole database is being restored, the <code>SYSTEM</code> and <code>UNDO</code> tablespaces will be restored and recovered, so the database will need to be in a <code>mounted</code> state. You cannot carry out incomplete recovery on an open database.</p>
<p>First of all, let&#8217;s add a new row to our test table which we use to show progress etc.</p>
<pre>SQL&gt; alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
Session altered.

SQL&gt; insert into test values (sysdate);
1 row created.

SQL&gt; commit;
Commit complete.

SQL&gt; select * from test order by 1;

A
-------------------
06/02/2012 20:25:11
16/02/2012 17:26:20
17/02/2012 15:03:42
17/02/2012 15:54:49
07/03/2012 11:21:53
19/03/2012 20:58:18
15/05/2012 13:44:29

7 rows selected.</pre>
<p>Now, restore and recover the database back to a time that is about 15 minutes ago. The first stage is to get the database into a <code>mount</code> state.</p>
<pre>rman target /

RMAN&gt; shutdown;

database closed
database dismounted
Oracle instance shut down

RMAN&gt; startup mount

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     768331776 bytes

Fixed Size                     2230360 bytes
Variable Size                213911464 bytes
Database Buffers             549453824 bytes
Redo Buffers                   2736128 bytes</pre>
<p>Next, we restore the database to our chosen time.</p>
<pre>RMAN&gt; restore database until time "to_date('15/05/2012 13:30:00','dd/mm/yyyy hh24:mi:ss')";

Starting restore at 15/05/2012 14:08:47
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /srv/nffs/oradata/ant12/data/sysaux01.dbf
...
...
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 15/05/2012 14:13:04</pre>
<p>I&#8217;ve trimmed the usual RMAN verbose output from the above to save you falling asleep reading it! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Next, we need to recover the database to the same time.</p>
<pre>RMAN&gt; recover database until time  "to_date('15/05/2012 13:30:00','dd/mm/yyyy hh24:mi:ss')";

Starting recover at 15/05/2012 14:16:35
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 12 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_12_7mwyxlk8_.arc
...
...
media recovery complete, elapsed time: 00:00:36
Finished recover at 15/05/2012 14:17:24</pre>
<p>Again, I&#8217;ve trimmed the output. RMAN will restore to disc any archived logs it requires to carry out the recovery if it determines that they are not available online.</p>
<p>The final stage is to reopen the database. You must use the resetlogs option because you&#8217;ve carried out an incomplete recovery.</p>
<pre>RMAN&gt; alter database open resetlogs;
database opened</pre>
<p>So, the restore and recovery went well, did it really work?</p>
<pre>SQL&gt; conn norman/norman
Connected.

SQL&gt; alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
Session altered.

SQL&gt;  select * from test;

A
-------------------
07/03/2012 11:21:53
19/03/2012 20:58:18
06/02/2012 20:25:11
16/02/2012 17:26:20
17/02/2012 15:03:42
17/02/2012 15:54:49

6 rows selected.</pre>
<p>So, our most recent row in the table is no longer present, we now have 6 rows instead of the 7 that we had at the start of this recovery. The database has been restored back in time.</p>
<p>You will note that in both the <code>restore database</code> and the <code>recover database</code> commands, I had to specify the same time. There is a short cut that you can use to save typing.</p>
<pre>RMAN&gt; run {
2&gt; set until time = "to_date('15/05/2012 13:30:00','dd/mm/yyyy hh24:mi:ss')";
3&gt; restore database;
4&gt; recover database;
5&gt; }

executing command: SET until clause

Starting restore at 15/05/2012 14:02:23
using channel ORA_DISK_1
...
...
Finished restore at 15/05/2012 14:02:24

Starting recover at 15/05/2012 14:02:24
using channel ORA_DISK_1
...
...
media recovery complete, elapsed time: 00:00:02

Finished recover at 15/05/2012 14:02:26</pre>
<p>Now you can open the database in <code>resetlogs</code> mode as above.</p>
<h2>Restoring a Database Through a Resetlogs</h2>
<p>In the past it wasn&#8217;t possible to restore a database that had been opened with <code>resetlogs</code> specified. RMAN used to treat this as a new incarnation of the database, so you had to make sure you took a fresh backup as soon as the database was opened.</p>
<p>RMAN in 11g is much more forgiving and it is now possible to restore through a <code>resetlogs</code>. You do this by restoring a backup from the previous incarnation and do a recover. If you watch the recovery phase carefully, you will see the archived logs files being applied from before and after the <code>resetlogs</code>.</p>
<p>The following assume that you haven&#8217;t taken a backup of the new incarnation yet. If you have, you must restore the controlfile from a named backup as opposed to letting RMAN work it out.</p>
<p>The first step is to restore the controlfile.</p>
<pre>RMAN&gt; shutdown immediate;

database closed
database dismounted
Oracle instance shut down

RMAN&gt; startup nomount;

connected to target database (not started)
Oracle instance started

Total System Global Area     768331776 bytes

Fixed Size                     2230360 bytes
Variable Size                213911464 bytes
Database Buffers             549453824 bytes
Redo Buffers                   2736128 bytes

RMAN&gt; restore controlfile from autobackup;

Starting restore at 15/05/2012 15:12:57
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK
...
...
Finished restore at 15/05/2012 15:13:03

RMAN&gt; alter database mount;

database mounted
released channel: ORA_DISK_1</pre>
<p>Now that we are on an old controlfile and the database is mounted, we can restore and recover the database in the normal manner.</p>
<pre>RMAN&gt; restore database;

Starting restore at 15/05/2012 15:15:06
Starting implicit crosscheck backup at 15/05/2012 15:15:06
allocated channel: ORA_DISK_1
...
...
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 15/05/2012 15:19:27</pre>
<p>Now all we have to do is the recover. As mentioned above, watch the thread and sequence numbers closely.</p>
<pre>RMAN&gt; recover database;

Starting recover at 15/05/2012 15:19:36
using channel ORA_DISK_1

starting media recovery
...
...
archived log ... thread=1 sequence=8
archived log ... thread=1 sequence=9
...
...
archived log ... thread=1 sequence=20
archived log ... thread=1 sequence=1
media recovery complete, elapsed time: 00:00:52
Finished recover at 15/05/2012 15:20:42</pre>
<p>You can hopefully see, in the above, that the sequence number dropped from 20 to 1 as we recovered through the resetlogs. Talking of which, we need another one now.</p>
<pre>RMAN&gt; alter database open resetlogs;

database opened</pre>
<h2>Tablespace Incomplete Recovery</h2>
<p>It was never possible to do a tablespace point in time recovery without cloning the database first and using the clone to export the data. However, with 11g it is now possible to perform incomplete recovery on a tablespace (or tablespaces) as RMAN takes care of all the cloning etc.</p>
<p>First of all, create a working area for the clone, as root.</p>
<pre># mkdir /media/oracle_backups/working_aux
# chown oracle:oinstall /media/oracle_backups/working_aux/
# ls -l /media/oracle_backups/
total 24
drwxr-xr-x 2 oracle oinstall  4096 Feb 17 16:51 ant12
drwx------ 2 root   root     16384 Feb  6 08:07 lost+found
drwxr-xr-x 2 oracle oinstall  4096 May 15 15:34 working_aux</pre>
<p>Next, check our test table to see how far back we can recover the users tablespace.</p>
<pre>SQL&gt; conn norman/norman
Connected.

SQL&gt; alter session set nls_date_format='dd/mm/yyyy hh24:mi:ss';
Session altered.

SQL&gt; select * from test;

A
-------------------
07/03/2012 11:21:53
19/03/2012 20:58:18
06/02/2012 20:25:11
16/02/2012 17:26:20
17/02/2012 15:03:42
17/02/2012 15:54:49

6 rows selected.</pre>
<p><em>Obviously</em> your decision criteria for the actual time to restore back to will be a little more scientific than mine! But I&#8217;m going to select a date of just after 16/02/2012 17:26:20, lets call it 16/02/2012 17:30:00.</p>
<p>The first problem we may happen across is whether there are any objects in the tablespace to be restored which have constraints etc in other tablespaces. We check the <code>SYS.TS_PITR_CHECK</code>.</p>
<pre>SQL&gt; conn / as sysdba
Connected.

SQL&gt; select * from ts_pitr_check
  2  where (ts1_name = 'USERS' and ts2_name &lt;&gt; 'USERS') or
  3 (ts2_name = 'USERS' and ts1_name &lt;&gt; 'USERS');
no rows selected</pre>
<p>In this case as we are about to restore the users tablespace, we have to see if there are relationships from users to other tablespaces and also if there are relationships from other tablespaces to users.</p>
<p>There are none, but if there had been, we would either need to temporarily drop those constraints or include the other tablespace(s) in the recovery.</p>
<p>The next problem is those objects that exist in the database now, that didn&#8217;t at the time of the recovery point in time. Again we can find a list of those by checking <code>SYS.TS_PITR_OBJECTS_TO_BE_DROPPED</code> and giving the date and time we intend to use.</p>
<pre>SQL&gt; select tablespace_name, owner, name
  2  from ts_pitr_objects_to_be_dropped
  3  where tablespace_name = 'USERS'
  4  and creation_time &gt; to_date('16/02/2012 17:30:00','dd/mm/yyyy hh24:mi:ss');
no rows selected</pre>
<p>So far so good. Had there been any objects listed, we would need to run an export of those objects using data pump to preserve them across the recovery.</p>
<p>We are now ready to carry out a point in time restore of the users tablespace to the working area instead of to the normal database area. You <em>do not</em> need to take the tablespace offline, RMAN does that for you.</p>
<blockquote><p>Note, in the following command <code><em>recover</em></code> is correct. Do not use <code><em>restore</em></code> as it will not work.</p></blockquote>
<pre>RMAN&gt; recover  tablespace users until time "to_date('16/02/2012 17:30:00','dd/mm/yyyy hh24:mi:ss')"
2&gt;  auxiliary destination '/media/oracle_backups/working_area';

Starting recover at 15/05/2012 15:55:52
using channel ORA_DISK_1

Creating automatic instance, with SID='qvbt'

initialization parameters used for automatic instance:
db_name=NORM
db_unique_name=qvbt_tspitr_NORM
...
...
Removing automatic instance
Automatic instance removed
Finished recover at 15/05/2012 15:58:42</pre>
<p>You will note that there is a <em>lot</em> of output from RMAN as it builds a clone database and recovers the tablespace to the specified time.</p>
<blockquote><p>You cannot recover a tablespace to a time previous to the last resetlogs time. If you try, you will get the following error message:</p>
<pre>RMAN-03002: failure of recover command at 05/15/2012 15:55:53
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time</pre>
</blockquote>
<p>After the tablespace has been cloned and recovered, you must back it up and then bring it online.</p>
<pre>RMAN&gt; backup tablespace users;
...
RMAN&gt; sql 'alter tablespace users online';
...</pre>
<blockquote><p>If you do not have an RMAN catalogue in use, you are not permitted to carry out more than one of these tablespace point in time recovery operations because the controlfile no longer knows about the previous incarnations of the recovered tablespace(s).</p>
<p>This is one of the reasons why you must backup the tablespace immediately after recovering it.</p>
<p>If, on the other hand, you do use a catalogue, then multiple recoveries of the same tablespace(s) are permitted.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-rman-for-beginners-part-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Locator or Spatial on 11g</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/installing-locator-or-spatial-on-11g/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/installing-locator-or-spatial-on-11g/#comments</comments>
		<pubDate>Tue, 15 May 2012 09:53:26 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=801</guid>
		<description><![CDATA[Locator is &#8220;Spatial Lite&#8221; if you wish, and costs nothing. It can be installed in Standard or Enterprise Editions with no additional licensing costs. You cannot do everything in Locator that you can in Spatial &#8211; but what do you expect for free? To install Locator you need to be aware that things changed at [...]]]></description>
				<content:encoded><![CDATA[<p>Locator is &#8220;Spatial Lite&#8221; if you wish, and costs nothing. It can be installed in Standard or Enterprise Editions with no additional licensing costs. You cannot do everything in Locator that you can in Spatial &#8211; but what do you expect for free? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  <span id="more-801"></span></p>
<p>To install <strong>Locator</strong> you need to be aware that things changed at 11g, so what <em>used</em> to work on 10g no longer does on 11g and can lead to you having a huge mess of objects and types to hunt down and remove from your SYS account &#8211; ask me how I know!</p>
<p>Note: If you have already <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/08/installing-oracle-multimedia-on-11g/" title="Installing Oracle Multimedia on 11g" target="_blank">installed Oracle Multimedia</a>, the <code>MDSYS</code> user will already exists. In this case, simply skip the create user command in the following.</p>
<pre>SQL&gt; connect / as sysdba

SQL&gt; create user mdsys identified by secret
  2  default tablespace sysaux;

SQL&gt; @?/md/admin/mdprivs.sql

SQL&gt; connect mdsys/secret
SQL&gt; @?/md/admin/catmdloc

SQL&gt; connect / as sysdba
SQL&gt; alter user mdsys
  2  account lock
  3  password expire;</pre>
<p>You can read the details about Locator in the file <code>$ORACLE_HOME/md/doc/README_LOCATOR.txt</code> &#8211; but don&#8217;t expect too much assistance, it doesn&#8217;t even mention how to install it!</p>
<p>You won&#8217;t be able to find Locator in <code>DBA_REGISTRY</code> nor will you be able to find it in <code>V$OPTION</code> either.</p>
<pre>SQL&gt; col parameter format a20
SQL&gt; col value format a5

SQL&gt; select parameter, value
  2  from v$option
  3  where parameter like 'Spatial%'
  4  or parameter like 'Locator%';

PARAMETER            VALUE
-------------------- -----
Spatial              FALSE</pre>
<p>You can see that Locator doesn&#8217;t turn up in the output &#8211; that&#8217;s because it&#8217;s not an option, unlike Spatial.</p>
<p>My Oracle Support (MOS) has a document that explains how to detect if Locator is installed. The document id is 357943.1. Unfortunately, the process explained doesn&#8217;t work. Sigh.</p>
<p>You <em>cannot</em> even assume Locator is installed if Spatial is not installed <em>and</em> you have a schema named <code>MDSYS</code> which owns objects, because <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/08/installing-oracle-multimedia-on-11g/" title="Installing Oracle Multimedia on 11g" target="_blank">installing Oracle Multimedia</a> creates the <code>MDSYS</code> user if it is not there already.</p>
<hr />
<p>Installing <strong>Spatial</strong> requires that you are running Enterprise Edition and that you didn&#8217;t deselect it when installing the software originally. If you did, you need to re-run the installer and when you see the <code>Enterprise Options</code> button, click it and select the Spatial component.</p>
<p>If you don&#8217;t do this then the file <code>catmd.sql</code> and it&#8217;s associated helpers, will not be copied to <code>$ORACLE_HOME/md/admin</code>.</p>
<p>Spatial costs extra dosh and must be licensed separately from your Enterprise Edition software.</p>
<pre>SQL&gt; connect / as sysdba

SQL&gt; create user mdsys identified by secret
  2  default tablespace sysaux
  3  account lock
  4  password expire;

SQL&gt; @?/md/admin/mdprivs.sql

SQL&gt; @?/md/admin/catmd</pre>
<p>You can read the details about Spatial in the file <code>$ORACLE_HOME/md/doc/README.txt</code>.</p>
<p>As with Locator, you won&#8217;t find Spatial in <code>DBA_REGISTRY</code> so, as before, you must look in <code>V$OPTION</code>.</p>
<pre>SQL&gt; col parameter format a20
SQL&gt; col value format a5

SQL&gt; select parameter, value
  2  from v$option
  3  where parameter like 'Spatial%';

PARAMETER            VALUE
-------------------- -----
Spatial              TRUE</pre>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/installing-locator-or-spatial-on-11g/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle Text aka CONTEXT &#8211; Installing on 11g</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-text-aka-context-installing-on-11g/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-text-aka-context-installing-on-11g/#comments</comments>
		<pubDate>Mon, 14 May 2012 15:14:37 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=791</guid>
		<description><![CDATA[It’s supposed to be installed by default, according to the documentation, but for some reason or another, I managed to build a brand new 11.2 database, on Linux, with no CTXSYS user present. Installing Context Here’s how to install Oracle Text and the English language defaults, into an 11.2 database. SQL> connect / as SYSDBA [...]]]></description>
				<content:encoded><![CDATA[<p>It’s supposed to be installed by default, according to the documentation, but for some reason or another, I managed to build a brand new 11.2 database, on Linux, with no CTXSYS user present. <span id="more-791"></span></p>
<h3>Installing Context</h3>
<p>Here’s how to install Oracle Text and the English language defaults, into an 11.2 database.</p>
<pre>SQL> connect / as SYSDBA
SQL> spool ctxsys_installation.log

-- Parameters are password, default t/s, temp t/s, don't lock the account. 
SQL> @?/ctx/admin/catctx.sql secret SYSAUX TEMP NOLOCK

SQL> connect CTXSYS/secret
SQL> @?/ctx/admin/defaults/dr0defin.sql "ENGLISH";

SQL> connect / as SYSDBA
SQL> alter user ctxsys account lock password expire;

SQL> spool off</pre>
<h3>Removing Context</h3>
<p>Here’s how to remove Oracle Text from an 11.2 database.</p>
<pre>SQL> connect / as SYSDBA
SQL> spool ctxsys_removal.log

SQL> @?/ctx/admin/catnoctx.sql

SQL> spool off</pre>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/oracle-text-aka-context-installing-on-11g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Quite Pleased With This Photo</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/im-quite-pleased-with-this-photo/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/im-quite-pleased-with-this-photo/#comments</comments>
		<pubDate>Mon, 14 May 2012 13:11:46 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=779</guid>
		<description><![CDATA[We have foxes in our garden in the mornings and evenings. We seem to have a dog and vixen and three cubs. This morning they were cavorting around in the sun and I managed to get a few pictures taken before they headed off to wherever they lie up during the day. This is my [...]]]></description>
				<content:encoded><![CDATA[<p>We have foxes in our garden in the mornings and evenings. We seem to have a dog and vixen and three cubs. This morning they were cavorting around in the sun and I managed to get a few pictures taken before they headed off to wherever they lie up during the day. <span id="more-779"></span></p>
<p>This is my favourite shot:</p>
<div id="attachment_780" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother-300x199.jpg" alt="Vixen watching me watching her" title="Vixen watching me watching her" width="300" height="199" class="size-medium wp-image-780" /></a><p class="wp-caption-text">Mother fox keeps an eye on me watching her and her cubs</p></div>
<p>Next up, we have one of the vixen and one cub:</p>
<div id="attachment_782" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother_and_cub.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother_and_cub-300x199.jpg" alt="Vixen and one cub" title="Vixen and one cub" width="300" height="199" class="size-medium wp-image-782" /></a><p class="wp-caption-text">One of the cubs comes accross to make sure &quot;mum&quot; is ok</p></div>
<p>Then one of the cubs playing together. They are so quick, it&#8217;s hard to get a decent focus. This shot is definitely out of focus, but high on cuteness!</p>
<div id="attachment_784" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Cubs.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Cubs-300x199.jpg" alt="Three cubs in the bushes" title="Three cubs in the bushes" width="300" height="199" class="size-medium wp-image-784" /></a><p class="wp-caption-text">Three fox cubs playing in our bushes</p></div>
<p>And finally, for now anyway, one of the whole family together. Something in the vixen&#8217;s look tells me she might be a tad fed up of all these kids!</p>
<div id="attachment_785" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother_and_cubs.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2012/05/Mother_and_cubs-300x199.jpg" alt="Vixen and cubs" title="Vixen and cubs" width="300" height="199" class="size-medium wp-image-785" /></a><p class="wp-caption-text">The vixen looks perplexed at all those cubs running around</p></div>
<p>By the way, all shots taken on a Konica Minolta Dynax 5D fitted with a Minolta 75-300 Zoom and a 2* doubler. As the camera won&#8217;t quite autofocus at the top end of the zoom with the doubler attached, I was on manual focus.</p>
<p>These images are poor quality jpegs rather than the high quality raw format we normally shoot in.</p>
<p>No foxes were harmed in the taking of these photos.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/05/im-quite-pleased-with-this-photo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird Error Dialogue when Installing Oracle 11.2.0.3 Client?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/weird-error-dialoge-when-installing-oracle-11-2-0-3-client/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/weird-error-dialoge-when-installing-oracle-11-2-0-3-client/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 14:28:47 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=772</guid>
		<description><![CDATA[When installing the Pro*C compiler stuff (technical term) from the 11.2.0.3 client install disc (it&#8217;s in zipfile 4 or 7 in case you need to know!) I hit a strange error almost immediately the installer started the GUI. I don&#8217;t have a screen dump, but the error message was the following: vbOEL.dunbar-it.co.uk:vbOEL.dunbar-it.co.uk In other words, [...]]]></description>
				<content:encoded><![CDATA[<p>When installing the Pro*C compiler stuff (technical term) from the 11.2.0.3 client install disc (it&#8217;s in zipfile 4 or 7 in case you need to know!) I hit a strange error almost immediately the installer started the GUI. <span id="more-772"></span></p>
<p>I don&#8217;t have a screen dump, but the error message was the following:</p>
<pre>vbOEL.dunbar-it.co.uk:vbOEL.dunbar-it.co.uk</pre>
<p>In other words, my fully qualified Linux x86-64bit server name, twice. Interesting. No buttons were present to allow me to carry on, abort etc. Just an OK button which is not much help as it bales out of the installer when clicked.</p>
<p>Googling and DuckDuckGoing (will that ever be a verb?) found me nothing.</p>
<p>As it turned out, I was using the wrong CD as I should have been putting in the 11.2.0.2 version. Once I mounted the correct CD image, I started again. This time I got an error dialoge with a bit more information:</p>
<pre>[INS-06101] IP address of localhost could not be determined.
Are you sure you wish to continue?</pre>
<p>And this time, I have buttons for YES and NO. I clicked YES and all was well.</p>
<p>It looks like 11.2.0.3 is a tad flaky in the error message/dialogue department.</p>
<p>Cheers,<br />
Norm.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/weird-error-dialoge-when-installing-oracle-11-2-0-3-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle 9i, HP-UX and ORA-12505 Drives Me Mad!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/oracle-9i-hp-ux-and-ora-12505-drives-me-mad/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/oracle-9i-hp-ux-and-ora-12505-drives-me-mad/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 16:06:02 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=760</guid>
		<description><![CDATA[I&#8217;ve just created a new database on an HP-UX server. The database is Oracle 9i (yes, I know, I know!) and no matter what I do, I can&#8217;t connect via the listener without getting the dreaded ORA-12505: TNS:listener could not resolve SID given in connect descriptor error message. I&#8217;ve done this lots of times in [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just created a new database on an HP-UX server. The database is Oracle 9i (yes, I know, I  know!) and no matter what I do, I can&#8217;t connect via the listener without getting the dreaded <em>ORA-12505: TNS:listener could not resolve SID given in connect descriptor</em> error message. <span id="more-760"></span></p>
<p>I&#8217;ve done this lots of times in the past, but for some reason, I can&#8217;t get it to work today. It&#8217;s driving me mad!</p>
<p>The reason I have to use a <code>local_listener</code> parameter on HP-UX is because the <code>hostname</code> and the <code>uname -n</code> commands don&#8217;t return the same result as the hostname is longer than 8 characters:</p>
<pre>SQL> !hostname
myserver0011

SQL> !uname -n
myserver</pre>
<p>So, we have to use a <code>local_listener</code> setting in the spfile, and register the database with that listener because we can&#8217;t connect with <code>user/password@alias</code> otherwise.</p>
<pre>SQL> connect my_user/secret@my9idb
ERROR:
ORA-12505: TNS:listener could not resolve SID given in connect descriptor
Warning: You are no longer connected to ORACLE.</pre>
<p>Hmmm, it works fine without using the listener:</p>
<pre>SQL> conn / as sysdba
Connected.</pre>
<p>Some sanity checks:</p>
<pre>SQL> show parameter db_name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      my9idb</pre>
<pre>SQL> show parameter local_listener

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      (ADDRESS=(PROTOCOL=TCP)(HOST=m
                                                 yserver0011)(PORT=1556))</pre>
<pre>SQL> !tnsping my9idb

TNS Ping Utility for HPUX: Version 9.2.0.6.0 - Production on 23-APR-2012 16:12:30

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0.6/db/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver0011)(PORT=1556)) (CONNECT_DATA=(SID=my9idb)(SERVER=DEDICATED)))
OK (10 msec)</pre>
<pre>SQL> !ping myserver0011
PING myserver0011: 64 byte packets
64 bytes from 10.55.127.122: icmp_seq=0. time=0. ms
64 bytes from 10.55.127.122: icmp_seq=1. time=0. ms
64 bytes from 10.55.127.122: icmp_seq=2. time=0. ms

----myserver0011 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss 
round-trip (ms)  min/avg/max = 0/0/0</pre>
<pre>SQL> !lsnrctl services lsnr_my9idb

LSNRCTL for HPUX: Version 9.2.0.6.0 - Production on 23-APR-2012 16:15:51

Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver0011)(PORT=1556)))

The listener supports no services
The command completed successfully</pre>
<p>The clue was in the second last line, <em>the listener supports no services</em>. But I missed it the first time I checked, and the second, third &#8230;.. </p>
<p>It eventually dawned on me:</p>
<pre>SQL> alter system set service_names='my9idb' scope=both;
System altered.

SQL> alter system register;
System altered.

SQL> conn myuser/secret@my9idb
Connected.</pre>
<p>Result! </p>
<p>It appears that the <code>alter system register</code> command isn&#8217;t required, as soon as I set the <code>service_names</code> parameter, the listener seems to notice. However, I&#8217;m taking no chances after today!</p>
<p><em>All usernames, passwords, IP addresses and server names in this article have been disguised to protect the innocent!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/oracle-9i-hp-ux-and-ora-12505-drives-me-mad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scotsmen &amp; the Weather.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/scotsmen-the-weather/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/scotsmen-the-weather/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 10:30:57 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Humour]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=756</guid>
		<description><![CDATA[This one has been around for a while, but it&#8217;s still amusing. Other opinions are available &#8230; 40 degrees Fahrenheit-Californians shiver uncontrollably. People in Scotland sunbathe. 35 degrees-Italian cars won&#8217;t start. People in Scotland drive with the windows down. 20 degrees-Floridians wear coats, gloves, and wool hats. People in Scotland throw on a T-shirt. 15 [...]]]></description>
				<content:encoded><![CDATA[<p>This one has been around for a while, but it&#8217;s still amusing. Other opinions are available &#8230; <span id="more-756"></span></p>
<p>40 degrees Fahrenheit-Californians shiver uncontrollably.<br />
People in Scotland sunbathe.</p>
<p>35 degrees-Italian cars won&#8217;t start.<br />
People in Scotland drive with the windows down.</p>
<p>20 degrees-Floridians wear coats, gloves, and wool hats.<br />
People in Scotland throw on a T-shirt.</p>
<p>15 degrees-Californians begin to evacuate the state.<br />
People in Scotland go swimming.</p>
<p>Zero degrees-New York landlords finally turn up the heat.<br />
People in Scotland have the last bbq before it gets cold.</p>
<p>10 degrees below zero-People in Miami cease to exist.<br />
People in Scotland lick flagpoles.</p>
<p>20 degrees below zero-Californians fly away to Mexico.<br />
People in Scotland throw on a light jacket.</p>
<p>80 degrees below zero-Polar bears begin to evacuate the Arctic.<br />
Scottish Boy Scouts postpone &#8220;Winter Survival&#8221; classes until it gets cold enough.</p>
<p>100 degrees below zero-Santa Claus abandons the North Pole.<br />
People in Scotland pull down their ear flaps.</p>
<p>173 degrees below zero-Ethyl alcohol freezes.<br />
People in Scotland get frustrated when they can&#8217;t thaw their kegs.</p>
<p>297 degrees below zero-Microbial life start to disappear.<br />
Scottish cows complain of farmers with cold hands.</p>
<p>460 degrees below zero-ALL atomic motion stops.<br />
People in Scotland start saying &#8220;chilly, you cauld an aw?&#8221;<br />
(Translation: &#8220;It&#8217;s chilly, are you cold as well?&#8221;)</p>
<p>500 degrees below zero-Hell freezes over.<br />
Scottish people support England in World Cup!!!! </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/04/scotsmen-the-weather/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sudo on SLES Asking for Root Password?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/sudo-on-sles-asking-for-root-password/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/sudo-on-sles-asking-for-root-password/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 12:42:41 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=747</guid>
		<description><![CDATA[It&#8217;s a post-installation configuration that hasn&#8217;t been done. The /etc/sudoers file has the following section in it: # In the default (unconfigured) configuration, sudo asks for the root password. # This allows use of an ordinary user account for administration of a freshly # installed system. When configuring sudo, delete the two # following lines: [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s a post-installation configuration that hasn&#8217;t been done. <span id="more-747"></span> The <code>/etc/sudoers</code> file has the following section in it:</p>
<pre># In the default (unconfigured) configuration, sudo asks for the root password.
# This allows use of an ordinary user account for administration of a freshly
# installed system. When configuring sudo, delete the two
# following lines:
Defaults targetpw   # ask for the password of the target user i.e. root
ALL ALL=(ALL) ALL   # WARNING! Only use this together with 'Defaults targetpw'!</pre>
<p>The administrator needs to edit <code>/etc/sudoers</code> and comment out the final two lines above, or remove them altogether. Once done, individual user accounts can be added as follows:</p>
<pre>oracle ALL=(ALL) ALL
norman ALL=(ALL) ALL</pre>
<p>or groups can be given access as follows:</p>
<pre>%dba ALL=(ALL) ALL
%oinstall ALL=(ALL) ALL</pre>
<p>Substituting the appropriate levels of commands and privileges of course!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/sudo-on-sles-asking-for-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners – Part 7</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/oracle-rman-for-beginners-part-7/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/oracle-rman-for-beginners-part-7/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 21:16:37 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=728</guid>
		<description><![CDATA[In part 6 of this mini-series, I left you with a backed up database using RMAN to take hot backups. This episode looks at restoring and recovering from hot backups. The joy of this is that most of the time you don&#8217;t need to have everyone off of the database twiddling their thumbs while you [...]]]></description>
				<content:encoded><![CDATA[<p>In <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-6/" title="Oracle RMAN for Beginners – Part 6" target="_blank">part 6</a> of this mini-series, I left you with a backed up database using RMAN to take hot backups. This episode looks at restoring and recovering from hot backups. <span id="more-728"></span></p>
<p>The joy of this is that <em>most of the time</em> you don&#8217;t need to have everyone off of the database twiddling their thumbs while you restore and recover, just anyone in those areas affected.</p>
<p>Restoration and recovery is <em>full</em> in that the database will be completely recovered right up to date after the restore and recovery is finished.</p>
<h2>Recover the Entire Database</h2>
<p>To recover the entire database you do actually need to have the databases <code>mounted</code> so the users will need to be offline. The steps involved are:</p>
<p>Make sure that the database is mounted, not open:</p>
<pre>RMAN> shutdown

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     768331776 bytes

Fixed Size                     2230360 bytes
Variable Size                213911464 bytes
Database Buffers             549453824 bytes
Redo Buffers                   2736128 bytes</pre>
<p>Restore the database from a suitable dump. RMAN will choose the dump for you in order to reduce the amount of work required:</p>
<pre>RMAN> restore database;

Starting restore at 2012/03/19 21:19:35
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00002 to /srv/nffs/oradata/ant12/data/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /srv/nffs/oradata/ant12/data/undotbs01.dbf
...
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2012/03/19 21:24:02</pre>
<p>Recover the database. This will use any available backups of archived logs, the currently online and possibly never backed up archived logs plus the online redo logfiles to bring the database right up to date. Any archived logs that are no longer online will be restored first &#8211; which you can see in the following if you looks carefully:</p>
<pre>RMAN> recover database;

Starting recover at 2012/03/19 21:28:58
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 12 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_12_7mwyxlk8_.arc
archived log for thread 1 with sequence 13 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_13_7mwzxtxg_.arc
...
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=8
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T160332_7mwylo3r_.bkp
...
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
...
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_9_7ph990ph_.arc thread=1 sequence=9
channel default: deleting archived log(s)
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_9_7ph990ph_.arc RECID=77 STAMP=778368544
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_10_7ph990r7_.arc thread=1 sequence=10
channel default: deleting archived log(s)
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_10_7ph990r7_.arc RECID=76 STAMP=778368544
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=11
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T160922_7mwyxlvn_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T160922_7mwyxlvn_.bkp tag=TAG20120217T160922
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_11_7ph996wn_.arc thread=1 sequence=11
channel default: deleting archived log(s)
archived log file name=/srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_11_7ph996wn_.arc RECID=78 STAMP=778368551
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_12_7mwyxlk8_.arc thread=1 sequence=12
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_13_7mwzxtxg_.arc thread=1 sequence=13
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_14_7mwzxx1n_.arc thread=1 sequence=14
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_15_7mwzxxkb_.arc thread=1 sequence=15
media recovery complete, elapsed time: 00:00:25
Finished recover at 2012/03/19 21:29:36</pre>
<p>And finally, open the database:</p>
<pre>RMAN> alter database open;

database opened</pre>
<h2>Recover Tablespaces</h2>
<p>Recovering individual tablespaces is done with the database open. Only the tablespaces to be recovered need to be offline.</p>
<p>However, if the SYSTEM or UNDO tablespaces need to be recovered, the database will need to be <code>mounted</code> as you cannot restore and recover those with the database online &#8211; for pretty obvious reasons to be honest!</p>
<blockquote><p>Note: You cannot recover a tablespace that has been dropped. In that situation, you must perform a point in time recovery to just before the tablespace was dropped. The control file doesn&#8217;t keep details of the dropped tablespace.</p>
<p>Attempting to recover a dropped tablespace will result in <strong>RMAN-20202 Tablespace not found in the recovery catalog</strong> errors.</p>
<p>You can, however, recover a tablespace where one or more of its datafiles have become corrupted or have been removed by nefarious means.</p></blockquote>
<p>The following example shows the users tablespace being restored from a backup and recovered completely up to date.</p>
<p>First of all, in an SQL*Plus session, add an up to date record to a test table in the tablespace to be restored and recovered:</p>
<pre>SQL> insert into test values (sysdate);

1 row created.

SQL> select * from test order by a desc;

A
-------------------
2012/03/19 20:58:18
2012/03/07 11:21:53
...</pre>
<p>This change has not yet been archived so will be found in the online redo logs. The following is the RMAN recovery &amp; restore process. </p>
<p>The first step is to take the affected tablespaces offline:</p>
<pre>RMAN> sql 'alter tablespace users offline';

sql statement: alter tablespace users offline</pre>
<p>The next step will restore the datafiles in this tablespace from a suitable dump. RMAN will choose the dump in order to reduce the amount of work it has to do to complete the restoration:</p>
<pre>RMAN> restore tablespace users;

Starting restore at 2012/03/19 21:01:25
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: reading from backup piece /media/oracle_backups/ant12/2nn3ict8_1_1
channel ORA_DISK_1: piece handle=/media/oracle_backups/ant12/2nn3ict8_1_1 tag=TAG20120217T165152
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2012/03/19 21:01:26</pre>
<p>With the dump of the datafile(s) restored, I next need to recover the tablespace to the current state:</p>
<pre>RMAN> recover tablespace users;

Starting recover at 2012/03/19 21:01:32
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 2012/03/19 21:01:33</pre>
<p>Finally, bring the tablespace back online:</p>
<pre>RMAN> sql 'alter tablespace users online';

sql statement: alter tablespace users online</pre>
<p>And to be sure that I have indeed recovered the tablespace completely up to date, I re-ran the above query in my SQL*Plus session again:</p>
<pre>SQL> select * from test order by a desc;

A
-------------------
2012/03/19 20:58:18
2012/03/07 11:21:53
...</pre>
<p>If the SYSTEM or UNDO tablespace need restoring and recovery then the database has to be <code>mounted</code>, as follows:</p>
<pre>RMAN> shutdown

database closed
database dismounted
Oracle instance shut down

RMAN> startup mount

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     768331776 bytes

Fixed Size                     2230360 bytes
Variable Size                213911464 bytes
Database Buffers             549453824 bytes
Redo Buffers                   2736128 bytes

RMAN> restore tablespace system;

Starting restore at 2012/03/19 21:14:34
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=17 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /srv/nffs/oradata/ant12/data/system01.dbf
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161210_7mwz2tyv_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161210_7mwz2tyv_.bkp tag=TAG20120217T161210
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:25
Finished restore at 2012/03/19 21:15:00

RMAN> recover tablespace system;

Starting recover at 2012/03/19 21:15:07
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 13 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_13_7mwzxtxg_.arc
archived log for thread 1 with sequence 14 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_14_7mwzxx1n_.arc
archived log for thread 1 with sequence 15 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_15_7mwzxxkb_.arc
archived log for thread 1 with sequence 16 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_16_7mwzxzvm_.arc
archived log for thread 1 with sequence 17 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_17_7mwzy01m_.arc
archived log for thread 1 with sequence 18 is already on disk as file /srv/nffs/flashback_area/ant12/NORM/archivelog/2012_03_19/o1_mf_1_18_7ph695lw_.arc
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_13_7mwzxtxg_.arc thread=1 sequence=13
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_14_7mwzxx1n_.arc thread=1 sequence=14
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_15_7mwzxxkb_.arc thread=1 sequence=15
media recovery complete, elapsed time: 00:00:02
Finished recover at 2012/03/19 21:15:10

RMAN> alter database open;

database opened</pre>
<h2>Recover Datafiles</h2>
<p>Recovering datafiles instead of a complete tablespace could save you a lot of downtime for the affected users. As ever, the affected datafile(s) need to be offline in order to be recovered. The remainder of the process is as simple as restoring and recovering a tablespace so the following demonstration of a datafile recovery needs little comment, however, as before, if SYSTEM or UNDO are affected, the database needs to be mounted, not open.</p>
<pre>RMAN> sql 'alter database datafile 5 offline';

sql statement: alter database datafile 5 offline

RMAN> restore datafile 5;

Starting restore at 2012/03/19 21:40:50
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /srv/nffs/oradata/ant12/data/tools01.dbf
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161511_7mwz8hvx_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161511_7mwz8hvx_.bkp tag=TAG20120217T161511
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2012/03/19 21:40:52

RMAN> recover datafile 5;

Starting recover at 2012/03/19 21:40:57
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 13 is already on disk as file /srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_13_7mwzxtxg_.arc
...
media recovery complete, elapsed time: 00:00:00
Finished recover at 2012/03/19 21:40:58

RMAN> sql 'alter database datafile 5 online';

sql statement: alter database datafile 5 online</pre>
<p>Of course, the above assumes you know the datafile number, the <code>report schema</code> command helps here. You can always run the restore and recovery using the full filename in single quotes, but I find the data file number method to be easier and less prone to my abysmal typing skills!</p>
<p>If you have multiple files to restore and recover, separate them with a comma in the normal fashion:</p>
<pre>RMAN> sql 'alter database datafile 5, 6 offline';
...
RMAN> recover datafile 5, 6;
...
RMAN> restore datafile 5, 6;
...
RMAN> sql 'alter database datafile 5, 6 online';</pre>
<h2>Recover Individual Blocks</h2>
<p>If you can save time by restoring and recovering just a datafile or two rather than a complete tablespace, then how about restoring and recovering a block or two, that&#8217;s will save even more time surely?</p>
<p>RMAN can help you out here as well, and you don&#8217;t need the datafile(s) to be offline at the time.</p>
<pre>RMAN> recover datafile 5 block 24;

Starting recover at 2012/03/19 21:49:47
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 2012/03/19 21:49:47</pre>
<p>In this case, even the SYSTEM and UNDO tablespaces can be recovered while online. You should note that there is no need to restore the data block first, just run the recover command.</p>
<p>See the RMAN manual for many other formats of this useful command.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/oracle-rman-for-beginners-part-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rename an Oracle 10g or 11g Database</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/rename-an-oracle-10g-or-11g-database/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/rename-an-oracle-10g-or-11g-database/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 16:04:28 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=716</guid>
		<description><![CDATA[Due to a document not being supplied to me recently, I built a few 11g databases with the wrong SID. I needed to change them all. I found a few web pages, Oracle and others, on using the nid utility to do just that, however, they were incomplete. The full process is described here. The [...]]]></description>
				<content:encoded><![CDATA[<p>Due to a document not being supplied to me recently, I built a few 11g databases with the wrong SID. I needed to change them all. I found a few web pages, Oracle and others, on using the <code>nid</code> utility to do just that, however, they were incomplete. The full process is described here. <span id="more-716"></span></p>
<p>The following has been tested fully on an 11.2.0.2 Oracle database. The <code>nid</code> utility used also exists in Oracle 10.2.0.5 and possibly other versions that I do not have access to at the moment.</p>
<ul>
<li>Backup the database or ensure a backup exists in RMAN. This shouldn&#8217;t be necessary but you are a DBA right? And chances we do not take!</li>
<li><code>create pfile='/home/oracle/initnew_sid.ora' from spfile;</code> this ensures that the pfile you are about to edit contains all the current settings. It is saved in a non-standard location for safety.</li>
<li>Shutdown the database cleanly. Use <code>shutdown</code> or <code>shutdown immediate</code>.</li>
<li><code>Startup mount</code> the database.</li>
<li>Check the <code>open_cursors</code> parameter. If you have a lot of data files you might need to increase this setting temporarily:
<pre>alter system set open_cursors=1500 scope=memory;</pre>
</li>
<li>In a shell session run the following <code>nid</code> command:
<pre>nid target=/ dbname=new_sid setname=y logfile=new_name.log</pre>
<p>The logfile created will show details of what just happened and should be checked for errors. As far as I am aware, but don&#8217;t trust me on this, errors will not change the database at all.</p>
<p>The instance will also have been shut down at the end of the <code>nid</code> command.	</li>
<li>Edit <code>/etc/oratab</code> to change the old sid to the new one.</li>
<li>Edit <code>tnsnames.ora</code> to do likewise. Also applies to OID, LDAP, whatever you use for alias resolution.</li>
<li>Stop the appropriate listener, edit <code>listener.ora</code> and restart the listener. If the listener in question serves other databases, just edit the <code>listener.ora</code> file and run <code>lsnrctl reload listener_name</code>.</li>
<li>Copy the newly created <code>/home/oracle/initnew_sid.ora</code> to <code>$ORACLE_HOME/dbs/initnew_sid.ora</code> then edit the new file and change the <code>db_name</code> parameter.</li>
<li>You may, if desired, delete the old files <code>$ORACLE_HOME/dbs/initold_sid.ora</code> and <code>$ORACLE_HOME/dbs/spfileold_sid.ora</code> as they are no longer needed. (Unless you plan on renaming the database back again of course!)</li>
<li>Export <code>ORACLE_SID</code> as the new sid. <code>ORACLE_HOME</code> will remain the same as before.</li>
<li>Run the <code>orapwd</code> command to create a new password file if required.</li>
<li>Startup the database.</li>
<li><code>create spfile='oracle_home/dbs/spfilenew_sid.ora' from pfile;</code> Obviously substituting the correct values for new_sid and oracle_home.</li>
<li>Shutdown and restart the database to use the new spfile.</li>
<li>Check it all just worked:
<pre>select name from v$database;
show parameter db_name</pre>
</li
</ul>
<p>That&#8217;s the simple bit and in theory is all you need to do. However, be aware that any data files, control files, recovery file destinations etc still have their old format names. You may end up with a database called <code>fred</code> located in <code>/srv/barney/oradata</code> for example. If you wish to go down the route of renaming everything to suit the database name, see <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/08/rename-an-oracle-10g-or-11g-database-part-2/" title="Rename an Oracle 10g or 11g Database – Part 2" target="_blank">part 2</a> of this discussion, <a href="http://qdosmsq.dunbar-it.co.uk/blog/2012/08/rename-an-oracle-10g-or-11g-database-part-2/" title="Rename an Oracle 10g or 11g Database – Part 2" target="_blank">here</a>.</p>
<p>As the control files are not overwritten by this process, and because the <code>DBID</code> doesn&#8217;t change, all your <code>RMAN</code> backup information is safe and even after the database has been renamed, you can use an old backup to restore and recover the database. I&#8217;ve tested this on a tablespace recovery to be sure. </p>
<blockquote><p>Ok, when I say your backups are safe, they are, but if you try to restore the controlfile from an old pre-rename dump, it will restore with no errors. However, when you attempt to <code>mount</code> the database you will be informed that the name in the controlfile doesn&#8217;t match the database. Edit the restored controlfile(s) to change the name and continue.</p></blockquote>
<p>I&#8217;m pretty sure that because the <code>DBID</code> doesn&#8217;t change, an <code>RMAN</code> catalogue will not lose any backup details either. On my test system, I don&#8217;t yet have a catalogue to play with, so best you test on an <em>expendable</em> database first. Just saying!</p>
<p>Online and backed up archived logs as well as the online redo logs are used quite happily to apply any required REDO.</p>
<p>It just works!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/03/rename-an-oracle-10g-or-11g-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners – Part 6</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-6/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-6/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 16:57:53 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=691</guid>
		<description><![CDATA[In the past few instalments, I&#8217;ve looked mainly at databases running in NOARCHIVELOG mode. It&#8217;s probably not the best way to run a production system but it is valid to do so. For the safest systems and the ability to recover from numerous disasters without losing nay data, the database should be run in ARCHIVELOG [...]]]></description>
				<content:encoded><![CDATA[<p>In the past few instalments, I&#8217;ve looked mainly at databases running in NOARCHIVELOG mode. It&#8217;s probably not the best way to run a production system but it is valid to do so.</p>
<p>For the safest systems and the ability to recover from numerous disasters without losing nay data, the database should be run in ARCHIVELOG mode.</p>
<p>The remainder of the mini-series concentrates on the things you can do with RMAN when the database is running in ARCHIVELOG mode.<span id="more-691"></span></p>
<h2>Hot Backups</h2>
<p>There&#8217;s nothing to taking a hot backup that I haven&#8217;t already shown you. Taking a backup of the full database in hot (or online) mode is exactly the same as taking a cold (offline) backup.</p>
<p>One difference is that you must backup the archived logs in addition to the database.</p>
<p>Another difference is that you can take a hot backup while the database is open, although you can also take one while the database is mounted.</p>
<p>In the following examples, I have set my archivelog deletion policy as follows:</p>
<pre>RMAN> configure archivelog deletion policy backed up 2 times to disk;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
new RMAN configuration parameters are successfully stored</pre>
<h3>Backup the Database and Archived Logs</h3>
<p>To backup the database, including controlfile and spfile if autobackup is configured &#8211; and the archived logs, all I need to do is as follows:</p>
<pre>RMAN> run {
2> backup full database;
3> backup archivelog all delete input;
4> }</pre>
<p>An extract of the results of running the above is this:</p>
<pre>Starting backup at 2012/02/17 15:07:46
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=45 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
...
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:07:47
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:08:32
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T150747_7mwvb3sy_.bkp tag=TAG20120217T150747 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2012/02/17 15:08:32

Starting backup at 2012/02/17 15:08:34
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=57 STAMP=775494253
input archived log thread=1 sequence=2 RECID=58 STAMP=775494254
input archived log thread=1 sequence=3 RECID=59 STAMP=775494255
input archived log thread=1 sequence=4 RECID=60 STAMP=775494258
input archived log thread=1 sequence=5 RECID=61 STAMP=775494274
input archived log thread=1 sequence=6 RECID=62 STAMP=775494514
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:08:35
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:08:38
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T150834_7mwvcm3s_.bkp tag=TAG20120217T150834 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03</pre>
<p>The archived logs are backed up to the FRA, as usual, and then deleted from their normal position in the FRA.This helps keep the FRA tidy of archived logs which are no longer necessary as enough backups have been taken.</p>
<p>Setting the archived log deletion policy sensibly means that you should never be without the logs you need to recover a restored database, either in full or up to a specific point in time, scn or leg sequence number.</p>
<p>You may note, if you looked closely, that one of the first things RMAN did as part of the archived log backup, was to archive the current online redo log. This means that you will have all the archived logs necessary since the start of the backup (of the database) available in the event of a recovery being required.</p>
<p>As this is the first time my archived logs have been backed up, the attempt to delete them has not been successful, as the following extract shows:</p>
<pre>channel ORA_DISK_1: deleting archived log(s)
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_1_7mwv3ddf_.arc thread=1 sequence=1
...
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_6_7mwvclf7_.arc thread=1 sequence=6
Finished backup at 2012/02/17 15:08:38</pre>
<p>These warnings <em>do not</em> affect the backup. The archived logs in the FRA <em>have</em> been successfully backed up (to the FRA) but because the deletion policy states that they can only be deleted, from the FRA, when they have already been backed up twice to disc, then they must remain on disc in the FRA.</p>
<p>Finally, the controlfile and spfile are automatically backed up:</p>
<pre>Starting Control File and SPFILE Autobackup at 2012/02/17 15:08:38
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775494518_7mwvcpqn_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 15:08:41</pre>
<p>It may be simpler to run the following command instead:</p>
<pre>RMAN> backup full database plus archivelog delete input;</pre>
<p>Looking at the log from the above command shows that the following steps take place:</p>
<ul>
<li>The current redo log is archived.</li>
<li>The archived logs are (all) backed up.</li>
<li>The deletion policy for archived logs is applied.</li>
<li>The database is backed up.</li>
<li>The (new) current redo log is archived.</li>
<li>The newly archived log is backed up on its own.</li>
<li>The controlfile and spfile are backed up &#8211; if configured to do so.</li>
</ul>
<p>An extract from the log, showing the above steps, is as follows:</p>
<pre>Starting backup at 2012/02/17 15:37:19
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=1 RECID=57 STAMP=775494253
...
input archived log thread=1 sequence=7 RECID=63 STAMP=775496239
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:37:20
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:37:23
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T153720_7mwx1j93_.bkp tag=TAG20120217T153720 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: deleting archived log(s)
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_1_7mwv3ddf_.arc RECID=57 STAMP=775494253
...
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_6_7mwvclf7_.arc RECID=62 STAMP=775494514
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_7_7mwx1hj5_.arc thread=1 sequence=7
Finished backup at 2012/02/17 15:37:23

Starting backup at 2012/02/17 15:37:23
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
...
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:37:24
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:38:09
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T153723_7mwx1n4f_.bkp tag=TAG20120217T153723 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2012/02/17 15:38:09

Starting backup at 2012/02/17 15:38:09
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=8 RECID=64 STAMP=775496289
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:38:09
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:38:10
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T153809_7mwx31qd_.bkp tag=TAG20120217T153809 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: deleting archived log(s)
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/srv/nffs/flashback_area/ant12/ANT12/archivelog/2012_02_17/o1_mf_1_8_7mwx31h2_.arc thread=1 sequence=8
Finished backup at 2012/02/17 15:38:10

Starting Control File and SPFILE Autobackup at 2012/02/17 15:38:10
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775496290_7mwx33bn_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 15:38:13</pre>
<h3>Backup Selected Tablespaces</h3>
<p>One of the joys of running a database in ARCHIVELOG mode is the fact that it is possible to backup and recover individual tablespaces.</p>
<pre>RMAN> backup tablespace users;

Starting backup at 2012/02/17 15:59:07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 15:59:07
channel ORA_DISK_1: finished piece 1 at 2012/02/17 15:59:08
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T155907_7mwybcbd_.bkp tag=TAG20120217T155907 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/17 15:59:08

Starting Control File and SPFILE Autobackup at 2012/02/17 15:59:08
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775497548_7mwybdnt_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 15:59:09</pre>
<p>Including the archived logs at the same time, is possible too, by running the <code>backup tablespace tools plus archivelog delete input;</code> command. It isn&#8217;t mandatory to delete the archived logs as part of the command, but it helps keep the FRA tidy.</p>
<h3>Backup Selected Data Files</h3>
<p>With ARCHIVELOG mode enabled, you can even backup at the data file level.</p>
<p>Datafailes may be specified by id or my full name. The following backs up the SYSTEM tablespace&#8217;s single datafile.</p>
<pre>RMAN> report schema;

Report of database schema for database with db_unique_name ANT12

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    600      SYSTEM               ***     /srv/nffs/oradata/ant12/data/system01.dbf
...
12   500      XDB                  ***     /srv/nffs/oradata/ant12/data/xdb01.dbf


RMAN> backup datafile 1;

Starting backup at 2012/02/17 16:12:10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/srv/nffs/oradata/ant12/data/system01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 16:12:10
channel ORA_DISK_1: finished piece 1 at 2012/02/17 16:12:26
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161210_7mwz2tyv_.bkp tag=TAG20120217T161210 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 2012/02/17 16:12:26

Starting Control File and SPFILE Autobackup at 2012/02/17 16:12:26
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775498346_7mwz3bdl_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 16:12:27</pre>
<p>You can also backup multiple data files together by specifying a comma separated list of id numbers or names:</p>
<pre>RMAN> backup datafile
2> '/srv/nffs/oradata/ant12/data/tools01.dbf',
3> '/srv/nffs/oradata/ant12/data/users01.dbf';

Starting backup at 2012/02/17 16:15:11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/srv/nffs/oradata/ant12/data/tools01.dbf
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 16:15:11
channel ORA_DISK_1: finished piece 1 at 2012/02/17 16:15:12
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_nnndf_TAG20120217T161511_7mwz8hvx_.bkp tag=TAG20120217T161511 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/17 16:15:12

Starting Control File and SPFILE Autobackup at 2012/02/17 16:15:12
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775498513_7mwz8k80_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 16:15:16</pre>
<p>The above is equivalent to the command <code>backup datafile 5,6;</code> in the case of my database.</p>
<h3>Backup Archived Logs</h3>
<p>You can take a backup of the archived logs at any time you wish simply by running the <code>backup archivelog all;</code> command as demonstrated at the beginning of this instalment.</p>
<p>It is possible to backup only a selection of archived logs, for example, a single log file:</p>
<pre>RMAN> backup archivelog sequence 15;

Starting backup at 2012/02/17 16:27:15
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=15 RECID=71 STAMP=775499197
channel ORA_DISK_1: starting piece 1 at 2012/02/17 16:27:15
channel ORA_DISK_1: finished piece 1 at 2012/02/17 16:27:16
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T162715_7mwzz3gk_.bkp tag=TAG20120217T162715 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/17 16:27:16

Starting Control File and SPFILE Autobackup at 2012/02/17 16:27:16
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775499236_7mwzz4w2_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 16:27:17</pre>
<p>Or, if required, a number of them:</p>
<pre>RMAN> backup archivelog sequence between 16 and 19;

Starting backup at 2012/02/17 16:28:15
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=16 RECID=72 STAMP=775499199
input archived log thread=1 sequence=17 RECID=73 STAMP=775499200
channel ORA_DISK_1: starting piece 1 at 2012/02/17 16:28:16
channel ORA_DISK_1: finished piece 1 at 2012/02/17 16:28:17
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_17/o1_mf_annnn_TAG20120217T162815_7mx01041_.bkp tag=TAG20120217T162815 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/17 16:28:17

Starting Control File and SPFILE Autobackup at 2012/02/17 16:28:17
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775499297_7mx011ll_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 16:28:18</pre>
<p>You may also specify the logs to be backed up using times. For example, the command <code>backup archivelog from time 'sysdate-7' until time 'sysdate-1';</code> will backup those archived logs, still on disc in the FRA, that were created within the time period specified.</p>
<p>And finally, for archived logs, if they have been stored in a section of the file system which is outside the FRA, you can still back those up.</p>
<p>If the archived logs are in the location &#8216;/srv/nffs/oradata/arch&#8217; then you back those up (to the FRA) by running the command <code>backup archivelog like '/srv/nffs/oradata/arch%';</code></p>
<h2>Specifying a New Destination for Backups</h3>
<p>In all of the preceding examples, the backups have been created in the FRA. What do you do if yo want to create a backup somewhere else?</p>
<p>The <code>format</code> parameter is how:</p>
<pre>RMAN> backup tablespace users format='/media/oracle_backups/ant12/%U';

Starting backup at 2012/02/17 16:51:52
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/17 16:51:52
channel ORA_DISK_1: finished piece 1 at 2012/02/17 16:51:53
piece handle=/media/oracle_backups/ant12/2nn3ict8_1_1 tag=TAG20120217T165152 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/17 16:51:53

Starting Control File and SPFILE Autobackup at 2012/02/17 16:51:54
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_17/o1_mf_s_775500714_7mx1fbdd_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/17 16:51:55</pre>
<p>It can bee seen from the <em>piece handle</em> that the backup has indeed been sent to the non-FRA disc area.</p>
<p>The <code>format</code> parameter can be used for all types of backups, not just for tablespaces as in this example.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners – Part 5</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-5/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-5/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 16:00:42 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=670</guid>
		<description><![CDATA[Previously in this mini-series, I managed to dump and recover a database from a cold backup. Before I move on to similar practices with hot backups, a few terms and observations may well be in order. Terms and Conditions A restore is the action of copying files back from a backup, prior to recovery. Recovery [...]]]></description>
				<content:encoded><![CDATA[<p><a title="Oracle RMAN for Beginners – Part 4" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-4/" target="_blank">Previously</a> in this mini-series, I managed to dump and recover a database from a cold backup. Before I move on to similar practices with hot backups, a few terms and observations may well be in order. <span id="more-670"></span></p>
<h2>Terms and Conditions</h2>
<p>A <strong>restore</strong> is the action of copying files back from a backup, prior to recovery.</p>
<p><strong>Recovery</strong> is carried out after restoring the files and allows the database to be recovered in full or to a specific point in time, using backups of archived logs, and/or the current archived logs &#8211; which may not have been backed up yet.</p>
<p>A <strong>full recovery</strong> restores and recovers the database to an up to date point. No data will be lost or missing after the recovery.</p>
<p>A <strong>partial recovery</strong> restores and recovers the database to a point in time in the past. Data may be lost after the recovery has completed.</p>
<p>A <strong>consistent backup</strong> is a cold backup. I have been using these types of backup since the beginning of this series of articles.</p>
<p>A consistent backup is one which, when recovered, leaves the database ready to use with no further recovery required.</p>
<p>An <strong>inconsistent backup</strong> is a hot backup. We will be looking at these backups next as they are the ones most likely to be in popular use.</p>
<p>An inconsistent backup has to be restored and then rolled forward (recovered) to some specific point in time before the database can be opened for use.</p>
<p>An <strong>available backup</strong> is a backup, consistent or otherwise, which is available for use in recovering a database.</p>
<p>An <strong>unavailable backup</strong> is a backup, consistent or otherwise, which is deemed to be unavailable for use in recovering a database. In normal conditions, this is a forced action by the DBA who marks the backup as unavailable in order to prevent RMAN using it in a restoration</p>
<p>An <strong>expired backup</strong> is a backup which is registered in the catalogue and/or controlfile, but which is not found on disc or tape.</p>
<p>An <strong>obsolete backup</strong> is a backup for which the files remain on disc or tape, but the configured <em>retention period</em> has caused the backup to become no longer required.</p>
<p>A <strong>full backup</strong> is a backup of the whole database.</p>
<p>An <strong>incremental backup</strong> is a backup which is not a full backup, but only contains blocks which have changed since the previous <em>level 0</em> or <em>level 1</em> incremental backup depending on whether the backup is <em>cumulative</em> or <em>differential</em>.</p>
<h2>Retention and Deletion Policy</h2>
<p>Oracle advise four (main) things when using RMAN to backup and recover your databases:</p>
<ul>
<li>Use a flashback recovery area</li>
<li>Use a backup retention policy</li>
<li>Use an archive log deletion policy</li>
<li>Use a recovery catalogue.</li>
</ul>
<p>The use of the FRA has been <a title="Oracle RMAN for Beginners – Part 1" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-1/" target="_blank">covered already</a> so no more need be said about that.</p>
<p>I will be discussing a recover catalogue later in this mini-series. For now, I&#8217;m sticking with the use only of the control file to record database backup details.<strong></strong></p>
<h3>Retention Policy</h3>
<p>You may configure a retention policy for your backups to ensure that they remain available for as long as you deem necessary. You may define the retention as a recovery window &#8211; the number of days a backups should remain available for &#8211; or as a number of copies.</p>
<p>RMAN&#8217;s default is a retention policy of one copy. This means that as each new database backup is created, the previous one becomes obsolete.</p>
<p>The method you use will depend on how your organisation likes to work. If the rules are that all backups should be kept for a fortnight then the command <code>configure retention policy to recovery window of 14 days</code> will cover that rule.</p>
<p>If, on the other hand, the rules demand that four copies of all backups should be retained then the command required will be <code>configure retention policy to redundancy 4</code>.</p>
<p>Whichever way that you configure your retention policy, backups that fall outside of your configured policy will automatically be flagged as obsolete by RMAN. </p>
<blockquote><p><strong>Note</strong>: RMAN may well hold on to a backup beyond its retention period if any of the files within the backup are still required to be able to restore the database.</p>
<p>With backup optimisation configured on, files that have not changed since the previous backup will not be backed up. This speeds up the backup process but does mean that more backups may be required to allow everything to be restored.</p></blockquote>
<h3>Archive log Deletion Policy</h3>
<p>The archive log deletion policy is a similar system to specify which archived logs are <em>eligible</em> for deleting from the FRA to recover space.</p>
<p>RMAN will delete those eligible logs as and when it needs to recover space in the FRA for further backups, or to avoid exceeding the setting of the DB_RECOVERY_FILE_DEST_SIZE for the database.</p>
<p>If you have mirrored copies of your archived logs stored outside the FRA, those will <em>not</em> be deleted automatically by RMAN, it is your responsibility to delete them.</p>
<p>The deletion policy also controls whether or not archived logs are deleted from the FRA when the <code>backup archivelog all delete input</code> command is executed. Any archived logs that have not yet been backed up enough times, or have been backed up but for too few days, will <em>not</em> be deleted. You can <code>force</code> the deletion though.</p>
<p>Examples of setting up the deletion policy are <code>configure archivelog deletion policy to applied on all standby</code> or <code>configure archivelog deletion policy to backed up 5 times to sbt</code> etc.</p>
<p>The default setting is <code>none</code> which means that archived logs are never deleted automatically from the FRA.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clone Oracle Home Easily</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/clone-oracle-home-easily/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/clone-oracle-home-easily/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 08:23:52 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=667</guid>
		<description><![CDATA[Frits Hoogland&#8217;s post on how to clone your Oracle Home rather than installing from scratch. Nice!]]></description>
				<content:encoded><![CDATA[<p><a title="http://fritshoogland.wordpress.com/2010/07/03/cloning-your-oracle-database-software-installation/" href="http://fritshoogland.wordpress.com/2010/07/03/cloning-your-oracle-database-software-installation/" target="_blank">Frits Hoogland&#8217;s post</a> on how to clone your Oracle Home rather than installing from scratch. Nice!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/clone-oracle-home-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners – Part 4</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-4/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-4/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 21:19:22 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=643</guid>
		<description><![CDATA[So far I have managed to dump and recover a database running in ARCHIVELOG mode. That is the most sensible mode for a production database and will be the case for the rest of this small RMAN guide. However, what if your databases are not running in ARCHIVELOG mode? What can RMAN do for you? [...]]]></description>
				<content:encoded><![CDATA[<p>So far I have managed to dump and recover a database running in ARCHIVELOG mode. That is the most sensible mode for a production database and will be the case for the rest of this small RMAN guide. However, what if your databases are not running in ARCHIVELOG mode? What can RMAN do for you? <span id="more-643"></span></p>
<h2>Running a Database in NOARCHIVELOG Mode</h2>
<p>The database is shutdown at the moment, so we will MOUNT it using RMAN and create a brand new full cold backup in the FRA.</p>
<pre>RMAN> connect target /
connected to target database (not started)

RMAN> startup mount

Oracle instance started
database mounted
...

RMAN> backup full database;

Starting backup at 2012/02/06 20:47:41
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
...
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/06 20:47:43
channel ORA_DISK_1: finished piece 1 at 2012/02/06 20:48:28
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T204742_7m0h3hmw_.bkp tag=TAG20120206T204742 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 2012/02/06 20:48:28

Starting Control File and SPFILE Autobackup at 2012/02/06 20:48:28
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_06/o1_mf_s_774563524_7m0h4xng_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/06 20:48:31

RMAN> startup;
database is already started
database opened
</pre>
<p>Again, we will trash the database by renaming a data file, after doing some work in a SQL*Plus session. The session to attempt a recovery using RMAN went like this:</p>
<pre>RMAN> startup

connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 21:00:45
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/srv/nffs/oradata/ant12/data/users01.dbf'</pre>
<p>I know it&#8217;s the users tablespace that&#8217;s affected, so I will attempt to restore and recover just that:</p>
<pre>RMAN> restore tablespace users;

Starting restore at 2012/02/06 21:01:21
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T204742_7m0h3hmw_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T204742_7m0h3hmw_.bkp tag=TAG20120206T204742
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 2012/02/06 21:01:23</pre>
<p>It looks like RMAN allows a single tablespace to be restored, will it recover?</p>
<pre>RMAN> recover tablespace users;

Starting recover at 2012/02/06 21:01:44
using channel ORA_DISK_1

starting media recovery
...
RMAN-08187: WARNING: media recovery until SCN 855319 complete
Finished recover at 2012/02/06 21:01:46</pre>
<p>That warning doesn&#8217;t look too healthy. I next attempt to open the database:</p>
<pre>RMAN> startup;

database is already started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 21:02:09
ORA-01113: file 6 needs media recovery
ORA-01110: data file 6: '/srv/nffs/oradata/ant12/data/users01.dbf'</pre>
<p>So, that&#8217;s it, with a database running in NOARCHIVELOG mode, you lose data if the changes that you are trying to recover have aged out of the online redo logs. Had they still been there I would have been able to recover the tablespace and open the database, as it is, I now need to do a full restore to get a consistent database back up and running.</p>
<pre>RMAN> restore database;

Starting restore at 2012/02/06 21:08:11
using channel ORA_DISK_1

skipping datafile 6; already restored to file /srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /srv/nffs/oradata/ant12/data/system01.dbf
...
channel ORA_DISK_1: restoring datafile 00012 to /srv/nffs/oradata/ant12/data/xdb01.dbf
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T204742_7m0h3hmw_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T204742_7m0h3hmw_.bkp tag=TAG20120206T204742
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:56
Finished restore at 2012/02/06 21:12:08

RMAN> sql "alter database open resetlogs";

sql statement: alter database open resetlogs

RMAN></pre>
<p>That&#8217;s it then, the database has been restored and opened.</p>
<p>One other thing, RMAN is smart enough to notice that my unsuccessful attempt to restore just the users tablespace meant that it didn&#8217;t have to restore it again. That saved a little time.</p>
<p>The moral to this little exercise is simple. Don&#8217;t run your databases in NOARCHIVELOG mode because you will lose data. In addition, you must always have downtime to backup the database. If you attempt to backup the database while it is open, you will see the following RMAN error message:</p>
<pre>RMAN> backup full database;

Starting backup at 2012/02/07 07:19:35
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 02/07/2012 07:19:36
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode</pre>
<h2>Recovery From a Total Loss</h2>
<p>Even in NOARCHIVEMODE and without using a catalogue, it is possible to recover a database when the controlfiles are lost or unusable. However, this is only possible, according to the manual, from a controlfile autobackup. You also must have the database unique identifier (DBID) to hand as well as the configured format of the controlfile autobackup files.</p>
<p>In the following example, I made sure that I had a backup of the database, the DBID (which RMAN helpfully displays when you connect to the target at the RMAN> prompt) and my controlfile autobackup format is the default, so I didn&#8217;t have to worry about that.</p>
<p>I shut down the database and deleted all the files. That represents a total failure scenario. The database is running in NOARCHIVELOG by the way. Let&#8217;s recover it.</p>
<pre>RMAN> startup nomount

connected to target database (not started)
Oracle instance started
...</pre>
<p>The database cannot be mounted as we have no controlfiles. </p>
<pre>RMAN> set DBID=2799264292
executing command: SET DBID</pre>
<p>This allows RMAN to try and find the controlfile autobackup.</p>
<pre>RMAN> restore controlfile from autobackup;

Starting restore at 2012/02/07 08:21:39
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

recovery area destination: /srv/nffs/flashback_area/ant12
database name (or database unique name) used for search: ANT12
channel ORA_DISK_1: AUTOBACKUP /srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_07/o1_mf_s_774602851_7m1noocb_.bkp found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20120207
channel ORA_DISK_1: restoring control file from AUTOBACKUP /srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_07/o1_mf_s_774602851_7m1noocb_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/srv/nffs/oradata/ant12/ctrl/control01.ctl
output file name=/srv/nffs/flashback_area/ant12/ctrl/control02.ctl
output file name=/srv/nffs/oradata/ant12/ctrl/control03.ctl
Finished restore at 2012/02/07 08:21:40</pre>
<p>So far so good. I have my controlfiles back. As I was using the default autobackup format, I didn&#8217;t have to set the format, however, if I had changed the format at some point, I need to tell RMAN what it is. In that case, the above restore would look like the following:</p>
<pre>RMAN> set DBID=2799264292
executing command: SET DBID

RMAN> run {
2> set controlfile autobackup format for device type disk to 'your format here';
3> restore controlfile from autobackup;
4> } </pre>
<p>The end result would be, hopefully, the restoration of the latest controlfile backup.</p>
<p>The controlfiles are back, but I&#8217;m are still without the data files. </p>
<p><strong>Note</strong>: <em>any</em> time that you have to restore the controlfile as part of a restore means that you must open the database with the <code>resetlogs</code> option.</p>
<pre>RMAN alter database mount;
database mounted

RMAN> restore database;
Starting restore at 2012/02/07 08:40:20
Starting implicit crosscheck backup at 2012/02/07 08:40:20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 2012/02/07 08:40:21

Starting implicit crosscheck copy at 2012/02/07 08:40:21
using channel ORA_DISK_1
Crosschecked 17 objects
Finished implicit crosscheck copy at 2012/02/07 08:40:22

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: /srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_07/o1_mf_s_774602851_7m1noocb_.bkp

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /srv/nffs/oradata/ant12/data/system01.dbf
...
channel ORA_DISK_1: restoring datafile 00012 to /srv/nffs/oradata/ant12/data/xdb01.dbf
channel ORA_DISK_1: reading from backup piece /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_07/o1_mf_nnndf_TAG20120207T072806_7m1nn6rq_.bkp
channel ORA_DISK_1: piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_07/o1_mf_nnndf_TAG20120207T072806_7m1nn6rq_.bkp tag=TAG20120207T072806
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:03:38
Finished restore at 2012/02/07 08:44:03

RMAN> alter database open resetlogs;
database opened</pre>
<p>Now that&#8217;s what I call magic! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners – Part 3</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-3/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-3/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 16:49:00 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=632</guid>
		<description><![CDATA[At the end of Oracle RMAN for Beginners – Part 2 I had created a few backups of the ant12 database. In this part, I explore how to trash a database and recover from that trashing using the cold backups taken. Bear in mind that any work done after the cold backup was taken will [...]]]></description>
				<content:encoded><![CDATA[<p>At the end of <a title="Oracle RMAN for Beginners – Part 2" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-2/" target="_blank">Oracle RMAN for Beginners – Part 2</a> I had created a few backups of the ant12 database. In this part, I explore how to trash a database and recover from that trashing using the cold backups taken. <span id="more-632"></span></p>
<p>Bear in mind that any work done after the cold backup was taken will be lost. With a cold backup, you cannot roll forward to re-apply archived logs etc because when the backup was taken, the database was in a consistent state.</p>
<blockquote><p>Note: A cold backup, taken of a database running in archivelog mode may still require archived logs to be present to restore the backup. Document 337450.1 on My Oracle Support has the details. This affects databases running RMAN version 9.2.0.1 through 10.2.0.5. </p>
<p>This could explain why I&#8217;m not seeing it as I&#8217;m restoring an 11.2 RMAN backup.</p>
<p>Thanks to David Farkough (@Farkough) for this information.</p></blockquote>
<h2>Cold Recovery – Backupset Type</h2>
<p>In order to restore a database I first need a broken database. To see what files I need to destroy, I can use the RMAN command <code>report schema</code> as follows:</p>
<pre>RMAN&gt; report schema;

Report of database schema for database with db_unique_name ANT12

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    600      SYSTEM               ***     /srv/nffs/oradata/ant12/data/system01.dbf
2    500      SYSAUX               ***     /srv/nffs/oradata/ant12/data/sysaux01.dbf
3    512      UNDOTBS1             ***     /srv/nffs/oradata/ant12/data/undotbs01.dbf
4    700      PERFSTAT             ***     /srv/nffs/oradata/ant12/data/perfstat01_01.dbf
5    10       TOOLS                ***     /srv/nffs/oradata/ant12/data/tools01.dbf
6    10       USERS                ***     /srv/nffs/oradata/ant12/data/users01.dbf
7    300      AUDIT01              ***     /srv/nffs/oradata/ant12/data/audit01_01.dbf
8    1024     NLWLDELFTFEWSDAT01   ***     /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSMCDat01_01.dbf
9    350      NLWLDELFTFEWSIDX01   ***     /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSMCIdx01_01.dbf
10   3224     NLWLDELFTFEWSLOB01   ***     /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
11   128      UTILITY01            ***     /srv/nffs/oradata/ant12/data/utility01_01.dbf
12   500      XDB                  ***     /srv/nffs/oradata/ant12/data/xdb01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    200      TEMP                 200         /srv/nffs/oradata/ant12/data/temp01.dbf</pre>
<p>I shall start simple, and destroy the TOOLS tablespace by deleting the file.</p>
<pre>RMAN&gt; shutdown;
database dismounted
Oracle instance shut down

RMAN&gt; host "mv /srv/nffs/oradata/ant12/data/tools01.dbf /srv/nffs/oradata/ant12/data/tools01.dbf.old";
host command complete</pre>
<pre>RMAN&gt; startup
connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 16:14:41
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/srv/nffs/oradata/ant12/data/tools01.dbf'</pre>
<p>You will note that the database didn&#8217;t open, but is stuck in a MOUNTed state. This is required to carry out a recovery. Lets restore the cold backup.</p>
<pre>RMAN&gt; connect target /
connected to target database: ANT12 (DBID=2799264292, not open)

RMAN&gt; restore database;

Starting restore at 2012/02/06 16:15:49
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
...
skipping datafile 1; already restored to file /srv/nffs/oradata/ant12/data/system01.dbf
skipping datafile 2; already restored to file /srv/nffs/oradata/ant12/data/sysaux01.dbf
skipping datafile 3; already restored to file /srv/nffs/oradata/ant12/data/undotbs01.dbf
skipping datafile 4; already restored to file /srv/nffs/oradata/ant12/data/perfstat01_01.dbf
skipping datafile 6; already restored to file /srv/nffs/oradata/ant12/data/users01.dbf
skipping datafile 7; already restored to file /srv/nffs/oradata/ant12/data/audit01_01.dbf
skipping datafile 8; already restored to file /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSMCDat01_01.dbf
skipping datafile 9; already restored to file /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSMCIdx01_01.dbf
skipping datafile 10; already restored to file /srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
skipping datafile 11; already restored to file /srv/nffs/oradata/ant12/data/utility01_01.dbf
skipping datafile 12; already restored to file /srv/nffs/oradata/ant12/data/xdb01.dbf
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to /srv/nffs/oradata/ant12/data/tools01.dbf
channel ORA_DISK_1: reading from backup piece /media/oracle_backups/ant12/backupset_4.rman
channel ORA_DISK_1: piece handle=/media/oracle_backups/ant12/backupset_4.rman tag=TAG20120206T154606
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 2012/02/06 16:16:00

RMAN&gt; alter database open;
database opened</pre>
<p>How easy was that then?</p>
<p>What happens if I&#8217;ve lost the SYSTEM tablespace then? Let&#8217;s see:</p>
<pre>RMAN&gt; shutdown

database closed
database dismounted
Oracle instance shut down

RMAN&gt; host "mv /srv/nffs/oradata/ant12/data/system01.dbf /srv/nffs/oradata/ant12/data/system01.dbf.old";
host command complete

RMAN&gt; startup

connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 16:20:45
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/srv/nffs/oradata/ant12/data/system01.dbf'</pre>
<p>As before, we have &#8220;lost&#8221; a data file, this time making up the SYSTEM tablespace. Can we recover from this? Of course!</p>
<pre>RMAN&gt; restore database;

Starting restore at 2012/02/06 16:39:43
using channel ORA_DISK_1

skipping datafile 2; already restored to file /srv/nffs/oradata/ant12/data/sysaux01.dbf
...
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /srv/nffs/oradata/ant12/data/system01.dbf
channel ORA_DISK_1: reading from backup piece /media/oracle_backups/ant12/backupset_3.rman
channel ORA_DISK_1: piece handle=/media/oracle_backups/ant12/backupset_3.rman tag=TAG20120206T153851
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:36
Finished restore at 2012/02/06 16:42:20</pre>
<p>And now I can open up the database again for use, or can I?</p>
<pre>RMAN alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 16:43:49
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/srv/nffs/oradata/ant12/data/system01.dbf'</pre>
<p>It appears not! Even though I&#8217;ve recovered the SYSTEM tablespace file(s) I still have potential updates etc in the online redo logs. A quick <code>recover database</code> command should resolve any issues:</p>
<pre>RMAN&gt; recover database;

Starting recover at 2012/02/06 16:45:29
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:02

Finished recover at 2012/02/06 16:45:32</pre>
<p>Now, I should be able to open up the database:</p>
<pre>RMAN&gt; alter database open;
database opened</pre>
<p>Job done. All recovered and usable.</p>
<p>It is not possible to recover a single data file, or tablespace, from a cold backup if the database has been updated in any way since the cold backup was taken <em>unless</em> the database is running in archivelog mode.</p>
<p>If the database is in NOARCHIVELOG mode, then all you can do is restore the complete database. The <a title="Oracle RMAN for Beginners – Part 4" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-4/" target="_blank">next part</a> gives a demonstration of this in action.</p>
<p>In ARCHIVELOG mode, RMAN will notice if any of the files have been updated, as shown in the following example where changes have been made to the database since the cold backup and &#8220;suddenly&#8221; a data file goes missing.</p>
<p>In this example, the user <em>norman</em> created a new table named <em>test</em> and added a single row to it. Then the file making up the users tablespace was renamed.</p>
<pre>RMAN&gt; startup;

connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 02/06/2012 20:26:48
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01110: data file 6: '/srv/nffs/oradata/ant12/data/users01.dbf'</pre>
<p>As we are running in archivelog mode, we can recover only the users tablespace from the cold backup, and using the archive logs, recover the transactions.</p>
<pre>RMAN&gt; restore tablespace users;

Starting restore at 2012/02/06 20:28:40
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
...
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to /srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: reading from backup piece /media/oracle_backups/ant12/backupset_4.rman
channel ORA_DISK_1: piece handle=/media/oracle_backups/ant12/backupset_4.rman tag=TAG20120206T154606
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 2012/02/06 20:28:49

RMAN&gt; recover tablespace users;

Starting recover at 2012/02/06 20:29:16
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 2012/02/06 20:29:16

RMAN&gt; alter database open;
database opened</pre>
<p>That saves time as all we had to do was recover a single tablespace, which in this case consists of only one data file, and then reapply the committed transactions from the archivelogs which, handily, were still online. Had they not been online, RMAN would have found them in a backup and used those to recover the database.</p>
<p>This, of course, relies on a complete set of archived logs being found either online or in a backup. If any are missing, the database cannot be recovered fully.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners &#8211; Part 2</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-2/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-2/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 16:02:33 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=619</guid>
		<description><![CDATA[At the end of Oracle RMAN for Beginners &#8211; Part 1 I was ready to begin a backup of the ant12 database. Read on &#8230; Cold Backup &#8211; Backupset Type There are two different types of cold backup. The first uses RMAN&#8217;s own internal format for the dump files &#8211; a backupset &#8211; the other [...]]]></description>
				<content:encoded><![CDATA[<p>At the end of <a title="Oracle RMAN for Beginners – Part 1" href="http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-1/" target="_blank">Oracle RMAN for Beginners &#8211; Part 1</a> I was ready to begin a backup of the ant12 database. Read on &#8230; <span id="more-619"></span></p>
<h2>Cold Backup &#8211; Backupset Type</h2>
<p>There are two different types of cold backup. The first uses RMAN&#8217;s own internal format for the dump files &#8211; a <em>backupset</em> &#8211; the other uses <em>image copies</em> of the individual database files. In this part I&#8217;ll concentrate on a backuset type of cold backup. I&#8217;ll look at image copies later.</p>
<p>A cold backup is always a <em>full</em> backup. To take a cold backup the database needs to be MOUNTed. This is slightly different from a normal cold backup using the OS tools to copy files, as the database should be SHUTDOWN in that case.</p>
<p>A cold backup is all that you can do when the database is running in NOARCHIVELOG mode, however, you can take a cold backup of a database running in ARCHIVELOG mode using the commands shown below.</p>
<pre>RMAN> connect target /
connected to target database: ANT12 (DBID=2799264292)

RMAN> shutdown;
database dismounted
Oracle instance shut down

RMAN> startup mount;
connected to target database (not started)
Oracle instance started
database mounted
...</pre>
<p>The following command creates a new backupset in the FRA. The files will be written to the FRA in a directory named <em>backupset/SID</em>.</p>
<pre>RMAN> backup full database;

Starting backup at 2012/02/06 09:58:40
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
...
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/06 09:58:41
channel ORA_DISK_1: finished piece 1 at 2012/02/06 09:59:16
piece handle=/srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T095841_7lz92krk_.bkp tag=TAG20120206T095841 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 2012/02/06 09:59:16

Starting Control File and SPFILE Autobackup at 2012/02/06 09:59:16
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_06/o1_mf_s_774524380_7lz93qbg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/06 09:59:23</pre>
<p>And that&#8217;s all there is to it. The backup file(s) will be created in the FRA as detailed above by various <em>piece handle</em> messages. You can see the backup details using the <code>list backup</code> command:</p>
<pre>RMAN> list backup;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
6       Full    365.34M    DISK        00:00:35     2012/02/06 09:59:16
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20120206T095841
        Piece Name: /srv/nffs/flashback_area/ant12/ANT12/backupset/2012_02_06/o1_mf_nnndf_TAG20120206T095841_7lz92krk_.bkp
  List of Datafiles in backup set 6
  File LV Type Ckp SCN    Ckp Time            Name
  ---- -- ---- ---------- ------------------- ----
  1       Full 847342     2012/02/06 09:39:40 /srv/nffs/oradata/ant12/data/system01.dbf
...
  12      Full 847342     2012/02/06 09:39:40 /srv/nffs/oradata/ant12/data/xdb01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
------- ---- -- ---------- ----------- ------------ -------------------
7       Full    9.70M      DISK        00:00:03     2012/02/06 09:59:20
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20120206T095916
        Piece Name: /srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_06/o1_mf_s_774524380_7lz93qbg_.bkp
  SPFILE Included: Modification time: 2012/02/06 09:40:06
  SPFILE db_unique_name: ANT12
  Control File Included: Ckp SCN: 847342       Ckp time: 2012/02/06 09:39:40</pre>
<p>The backup will be created in <em>DB_RECOVERY_DEST</em>/SID/backupset. A separate backup took place to copy the controlfile and spfile so that details of this current backup remain safe. </p>
<p><strong>Note</strong> in most cases the SID will be used to determine the output directory in the FRA as specified by the database parameter DB_RECOVERY_DEST. However it is not ORACLE_SID that is actually used but the DB_UNIQUE_NAME initialisation parameter. I used SID as it&#8217;s easier to type!</p>
<p>It is possible to avoid backing up to the FRA by specifying a <code>FORMAT</code> parameter:</p>
<pre>RMAN> backup format='/media/oracle_backups/ant12/ant12_backupset.rman' full database;

Starting backup at 2012/02/06 12:30:20
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/srv/nffs/oradata/ant12/data/NLWLDELFTFEWSModDat01_01.dbf
...
input datafile file number=00006 name=/srv/nffs/oradata/ant12/data/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2012/02/06 12:30:20
channel ORA_DISK_1: finished piece 1 at 2012/02/06 12:31:45
piece handle=/media/oracle_backups/ant12/ant12_backupset.rman tag=TAG20120206T123020 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 2012/02/06 12:31:45

Starting Control File and SPFILE Autobackup at 2012/02/06 12:31:46
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_06/o1_mf_s_774524380_7lzl1lcg_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/06 12:31:47</pre>
<p>Unfortunately, if you look carefully at the last few lines of output, the controlfile and spfile<br />
autobackup have <em>still</em> gone to the FRA and not to the desired location. What to do?</p>
<p>You can temporarily turn off the controlfile autobackup, run a database backup followed by a manual controlfile (and spfile) backup and then turn controlfile autobackup back on, as follows. You don&#8217;t have to use a <code>run {}</code> block as RMAN will happily accept all the commands separately. (This is not always the case!)</p>
<pre>RMAN> run {
2> configure controlfile autobackup off;
3> backup format = '/media/oracle_backups/ant12/backupset_4.rman' full database;
4> backup format = '/media/oracle_backups/ant12/cf_backup_manual.f' current controlfile;
5> configure controlfile autobackup on;
}
 
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored

Starting backup at 2012/02/06 15:46:06
using channel ORA_DISK_1
...
piece handle=/media/oracle_backups/ant12/backupset_4.rman tag=TAG20120206T154606 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 2012/02/06 15:46:32

Starting backup at 2012/02/06 15:46:32
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 2012/02/06 15:46:33
channel ORA_DISK_1: finished piece 1 at 2012/02/06 15:46:40
piece handle=/media/oracle_backups/ant12/cf_backup_manual.f tag=TAG20120206T154632 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 2012/02/06 15:46:40

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored</pre>
<p>There has to be an easier way to do this doesn&#8217;t there? What about when you don&#8217;t know for sure that the configuration parameter is on or off? I&#8217;m sure there&#8217;s a way, and if there is, I&#8217;ll find it.</p>
<p><strong>UPDATE</strong> there is a way. Simply use the <code>set</code> command instead of <code>configure</code>. For example, the above should be replaced by:</p>
<pre>RMAN> run {
2> set controlfile autobackup off;
3> backup format = '/media/oracle_backups/ant12/backupset_4.rman' full database;
4> backup format = '/media/oracle_backups/ant12/cf_backup_manual.f' current controlfile;
}</pre>
<p>The <code>set</code> remains in force until the end of the session, or, as in this case, until the end of the <code>run</code> block.</p>
<p>Anyway, you now have a cold backup of the database and a safety copy of the controlfile. Unfortunately, perhaps, the backup of the controlfile didn&#8217;t take a backup of the spfile. To do that you need to add in a separate manual copy of the spfile similar to the following:</p>
<pre>RMAN> backup format = '/media/oracle_backups/ant12/sp_backup_manual.f' spfile;

Starting backup at 2012/02/06 15:58:31
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 2012/02/06 15:58:31
channel ORA_DISK_1: finished piece 1 at 2012/02/06 15:58:32
piece handle=/media/oracle_backups/ant12/sp_backup_manual.f tag=TAG20120206T155831 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2012/02/06 15:58:32

Starting Control File and SPFILE Autobackup at 2012/02/06 15:58:33
piece handle=/srv/nffs/flashback_area/ant12/ANT12/autobackup/2012_02_06/o1_mf_s_774524380_7lzy59go_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2012/02/06 15:58:34</pre>
<p>Did you notice? The backup of the spfile includes a backup of the controlfile. Is nothing consistent with RMAN? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Coming soon, restoring and recovering a database from a cold backup.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle RMAN for Beginners &#8211; Part 1</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-1/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-1/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 15:09:58 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=606</guid>
		<description><![CDATA[Introduction One of the things a DBA needs to be aware of, is RMAN. This has been around since Oracle 8 (or was it 8i?) and has been improving since then. It&#8217;s almost pretty good at 11.2! One of the things that I, as a DBA, need to get to grips with is RMAN. Most [...]]]></description>
				<content:encoded><![CDATA[<h2>Introduction</h2>
<p>One of the things a DBA needs to be aware of, is RMAN. This has been around since Oracle 8 (or was it 8i?) and has been improving since then. It&#8217;s almost pretty good at 11.2!</p>
<p>One of the things that I, as a DBA, need to get to grips with is RMAN. Most of the work I&#8217;ve been doing for the last few years have not involved very much in the way of RMAN usage. It&#8217;s time I put an end to my almost complete ignorance.</p>
<p>I have set myself up a small test system where I can do my own RMAN training. I&#8217;ll be writing up my results and findings as I go along. Feel free to correct me where I get things wrong &#8211; which I no doubt will! <span id="more-606"></span></p>
<h2>Sensible Prerequisites</h2>
<p>I have found a few sensible prerequisites to using RMAN. For best results, set your environment up in a similar manner.</p>
<p>I&#8217;ll be using a database named <em>ant12</em> running on a server named <em>hubble</em>.</p>
<p>The first irritation I have with RMAN is it&#8217;s use of dates. They are never expanded to how I like them to be. So run the following command in a shell session:</p>
<pre>hubble> export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'</pre>
<p>Next up, we have the problem that on some Linux/Unix systems the rman command is actually in two places, one in ORACLE_HOME, the other under the X11 installation. Usually, X11 is higher up the PATH than ORACLE_HOME, so we need to be sure we are using the right one.</p>
<pre>hubble> alias rman='$ORACLE_HOME/bin/rman'</pre>
<p>Using single quotes in the command allows the evaluation of ORACLE_HOME to be carried out at run time &#8211; when the <code>rman</code> command is called &#8211; not at define time. That way, whatever ORACLE_HOME is current at the time of running RMAN will be the correct one for the database.</p>
<p>Now we need to make sure that we have set the Oracle environment for the database to be backed up.</p>
<pre># I'll be using a database called ant12.
hubble> . oraenv
ORACLE_SID = [ant12] ? ant12
The Oracle base remains unchanged with value /srv/oracle </pre>
<p>Oracle advise that the database should be using a FLASH RECOVERY AREA (FRA), so let&#8217;s set the database up to use one:</p>
<pre>hubble> sqlplus / as sysdba

SQL> -- Commands must be typed in the following order ....
SQL> alter system set log_archive_duplex_dest='';
System altered.

SQL> alter system set log_archive_dest='';
System altered.

SQL> alter system set db_recovery_size=19G;
System altered.

SQL> alter system 
set db_recovery_dest='/srv/nffs/flashback_area/ant12';
System altered.</pre>
<p>There is a reason for not having the archived logs stored within the FRA, it becomes a single point of failure. However, there are a few reasons for doing so, the main one being that you have all files necessary for a recovery in the same place.</p>
<p>If you are using the FRA for archived logs, it is probably a good idea to be mirroring the FRA.</p>
<p>For my test system, I <em>am</em> putting the archived logs into the FRA.</p>
<pre>
SQL> alter system set
log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';
System altered.

SQL> alter system set log_archive_dest_state_1=enable;
System altered.</pre>
<h2>Check and Amend Configuration</h2>
<p>RMAN comes configured with reasonably sensible defaults. However, they are not as desired for my use, so the first thing to do is look at the default settings, and change them.</p>
<pre># Run the correct version of RMAN for the database
#the display the current default settings:
hubble> rman target /

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ANT12 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/srv/oracle/product/11gR1/db/dbs/snapcf_ant12.f'; # default</pre>
<p>We are advised, by Oracle, that we should configure RMAN to always backup the control file (which includes the spfile &#8211; if one is in use) if we are not using an RMAN catalogue. This is because without a catalogue we store details of backups in the control file, so we don&#8217;t want to lose those.</p>
<p>We will also configure RMAN to prevent the copying of virgin blocks. These are blocks in data files which have <em>never</em> been used at all. (Being used and then emptied means a block is no longer virgin.) This can help to reduce backup times.</p>
<p>We will do all of them in one go, using a <code>run {}</code> block.</p>
<pre>RMAN> run {
2> configure controlfile autobackup on;
3> configure backup optimization on;
4> }

new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored</pre>
<p>We are ready to backup the ant12 database to the FRA.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/02/oracle-rman-for-beginners-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Docbook &#8211; Creating Indexes</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/docbook-creating-indexes/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/docbook-creating-indexes/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 20:10:24 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Docbook]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=601</guid>
		<description><![CDATA[I&#8217;ve been doing a bit of Docbook work recently &#8211; converting a paper based manual into a Docbook one that can then be used to generate all kinds of different output from the same input file. Very useful. I needed to create an index that correctly reflected the contents of the new format rather than [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been doing a bit of Docbook work recently &#8211; converting a paper based manual into a Docbook one that can then be used to generate all kinds of different output from the same input file. Very useful.</p>
<p>I needed to create an index that correctly reflected the contents of the new format rather than simply copying the old one &#8211; where the pages would no longer have matched up.</p>
<p>I found a couple of good articles, namely:</p>
<p><a title="http://www.xml.com/pub/a/2004/07/14/dbndx.html" href="http://www.xml.com/pub/a/2004/07/14/dbndx.html" target="_blank">http://www.xml.com/pub/a/2004/07/14/dbndx.html</a></p>
<p>and, of course, this one:</p>
<p><a title="http://www.sagehill.net/docbookxsl/GenerateIndex.html" href="http://www.sagehill.net/docbookxsl/GenerateIndex.html" target="_blank">http://www.sagehill.net/docbookxsl/GenerateIndex.html</a></p>
<p><strong>UPDATE</strong>: Of all the people you would expect to get it right, Bob Stayton is the one. Except he got it wrong. In the link above to <a title="www.sagehill.net" href="http://www.sagehill.net" target="_blank">www.sagehill.net</a>, there is an example thus:</p>
<pre>&lt;indexterm <strong>class="startofrange" id="makestuff"</strong>&gt;
 &lt;primary&gt;Makefiles&lt;/primary&gt;
&lt;/indexterm&gt;
 ... <em>
</em>&lt;indexterm <strong>class="endofrange" startref="makestuff"</strong>&gt;
 &lt;primary&gt;Makefiles&lt;/primary&gt;
&lt;/indexterm&gt;</pre>
<p>It should be as follows <em>without</em> the on the end of page range indexterm. If you do it with a primary, you get the page range as expected, but with the final page duplicated, as in:</p>
<pre>Subject matter 123-127, 127</pre>
<p>Remove the primary and it just works.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/docbook-creating-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raspberry Pi Goes Into Manufacturing &#8211; Yippee!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/raspberry-pi-goes-into-manufacturing-yippee/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/raspberry-pi-goes-into-manufacturing-yippee/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 07:38:29 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Gadgets & Gizmos]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=596</guid>
		<description><![CDATA[It&#8217;s finally coming! Raspberry Pi has now officially started manufacture of the first production boards. See http://www.raspberrypi.org/archives/509 for details. Sadly, you can also see there why the tax situation in the UK (or possibly because of the EU) is preventing the charity from manufacturing these boards in the UK. And, equally sadly, it may also [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s finally coming! Raspberry Pi has now officially started manufacture of the first production boards. See <a href="http://www.raspberrypi.org/archives/509" title="http://www.raspberrypi.org/archives/509" target="_blank">http://www.raspberrypi.org/archives/509</a> for details.</p>
<p>Sadly, you can also see there why the tax situation in the UK (or possibly because of the EU) is preventing the charity from manufacturing these boards in the UK.</p>
<p>And, equally sadly, it may also be true that certain UK manufacturers don&#8217;t seem to want the extra work either.</p>
<p>How sad are we in the UK?</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/raspberry-pi-goes-into-manufacturing-yippee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Do I Have To Suffer Your Children?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/why-do-i-have-to-suffer-your-children/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/why-do-i-have-to-suffer-your-children/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 15:19:53 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=591</guid>
		<description><![CDATA[I&#8217;m trapped on a plane for four and a bit hours and your bloody child has been screaming it&#8217;s head off for most of the way. There&#8217;s little chance of me being able to sleep at all on this flight but somehow that&#8217;s ok with you because &#8220;she&#8217;s only 18 months old.&#8221; Do you think [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m trapped on a plane for four and a bit hours and your bloody child has been screaming it&#8217;s head off for most of the way. <span id="more-591"></span></p>
<p>There&#8217;s little chance of me being able to sleep at all on this flight but somehow that&#8217;s ok with you because &#8220;she&#8217;s only 18 months old.&#8221;</p>
<p>Do you think that I, and the other passengers around you, think that that is an acceptable reason for suffering 4 and a bit hours of continual screaming? The answer, if you give a toss, is a resounding &#8220;NO IT FUCKING ISN&#8217;T!&#8221;</p>
<p>If I make a noise around your bloody child, you will tell me to &#8220;be quiet or I will wake the baby&#8221;, so what makes you think that it&#8217;s perfectly ok the other way around?</p>
<p>Don&#8217;t even think of telling me that she&#8217;s too young to know better. If that&#8217;s the case, she&#8217;s too bloody young to be keeping every passenger aboard this Boeing 737-800 awake &#8211; put the damned child in the bloody kennels next time you want a holiday you selfish and inconsiderate pair of idiots!</p>
<p>(Can you tell I&#8217;m seriously pissed off?)</p>
<p>Cheers.</p>
<p>PS. It&#8217;s 22:05 on new year&#8217;s eve 2011 and I need to get some sleep before the drive home from Manchester airport and your fucking child is getting right on my tits. Shut it the fuck up NOW!</p>
<p>PPS. This post written on my Galaxy Tab while airbourne &#8220;somewhere over Europe&#8221;. Obviously I can&#8217;t post it from a plane, so you&#8217;ll get to see it some time after we have landed.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2012/01/why-do-i-have-to-suffer-your-children/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slightly Weird Oracle Stuff</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/slightly-weird-oracle-stuff/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/slightly-weird-oracle-stuff/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 09:40:11 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=578</guid>
		<description><![CDATA[I knew you could do this: SQL> select 1234567890 as abc from dual; ABC ---------- 1234567890 or SQL> select 1234567890 abc from dual; ABC ---------- 1234567890 But I didn&#8217;t know that this worked as well: SQL> select 1234567890abc from dual; ABC ---------- 1234567890 So I did a bit of playing and discovered that there is [...]]]></description>
				<content:encoded><![CDATA[<p>I knew you could do this: <span id="more-578"></span></p>
<pre>SQL> select 1234567890 as abc from dual;

       ABC
----------
1234567890
</pre>
<p>or</p>
<pre>SQL> select 1234567890 abc from dual;

       ABC
----------
1234567890</pre>
<p>But I didn&#8217;t know that this worked as well:</p>
<pre>SQL> select 1234567890abc from dual;

       ABC
----------
1234567890</pre>
<p>So I did a bit of playing and discovered that there is a difference if the alias is D or F but no other single character:</p>
<pre>SQL> select 1234567890d, 1234567890f, 1234567890p from dual;

1234567890D 1234567890F          P
----------- ----------- ----------
 1.235E+009  1.235E+009 1234567890</pre>
<p>This shows the values in Scientific notation when D or F is used as an alias in this manner, but not if used in this manner:</p>
<pre>SQL> select 1234567890 d, 1234567890 f, 1234567890 p from dual

         D          F          P
---------- ---------- ----------
1234567890 1234567890 1234567890</pre>
<p>Then it gets stranger:</p>
<pre>SQL> select 1234567890df from dual;

         F
----------
1.235E+009


SQL> select 1234567890fd from dual

         D
----------
1.235E+009


SQL> select 1234567890fa from dual

         A
----------
1.235E+009</pre>
<p>I get the impression that a trailing F or D on a number means &#8220;display as floating point or decimal&#8221; then the F/D is dropped and the A used as a label. I can&#8217;t find this in the docs though.</p>
<p>Works with strings as well but the F/D thing doesn&#8217;t appear with strings. Doesn&#8217;t work &#8211; for obvious reasons &#8211; with column names.</p>
<p>UPDATE: Thanks to Maxim on the Oracle-L list, the answer is <a href="http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements003.htm#sthref357" title="http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements003.htm#sthref357" target="_blank">here</a> </p>
<p>UPDATE 2: Thanks to Jonathan Lewis also on the Oracle-L list, it seems that Tanel Poder has also come across this. On his blog <a href="http://blog.tanelpoder.com/2011/01/10/is-this-valid-sql-syntax/" title="http://blog.tanelpoder.com/2011/01/10/is-this-valid-sql-syntax/" target="_blank">here</a>.</p>
<p>Cheers,</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/slightly-weird-oracle-stuff/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Green Thing</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/the-green-thing/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/the-green-thing/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 15:58:30 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=568</guid>
		<description><![CDATA[This is doing the rounds on email at the moment, but it made me laugh. Grumpy old sod that I am! Checking out at the store, the young cashier suggested to the older woman that she should bring her own grocery bags because plastic bags weren&#8217;t good for the environment. The woman apologised and explained, [...]]]></description>
				<content:encoded><![CDATA[<p>This is doing the rounds on email at the moment, but it made me laugh. Grumpy old sod that I am! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><em>Checking  out at the store, the young cashier suggested to the older woman that she  should bring her own grocery bags because plastic bags weren&#8217;t good for  the environment. The woman apologised and explained, &#8220;We didn&#8217;t  have this green thing back in my earlier days.&#8221; <span id="more-568"></span></p>
<p>The clerk  responded, &#8220;That&#8217;s our problem today. Your generation did not care enough  to save our environment for future generations.&#8221; She was right &#8212;  our generation didn&#8217;t have the green thing in its day.</p>
<p>Back then,  we returned milk bottles, soda bottles and beer bottles to the store. The  store sent them back to the plant to be washed and sterilised and  refilled, so it could use the same bottles over and over. So they really  were recycled. But we didn&#8217;t have the green thing back in our  day.</p>
<p>We walked up stairs, because we didn&#8217;t have an escalator in  every store and office building. We walked to the grocery store and didn&#8217;t  climb into a 300-horsepower machine every time we had to go two blocks.  But she was right. We didn&#8217;t have the green thing in our day.</p>
<p>Back  then, we washed the baby&#8217;s nappies [diapers] because we didn&#8217;t have the throw-away  kind. We dried clothes on a line, not in an energy gobbling machine  burning up 3000 Watts every hour &#8212; wind and solar power really did dry our clothes  back in our early days. Kids got hand-me-down clothes from their brothers  or sisters, not always brand-new clothing. But that young lady is right.  We didn&#8217;t have the green thing back in our day.</p>
<p>Back then, we had  one TV, or radio, in the house &#8212; not a TV in every room. And the TV had a  small screen the size of a handkerchief (remember them?), not a screen the  size of the state of Montana<sup>***</sup> . In the kitchen, we blended and stirred by  hand because we didn&#8217;t have electric machines to do everything for us. When we packaged a fragile item to send in the mail, we used wadded up old  newspapers to cushion it, not Polystyrene [Styrofoam] or plastic bubble wrap.  Back then,  we didn&#8217;t fire up an engine and burn gasoline just to cut the lawn. We  used a push mower that ran on human power. We exercised by working so we  didn&#8217;t need to go to a health club to run on treadmills that operate on  electricity. But she&#8217;s right.  We didn&#8217;t have the green thing back  then.</p>
<p>We drank from a fountain when we were thirsty instead of  using a cup or a plastic bottle every time we had a drink of water. We  refilled writing pens with ink instead of buying a new pen, and we  replaced the razor blades in a razor instead of throwing away the whole razor just because the blade got dull. But we didn&#8217;t have the green thing back then.</p>
<p>Back then, people took the tram [streetcar] or a bus, and kids  rode their bikes to school or walked instead of turning their parents into a  24-hour taxi service. We had one electrical outlet in a room, not an  entire bank of sockets to power a dozen appliances. And we didn&#8217;t need a  computerised gadget to receive a signal beamed from satellites 2,000 miles  out in space in order to find the nearest pizza joint.</p>
<p>But isn&#8217;t it  sad the current generation laments how wasteful we old folks were just because we didn&#8217;t have the green thing back then?</p>
<p>Please forward  this on to another selfish old person who needs a lesson in conservation from a smart-ass young person.</p>
<p>Remember:  Don&#8217;t make old people mad. We don&#8217;t  like being old in the first place, so it doesn&#8217;t take much to make us cross.</em></p>
<p>*** Yes, I know, TVs today use far less power than the old CRT versions of yesteryear &#8211; but this is humour ok? And why let facts get in the way> <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/the-green-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air Applications Can&#8217;t Find Passwords etc?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/adobe-air-applications-cant-find-passwords-etc/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/adobe-air-applications-cant-find-passwords-etc/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 15:56:42 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=564</guid>
		<description><![CDATA[TweetDeck for Linux, for example. Refused to start on me recently because it couldn&#8217;t find or access the location where I had saved my encrypted details. The problem is caused by Adobe Air not being able to find a running daemon for Gnome Keyring or KWallet, or a corrupted wallet database. Full details here http://kb2.adobe.com/cps/492/cpsid_49267.html [...]]]></description>
				<content:encoded><![CDATA[<p>TweetDeck for Linux, for example. Refused to start on me recently because it couldn&#8217;t find or access the location where I had saved my encrypted details. The problem is caused by Adobe Air not being able to find a running daemon for Gnome Keyring or KWallet, or a corrupted wallet database. <span id="more-564"></span></p>
<p>Full details here <a href="http://kb2.adobe.com/cps/492/cpsid_49267.html" title="Adobe  Air Support" target="_blank">http://kb2.adobe.com/cps/492/cpsid_49267.html</a> &#8211; works for me!</p>
<p>In my case, simply restarting KWalletManager worked fine. And restarting TweetDeck of course &#8211; it&#8217;s unable to pick up the fact that the wallet is available.</p>
<p>Cheers,<br />
Norm.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/12/adobe-air-applications-cant-find-passwords-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deprecated Parameter Warning on Database Startup</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/deprecated-parameter-warning-on-database-startup/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/deprecated-parameter-warning-on-database-startup/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 10:34:49 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=553</guid>
		<description><![CDATA[You know the feeling, your 10g or 11g database displays a warning message about your use of deprecated parameters at startup, but it doesn&#8217;t say which parameters are deprecated? You could look through the manuals to find the list of all deprecated parameters then go hunting in your spfile/pfile for those and remove them, or, [...]]]></description>
				<content:encoded><![CDATA[<p>You know the feeling, your 10g or 11g database displays a warning message about your use of deprecated parameters at startup, but it doesn&#8217;t say which parameters are deprecated? <span id="more-553"></span></p>
<p>You could look through the manuals to find the list of all deprecated parameters then go hunting in your spfile/pfile for those and remove them, or, you could simply look in the <code>alert.log</code>.</p>
<pre>
...
Starting up ORACLE RDBMS Version: 10.2.0.4.
...
Deprecated system parameters with specified values:
  log_archive_start
End of deprecated system parameter listing
PMON started with pid=2, OS id=11541
...
</pre>
<p>There are a few more at 11g:</p>
<pre>
...
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 ...
...
Deprecated system parameters with specified values:
  log_archive_start
  hash_join_enabled
  max_enabled_roles
  background_dump_dest
  user_dump_dest
End of deprecated system parameter listing
PMON started with pid=2, OS id=5292
...
</pre>
<p>These databases were converted from 9.2.0.8 to 10g and 11g respectively. So, now you know what the deprecated parameters are, go fix them! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/deprecated-parameter-warning-on-database-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does Your Volume Control Freeze on KDE?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/does-your-volume-control-freeze-on-kde/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/does-your-volume-control-freeze-on-kde/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 14:34:54 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=546</guid>
		<description><![CDATA[I&#8217;ve been using KDE4 on OpenSuse (11.4 currently) for some time and never had any problems. After a recent patch fix to the system, the volume control buttons on my Dell Vostro stopped responding. Normally pressing volume up or volume down worked instantaneously. Stop and go still worked fine, but not volume. What would happen [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been using KDE4 on OpenSuse (11.4 currently) for some time and never had any problems. After a recent patch fix to the system, the volume control buttons on my Dell Vostro stopped responding. Normally pressing volume up or volume down worked instantaneously. Stop and go still worked fine, but not volume. <span id="more-546"></span></p>
<p>What would happen is that the on screen indicator would appear after about 45 seconds or so &#8211; but the volume wouldn&#8217;t change until it did, then, it would go to maximum or minimum &#8211; depending on which button I&#8217;d been hammering for 45 seconds! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>A similar thing would happen if I tried to use the Volume control applet in the task bar. Hmmm.</p>
<p>The solution is fairly simple:</p>
<ul>
<li>Stop the kmix process by right-clicking it in the task bar, and choosing the <em>quit</em> option.</li>
<li><code>cd ~/.kde4/share/apps<br />
rm -R kmix*</code></li>
<li>Restart Kmix by pressing ALT-F2 and typing <code>kmix</code> into the dialogue that appears. After a few seconds, you get your volume control icon back in the task bar and everything works fine.</li>
</ul>
<p>The problem appears to have been caused by a configuration change which left problems when old config was found in the assorted config files &#8211; but don&#8217;t quote me on that!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/does-your-volume-control-freeze-on-kde/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indoor Beekeeping? It Won&#8217;t Catch on!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/indoor-beekeeping-it-wont-catch-on/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/indoor-beekeeping-it-wont-catch-on/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 18:12:39 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=541</guid>
		<description><![CDATA[Check this link for details. I&#8217;m saying nothing! Except, maybe, I really can&#8217;t see it taking off. Well, ok then. How do you stop the queen laying in the honey comb? There doesn&#8217;t appear to be a queen excluder &#8211; so your honey will have all sorts of stuff in it! Larvae, eggs, etc. It [...]]]></description>
				<content:encoded><![CDATA[<p>Check <a href="http://www.newscientist.com/blogs/onepercent/2011/11/urban-beehive-lets-you-harvest.html" title="Indoor bee keeping?" target="_blank">this link</a> for details. I&#8217;m saying nothing!</p>
<p>Except, maybe, I really can&#8217;t see it taking off.</p>
<p>Well, ok then. How <em>do</em> you stop the queen laying in the honey comb? There doesn&#8217;t appear to be a queen excluder &#8211; so your honey will have all sorts of stuff in it! Larvae, eggs, etc. It really won&#8217;t work!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/indoor-beekeeping-it-wont-catch-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetBeans Complains That it Can&#8217;t Find Java.Lang in your Android Project.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/netbeans-complains-that-it-cant-find-java-lang-in-your-android-project/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/netbeans-complains-that-it-cant-find-java-lang-in-your-android-project/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 15:55:17 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NetBeans]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=530</guid>
		<description><![CDATA[Using NetBeans (version 7.0.1) to develop Android applications and for no apparent reason, a project that worked yesterday won&#8217;t run any more. It compiles without error but refuses to run &#8211; whether or not the emulator is running &#8211; and doesn&#8217;t produce an error. Hmmm.  In the source code for the main Java class (yes, [...]]]></description>
				<content:encoded><![CDATA[<p>Using NetBeans (version 7.0.1) to develop Android applications and for no apparent reason, a project that worked yesterday won&#8217;t run any more. It compiles without error but refuses to run &#8211; whether or not the emulator is running &#8211; and doesn&#8217;t produce an error. Hmmm.  <span id="more-530"></span>In the source code for the main Java class (yes, I said Java &#8211; anyone who knows me will be having a fit right now!) the very first line is flagged with a red (ok, pink!) dot. The line itself simply says:</p>
<p><code>package uk.co.dunbarit.myprojectname;</code></p>
<p>Rolling the mouse over the line pops up a helpful hint which states that the system <em>cannot find java.lang in classpath or bootclasspath</em>.</p>
<p>Now, as my work colleagues will tell you, I&#8217;m not a Java developer by any means. But this was working yesterday, so why not today?</p>
<p>Right-click the project name in the project tab, and select the option &#8211; near the bottom &#8211; to <em>rebuild broken project</em>. This pops up with a dialogue box upon which appears the message that I should &#8220;<em>update the project using SDK tools</em>&#8220;. Easy? What does that mean?</p>
<p>What it means is this. I have to:</p>
<ul>
<li>Close the project in NetBeans and open a terminal session.</li>
<li>Navigate to the Android SDK&#8217;s tools  directory. In there you&#8217;ll find the <code>android</code> utility.</li>
<li><code> ./android update project --name MyProjectName --path full_path_to_project</code></li>
</ul>
<p>Job done! Reopen the project in NetBeans and run it. Yippee! By the way, the <code>--path</code> parameter is set to the location where the <code>AndroidManifest.xml</code> file can be found.</p>
<p>It appears that the Android SDK updated itself thus rendering something that was legal as no longer legal. Nice one &#8211; thanks. I&#8217;m having enough trouble with Java without having silent updated bollox me as well! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/netbeans-complains-that-it-cant-find-java-lang-in-your-android-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can We Have 10g and 11g on the Same Server?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/can-we-have-10g-and-11g-on-the-same-server/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/can-we-have-10g-and-11g-on-the-same-server/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 15:42:04 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=527</guid>
		<description><![CDATA[If you install 10g and 11g on the same server, which one do you wish to supply the executables for &#8220;oraenv&#8221;? If you install 10g first and allow 11g to overwrite the files in /usr/local/bin when you run &#8220;root.sh&#8221; then when you eventually call oraenv to set a 10g environment, you get a warning that [...]]]></description>
				<content:encoded><![CDATA[<p>If you install 10g and 11g on the same server, which one do you wish to supply the executables for &#8220;oraenv&#8221;?</p>
<p>If you install 10g first and allow 11g to overwrite the files in /usr/local/bin when you run &#8220;root.sh&#8221; then when you eventually call oraenv to set a 10g environment, you get a warning that &#8220;$ORACLE_HOME/bin/orabase&#8221; cannot be found.</p>
<p>If you allow the 10g files to overwrite the 11g ones, you don&#8217;t set ORACLE_BASE. I wonder what problems that might cause?</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/can-we-have-10g-and-11g-on-the-same-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing &#8220;Rogue&#8221; Expensive Oracle Options After Upgrading to 10.2.0.x.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/removing-rogue-expensive-oracle-options-after-upgrading-to-10-2-0-x/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/removing-rogue-expensive-oracle-options-after-upgrading-to-10-2-0-x/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 15:37:26 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=523</guid>
		<description><![CDATA[Install 10.2.0.1 &#8211; the base release &#8211; of Oracle and deselect the various Enterprise Edition Options &#8211; these cost money and we don&#8217;t like that, especially if we don&#8217;t use them. Patching to 10.2.0.5 (in my installation &#8211; it could be different with previous versions) silently adds OLAP, Data Mining etc back into the mix. [...]]]></description>
				<content:encoded><![CDATA[<p>Install 10.2.0.1 &#8211; the base release &#8211; of Oracle and deselect the various Enterprise Edition Options &#8211; these cost money and we don&#8217;t like that, especially if we don&#8217;t use them.</p>
<p>Patching to 10.2.0.5 (in my installation &#8211; it could be different with previous versions) silently adds OLAP, Data Mining etc back into the mix. Not good &#8211; especially if/when Oracle decide to audit your licenses. You pay for what you <em>install</em> whether used or not.<span id="more-523"></span></p>
<p>So, to remedy the problem, do this:</p>
<p><code> cd $ORACLE_HOME/rdbms/lib<br />
make -f ins_rdbms.mk olap_off rat_off rac_off dm_off sdo_off ioracle</code></p>
<p>You may see an error telling you that SDO can&#8217;t be turned off. That&#8217;s fine, at least we tried! The various options are:</p>
<ul>
<li>olap_off = OLAP</li>
<li>rat_off = Real Application Testing</li>
<li>rac_off = Real Application Cluster</li>
<li>dm_off = Data Mining</li>
<li>sdo_off = Spatial</li>
</ul>
<p>There are others in the make file, but these are the ones I&#8217;m mostly interested in not having!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/11/removing-rogue-expensive-oracle-options-after-upgrading-to-10-2-0-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Norm&#8217;s Law of Computing</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/10/norms-law-of-computing/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/10/norms-law-of-computing/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 16:37:24 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[QDOSMSQ]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=521</guid>
		<description><![CDATA[Software efficiency halves every 18 months thus compensating for Moore&#8217;s Law. Cheers.]]></description>
				<content:encoded><![CDATA[<p>Software efficiency halves every 18 months thus compensating for <a title="Moore's Law (Wikipedia)" href="http://en.wikipedia.org/wiki/Moore%27s_law" target="_blank">Moore&#8217;s Law</a>.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/10/norms-law-of-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Day in London with Cary Millsap</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/09/a-day-in-london-with-cary-millsap/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/09/a-day-in-london-with-cary-millsap/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 14:41:34 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=515</guid>
		<description><![CDATA[Yesterday I had the pleasure of a day trip to London to attend the Mastering Oracle Trace Data session with Cary Millsap. The day got off to a great start as I arrived at the railway station in Leeds very early to find my train waiting for me at the platform. Excellent! I got on [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday I had the pleasure of a day trip to London to attend the Mastering Oracle Trace Data session with Cary Millsap. <span id="more-515"></span>The day got off to a great start as I arrived at the railway station in Leeds very early to find my train waiting for me at the platform. Excellent! I got on and 20 minutes before departure time, we headed on out of Leeds for London. WTF? The announcement that this was the 06:40 to London Kings Cross and <em>not</em> the 07:00 cleared things up a little.</p>
<p>Guess what? My ticket was only valid on the 07:00. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  However, I sought out the guard and she checked my ticket, her timetable and said that &#8220;as it&#8217;s only a difference of 6 minutes, don&#8217;t worry about it&#8221;. Result! Nice lady.</p>
<p>After arriving in London, finding the location for the session wasn&#8217;t too bad, well if you exclude the £4 per trip to do two stations on the Tube, which was absolutely jam packed. I had to let one train go past as there was simply no room on it for anyone else. Luckily the next one wasn&#8217;t as packed. (Well, just!)</p>
<p>The session itself was an exceedingly interesting day. Cary is an excellent speaker and made what could have been a pretty dry day, very interesting indeed. There were 16 of us in total including one Doug Burns &#8211; who I would have thought already knew all this stuff!</p>
<p>The lunchtime chicken and mash was just that, chicken and mash. With a spot of gravy and a slice of lemon thrown in for good measure. I decided to get my jacket and nip out for something else, and a little walk. The room was locked.</p>
<p>In the afternoon session we looked at lots of ways to use the tools that we would be taking home with us. These are the <a title="MR Tools" href="http://www.method-r.com/software/mrtools" target="_blank">MR Tools</a> and <a title="MR Trace" href="http://www.method-r.com/software/mrtrace" target="_blank">MR Trace</a> available from <a title="www.method-r.com" href="http://www.method-r.com" target="_blank">www.method-r.com</a> &#8211; they appear exceedingly useful indeed. I&#8217;m currently waiting to obtain my license so that I can get hold of them and start trying them out on a few trace files from my past.</p>
<p>Mr Trace won&#8217;t be much use to me though, it&#8217;s an add on for SQL Developer which I don&#8217;t use, being a <a title="That's me, down at the bottom, in a &quot;skirt&quot;" href="http://www.toadworld.com/Experts/tabid/442/Default.aspx" target="_blank">Toad man</a> myself. However, I have passed Method R&#8217;s details on to Quest&#8217;s product manager for a potential inclusion in a future version of Toad, so maybe one day!</p>
<p>I really think the course should have been over a couple of days rather than just one, as all too soon, we were all departing for home. But not before we had picked up our exclusive T shirts (not available in the shops!) and posed for a <a title="London, 8th September 2011, Mastering Oracle Trace data" href="http://twitter.com/#!/CaryMillsap/status/111947031127400449/photo/1/large" target="_blank">group photo</a>.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/09/a-day-in-london-with-cary-millsap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2011 Honey Harvest &#8211; Let it Begin!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/08/2011-honey-harvest-let-it-begin/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/08/2011-honey-harvest-let-it-begin/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 12:57:13 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=490</guid>
		<description><![CDATA[On Sunday past, I took 11 full &#38; capped super frames of lovely honey from the original hive, and checked the new hive. They are a bit behind and have not yet capped anything off. Hmmm, what are they up to I wonder? The original hive got another full set of super frames to draw [...]]]></description>
				<content:encoded><![CDATA[<p>On Sunday past, I took 11 full &amp; capped super frames of lovely honey from the original hive, and checked the new hive. They are a bit behind and have not yet capped anything off. Hmmm, what are they up to I wonder?</p>
<p>The original hive got another full set of super frames to draw out and fill up. Seeing as how it&#8217;s getting late on in the year, I&#8217;m not sure we&#8217;ll get much more, if anything off of them &#8211; but you never know.</p>
<p>The third hive (well, nucleus box) is going to Peter as soon as we can get the little b*ggers to stay inside so that I can block off the entrance and get them transported. They are up early every morning and they stay out much later that I do at night! Women! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/08/2011-honey-harvest-let-it-begin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jonathan Lewis Has A New Book Coming Soon &#8230;.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/07/jonathan-lewis-has-a-new-book-coming-soon/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/07/jonathan-lewis-has-a-new-book-coming-soon/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 09:26:18 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=485</guid>
		<description><![CDATA[Great news! (At least for us Oracle types anyway.) Jonathan Lewis has a new book coming out. The working title appears to be &#8220;A look at the internal mechanics of the important bits of Oracle for people who aren’t planning to become rocket scientists but who do want to do a little more than just [...]]]></description>
				<content:encoded><![CDATA[<p>Great news! (At least for us Oracle types anyway.)</p>
<p>Jonathan Lewis has a new book coming out. The working title appears to be &#8220;<em>A look at the internal mechanics of the important bits of Oracle for  people who aren’t planning to become rocket scientists but who do want  to do a little more than just push buttons in OEM</em>&#8221; but this will probably change by November when it is due to be published, all going well.</p>
<p>Just in time for Christmas!</p>
<p>Check out the details <a title="Jonathan's new book." href="http://jonathanlewis.wordpress.com/2011/06/17/author-author/" target="_blank">here.</a></p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/07/jonathan-lewis-has-a-new-book-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Page Intentionally Left Blank &#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/this-page-intentionally-left-blank/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/this-page-intentionally-left-blank/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 10:38:12 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=477</guid>
		<description><![CDATA[Except, it&#8217;s not! WTF is it all about? You open a report, or a book and see a page with no text on it except this page intentionally left blank. Except, because of that bit of text, it&#8217;s no longer blank is it? So why do they bother? Does the author/publisher think we readers are [...]]]></description>
				<content:encoded><![CDATA[<p>Except, it&#8217;s not! <span id="more-477"></span></p>
<p>WTF is it all about? You open a report, or a book and see a page with no text on it except <em>this page intentionally left blank</em>. Except, because of that bit of text, it&#8217;s no longer blank is it?</p>
<p>So why do they bother? Does the author/publisher think we readers are too stupid to realise that a page is blank without being told? Is it because they think we might assume that somehow, the printing process has mysteriously failed for that one page in particular and we may be missing some highly important information? Or what?</p>
<p>If they really must tell us that the page was never intended to have anything useful on it, surely <em>this page has no useful information on it</em> could be a better idea. Except, pedants like me, might assume that because of what it is telling us, that it <em>does</em> indeed contain useful information. </p>
<p>I give up. Just leave the blank pages as blanks and we&#8217;ll probably get the message that it has no content and is simply being used to ensure that the first page of the next section, part, chapter, whatever, starts on the generally accepted face of the page. It&#8217;s not rocket science!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/this-page-intentionally-left-blank/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wondering Why The Oracle Databases Won&#8217;t Start With A SLES Reboot?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/wondering-why-the-oracle-databases-wont-start-with-a-sles-reboot/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/wondering-why-the-oracle-databases-wont-start-with-a-sles-reboot/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 14:27:10 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=473</guid>
		<description><![CDATA[Me too. Took ages to hit the &#8220;duh&#8221; moment, then it became pretty obvious! The file /etc/init.d/oracle also known as rcoracle to root users can be used to do a number of things such as starting the databases, starting the (default LISTENER) listener, CRS etc but, as I eventually found out, you have to configure [...]]]></description>
				<content:encoded><![CDATA[<p>Me too. Took ages to hit the &#8220;duh&#8221; moment, then it became pretty obvious! <span id="more-473"></span> The file <code>/etc/init.d/oracle</code> also known as <code>rcoracle</code> to root users can be used to do a number of things such as starting the databases, starting the (default LISTENER) listener, CRS etc but, as I eventually found out, you have to configure it to do so!</p>
<p>The configuration file is <code>/etc/sysconfig/oracle</code>.</p>
<p>Most of the options are defaulted to off, except for the setting of kernel parameters (<code>SET_ORACLE_KERNEL_PARAMETERS="yes"</code>) which is very useful.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/wondering-why-the-oracle-databases-wont-start-with-a-sles-reboot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Extract Details From /etc/oratab on Linux</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/how-to-extract-details-from-etcoratab-on-linux/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/how-to-extract-details-from-etcoratab-on-linux/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 14:22:17 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=466</guid>
		<description><![CDATA[Ever wanted to parse /etc/oratab but ignore all the comments and blank lines? So did I. Here&#8217;s how &#8230; I can&#8217;t claim all the credit for this, it is based on something I was doing plus a bit of &#8220;stolen&#8221; code from SLES. OLDIFS=$IFS IFS=: grep -v '^\(#\&#124;$\)' /etc/oratab &#124;\ while read ORASID ORAHOME AUTOSTART [...]]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to parse <code>/etc/oratab</code> but ignore all the comments and blank lines? So did I. Here&#8217;s how &#8230; <span id="more-466"></span></p>
<p>I can&#8217;t claim all the credit for this, it is based on something I was doing plus a bit of &#8220;stolen&#8221; code from SLES.</p>
<pre>OLDIFS=$IFS
IFS=:
grep -v '^\(#\|$\)' /etc/oratab        |\
while read ORASID ORAHOME AUTOSTART
do
        ## Do what you like here with
        ##  $ORASID, $ORAHOME and $AUTOSTART ##
done
IFS=$OLDIFS</pre>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/how-to-extract-details-from-etcoratab-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does Your Windows Oracle Database Stay Down After A Server Reboot?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-windows-oracle-database-stay-down-after-a-server-reboot/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-windows-oracle-database-stay-down-after-a-server-reboot/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 09:41:44 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=442</guid>
		<description><![CDATA[After a server reboot, your (windows) database stays down, even though you have it set to come up automatically &#8211; why? The services have started, just not the database. The following is a clue: sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 21 07:29:08 2011 Copyright (c) 1982, 2006, Oracle. All [...]]]></description>
				<content:encoded><![CDATA[<p>After a server reboot, your (windows) database stays down, even though you have it set to come up automatically &#8211; why? <span id="more-442"></span> The services have started, just not the database.</p>
<p>The following is a clue:<br />
<code>sqlplus "/ as sysdba"</p>
<p>SQL*Plus: Release 10.2.0.3.0 - Production on Tue Jun 21 07:29:08 2011<br />
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.<br />
ERROR:<br />
ORA-01031: insufficient privileges</code></p>
<p>You now have two options to check, and both must be confirmed:</p>
<ul>
<li>Is the oracle user a member of the ora_dba group?</li>
<li>Is sqlnet.ora correctly configured?</li>
</ul>
<p>To check the first, proceed as follows (on the database server!):</p>
<ul>
<li>Start->Programs->Administrative Tools->Computer Management.</li>
<li>Double-click Local Users and Groups.</li>
<li>Double-click Groups.</li>
<li>Double-click ora_dba (on the right) if it exists. If it doesn&#8217;t, it should &#8211; so have it added.</li>
<li>The list of members of the ora_dba group should appear. Make sure that the oracle user is listed. If not, add it to the group.</li>
<li>If you made changes, logout of the oracle user and back in again, then continue.</li>
</ul>
<p>To correctly configure sqlnet.ora, make sure that the following line appears:<br />
<code>SQLNET.AUTHENTICATION_SERVICES=(NTS)</code></p>
<p>If it is not found, then the default is <code>(NONE)</code> which requires a username and password always be supplied when connecting as <code>sysdba</code> or <code>sysoper</code>. </p>
<p>If it is set to anything else, other than <code>(ALL)</code>, then it should be ok &#8211; although some of the other settings may not use <code>(NTS)</code> &#8211; you need to test on your system to be sure.</p>
<p>Now that you can <code>connect "/ as sysdba"</code>, you can check the oradim.log (%oracle_home%\database\oradim.log) to see if there are any of these errors corresponding to your server reboot times:</p>
<p><code>oradim.exe -startup .......<br />
ORA-01017: invalid username/password; login denied</code></p>
<p>You may also find entries in the application pages of the event viewer with similar messages:<br />
<code>ORACLE.<sid> "CONNECT" DATABASE USER: "/" PRIVILEGE: NONE CLIENT_USER: oracle CLIENT_TERMINAL: <server_name> STATUS: 1031</code></p>
<p>The alert log shows no errors whatsoever. It won&#8217;t, you didn&#8217;t get that far!</p>
<p>If the oradim.log shows no errors of the above kind, you may not have the database configured to autostart. So, delve into the registry. If the two following keys exist, and have the value <em>true</em>, then all should be well on the next restart. Otherwise add/edit them manually. Setting <em>both</em> to <em>true</em> ensures that when you start and stop the <em>services</em> the database will also start and stop.</p>
<p>When the server is rebooted, the services are told to stop, so they will stop the database cleanly <em>before</em> the server goes down. The reverse is true on a server startup, the services are told to start and they tell the database to come on up!</p>
<p><code>HKLM/software/oracle/key_<strong>ora_home_name</strong>/ora_<strong>oracle_sid</strong>_autostart<br />
HKLM/software/oracle/key_<strong>ora_home_name</strong>/ora_<strong>oracle_sid</strong>_shutdown</code></p>
<p>If all of the above pan out, next time you restart the server, the database <em>will</em> come up! </p>
<p>You can test without bouncing the server simply by shutting down and restarting the database service from control panel. On a restart of the service, the database should also be back up and running. If not, get into the oradim.log again, and fix the problem you find.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-windows-oracle-database-stay-down-after-a-server-reboot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does Your Hard Disc Lights Stay On For Ages After Booting Linux?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-hard-disc-lights-stay-on-for-ages-after-booting-linux/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-hard-disc-lights-stay-on-for-ages-after-booting-linux/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 11:15:27 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=431</guid>
		<description><![CDATA[Mine did, not any more though. Read on. I was just a tad annoyed at the sudden increase in s-l-o-o-o-o-w responses after starting OpenSuse 11.4 up. I noticed that the hard drive indicator LED was continually lit for about 5-10 minutes after bootup. Performance was abysmal during this time. Top showed almost no CPU being [...]]]></description>
				<content:encoded><![CDATA[<p>Mine did, not any more though. Read on. <span id="more-431"></span> </p>
<p>I was just a tad annoyed at the sudden increase in s-l-o-o-o-o-w responses after starting OpenSuse 11.4 up. I noticed that the hard drive indicator LED was continually lit for about 5-10 minutes after bootup. Performance was abysmal during this time.</p>
<p>Top showed almost no CPU being used, so I looks ad <code>vmstat</code> instead. This was the result, on an idle (and slow) system:</p>
<p><code> vmstat -d<br />
disk- - -----IO------<br />
          cur  sec<br />
sda8        0  898</code></p>
<p><strong>Note:</strong> In the above, I&#8217;ve removed the individual reads and writes columns, to sort out the wheat from the chaff. I&#8217;m interested in I/Os overall. I&#8217;ve also removed the partitions that were showing 0 or 1 as the total I/O count.</p>
<p>The figures showed me that partition sda8 was getting hit to the tune of almost 900 I/O operations per second. Who or what is partition sda8?</p>
<p><code> df -h | grep -i sda8<br />
/dev/sda8             251G  131G  108G  55% /data</code></p>
<p>Now I know, so what&#8217;s open on this mount point?</p>
<p><code> lsof /data<br />
COMMAND PID USER  NODE NAME<br />
preload 385 root  /data/VirtualBox/ScientificLinuxEnterprise6.vdi<br />
preload 385 root  /data/VirtualBox/LinuxMint64bit.vdi</code></p>
<p>And having noted the above, why on earth was anything loading my virtual drives when I&#8217;m not even running VirtualBox at the moment?</p>
<p><code> ps -ef|grep -i 385<br />
root       385     1  1 11:15 ?        00:00:11 /sbin/preload /var/cache/preload/prepared</code></p>
<p>A quick check of the internet showed that <code>preload</code> is a process to save boot time (how ironic) and that it can easily be disabled. So I disabled it. No more long boots now! To disable preload, run <code>yast</code> and select <code>System Services (Runlevel)</code>.</p>
<ul>
<li>Tick the <code>Expert Mode</code> radio button.</li>
<li>Scroll down to find <code>boot.startpreload</code></li>
<li>At the bottom of the screen, uncheck the <code>B</code> box.</li>
<li>Click OK.</li>
</ul>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/06/does-your-hard-disc-lights-stay-on-for-ages-after-booting-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Amazon &#8220;Kindle For PC&#8221; running on Linux.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/getting-amazon-kindle-for-pc-running-on-linux/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/getting-amazon-kindle-for-pc-running-on-linux/#comments</comments>
		<pubDate>Thu, 19 May 2011 09:08:40 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=419</guid>
		<description><![CDATA[How hard can it be? Well, as it turns out, not very. The steps are as follows: Install, or check, that you have wine version 1.3 installed. The command wine --version gives details, assuming that you already have it installed. Download &#8220;Kindle for PC&#8221; from Amazon&#8217;s web site. Double-click the Kindle exe file to install [...]]]></description>
				<content:encoded><![CDATA[<p>How hard can it be? Well, as it turns out, not very. The steps are as follows: <span id="more-419"></span></p>
<ul>
<li>Install, or check, that you have wine version 1.3 installed. The command <code>wine --version</code> gives details, assuming that you already have it installed.</li>
<li>Download &#8220;<a href="http://www.amazon.co.uk/gp/kindle/pc/download/ref=kcp_pc_dnld_ar">Kindle for PC</a>&#8221; from Amazon&#8217;s web site.</li>
<li>Double-click the Kindle exe file to install it under wine. If you see errors about &#8220;winesetup encountered an error&#8221; just ignore them.</li>
</ul>
<p>You will have a new entry in your applications menu for Kindle. How difficult was that? Here is Kindle for PC running on OpenSuse 11.4 with a KDE desktop:</p>
<div id="attachment_423" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/05/Kindle.png"><img class="size-medium wp-image-423" title="Kindle for PC, running on OpenSuse 11.4 under the KDE desktop." src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/05/Kindle-300x226.png" alt="Kindle for PC, running on OpenSuse 11.4 under the KDE desktop." width="300" height="226" /></a><p class="wp-caption-text">Kindle for PC, on Linux. Click for full sized image.</p></div>
<p>A couple of things don&#8217;t work as they do in Windows, for example, shopping in the Kindle Store opens up in your default browser, which is not really a problem &#8211; you get full screen browsing. As far as I can see, synchronising with your other Kindle(s) works fine &#8211; I&#8217;m running Kindle for Android as well as Kindle for PC and they happily sync with each other.</p>
<p>I also see the following wine problem whenever I start Kindle, but this occurs on a couple of other wine programs as well, and did previously in OpenSuse 11.2 after a patch to wine. So far, nothing has been affected.</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/05/wineerror.png"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/05/wineerror-300x237.png" alt="Error in Wine." title="Error in Wine." width="300" height="237" class="size-medium wp-image-427" /></a><p class="wp-caption-text">The error that occurs in wine when applications are executed.</p></div>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/getting-amazon-kindle-for-pc-running-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bees Coming Out Of Our Ears!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/bees-coming-out-of-our-ears/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/bees-coming-out-of-our-ears/#comments</comments>
		<pubDate>Thu, 19 May 2011 08:47:35 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=416</guid>
		<description><![CDATA[One of Alison&#8217;s ex work colleagues, Andy, keeps bees. So far this year he has had 4 swarms! We took advantage of his generosity and restocked our recently dead hive with one of his swarms, and then, a couple of days later we obtained another of his swarms in a (borrowed &#8211; thanks Peter) nucleus [...]]]></description>
				<content:encoded><![CDATA[<p>One of Alison&#8217;s ex work colleagues, Andy, keeps bees. So far this year he has had 4 swarms! <span id="more-416"></span> We took advantage of his generosity and restocked our recently dead hive with one of his swarms, and then, a couple of days later we obtained another of his swarms in a (borrowed &#8211; thanks Peter) nucleus box. We now have two and a half hives.</p>
<p>Our own hive, looks to have requeened itself &#8211; my last inspection showed no red queen, and what appeared to be an unmarked queen laying. Hmmm. There were, however, no signs of any queen related waxworks going on. I&#8217;m confused! </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/bees-coming-out-of-our-ears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do We Have A New Queen, Or What?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/do-we-have-a-new-queen-or-what/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/do-we-have-a-new-queen-or-what/#comments</comments>
		<pubDate>Sun, 01 May 2011 16:13:48 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=412</guid>
		<description><![CDATA[I&#8217;ve been checking the girls today &#8211; the weather is lovely and warm and they are flying around all over the place, returning with lots of pollen and, hopefully, nectar. We&#8217;ve been away for a couple of weeks and before we went, I fed them on about 5 pounds of honey and put a super [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been checking the girls today &#8211; the weather is lovely and warm and they are flying around all over the place, returning with lots of pollen and, hopefully, nectar. <span id="more-412"></span></p>
<p>We&#8217;ve been away for a couple of weeks and before we went, I fed them on about 5 pounds of honey and put a super on with last years frames &#8211; fresh (!) from extraction &#8211; in case the girls needed something to do while we were away. Unfortunately, due to being in a hurry and getting ever so slightly confused, I put the queen excluder <em>above</em> the super rather than below it. Sigh! Today, I rebuilt the hive correctly after checking that all was well in camp.</p>
<p>It seems that the queen has not moved up into the super anyway as there was no sign of laying in the super frames. This is good news, there is, however, a little honey in a couple of frames, so they seem to be getting on with things already!</p>
<p>Now we have (or had?) a red marked queen in our original swarm and this makes her 4 years old this year which, I&#8217;m told, is past her best. However, I didn&#8217;t see her at all today when I was inspecting the hive but we do have larvae in various stages of development from tiny little newly hatched ones up to lots of fully developed and capped over cells &#8211; so someone is laying. There are a few drones too, but not too many. So far, there is very little drone comb around. So we definitely have a queen doing the laying &#8211; but who?</p>
<p>I did see what I <em>think</em> was a queen bee &#8211; she looked different to the others and was certainly not a drone &#8211; wandering about over the comb, sticking her back end into vacant cells, pausing, then moving on &#8211; all of which is queen behaviour as far as I&#8217;m aware, but she wasn&#8217;t marked with a red spot.</p>
<p>I&#8217;m wondering if the swarm decided to re-queen all by themselves while we were away, or even before we went. Today was the first physical inspection we&#8217;ve made since spring as the weather has been pretty chilly and damp. The only opening of the hive we&#8217;ve done up till now has been to feed the girls.</p>
<p>I didn&#8217;t see anything that looked like an open queen cell on any of the comb or frames, so if they have re-queened, then I&#8217;ve got no idea where she came from! There was one large cell, open, on one frame, but it looked more like a drone cell than a queen cell. Confused? I certainly am!</p>
<p>So there you have it, bees don&#8217;t seem to need us humans as much as we seem to need them. We are still eating last years honey &#8211; Alison makes the finest honey flapjack in the world with nothing more than oats, honey and juicy sultanas &#8211; yum! </p>
<p>Varroa counts are low, I saw only a few when I did my count today, and it worked out at less than one per day over the last couple of weeks. I&#8217;m extremely suspicious of this, but gave them a dose of icing sugar anyway &#8211; just to be on the safe side.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/05/do-we-have-a-new-queen-or-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bee Tragedy!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/04/bee-tragedy/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/04/bee-tragedy/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 09:54:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=408</guid>
		<description><![CDATA[I&#8217;ve taken far too long to write this up, but I&#8217;ve been rather pissed off to be honest! We&#8217;ve lost one hive of bees since February. They were alive when I checked and I&#8217;ve been feeding them but I noticed that the feed wasn&#8217;t going down. Due to the weather, I couldn&#8217;t &#8220;go in&#8221; and [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve taken far too long to write this up, but I&#8217;ve been rather pissed off to be honest! We&#8217;ve lost one hive of bees since February. <span id="more-408"></span> They were alive when I checked and I&#8217;ve been feeding them but I noticed that the feed wasn&#8217;t going down. Due to the weather, I couldn&#8217;t &#8220;go in&#8221; and see what was what in case I did them some harm with the cold and damp. I wish I had to be honest.</p>
<p>We had a warm day about three weeks ago, so I looked in, still food left, but no sound, no movement from within. Fearing the worst, I lifted the crown board a little to peek inside, nothing. Hmmm not good.</p>
<p>Given that it was reasonably warm, and that I had my cloth cover with me, I whipped off the crown board and I was met with a scene of carnage. Every single bee was dead and they were all lying in a heap on the floor. Why? They had starved to death. </p>
<p>Even with the fact that there was lots of feed on hand and close by, it seems as if they refused to leave the cluster and eat. This happens (I&#8217;ve been told by Peter) and there&#8217;s not a lot we can do. The cold, damp weather may have kept them in the cluster and they would not have moved away to feed &#8211; starving themselves to death while there was plenty of food all around.</p>
<p>Every cell in each of the 5 frames that had drawn out last year was totally clean. A couple of bees had died &#8220;head down&#8221; in the cells looking for the last of the stores that they had accumulated. I find this all quite distressing &#8211; so much food, so many deaths.</p>
<p>This was our first swarmed hive too, with a new queen. We still have lots of bees in the original hive, but Queenie is a &#8220;red spot&#8221; and is now in her fourth year, so we may need to re-queen to keep that hive going strongly. We don&#8217;t want her to be laying drones all the time &#8211; that&#8217;s fatal for a colony.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/04/bee-tragedy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domino is gone</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/domino-is-gone/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/domino-is-gone/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 20:19:02 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=401</guid>
		<description><![CDATA[Domino, our California Kingsnake was put to sleep tonight at 19:10. She&#8217;s been in the family for about 13 or 14 years with never a problem, well, except for what you can see below &#8211; she got me one night and had my finger down her throat before we could do anything about it. Alison [...]]]></description>
				<content:encoded><![CDATA[<p>Domino, our California Kingsnake was put to sleep tonight at 19:10. <span id="more-401"></span></p>
<p>She&#8217;s been in the family for about 13 or 14 years with never a problem, well, except for what you can see below &#8211; she got me one night and had my finger down her throat before we could do anything about it. Alison decided to take a picture rather than get her off me! </p>
<p>It eventually took over an hour and a half, and judicious use of January ice cold water (as advised by the RSPCA) to get her off, safely.</p>
<div id="attachment_402" class="wp-caption aligncenter" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/03/SnakeBite.jpg"><img src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2011/03/SnakeBite-300x200.jpg" alt="Domino Bites Norm!" title="Domino bites Norm" width="300" height="200" class="size-medium wp-image-402" /></a><p class="wp-caption-text">Domino Bites Norm! (January 2003)<br />Click for large sized image.</p></div>
<p>What you may not be able to make out in the picture above is the fact that she has effectively tied my wrists together &#8211; she had quite a grip, I can tell you. Mind you, she is a constrictor, so she would be strong in that department!</p>
<p>Recently, she developed a lump on her tail. We took her to the vet but after a course of treatment, there was no response. She hasn&#8217;t eaten now for two weeks &#8211; not a problem in itself, she&#8217;s gone much longer without in the past, but she has lost a lot of her muscle tone and her spine was showing quite prominently. Even the vet was surprised at how much she had gone downhill since she last saw her.</p>
<p>We shall miss her. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/domino-is-gone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Japanese Tragedy</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/japanese-tragedy/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/japanese-tragedy/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 14:22:51 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Humanity]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=391</guid>
		<description><![CDATA[Earthquake, tsunami and nuclear problems. Like they don&#8217;t have enough trouble with just one of these? And as usual, the religious fuck-wits are coming out of the woodwork with their completely ridiculous claims that it&#8217;s all &#8220;someone&#8217;s&#8221; fault &#8211; be that someone the gays, women (it&#8217;s usually one of these groups to blame for everything [...]]]></description>
				<content:encoded><![CDATA[<p>Earthquake, tsunami and nuclear problems. Like they don&#8217;t have enough trouble with just one of these? <span id="more-391"></span></p>
<p>And as usual, the religious fuck-wits are coming out of the woodwork with their completely ridiculous claims that it&#8217;s all &#8220;someone&#8217;s&#8221; fault &#8211; be that someone the gays, women (it&#8217;s usually one of these groups to blame for everything according to the fundies!) or someone else.</p>
<p>Mind you, the Daily Mail isn&#8217;t much better, reporting on a astrologist (anagram of fuck-wit) who &#8220;predicted&#8221; the carnage. Read more, if you haven&#8217;t yet eaten your lunch, <a href="http://www.dailymail.co.uk/sciencetech/article-1365225/Japan-earthquake-tsunami-Did-supermoon-cause-todays-natural-disaster.html">here</a> </p>
<div class="wp-caption alignnone" style="width: 833px"><a href="http://www.telegraph.co.uk/news/picturegalleries/worldnews/8380342/Tsunami-and-earthquake-in-Japan-latest-pictures-of-the-damage.html?image=1"><img alt="Click to view more pictures" src="http://c3012132.r32.cf0.rackcdn.com/110315Woman.jpg" title="How can we help?" width="411" height="307" /></a><p class="wp-caption-text">A woman cries her eyes out in the ruined town of Natori, Miyagi Prefecture. Click for more pictures, full size.</p></div>
<p>We all need to help out, <a href="http://givingaid.richarddawkins.net/">so give money</a> (scroll down to the flags), praying doesn&#8217;t work &#8211; it has been proved &#8211; except to make religious nutters think that they have done something useful &#8211; so unclasp your hands and get them into your pockets!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/03/japanese-tragedy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Frogs Are Back!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-frogs-are-back/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-frogs-are-back/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 13:14:23 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=384</guid>
		<description><![CDATA[Yesterday, 24th February 2011, was about the first reasonably warm day of the year. The pond and paths around our house are now filled with frogs. It must be spring!]]></description>
				<content:encoded><![CDATA[<p>Yesterday, 24th February 2011, was about the first reasonably warm day of the year. The pond and paths around our house are now filled with frogs. It must be spring!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-frogs-are-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Bees are alive!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-bees-are-alive/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-bees-are-alive/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 12:15:25 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=381</guid>
		<description><![CDATA[On Sunday 6th February I hefted the hives as usual. The new hive felt a bit on the light side so I whipped the lid off (just the lid) to take a peek &#8211; it was quite mild or I wouldn&#8217;t have disturbed them. Lifting the card I use to block the ventilation from passing [...]]]></description>
				<content:encoded><![CDATA[<p>On Sunday 6th February I hefted the hives as usual. The new hive felt a bit on the light side so I whipped the lid off (just the lid) to take a peek &#8211; it was quite mild or I wouldn&#8217;t have disturbed them. <span id="more-381"></span> </p>
<p>Lifting the card I use to block the ventilation from passing through the cluster, I saw lots of live bees! Yippee! Things are looking good for a second successful winter, and this year was a cold one!</p>
<p>Anyway, we have a pile of honey from the natural comb from last year so I decided to get some on as the girls felt a bit light to me (this is our first ever &#8220;home grown&#8221; swarm and as yet are still only on 5 brood frames). I&#8217;ve added a super and put a feeder in with some of their honey. A dribble went down the central hole to get them interested &#8211; just in case.</p>
<p>Hopefully the weather will stay on the mild side and they&#8217;ll be able to get up and feed. I&#8217;d rather feed them honey than fondant &#8211; that needs a lot of water to dilute just so that they can evaporate the water again! Doesn&#8217;t make sense to me. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>While I was pouring honey into the feeder, a couple of bees flew out of our main hive, and took a look at me before nipping back inside the hive. Looks like we may have managed to get two hives through the winter.</p>
<p>This is our second year keeping bees, our second winter and it seems we still have beginner&#8217;s luck!</p>
<p>We may need to re-queen our main hive this year too, she&#8217;s red and now at least 3 years old. I need advice &#8230;</p>
<p>Queens are marked for the year they were born:</p>
<p>White Yellow Red Green Blue &#8211; calendar years 1 and 6 are white, 2 and 7 are yellow and so on, up to 5 and 0 which are blue. This year, 2011, is a white year and our queen is red, so she&#8217;s most likely to be 2008. Apparently after 3 years there is a strong possibility that she is running out of stored sperm and may start laying nothing but drones. Fatal for a hive.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/02/the-bees-are-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Signs Of Life?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/signs-of-life/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/signs-of-life/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 15:15:58 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=376</guid>
		<description><![CDATA[I was out this Sunday hefting the hive. It&#8217;s feeling a little lighter than I remember, so I suspect the girls are tucking in to the stores now. I heard from Peter, about a fortnight ago, that his girls have started laying already so it&#8217;s looking good for Spring. As I was hefting, one solitary [...]]]></description>
				<content:encoded><![CDATA[<p>I was out this Sunday hefting the hive. It&#8217;s feeling a little lighter than I remember, so I suspect the girls are tucking in to the stores now. I heard from Peter, about a fortnight ago, that his girls have started laying already so it&#8217;s looking good for Spring. <span id="more-376"></span></p>
<p>As I was hefting, one solitary bee flew out from the mouse guard and buzzed around me to have a look, then vanished back into the hive. This is good because it means that we have at least one bee that survived the winter!</p>
<p>I&#8217;ve got some honey from the Autumn crop all ready to feed them with, if they need it. Much better than sugar syrup if you ask me.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/signs-of-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ExecutingPackaged Code Over a Database Link</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/executingpackaged-code-over-a-database-link/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/executingpackaged-code-over-a-database-link/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 15:40:49 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=367</guid>
		<description><![CDATA[Ever wondered how you can call a packaged procedure (or function) which resides at the far end of a database link? Wonder no more! begin package_name.Procedure_name@db_link_name(parameter, parameter, ...); end; Calling a function is just as easy: declare vResult number(10); begin vResult := package_name.Function_name@db_link_name(parameter, parameter, ...); end; Unfortunately, you don&#8217;t appear to be able to do [...]]]></description>
				<content:encoded><![CDATA[<p>Ever wondered how you can call a packaged procedure (or function) which resides at the far end of a database link? Wonder no more!<span id="more-367"></span><br />
<code><br />
begin<br />
       package_name.Procedure_name@db_link_name(parameter, parameter, ...);<br />
end;<br />
</code><br />
Calling a function is just as easy:<br />
<code><br />
declare<br />
       vResult number(10);<br />
begin<br />
       vResult := package_name.Function_name@db_link_name(parameter, parameter, ...);<br />
end;<br />
</code></p>
<p>Unfortunately, you don&#8217;t appear to be able to do this sort of thing via a synonym:</p>
<p><code><br />
create or replace synonym X for package_name@db_link_name;<br />
begin<br />
       X.Procedure_name(parameter, parameter, ...);<br />
end;<br />
</code><br />
You get <strong>ORA-00904: &#8220;SQLTEST&#8221;.&#8221;TEST&#8221;: invalid identifier</strong> instead of a result. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p><strong>Update: 20 January 2011</strong>:<br />
If you prefix the remote object name with the remote object owner, <em>regardless</em> of the fact that the database link is connecting to that schema anyway, then you <em>can</em> subsequently call the function, procedure or packaged code using the synonym. Result &#8211; thanks to Oracle Support.</p>
<p><code><br />
create or replace synonym X for owner.package_name@db_link_name;<br />
begin<br />
       X.Procedure_name(parameter, parameter, ...);<br />
end;<br />
</code><br />
It &#8220;just&#8221; works. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/executingpackaged-code-over-a-database-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Do We Need, Banks or Hospitals?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/what-do-we-need-banks-or-hospitals/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/what-do-we-need-banks-or-hospitals/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 09:17:49 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=358</guid>
		<description><![CDATA[The government&#8217;s wonderful new system for the NHS starts tomorrow. GP&#8217;s will take over running things where the Primary Care Trusts used to and Primary Care Trusts are to vanish. If any hospital fails under the new system, there will be no tax-payer funded bale outs. Strange that, they baled out the banks and have [...]]]></description>
				<content:encoded><![CDATA[<p>The government&#8217;s <em>wonderful</em>  new system for the NHS starts tomorrow. GP&#8217;s will take over running things where the Primary Care Trusts used to and Primary Care Trusts are to vanish. If <em>any</em> hospital fails under the new system, there will be no tax-payer funded bale outs.<span id="more-358"></span></p>
<p>Strange that, they baled out the banks and have been shafted in return as bankers returned to their old ways &#8211; the ways that all political parties said would never happen again &#8211; and stuck two fingers up at the tax-payer and the government. But there&#8217;s no such luxury for a hospital. Hmm.</p>
<p>Nice to know where their priorities lie then!</p>
<p>As I always say, <em>voting should be mandatory and there must be an option on every ballot paper entitled &#8220;none of the above&#8221;</em>. Mind you, I also have said for years <em>don&#8217;t vote, the government will get in!</em></p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2011/01/what-do-we-need-banks-or-hospitals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very Sticky Sunday!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/very-sticky-sunday/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/very-sticky-sunday/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 20:06:00 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=346</guid>
		<description><![CDATA[Today, Alison and I took our lives in our hands and extracted the honey from 20 full frames. In all, we have now got a kitchen full of about 70 lbs of fresh garden honey courtesy of our hard working lady friends. The day started with the de-capping of the combs, four of, and then putting [...]]]></description>
				<content:encoded><![CDATA[<p>Today, Alison and I took our lives in our hands and extracted the honey from 20 full frames. In all, we have now got a kitchen full of about 70 lbs of fresh garden honey courtesy of our hard working lady friends. <span id="more-346"></span>The day started with the de-capping of the combs, four of, and then putting those into the centrifuge &#8211; a giant salad spinner of sorts. After 60 turns of the handle, we open up and turn the combs around and give the other side 60 turns as well. repeat for the other 16 frames.</p>
<p>Of course, as soon as you get a good extraction, you have to empty the centrifuge through a double mesh filter and into a bucket (sterile of course). This filtering gets rid of various lumps of bees wax, assorted bee parts &#8211; legs, heads, the odd wing etc and leaves you with fresh, clean and very tasty honey ready for bottling.</p>
<p>It&#8217;s hard work, but not as hard as cleaning up afterwards and getting tiny lumps of sticky bees wax off the floor of the kitchen! The empty frames have all bee put back into a super and put on top of the two hives. While the centrifuge gets most of the honey out, it leaves everything sticky. The bees, on the other hand, will clean up everything and take it down into the brood box for winter stores. In return for this bounty, we get the combs back clean and dry and ready for storage.</p>
<p>We give the girls back the honey because it&#8217;s theirs after all, it would be cruel not to let them have some. We have kept back about 10 lbs of honey &#8211; in raw natural comb &#8211; for the girls to feed on over the preparation for winter and in early parts of the year when they need feeding ready to being. No sugar syrup this year for our girls!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/very-sticky-sunday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Seriously Offended &#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/im-seriously-offended/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/im-seriously-offended/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 12:30:22 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=340</guid>
		<description><![CDATA[It seems that this new government is off it&#8217;s bloody head. A new law has been introduced that means, in essence, that if someone tells a joke in the office, and someone else is offended by it, they can sue, even (get this) if the offended person didn&#8217;t actually hear the joke in question! WTF [...]]]></description>
				<content:encoded><![CDATA[<p>It seems that this new government is off it&#8217;s bloody head. <span id="more-340"></span>A new law has been introduced that means, in essence, that if someone tells a joke in the office, and someone else is offended by it, they can sue, even (get this) if the offended person didn&#8217;t actually hear the joke in question!</p>
<p>WTF is the government doing for crying out loud? Have they not learned from the mistakes of the last Tory government (aka selfish b&#8217;stards) &#8211; led by the &#8220;lovely&#8221; Maggie T. &#8211; who were the ones that introduced the American style &#8220;sue everyone, I&#8217;m not to blame&#8221; culture, that it just leads to complete nonsense? It appears not.</p>
<p>I&#8217;m seriously offended by this new rule &#8211; who do I sue?</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/im-seriously-offended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Final Harvest Is In&#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/the-final-harvest-is-in/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/the-final-harvest-is-in/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 12:25:05 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=336</guid>
		<description><![CDATA[Saturday 2nd October was a fairly nice day given the weather we&#8217;ve been having recently, so we managed &#8211; at long last &#8211; to get the final harvest of honey done. We managed to take another 9 full frames and a bucket full of raw natural comb also completely full and capped off. This was [...]]]></description>
				<content:encoded><![CDATA[<p>Saturday 2nd October was a fairly nice day given the weather we&#8217;ve been having recently, so we managed &#8211; at long last &#8211; to get the final harvest of honey done. <span id="more-336"></span>We managed to take another 9 full frames and a bucket full of raw natural comb also completely full and capped off. This was the space I inadvertently left when I removed the initial three frames. The girls went mad and filled the gaps.</p>
<p>The moral learned was never ever give them any free space because they will fill it up!</p>
<p>Anyway, we have now got the supers off, the queen excluder off, the eke on, the apiguard (anti varroa) on and we are just about almost nearly ready for winter &#8211; just the mouse guards to go.</p>
<p>We intend to keep the honey in the bucket to use as winter feed rather than supplying them with syrup that they have to work on to convert into &#8220;honey&#8221;. I suspect giving them back their own honey is far batter for them in the long run.</p>
<p>Peter&#8217;s extractor was delivered by Helen last night (Sunday) so next Sunday will hopefully be the day that the kitchen gets extremely sticky as we attempt to extract honey from all 19 frames. Watch this space for details.</p>
<p>Next time, I need to make sure I get hold of a couple of Porter Bee Escapes to keep the girls from the capped off honey stores &#8211; it&#8217;s a lot easier to extract the filled frames when you don&#8217;t have to deal with a swarm of slightly irritated bees!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/10/the-final-harvest-is-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pope Is Coming &#8211; Lock Up Your Kids!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/the-pope-is-coming-lock-up-your-kids/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/the-pope-is-coming-lock-up-your-kids/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 07:42:59 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=326</guid>
		<description><![CDATA[The pope arrives in the UK today. Personally, I think he should be arrested. As the head of an organisation that is riven with child molesting staff he should be arrested. As the man in charge of covering up the atrocities (while a Cardinal) he should be arrested. As God&#8217;s disciple on Earth &#8211; he&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>The pope arrives in the UK today. Personally, I think he should be arrested. <span id="more-326"></span>As the head of an organisation that is riven with child molesting staff he should be arrested. As the man in charge of covering up the atrocities (while a Cardinal) he should be arrested. As God&#8217;s disciple on Earth &#8211; he&#8217;s a fraud!</p>
<p>Why are the British Tax Payers, at a time when cut-backs are &#8220;required&#8221; paying for the head of the  Vatican &#8220;state&#8221; to pay a &#8220;state&#8221; visit to the UK, forced to pay huge sums, running into multi-millions of pounds to provide security  for this man?</p>
<ul>
<li>If he <em>really is</em> god&#8217;s disciple on Earth then god will prevent harm coming to him, surely?</li>
<li>If someone does harm him, then surely it was god&#8217;s will, and we lowly Earthlings shouldn&#8217;t even begin to attempt to subvert god&#8217;s will?</li>
</ul>
<p>So, regardless, we don&#8217;t need and shouldn&#8217;t have to pay <em>a single penny</em> for security  on this visit. Just a thought!</p>
<p>Anyway, you can tell how much <em>real</em> faith all churches and mosques etc have by the fact that they all have lightning conductors on the highest points. Go figure. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>And finally, as the pope is arriving in the UK via Scotland, here&#8217;s a question:</p>
<p>Why is it, in public toilets in Glasgow, that people write &#8220;Fuck the pope&#8221; on the walls? Because they can&#8217;t be bothered to write &#8220;Fuck the moderator of the general assembly of the church of Scotland&#8221; (<em>Billy Connolly</em>)</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/the-pope-is-coming-lock-up-your-kids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Change The Patching Process From 11.2.0.2</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/oracle-change-the-patching-process-from-11-2-0-2/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/oracle-change-the-patching-process-from-11-2-0-2/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 08:19:43 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=321</guid>
		<description><![CDATA[Oracle have made subtle changes to the way that they advise you to patch an installation from the release of 11.2.0.2. The full gory details can be found here (My Oracle Support link &#8211; support contract required) but in brief: You are now advised to perform an out-of-line patch, however, you can do an in-line [...]]]></description>
				<content:encoded><![CDATA[<p>Oracle have made subtle changes to the way that they advise you to patch an installation from the release of 11.2.0.2. The full gory details can be found <a title="MOS Document 1189783.1" href="https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=1189783.1" target="_blank">here</a> (My Oracle Support link &#8211; support contract required) but in brief:</p>
<ul>
<li>You are now advised to perform an out-of-line patch, however, you can do an in-line patch if you are short of space. However, this will delete the existing installation. Beware &amp; take copious backups!</li>
<li>The patch kit is a full installation &#8211; so you get  the latest patch kit and install it instead of getting  the base release and then patching it.</li>
<li>Grid components <em>must</em> be patched out-of-line.</li>
</ul>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/oracle-change-the-patching-process-from-11-2-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bee Latest.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/bee-latest/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/bee-latest/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:41:36 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=312</guid>
		<description><![CDATA[The girls were checked again today and all is well. Varroa counts is nil on both hives &#8211; that worries me a tad!  But I did give them a good dusting of icing sugar last week &#8211; so maybe it works after all!Anyway, I managed to swap out 5 old brood frames from the new [...]]]></description>
				<content:encoded><![CDATA[<p>The girls were checked again today and all is well. Varroa counts is nil on both hives &#8211; that worries me a tad!  But I did give them a good dusting of icing sugar last week &#8211; so maybe it works after all!<span id="more-312"></span>Anyway, I managed to swap out 5 old brood frames from the new hive &#8211; the bees were not using those frames and on inspection, it&#8217;s easy to see why &#8211; old dirty wax, some dead brood in the combs so they have gone, destroyed. I thought about cleaning them up and re-waxing them, but you never know what has been in there.</p>
<p>These were frames from Peter&#8217;s hive out in the woods near Leeds and he did say that the swarm in there originally had died for some unknown reason. Before he got a chance to clean up, a new swarm moved in and we were the lucky recipients of said new swarm last year.</p>
<p>They are starting to store quite a lot of honey on the brood frames, but there are still larvae so the new queen is doing her stuff &#8211; I still have not found her yet, but when I do, she will have to be marked &#8211; something new for us to learn!</p>
<p>The original hive is also doing well. They are out and about quite a lot at the moment making the most of the end of season sunshine and, of course, the honey flow from Himalayan Balsam.</p>
<p>After we took a super of frames off this hive last week, they started to fill in every available space with comb and honey, so I put a new super on today with 9 brand spanking new frames. I&#8217;m not expecting them to draw out and fill all nine, but at least they have somewhere to store all that lovely nectar!</p>
<p>All being well, we will be able to feed them honey, of their own making, to keep them happy over winter.</p>
<p>Talking of winter, it doesn&#8217;t seem like it was this time last year when we were just getting ready for our first over wintering of the bees. Here we are again, getting ready to over winter two hives, one strong and the other, not as large, but doing quite well so far. Other than in the stores department!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/09/bee-latest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s Harvest Time!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/its-harvest-time/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/its-harvest-time/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 18:54:57 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=308</guid>
		<description><![CDATA[The girls have been busy and today, we have harvested another 9 frames of fully capped honeycomb to add to the three we took a couple of weeks back. Unfortunately &#8230; &#8230; I neglected to replace the three full frames I took out last time with new ones. The picture below shows what the bees [...]]]></description>
				<content:encoded><![CDATA[<p>The girls have been busy and today, we have harvested another 9 frames of fully capped honeycomb to add to the three we took a couple of weeks back. Unfortunately &#8230; <span id="more-308"></span>&#8230; I neglected to replace the three full frames I took out last time with new ones. The picture below shows what the bees will do if left to their own devices and when they find a big space in the hive. The entire space has been filled with natural comb and filled and capped all in a couple of weeks.</p>
<p>Busy or what? Anyway, here&#8217;s the picture.</p>
<div id="attachment_309" class="wp-caption alignnone" style="width: 310px"><a href="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2010/08/Insidethehive.jpg"><img class="size-medium wp-image-309" title="Insidethehive" src="http://qdosmsq.dunbar-it.co.uk/blog/wp-content/uploads/2010/08/Insidethehive-300x225.jpg" alt="What bees do when they find a space in the hive!" width="300" height="225" /></a><p class="wp-caption-text">The space for three frames has been filled.</p></div>
<p>Unfortunately, as you can tell from the picture above, the natural comb has been broken when we split the super off the top (there&#8217;s another super underneath &#8211; that&#8217;s what you are looking at) so there&#8217;s a bit of loose honey that the girls will have to tidy away quickly now &#8211; in case of robbers, and bloody wasps, of which there are many this year.</p>
<p>We still have six frames, capped off, to harvest plus the mess above. I have a feeling I may be using the natural comb as feed for the winter.</p>
<p>At present, the girls are heavily into <a title="All about Himalayan Balsam" href="http://en.wikipedia.org/wiki/Himalayan_Balsam" target="_blank">Himalayan Balsam</a> which is good for them, but not so good for our native environment. This stuff is an alien and takes over quite rapidly when it arrives &#8211; but the bees love it and it flowers late into the season keeping them on good natural honey which, with a bit of luck, will be more than enough to keep them through winter without having to be fed on sugar syrup.</p>
<p>We may have to let them have their heads, as it were, and give them a few new super frames to fill up with winter stores. I&#8217;d much rather my bees fed on their natural food than on sugary substitutes that we supply. It makes sense to me.</p>
<p>Varroa counts were up a little &#8211; we have about 16 on the tray today, so while not bad, it&#8217;s not good to have any, so the hive got a good dusting of icing sugar. With the honey still on the hive, we can&#8217;t use any of the chemical (thymol) based stuff, but once we get the last few frames off the hive, there will be some going in. We need to get the girls healthy in time for winter.</p>
<p>The other hive is still getting established. The girls in there have managed to use about 5 full frames to get the queen laying and they have pollen and honey &#8211; capped off now &#8211; aplenty. Not enough for the winter though, not by a long way. The remainder of the frames have not bee touched. They don&#8217;t seem to want to do much wax works inside the hive this lot.</p>
<p>They haven&#8217;t begun to create or lay, any drone comb either, but with it being September (tomorrow) I doubt we&#8217;ll see any of that from them now, it&#8217;s getting on for drone expulsion time, so any boys in the hive better enjoy life while they can, it&#8217;s soon to be all over!</p>
<p>As an aside to the main posting here, it&#8217;s a hard life being a boy bee &#8211; in case you didn&#8217;t know, drones are the boys and they exist for one thing and one thing only, sex! (How much does that resemble us Humans?) They sit around in the hive all day doing nothing, providing nothing and eating stores, waiting for a virgin queen.</p>
<p>They also hang about in gangs at a drone meeting place, where a virgin queen will come and mate with as many of the boys as she can. This is her only chance of mating so she takes full advantage!</p>
<p>For the boys this is it! Sex, then death, by having your bits ripped off! Still they seem to like it! If the boys manage to avoid being killed off in this way, come September, the girls will either evict them from the hive, or sting them to death. There&#8217;s no place for boy bees in the hive over winter.</p>
<p>At least the wax moth problem I mentioned last time has been sorted, no more signs of any, which is a good thing. And even better, the varroa count was one single solitary mite.</p>
<p>This new hive is going to need quite a bit of feeding before winter. And I still haven&#8217;t found our new queen yet! I know she&#8217;s in there because there are lots of lovely larvae in the brood frames, but she&#8217;s keeping her head down and hiding from us.</p>
<p>Peter, if you are reading this, thanks! We couldn&#8217;t have managed without your help and advice.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/its-harvest-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Flashback, Or Not To Flashback. Are You Sure About That?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/to-flashback-or-not-to-flashback-are-you-sure-about-that/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/to-flashback-or-not-to-flashback-are-you-sure-about-that/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 14:13:19 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=303</guid>
		<description><![CDATA[John Hallas has an interesting blog post here about how a system running flashback can become a system not running flashback &#8211; and without you knowing! Enjoy. Cheers.]]></description>
				<content:encoded><![CDATA[<p>John Hallas has an interesting <a title="Flashback on? - do you think so?" href="http://jhdba.wordpress.com/2010/01/06/flashback-disabled-automatically-a-minor-rant/" target="_blank">blog post here</a> about how a system running flashback can become a system not running flashback &#8211; and without you knowing!</p>
<p>Enjoy.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/to-flashback-or-not-to-flashback-are-you-sure-about-that/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The AA Insurance Company &#8220;Scam&#8221;.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-aa-insurance-company-scam/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-aa-insurance-company-scam/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 08:28:43 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=297</guid>
		<description><![CDATA[My wife recently changed from her old insurance company to the AA as they gave her a much better quote for herself and me as named driver. However, it soon turned out to be not quite as attractive as it first seemed. Shortly after sending in the forms and money Alison received a call from [...]]]></description>
				<content:encoded><![CDATA[<p>My wife recently changed from her old insurance company to the AA as they gave her a much better quote for herself and me as named driver. However, it soon turned out to be not quite as attractive as it first seemed. <span id="more-297"></span>Shortly after sending in the forms and money Alison received a call from the AA saying that there was a problem with her application and could she call a certain number to discuss. She duly did so and was told that as I had a claim <em>against</em> me, that they were increasing  the premium by approximately £60 per year.</p>
<p>This was interesting as I don&#8217;t have any claims against me at all, however, they assured my wife that this claim <em>against</em> me took place in 2007. I was puzzled and decided to check.</p>
<p>I spoke first with the AA who assured me that there was indeed a claim on the database and so Alison had no choice but to pay up the additional premium on her police (or drop me as named driver). I got as much information as I could from the telephone operator &#8211; who was very helpful just powerless to deviate from the rules she had to work under &#8211; and eventually asked for her manager. S/he wasn&#8217;t there but promised to call me back. So far,  no call back!</p>
<p>I then spoke to my own insurance company, <a title="Sainsburys car insurance" href="http://www.sainsburysbank.co.uk/insuring/ins_carinsurance_car_skip.shtml" target="_blank">Sainsburys </a>who I highly recommend and they explained everything about this claim. I was informed that, on their database it is listed as &#8220;<em>no fault, no claim</em>&#8221; as it was simply noting that I had advised my insurance company of an accident in which I had been hit, while stationery, by another car. The other driver immediately admitted full liability and the whole matter was resolved with <em>no</em> claims being made <em>against </em>me and my own insurance company merely being <em>informed </em>of the facts.</p>
<p>So, a non-claim against me turned into a claim against me on the AA&#8217;s database and they flatly refuse to change it, or even speak to my own insurance company for clarification.</p>
<p>Next time you think you need the AA, try <a title="The RAC" href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CB8QFjAA&amp;url=http%3A%2F%2Fwww.rac.co.uk%2F&amp;ei=yPRoTIKkKceZONCX3LkF&amp;usg=AFQjCNEdW93s8oNYb2vsedOqlMU_NPVFAg" target="_blank">here</a> or <a title="Green Flag" href="http://www.greenflag.com/" target="_blank">here</a> instead &#8211; the AA&#8217;s own claims are probably as dubious as the one they think has been logged against me.</p>
<p>It&#8217;s not  the first time that I&#8217;ve had trouble with this organisation, they gave me a load of grief years back when I was a motorcyclist and I promised myself never to use them. I was happy with the <a title="The RAC, not the AA!" href="http://www.rac.co.uk/" target="_blank">RAC </a>for years &#8211; until Alison had some grief with them once and changed our &#8220;contract&#8221;.</p>
<p>I stand by my previous decision never to become a customer of the AA. (Unless they sort their act out pretty sharpish <em>and</em> refund our additional expense.)</p>
<p>Would I recommend anyone take out insurance with the AA? In a word, no. (Other opinions are available, but they are wrong! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )</p>
<p>Having said all that, I do appreciate the fact that the AA are not actually an insurance company, just a broker (or are they?) for a real insurance company located somewhere in Gibraltar and that the AA probably have to follow the rules laid down by said off-shore insurance company but does anyone actually think about these rules? I mean, how on Earth can a &#8220;no claim&#8221; be a &#8220;claim against&#8221;? Sigh.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-aa-insurance-company-scam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Gather Table Stats Effectively</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/how-to-gather-table-stats-effectively/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/how-to-gather-table-stats-effectively/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 07:36:06 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=291</guid>
		<description><![CDATA[Greg Rahn wrote a pretty good article back in 2008 &#8211; it still applies today. Cheers.]]></description>
				<content:encoded><![CDATA[<p>Greg Rahn wrote a <a title="DBMS_STATS" href="http://structureddata.org/2008/10/14/dbms_stats-method_opt-and-for-all-indexed-columns/" target="_blank">pretty good article</a> back in 2008 &#8211; it still applies today.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/how-to-gather-table-stats-effectively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The First Honey Crop</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-first-honey-crop/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-first-honey-crop/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 12:12:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=285</guid>
		<description><![CDATA[Been a while since I wrote, so here&#8217;s a brief update on what&#8217;s happened since last time. The artificial swarm was carried out and we watched hopefully for a hatching new queen. We didn&#8217;t see her, but we have evidence that she is indeed there and laying. The hive is filling with bees and we [...]]]></description>
				<content:encoded><![CDATA[<p>Been a while since I wrote, so here&#8217;s a brief update on what&#8217;s happened since last time. <span id="more-285"></span> The artificial swarm was carried out and we watched hopefully for a hatching new queen. We didn&#8217;t see her, but we have evidence that she is indeed there and laying. The hive is filling with bees and we have larvae in the cells. The vast majority are worker cells and there are very few <a title="Wikipedia - Drone Bees" href="http://en.wikipedia.org/wiki/Drone_%28bee%29" target="_blank">drone </a>cells &#8211; so it&#8217;s looking good for a new laying queen as opposed to a laying worker.</p>
<p>We were in Sardinia for two weeks and on our return, it was impossible to separate the top (two) supers from the main hive. The girls had glued everything together. It didn&#8217;t help that I&#8217;d lost the hive tool somewhere and it simply seems to have vanished from the planet. I suspect it was beamed up at some point between the hive and the garage!</p>
<p>Anyway, a new hive tool was purchased, and I went in to the hive last night when the weather was quite mild. The new tool was an immense help in separating the two supers and there is currently 16 frames of honey. Three were fully capped off, so I&#8217;ve removed those for later. I&#8217;ll be putting another three empty frames in to keep the girls busy.</p>
<p>Between the supers, they had built comb from the top of the lower super to the bottom of the frames in the upper one, that&#8217;s what made it difficult to split the two. After last night when I scraped off what was bridging the two supers, we have a bowl of wax + honey to enjoy. A bit more work needs doing on this matter, but the girls were getting grumpy and I&#8217;d refilled the smoker three times by then, so I decided to let them have some peace and quiet.</p>
<p>The second hive had a plague of <a title="Wikipedia - wax moth" href="http://en.wikipedia.org/wiki/Lesser_wax_moth" target="_blank">wax moth</a> caterpillar, well two of the b*ggers, so I got rid of those. One brood frame was pretty much trashed but it was an old one I fancied replacing as the girls weren&#8217;t using it yet &#8211; so it&#8217;s now gone. I ditched the wax as well it was looking pretty black. (It was one of the original frames we inherited when we got our first swarm from Peter.)</p>
<p>When I checked for <a title="Wikipedia - Varroa Destructor" href="http://en.wikipedia.org/wiki/Varroa_destructor" target="_blank">varroa</a>, that nasty little mite, the counts were still low. About 4 weeks ago (I know, far too long!) I had 16 on the second hive, but after a fairly liberal sprinkling of icing sugar, we are down to about 3 mites over the 4 week period. The main hive had 1 mite over the same period. I&#8217;ve also done a drone cull in the second hive (where the frame came from the main hive &#8211; don&#8217;t get confused like me!) and there were a few mites present in the drone comb, but nothing spectacular. Yet!</p>
<p>I&#8217;ll be keeping on top of the mites on a weekly basis now that the holidays are over.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/08/the-first-honey-crop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Have A New Queen Coming!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-new-queen-coming/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-new-queen-coming/#comments</comments>
		<pubDate>Mon, 31 May 2010 11:42:05 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=281</guid>
		<description><![CDATA[It was been checking time again yesterday and of the three queen cups I found last week, one has a grub in it. Looks like we need to consider doing an artificial swarm for real this time. The first super we put on is now in the process of being capped off. The honey is [...]]]></description>
				<content:encoded><![CDATA[<p>It was been checking time again yesterday and of the three queen cups I found last week, one has a grub in it. <span id="more-281"></span> Looks like we need to consider doing an artificial swarm for real this time.</p>
<p>The first super we put on is now in the process of being capped off. The honey is almost ready. I&#8217;m leaving it for the girls to completely cap off and then, Alison gets to do what she&#8217;s been looking forward to since we started on the Bee Keeping course, extracting her own honey! I foresee a very sticky kitchen any time soon.</p>
<p>The second super is starting to be filled as well. They have drawn out 7 of the 8 frames and have simply left the last one untouched. Not bad for a week though.</p>
<p>Queenie is still around, I saw her yesterday. Wandering about and laying eggs as usual.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-new-queen-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just How Busy Can a Bee Get?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/just-how-busy-can-a-bee-get/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/just-how-busy-can-a-bee-get/#comments</comments>
		<pubDate>Mon, 24 May 2010 19:17:29 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=277</guid>
		<description><![CDATA[On Saturday I went to check on the girls again. In the seven days since my last check, they&#8217;ve been busy. How busy? Well, last week I gave them a pair of brand new super frames to fill up the super. They had 6 already (or was it 7? I must go and count next [...]]]></description>
				<content:encoded><![CDATA[<p>On Saturday I went to check on the girls again. In the seven days since my last check, they&#8217;ve been busy. How busy? <span id="more-277"></span>Well, last week I gave them a pair of brand new super frames to fill up the super. They had 6 already (or was it 7? I must go and count next time I see them!) and they had just started to draw out the comb. Well, 7 days later, we not only have a complete set of super frames, fully drawn out, but the whole lot is just about full (on both sides!) with brand new honey. Once they get it evaporated down to the correct water content, they will cap it off.</p>
<p>I suspected something was up when I lifted off the super to do my weekly checks, I could hardly lift it! Anyway, I&#8217;ve kept them busy by giving them a new super on top of the existing one, with a compete set of empty frames. Wonder what I&#8217;ll find next weekend?</p>
<p>Downstairs in the brood box, Queenie has been busy and there are &#8220;millions&#8221; of bees milling about. Plenty of stores &#8211; honey and pollen &#8211; stashed away in the brood frames. The drone comb that we cut out last week (to try and prevent varroa infestation) has been completely rebuilt with new, fresh beeswax. No eggs yet.</p>
<p>We also have three potential queen cups. No eggs (not that I can see them with my eyesight &#8211; glasses on or not!) or larva yet, but I&#8217;ll be keeping an eye out, just in case.</p>
<p>And the varroa count. Well, after 7 days, I counted what was on the varroa tray under the hive &#8211; a bit of chalk-brood, and one, single, solitary, all by itself, mite. One!</p>
<p>This is good news, but worrying at the same time. I can&#8217;t believe that our hive doesn&#8217;t seem to be a hot bed of varroa like almost all the others. There were some in the drone comb we removed last week, but not many. I haven&#8217;t see any of the bees with mites, but then again, it&#8217;s difficult to tell with so many of them knocking about.</p>
<p>How many times have I been stung when I dismantle their house? So far this year, none! They are very docile at the moment, I&#8217;d personally be going off my head if someone kept breaking into my house and moving the furniture all the time!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/just-how-busy-can-a-bee-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ted Hooper &#8211; RIP.</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/ted-hooper-rip/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/ted-hooper-rip/#comments</comments>
		<pubDate>Thu, 20 May 2010 20:01:52 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=273</guid>
		<description><![CDATA[Ted Hooper has died at the age of 91. He was most famous for the Bee Keeping book Guide To Bees And Honey. Some links to Ted: Wikipedia British Bee Keeping Association &#8211; Obituary. Times Online &#8211; Obituary.]]></description>
				<content:encoded><![CDATA[<p>Ted Hooper has died at the age of 91. He was most famous for <em>the</em> Bee Keeping book <a title="Ted Hooper's Book" href="http://www.amazon.co.uk/Guide-Bees-Honey-Selling-Beekeeping/dp/1904846513/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1274385393&amp;sr=8-1" target="_blank">Guide To Bees And Honey</a>.</p>
<p>Some links to Ted:</p>
<p><a title="Ted on Wikipedia" href="http://en.wikipedia.org/wiki/Ted_Hooper" target="_blank">Wikipedia</a></p>
<p><a title="Ted's Obituary at BBKA" href="http://www.britishbee.org.uk/news/obituaries/ted-hooper-1918-2010.shtml" target="_blank">British Bee Keeping Association &#8211; Obituary</a>.</p>
<p><a title="Ted's obituary at Times Online" href="http://www.timesonline.co.uk/tol/comment/obituaries/article7085866.ece" target="_blank">Times Online &#8211; Obituary</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/ted-hooper-rip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Have A Queen &#8211; And She&#8217;s Red!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-queen-and-shes-red/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-queen-and-shes-red/#comments</comments>
		<pubDate>Thu, 20 May 2010 19:54:45 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=270</guid>
		<description><![CDATA[On Saturday, Peter came over because we (Alison and I) thought we had noticed a few queen cells in the hive. Drastic action could have been required if this was the case with an artificial swarm being uppermost on the list. As it turned out, we were wrong and what we had seen was a [...]]]></description>
				<content:encoded><![CDATA[<p>On Saturday, Peter came over because we (Alison and I) thought we had noticed a few queen cells in the hive. Drastic action could have been required if this was the case with an artificial swarm being uppermost on the list. <span id="more-270"></span> As it turned out, we were wrong and what we had seen was a number of drone cells, not queen cells. Ah well, at least we know now!</p>
<p>While inside the hive, we found the queen &#8211; and she was marked, with a red dot. This makes her either 2003 (highly unlikely) or 2008 (most likely) which does imply that our swarm of bees used to belong to someone else!</p>
<p>Anyway, a full investigation showed lots of new brood, plenty drones and workers (phew!) and while we were inspecting, the queen laid an egg right in front of us.</p>
<p>They have also drawn out about 6 super frames from bare foundation since the start of the year. There is even honey in some of the super combs already.</p>
<p>They are still surprisingly docile, we basically destroyed their house, and they were not bothered at all.</p>
<p>We now have to check them every 7 days to make sure that they don&#8217;t start getting ideas about leaving home. Mind you, we have a new hive sitting right next door to the existing one, so there&#8217;s always a chance that they will move in there.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/05/we-have-a-queen-and-shes-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Election Is Coming!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/the-election-is-coming/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/the-election-is-coming/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 17:32:19 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=265</guid>
		<description><![CDATA[Oh joy! Politics. How lovely. Ok, here&#8217;s what I think of the election: They don&#8217;t give a shit about keeping promises. Regardless of what your local MP (or wannabe MP) tells you he will do for you, once (if) s/he gets elected, s/he will have to follow the party whip &#8211; so why do they [...]]]></description>
				<content:encoded><![CDATA[<p>Oh joy! Politics. How lovely. <span id="more-265"></span>Ok, here&#8217;s what I think of the election:</p>
<ul>
<li>They don&#8217;t give a shit about keeping promises. <em>Regardless</em> of what your local MP (or wannabe MP) tells you he <em>will do</em> for you, once (if) s/he gets elected, s/he will have to follow the party whip &#8211; so why do they bother telling us lies all the time.</li>
<li>They still have an expenses system that gives them the right to excess. If I took a job in London, for example, I <em>would not</em> be getting second homes allowances, nor any of the rest of the stuff that they provide themselves with. It&#8217;s a con. They know what the job entails and where they have to work from, so deal with it. if you don&#8217;t like working to the same expenses rules as everyone else in the country, don&#8217;t apply for a job as an MP. Simple.</li>
<li>Voting should be mandatory in the UK. However, see next bullet point.</li>
<li>Every voting paper should have one additional &#8216;candidate&#8217; at the bottom &#8211; <em>None Of The Above</em> &#8211; that would give the politicians a better idea of exactly what we think of them. (<em>None Of The Above</em> courtesy of <em>Brewster&#8217;s Millions</em> an old film with Richard Prior.)</li>
<li>And finally &#8211; for now &#8211; remember this if nothing else. You can always tell when a politician is lying, because his lips move!</li>
</ul>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/the-election-is-coming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fly Monarch? I Don&#8217;t Think So!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/fly-monarch-i-dont-think-so/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/fly-monarch-i-dont-think-so/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 15:39:47 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=257</guid>
		<description><![CDATA[On Saturday the 10th of April, at 20:30 our journey home from Sharm El Sheikh began on a Monarch Airlines Airbus A300. We were sitting in row 15, seats A and B &#8211; if it makes a difference. 15A being the window seat and 15B being the middle of three. For someone over about 5&#8217;6&#8243; [...]]]></description>
				<content:encoded><![CDATA[<p>On Saturday the 10th of April, at 20:30 our journey home from Sharm El Sheikh began on a Monarch Airlines Airbus A300. We were sitting in row 15, seats A and B &#8211; if it makes a difference. 15A being the window seat and 15B being the middle of three.<br />
<span id="more-257"></span><br />
For someone over about 5&#8217;6&#8243; legroom is a problem and as Alison is 5&#8217;8&#8243; and I&#8217;m 6&#8242; we both were in trouble before we left! I had to request that the people in front of me didn&#8217;t attempt to put their seats back as they would crush my knees if they did &#8211; thankfully, they obliged even though that had to have their 2 year old on their knees. Not an ideal way to start a long (approx 6 hours) flight back to the UK.</p>
<p>The window seat has a big metal bracket screwed to the floor restricting the available space for feet under the chair in front. The aisle seat has a big &#8220;box&#8221; of some sort that also performs the same task. Only the middle seat &#8211; where Alison was &#8211; has any decent amount of space for your feet &#8211; although the middle seat is always seemingly narrower than the others.</p>
<p>So, an auspicious start to the nightmare ahead &#8211; no leg room and nowhere to put your feet either.</p>
<p>Did I mention also that the flight was short staffed as two Cabin Crew had failed to arrive for work? Well, all compliments to the girls who had arrived &#8211; they did a great job. Credit where it is due.</p>
<p>On the ground, the interior of the plane was far too hot. We were told that after take off the air conditioning would come on and reduce the temperature. Take off couldn&#8217;t come too soon!</p>
<p>Anyway, we soon set off, on time (ok, 5 minutes late!) and immediately we hit a problem. The temperature inside the cabin soared into the heights. People all around us were fanning themselves with the in-flight magazine, sick bags or anything else they could find. The captain was asked to turn it down. It made no difference.</p>
<p>Did I mention that we had been given details in the safety briefing on where to find the exercises we really should do to keep ourselves from the scourge of Deep Vein Thrombosis (DVT)? Well, reading about the exercises was about all we could manage &#8211; there&#8217;s no room for your feet under the chair when sitting still so you have absolutely no chance of &#8220;extending your leg and waggling your foot around and around&#8221; &#8211; once sat down in a Monarch Plane, you simply cannot move.</p>
<p>Once safely at height, the cabin crew sold us drinks. We again asked to have the heating turned off and they asked the Captain to do so. He did. It made no difference. Maybe third time lucky?</p>
<p>If I remember correctly, two tiny bottles of Brandy, two tiny tins of Ginger, and two tiny bottles of white wine (unchilled for crying out loud!) and a tiny box of Pringles cost us about £17.00. Ouch! Still anything to take the mind away from the uncomfortable situation we find ourselves in has to be worth that, doesn&#8217;t it?</p>
<p>Shortly afterwards, and it&#8217;s still far too hot, it&#8217;s dinner time. Sausage, mash and two vegetables. Sounds good doesn&#8217;t it? Unfortunately, airline food all smells the same &#8211; it must be the altitude and reduced cabin pressure &#8211; and it smells (to me) like vomit. I cannot eat airline food. Dinner for me was a brandy &amp; ginger and a bottle of wine. I tried to chill it in a cup with two ice cubes in it &#8211; I failed. The heat in the cabin rendered the ice cubes into water in about 5 minutes. Sigh.</p>
<p>We ask the crew to turn the heating down, or perchance, off completely. They promise to do so. It doesn&#8217;t work. Aaargh!</p>
<p>The entertainment is a rerun of some old <span style="text-decoration: line-through;">crappy</span> TV programs, which if memory serves me, started with something dire, was followed by a program about the Beatles, that then Progressed into a Tribute To Heath Leger followed by some other ancient drivel from the TV and got worse after that. It&#8217;s still too bloody hot!</p>
<p>It makes no difference anyway, the headphones supplied (excuse me, <em>sold</em> to us for £2.50 each) don&#8217;t work. Well, they do work, but the holes in the seat to plug them in are so close to your thighs that you can either have the headphones on or you can sit in the seat &#8211; but not both!</p>
<p>I suspect that after a few passenger plus headphones plugged in interactions, the sockets are trashed. No sound. It was the same on the way out as well. Thankfully, the TVs are small and so far away from where I&#8217;m sitting that watching is almost impossible anyway.</p>
<p>Later that same day &#8230;. it&#8217;s almost midnight. Guess what, it&#8217;s cooled down a lot now. The Captain finally managed to turn the heating off/down and we are almost comfortable &#8211; temperature wise I mean. The cabin comfort levels are non-existent I&#8217;m afraid. Everyone (it seems) is stiff and unable to move. I didn&#8217;t remember anyone putting their seats back to try and get a bit more comfortable &#8211; maybe the sound of cracking knee caps from behind put them off?</p>
<p>The cabin is full of people wanting desperately to go to sleep. The staff will sell you &#8220;comfort kits&#8221; consisting of a blanket, a blow up neck pillow and a mask. Hmm.</p>
<p>You will need the mask because even though it&#8217;s midnight (Egyptian Time) the Cabin staff are now selling Duty Free <span style="text-decoration: line-through;">crap</span> goods from the trolley at prices that appear way too high to be anything but Duty Free. (Other opinions are available!) The Cabin lights are turned up to full and other than take-off, they haven&#8217;t been anything but.</p>
<p>Now, the blow up pillow are a great idea. In principle that is. The idea is that you blow them up and place around your neck so that you can lean back in your chair (yeah right!) and have a nice comfortable place to rest your weary head as you drift off into a deep and comfortable sleep.</p>
<p>Reality has a nasty habit of changing things! The seats that we are supplied with are way too low in the head rest department, and any attempt to sleep with your head back results in your head falling over the back of the seat and irritating the people behind you! There is nothing at all to rest your head on! The seats in my car have more height to them than the ones in this plane! Monarch are the only airline I know that have such low seats.</p>
<p>Trying to rest your nice comfy pillow on the seat simply won&#8217;t work &#8211; you&#8217;ve been sold a pup &#8211; as the people in front of me discovered when they tried! At least the mask comes in handy as the Duty Free trolley is still slowly doing the rounds and the cabin is lit up at full brightness.</p>
<p>Trying to get to sleep I rest my head on the back of the chair in front of me. It doesn&#8217;t work. Any time anyone in any of the three seats in front of me moves &#8211; or breathes heavily &#8211; the vibrations transfer straight into my head.</p>
<p>I&#8217;m in the window seat (15A) and I think I could be able to lean my head against the window or the wall. How sadly mistaken was I? I start to nod off and my head falls backwards into the window recess, twisting my neck at an unnatural angle and wakes me up. I try again. Same result. I swear! Twice.</p>
<p>I suppose I forgot to mention the fact that the seats and the windows don&#8217;t line up? Well, they don&#8217;t. Some people can see out of two windows (ok, one and a bit) while some people can&#8217;t see out at all &#8211; even though they have a &#8220;window&#8221; seat. Hmm.</p>
<p>Ok, sleep is going to be difficult I can tell. But I try again, this time I must have drifted off for a while as I wake up to find the lights in the cabin have been dimmed. I look at my watch &#8211; why am I awake? Oh yes, I fell into the window again &#8211; we still have hours and hours to go yet.</p>
<p>I give up on sleep. I look out the window &#8211; there&#8217;s nothing on TV and anyway, my earphones don&#8217;t bloody work! (See above!) The view down to ground is quite pleasant &#8211; it&#8217;s a clear night and you can see for miles. Looking up, I can see even further as I can see stars! Oh well, that&#8217;s the good bits done then, back to the flight!</p>
<p>I attempt another attack on my complete exhaustion by leaning my head on the seat in front again. Alison &#8211; herself knackered &#8211; tries to sleep by leaning on my back. I think I drop off but the liquid lunch seems to be causing weird dreams (or it could just be the surreal reality of this flight!) and I&#8217;m not sure if I&#8217;m awake or asleep or what. Anyway, it doesn&#8217;t work and Alison gets off of me pretty soon. I&#8217;m awake again.</p>
<p>Alison has given up on sleeping now and has been trying to do Sudoku on my Nintendo DS but she soon gives up on that and starts chatting to the man in 15C. He turns out to be on permanent holiday since being laid off from his job as a civil engineering something or other! He was responsible for there Leeds City Tram project that the government canned. They chat for ages while I doze &#8211; my head still jammed onto the seat in front. I&#8217;ll have a textured forehead when we eventually get back to Manchester!</p>
<p>There&#8217;s a famous person on this flight as well. David someone or other. He plays the caretaker in the Harry Potter movies. I didn&#8217;t recognise him when he was chatting to us on our bus on the way out &#8211; or on the way back. Nice man. He&#8217;s knackered as well and seems to have given up on sleep and sitting down. He stood up for the best part of the flight.</p>
<p>Many people, when I look around, are doing the same. Standing. It&#8217;s the only thing to do. I suspect the number of numb bums on this flight is approaching 100% &#8211; mine certainly is.</p>
<p>I try to sleep. I doze mostly and I seem to remember when I could actually feel my feet. Thanks to that metal bracket (and the sloping curved sides of the plane) I&#8217;m sitting with my legs and feet at what can only be called &#8220;an unnatural angle&#8221; and I&#8217;m really uncomfortable. The man in front is in a similar situation and is complaining about his back giving him grief. I suspect others have a similar mindset.</p>
<p>Suddenly I awake from my doze. The plane has throttled back and dumped it&#8217;s nose into a downward direction. We must be descending into Manchester. I look at my watch and I can&#8217;t figure it out, we are early!</p>
<p>Half an hour later we are down and off the plan. What a relief. That flight was a nightmare and I&#8217;m surprised that Monarch are allowed to put passengers in a situation where they have no leg room and no foot room while sitting on a seat with no ability to lean back and rest their head. I&#8217;m not surprised people get DVT when flying.</p>
<p>Sometimes the only thing that spoils the joy of flight is being on a plane.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/04/fly-monarch-i-dont-think-so/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shag Fest!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/shag-fest/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/shag-fest/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:25:32 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=253</guid>
		<description><![CDATA[There&#8217;s a mass orgy taking place in our pond this weekend. The frogs are hard at it again &#8211; it must be springtime! The first spawn I found was actually in the filtration housing, one batch of spawn plus 38 frogs &#8211; 36 coupling and two single males looking for action. I hefted all the [...]]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a mass orgy taking place<span id="more-253"></span> in our pond this weekend. The frogs are hard at it again &#8211; it must be springtime!</p>
<p>The first spawn I found was actually in the filtration housing, one batch of spawn plus 38 frogs &#8211; 36 coupling and two single males looking for action.</p>
<p>I hefted all the above into the main pond itself, and left them to get on with it. Yesterday afternoon, the spawning had begun in earnest. This morning they are still laying.</p>
<p>It&#8217;s a shame that we have fewer frogs in the pond than we had on the last two years, plus those damned Koi haven&#8217;t died yet so any tadpoles that do hatch, will eventually be eaten. I saved some last year by a transfer to the small pond in the back garden &#8211; but it&#8217;s far too small to cope with the expected numbers of tadpoles. Sigh!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/shag-fest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Was Peed On By A Frog This Morning!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/i-was-peed-on-by-a-frog-this-morning/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/i-was-peed-on-by-a-frog-this-morning/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:39:18 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=249</guid>
		<description><![CDATA[What more can I say? I was leaving home, for work, this morning at 06:55 and when I opened the garage door (from the inside) a frog was sitting  there, right slap bang in the middle of the doorway. She, for it was a girl frog, just sat looking at me. Obviously, if I was [...]]]></description>
				<content:encoded><![CDATA[<p>What more can I say? <span id="more-249"></span></p>
<p>I was leaving home, for work, this morning at 06:55 and when I opened the garage door (from the inside) a frog was sitting  there, right slap bang in the middle of the doorway. She, for it was a girl frog, just sat looking at me.</p>
<p>Obviously, if I was to drive over her, she wouldn&#8217;t be too happy (neither would I, I like frogs) so I picked her up to take her to the pond.</p>
<p>She wasn&#8217;t happy about that at all. She peed all over my hands. Thanks girlie! Frog pee is cold by the way, in case you are interested!</p>
<p>Anyway, I took her up to the pond where rather a lot of other frogs are waiting for the right moment for a frog orgy and popped her in.</p>
<p>I didn&#8217;t kiss her though! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/i-was-peed-on-by-a-frog-this-morning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Bees are Flying Again!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/the-bees-are-flying-again/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/the-bees-are-flying-again/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 15:34:05 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=245</guid>
		<description><![CDATA[On Sunday (14th March) I went to check on the bees. Hefting the hive was a tad tricky as they were all out and about flying around and generally being bees. The weather had taken a bit of a warm turn (relative to recent months that is) and they took advantage. A closer inspection showed [...]]]></description>
				<content:encoded><![CDATA[<p>On Sunday (14th March) I went to check on the bees. Hefting the hive was a tad tricky as they were all out and about flying around and generally being bees. The weather had taken a bit of a warm turn (relative to recent months that is) and they took advantage. <span id="more-245"></span></p>
<p>A closer inspection showed a good few had been &#8220;hopping&#8221; over the hedge to a crocus &#8216;plantation&#8217; not 10 feet from the hive and were covered in shocking yellow pollen. This is a good sign.</p>
<p>I decided to take the mouse guard off and let them clear out the bodies of those bees that didn&#8217;t make it through the winter. They do it so much better than me after all!</p>
<p>It looks like we may have managed to keep our bees alive through their first winter. Thankfully!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/03/the-bees-are-flying-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Much Does it Cost to Keep Politicians Honest?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/how-much-does-it-cost-to-keep-politicians-honest/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/how-much-does-it-cost-to-keep-politicians-honest/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 07:56:37 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=242</guid>
		<description><![CDATA[£6.5 million per year it would appear. A new Parliamentary Standards Authority has been set up to monitor our beloved politicians and to keep them honest. According to Radio 4 today, this has an annual budget of £6.5 million and will employ 80 people. Is it just me, or is it a tad strange that [...]]]></description>
				<content:encoded><![CDATA[<p>£6.5 million per year it would appear. <span id="more-242"></span></p>
<p>A new Parliamentary Standards Authority has been set up to monitor our beloved politicians and to keep them honest. According to Radio 4 today, this has an annual budget of £6.5 million and will employ 80 people.</p>
<p>Is it just me, or is it a tad strange that the people we elect to run (ruin?) the country should need so much watching to keep them honest?</p>
<p>Someone mentioned on the news last week, when discussing Grodon Brown&#8217;s proposal for the new voting system, that we should have an option that says &#8220;none of the above&#8221; &#8211; well, I&#8217;ve been saying that ever since I first watched <em>Brewster&#8217;s Millions</em> many years ago.</p>
<p>In my opinion, voting should be mandatory &#8211; like Australia &#8211; but every ballot paper should have the final option of &#8220;none of the above&#8221; and that way we can show politicians exactly what we think. Gordon&#8217;s new system doesn&#8217;t let us show our disapproval &#8211; funny that eh?</p>
<p>I suppose, looking on the bright side, 80 people will have a new job.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/how-much-does-it-cost-to-keep-politicians-honest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Oracle Scripting Standards</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/my-oracle-scripting-standards/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/my-oracle-scripting-standards/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 15:05:53 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=236</guid>
		<description><![CDATA[Subject to unannounced changes of course, but &#8230; All supplied scripts will be QA&#8217;d to ensure adherence to the following standards. Any script that fails on one or more of the following rules will not be applied to any system. Instead it will be returned to the vendor for correction. All vendor or internally supplied [...]]]></description>
				<content:encoded><![CDATA[<p>Subject to unannounced changes of course, but &#8230;<span id="more-236"></span></p>
<ul>
<li><strong>All supplied scripts will be QA&#8217;d to ensure adherence to the following standards. </strong></li>
</ul>
<p>Any script that fails on one or more of the following rules will not be applied to any system. Instead it will be returned to the vendor for correction.</p>
<ul>
<li><strong>All vendor or internally supplied scripts must be able to be run &#8211; without error &#8211; in SQL*Plus.</strong></li>
</ul>
<p>We need this as a standard because of all the wonderful GUI tools out there in vendor land, Toad etc are fine &#8211; if you can guarantee that the person running the script has the same tool.  SQL*Plus should be available in all Oracle installations. I much prefer Toad myself, but this is how it is.</p>
<p>I have seen (and run!) scripts in the past where semi-colons were missing off the end of statements. These had been tested and proved to work under some GUI or other that allowed this sort of thing &#8211; but come the day of reckoning, they failed in SQL*Plus.</p>
<ul>
<li><strong>All scripts must spool to &lt;scriptname&gt;.log.</strong></li>
</ul>
<p>This is so that we can see what errors occurred rather than hoping to spot them all as they zoom off the top of the screen at high speed!</p>
<ul>
<li><strong>The use of WHENEVER is not permitted. </strong></li>
</ul>
<p>It&#8217;s a pain when a script blows up at the first hurdle and then carries on, however, scripts which blow up and immediately vanish are even worse.</p>
<ul>
<li><strong>All scripts will explicitly set linesize, pagesize, trimspool etc.</strong></li>
</ul>
<p>No assumptions about how the client is set up shall be made. The vendor must explicitly specify all required options.</p>
<ul>
<li><strong>Commit and/or rollback is not permitted in any script.</strong></li>
</ul>
<p>Obvious really. If the vendor tests on a 6 row table and it all works, that&#8217;s fine. What if I have a 3.6 billion row table (and I do!) that, if updated, could blow away my UNDO tablespace? I don&#8217;t want some developer telling me it&#8217;s ok to commit in such an event, I&#8217;m the DBA so I decide.</p>
<p>Scripts must instead prompt the DBA to commit or rollback as appropriate after checking the log file (see above) as required.</p>
<ul>
<li><strong>Mixing DDL and DML is forbidden.</strong></li>
</ul>
<p>It is surprising how many vendors don&#8217;t know how Oracle works. The simply do not realise that DDL implicitly commits any outstanding transactions before it starts to CREATE or ALTER or DROP or whatever. It then commits again when done (if successful).</p>
<p>If you do see scripts from vendors that mix and match DML and DDL (and invariable compound the error by having a commit at the end!) then you should be on your guard for other problems &#8211; they don&#8217;t know what they are doing!</p>
<p>If it is impossible (!) to separate DML and DDL then it is imperative that all the DDL is executed first and all the DML executed last. This prevents the implicit commits from affecting the DML statements. However, it is advised that separate scripts are supplied for the DDL and DML parts.</p>
<ul>
<li><strong>Scripts that create stored procedure code must SHOW ERRORS.</strong></li>
</ul>
<p>It&#8217;s always nice when that well tested piece of code that creates a new package or whatever, fails to compile on my databases, but it doesn&#8217;t tell me why. Slipping a SHOW ERRORS in at the end of the CREATE OR REPLACE &#8230; is a nice little touch and keeps the DBA happy. The DBA is especially happy as the errors are logged in the spool file (see above) and can be sent straight back to the vendor for correction!</p>
<ul>
<li><strong>Do not drop temporary tables in the same script that created/used them.</strong></li>
</ul>
<p>This shouldn&#8217;t ever occur based on not mixing DDL and DML, but I have seen scripts which:</p>
<ol>
<li>Create temp_table as select * from live_table;</li>
<li>DML the temp table to massage the data.</li>
<li>Drop live_table;</li>
<li>Create new live_table as select * from temp_table;</li>
<li>Drop temp_table;</li>
</ol>
<p>Now, the obvious problem is this, it <em>always </em>fails at step 1. Steps 2 through 4 obviously also fail resulting in the loss of the live table and all it&#8217;s data. (10g recycle bin not withstanding!) and finally, we drop the temp table at step 5 losing all the data completely.</p>
<p>At this point, it&#8217;s back to the backups &#8211; you did take a backup didn&#8217;t you?</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/02/my-oracle-scripting-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dead Bees :-(</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2010/01/dead-bees/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2010/01/dead-bees/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 15:16:11 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=232</guid>
		<description><![CDATA[I hefted the hive the other evening &#8211; checking for the remaining supplies &#8211; it&#8217;s still heavy, so the girls should be fine for a while yet. Unfortunately, when I peeked in through the mouse guard, there was a pile of dead bees. Not good. There are still lots of live ones, clustering on the [...]]]></description>
				<content:encoded><![CDATA[<p>I hefted the hive the other evening &#8211; checking for the remaining supplies &#8211; it&#8217;s still heavy, so the girls should be fine for a while yet. <span id="more-232"></span></p>
<p>Unfortunately, when I peeked in through the mouse guard, there was a pile of dead bees. Not good. There are still lots of live ones, clustering on the combs to stay warm (and alive!) so that&#8217;s good. It&#8217;s just a shame that winter kills off so many of them.</p>
<p>The other thing is, being on our first season of actual bee keeping, we don&#8217;t know what to expect in winter. The last couple have been wet and miserable and that&#8217;s what kills bees, damp, not cold.</p>
<p>We shall see what happens soon. The queen should be up and laying shortly, then the stores will start going down and we&#8217;ll need to keep a close eye on them then. We don&#8217;t want them to starve after surviving all winter.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2010/01/dead-bees/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The bees are clustering for winter</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/the-bees-are-clustering-for-winter/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/the-bees-are-clustering-for-winter/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 19:40:05 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=225</guid>
		<description><![CDATA[Well, the snows are here and the temperatures have dropped dramatically. The bees are settled in for winter. Hopefully they will make it through to next year (only eight days away!) and be ready to start hunting and gathering pollen, nectar and all  the other stuff that they seem to like so much. We only [...]]]></description>
				<content:encoded><![CDATA[<p>Well, the snows are here and the temperatures have dropped dramatically. The bees are settled in for winter. <span id="more-225"></span>Hopefully they will make it through to next year (only eight days away!) and be ready to start hunting and gathering pollen, nectar and all  the other stuff that they seem to like so much.</p>
<p>We only had them for a brief period at the end of 2009, we got them in late August/Early September but so far they seem to have been fine. Not too much varroa even with ApiGuard in the hive and I&#8217;ve just bought them a Christmas present of some Oxalic acid. When I get a decent enough day, I shall apply it and that should hopefully reduce any chance of getting a load of nasty mites in the new year when the brood comes on.</p>
<p>The mouse guard is on and secure, the bees can be seen in the brood box, clustered together for heat and warmth. With the temperatures below zero at the moment, they need all the heat that they can get.</p>
<p>I have 12Kg of baker&#8217;s fondant in the garage all ready in case they haven&#8217;t got enough stores to make it through. Regular hefting of the hive seems ok at present, but January is when queenie should start laying again, and the stores will take a severe hit when she does.</p>
<p>Here&#8217;s to next year.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/the-bees-are-clustering-for-winter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a bloody life!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/get-a-bloody-life/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/get-a-bloody-life/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 10:10:28 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=221</guid>
		<description><![CDATA[Check out this link first. Speaking as a ginger myself, I have no idea what that woman is complaining about. So what if a card says something funny about gingers (ok, funny is relative, some things I find funny others don&#8217;t and vice versa) &#8211; it&#8217;s called humour and it doesn&#8217;t hurt! I wonder if [...]]]></description>
				<content:encoded><![CDATA[<p>Check out <a title="Tesco apologise to gingers" href="http://news.bbc.co.uk/1/hi/england/north_yorkshire/8411894.stm" target="_blank">this link</a> first.</p>
<p><span id="more-221"></span>Speaking as a ginger myself, I have no idea what that woman is complaining about. So what if a card says something funny about gingers (ok, funny is relative, some things I find funny others don&#8217;t and vice versa) &#8211; it&#8217;s called humour and it doesn&#8217;t hurt!</p>
<p>I wonder if this woman was simply &#8216;offended&#8217; because she was after a payout form Tesco for &#8220;mental distress&#8221; or some other such nonsense. I find that being offended is usually an indicator that you have nothing to say. It&#8217;s what the religious fundies are all using as an excuse these days to complain about people saying or doing something that their particular imaginary friend would disapprove of.</p>
<p>The fact that this woman got TV News time and an interview on North Tonight on the BBC is laughable.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/12/get-a-bloody-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Have Bees!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/10/we-have-bees/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/10/we-have-bees/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 18:53:27 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=213</guid>
		<description><![CDATA[Well, it has happened &#8211; granted, a few weeks ago &#8211; but we have bees. Peter, our mentor was as good as his word and he supplied us with a hive of bees. They were moved by us from a location outside Leeds, West Yorkshire, to our own location. I got stung twice &#8211; once [...]]]></description>
				<content:encoded><![CDATA[<p>Well, it has happened &#8211; granted, a few weeks ago &#8211; but we have bees. <span id="more-213"></span> Peter, our mentor was as good as his word and he supplied us with a hive of bees. They were moved by us from a location outside Leeds, West Yorkshire, to our own location. I got stung twice &#8211; once on the arm and once on the end of my nose! That certainly makes your eyes water, I can tell you!</p>
<p>Since then, the bees have been transferred from Peter&#8217;s hive into our own and they have settled in nicely. After transferring them, Peter, Alison and I spent a happy evening extracting honey from them. Considering the bees had only found Peter&#8217;s hive about 4 weeks before we extracted, the fact that we got about 20 pounds (UK) of honey from them was a good haul indeed.</p>
<p>Since then, they have been feeding almost exclusively &#8211; or as exclusively as we can tell &#8211; on <a title="Himalayan Balsam" href="http://en.wikipedia.org/wiki/Himalayan_Balsam" target="_blank">Himalayan Balsam</a> which in the UK is a weed and should be eradicated. This, of course, leaves DEFRA and the Environment Agency with a huge problem. Bees are suffering tremendously at the moment with all sorts of problems and Himalayan Balsam keeps flowering late into the season &#8211; it&#8217;s still flowering now at the beginning of October &#8211; and keeps the bees alive. The other nice thing about HB is that the honey it produces (by way of the bees of course!) is the finest you can taste. What a problem.</p>
<p>As bee keepers (and we have certificates to prove it) Alison and I prefer the HB to stay around for a bit. The bees love it, the flowers are extremely nice &#8211; they look like orchids to us &#8211; but it&#8217;s an invasive weed. Who said life was easy.</p>
<p>Anyway, we are feeding the bees on a sugar syrup at the moment, but not for much longer, as we have robbed them of a lot of honey. The recipe is simple, 2 KG of sugar to one litre of water, heat slowly stirring all the time until dissolved. Allow to cool. If it starts to crystalise add some more hot water and stir again. Easy!</p>
<p>Lets hope we can get these bees through the winter and into next year where they will be able to make as much honey as possible and we will leave them with plenty for themselves. I think it&#8217;s better for the bees to feed on their own food rather than the sugar syrup we give them &#8211; and every little helps. Bees, at the moment, need lots of help.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/10/we-have-bees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Bees Are Coming!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/the-bees-are-coming/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/the-bees-are-coming/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 18:50:47 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Bees]]></category>
		<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=208</guid>
		<description><![CDATA[Tomorrow night (Tuesday 18th August 2009), Alison and I are off out to a secret location near where we live to colect our very first honey bee swarm. Our Mentor, Peter, has been looking after then for us while we were on holiday, and tomorrow we get to take them home. We&#8217;ve been on the [...]]]></description>
				<content:encoded><![CDATA[<p>Tomorrow night (Tuesday 18th August 2009), Alison and I are off out to a secret location near where we live to colect our very first honey bee swarm. Our Mentor, Peter, has been looking after then for us while we were on holiday, and tomorrow we get to take them home.<span id="more-208"></span></p>
<p>We&#8217;ve been on the Harrogate &amp; Ripon Beekeepers Association course and are, unfortunately, the last people to get some bees. Some people have simply placed a hive outside and had bees come and live there by themselves, others have purchased bees for themselves (I&#8217;m Scottish and Alison is Yorkshire &#8211; so that was never going to be an option was it? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) while others have managed to obtain a swarm from their mentors &#8211; we just happened to be last!</p>
<p>We are very excited &#8211; as you can imagine &#8211; and looking forward to the imminent arrival. Hopefully, we can remember all that we were taught by HRBKA and we will make good &#8216;parents&#8217; to our swarm.</p>
<p>With winter coming soon (well, it is August you know!) we will most likely need to keep them fed throughout the remainder of this year &#8211; it is quite late in the season for a swarm. Hopefully this winter will not be as miserable as the last two which caused havoc with the bee populations all over the country.</p>
<p>Wish us luck!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/the-bees-are-coming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Oracle deadlocks &#8211; what happens?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/oracle-deadlocks-what-happens/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/oracle-deadlocks-what-happens/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 13:30:34 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=192</guid>
		<description><![CDATA[From time to time an Oracle based application will encounter a deadlock. This happens when two (or more) sessions are holding onto a resource and waiting for another one before it can relinquish the one(s) it holds. There is quite a lot of misunderstanding about deadlocks and what happens within Oracle to relieve the situation. [...]]]></description>
				<content:encoded><![CDATA[<p>From time to time an Oracle based application will encounter a deadlock. This happens when two (or more) sessions are holding onto a resource and waiting for another one before it can relinquish the one(s) it holds. <span id="more-192"></span></p>
<p>There is quite a lot of misunderstanding about deadlocks and what happens within Oracle to relieve the situation. Hopefully this blog entry will help to sort it all out.</p>
<p>First of all, a brief demonstration.</p>
<p><strong>Background.</strong></p>
<pre>CREATE TABLE DEADLOCK (A NUMBER);
INSERT INTO DEADLOCK VALUES (1);
INSERT INTO DEADLOCK VALUES (2);
COMMIT;</pre>
<p><strong>Session One.</strong></p>
<pre>DELETE FROM DEADLOCK WHERE A=1;</pre>
<p>Nothing wrong so far, the row will be deleted.</p>
<p><strong>Session Two.</strong></p>
<pre>DELETE FROM DEADLOCK WHERE A=2;</pre>
<p>Again, nothing wrong, the row will be deleted.</p>
<p><strong>Session One.</strong></p>
<pre>DELETE FROM DEADLOCK WHERE A=2;</pre>
<p>This session will hang waiting for Session Two to commit (in which case the delete will fail) or rollback.</p>
<p><strong>Session Two.</strong></p>
<pre>DELETE FROM DEADLOCK WHERE A=1;</pre>
<p>This session will hang waiting for Session One to commit (in which case the delete will fail) or rollback. In addition, we now have a deadlock condition.</p>
<p>After a few seconds, Oracle will detect the deadlock and pick one of the sessions and &#8216;rollback&#8217; the statement. This is where we see our first misunderstanding about deadlocks.</p>
<ul>
<li>Oracle <strong>does not</strong> kill the session.</li>
<li>Oracle <strong>does not</strong> kill the transaction.</li>
<li>Oracle <strong>only</strong> kills the <strong>statement</strong>.</li>
<li>Oracle <strong>does</strong> rollback the failing statement, but Oracle <strong>does not</strong> rollback the entire transaction that the failing statement is part of. (<em>Correction by Mark Bobak.)</em></li>
<li>PMON (Process Monitor) <strong>does not</strong> clear out the locks.</li>
</ul>
<p>It is the responsibility of the session that detects the &#8220;<em>ORA-00060 deadlock detected while waiting for resource</em>&#8221; error to trap and handle the error by issuing a rollback (or a commit) command. <strong>Only</strong> once this has been done will the other session be able to continue.</p>
<p>If, like me, you run a test of the above using two separate SQL*Plus sessions (or <a title="Toad for Oracle" href="http://www.quest.com/toad-for-oracle/" target="_blank">TOAD</a> sessions, whatever you like) you will find that the session that detects the deadlock will return to a prompt and allow you to enter new commands. The other session <strong>remains hung</strong> until such time as the other session releases the locks it took out on the rows it had deleted.</p>
<p>This demonstration uses DELETEs but UPDATE will show similar results.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/08/oracle-deadlocks-what-happens/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>God or Santa?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/god-or-santa/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/god-or-santa/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 15:08:23 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=181</guid>
		<description><![CDATA[I&#8217;m not a religious person &#8211; I think and check the evidence rather than accepting the word of a misogynistic bloke in a frock. However when confronted by a religious zealot I find the following conversation goes down rather well! But then, I&#8217;m a right b&#8217;stard! Me: Do you believe in Santa Claus? Religious Person: [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m not a religious person &#8211; I think and check the evidence rather than accepting the word of a misogynistic bloke in a frock. <span id="more-181"></span></p>
<p>However when confronted by a religious zealot I find the following conversation goes down rather well! But then, I&#8217;m a right b&#8217;stard!</p>
<p><strong>Me</strong>: Do you believe in Santa Claus?<br />
<strong>Religious Person</strong>: No, don&#8217;t be stupid.<br />
<strong>Me</strong>: But you believe in god?<br />
<strong>RP</strong>: Yes, of course.</p>
<p>So what&#8217;s the difference? They are both &#8216;invisible&#8217;, both live in &#8216;far away&#8217; places, both know if you are good or bad, both will reward you for being good or punish you for being bad &#8230;</p>
<p>The other thing about RPs in general (ok, the so called Christians) is that when you point out that something in the Bible &#8211; <em>all characters and events in this book are fictitious, any resemblance to persons living or dead is entirely coincidental</em> &#8211; they <em>always</em> say that I shouldn&#8217;t take any notice of <em>that</em> bit.</p>
<p>Excuse me? Is this the word of god or not? Who decides what we pay attention to or otherwise then? If you are picking and choosing which bits of the &#8216;rule book&#8217; to take note of and which to ignore, then surely you are making it all up as you go along and choosing your own customised version of the bible.</p>
<p>One god? <del><a title="The million gods project" href="http://richarddawkins.net/forum/viewtopic.php?f=3&amp;t=73778" target="_blank">I think not!</a></del> (Sorry, that link is gone now, there&#8217;s an updated one <a title="Million Gods Project" href="http://forum.richarddawkins.net/viewtopic.php?f=3&amp;t=73778" target="_blank">here instead</a>.)</p>
<p>And one last thing, why exactly do they put lightning conductors on church spires then? Have they no faith? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/god-or-santa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have Change Control become the new Health &amp; Safety?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/have-change-control-become-the-new-health-safety/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/have-change-control-become-the-new-health-safety/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 14:49:07 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=176</guid>
		<description><![CDATA[All organisations need Change Control to make sure that changes are applied correctly and so on. However, have Change Control departments become the new &#8220;Health &#038; Safety&#8221; and gone beyond being useful to being a disruptive and obstructive unit interested only in getting in the way rather than getting work done? I&#8217;m all in favour [...]]]></description>
				<content:encoded><![CDATA[<p>All organisations need Change Control to make sure that changes are applied correctly and so on. However, have Change Control departments become the new &#8220;Health &#038; Safety&#8221; and gone beyond being useful to being a disruptive and obstructive unit interested only in getting in the way rather than getting work done? <span id="more-176"></span></p>
<p>I&#8217;m all in favour of change control &#8211; it serves a purpose and helps prevent invalid changes being applied to production (or test) systems without them having been checked, tested and applied correctly with full cooperation from the system&#8217;s users.</p>
<p>However, I&#8217;m seeing a trend develop whereby the cascade or new rules and regulations, redesigned forms, consultation matrices and all the attendant palaver have simply become a joke.  Change Control are rapidly hurtling down the road to becoming the new Health &#038; Safety with all the ludicrous diktats that they produce.</p>
<p>These people are left in control of whether a change is applied or not and as to the quality of the code being applied, they care not a jot. However, get a date wrong on a form (filled in in multiple copies of course!) and all hell breaks loose with arrogant emails winging their way around everyone in the entire universe to let them know that you failed to fill in a date correctly.</p>
<p>Finished the task? All went ok? Now fill in a Post Implementation review form or else. Even when there are no actual changes taking place &#8211; which they will know from reading the myriad of forms we have sent them prior to getting approval for the &#8216;change&#8217; &#8211; they insist on knowing what was changed and how well it went!</p>
<p>If a change is raised as an emergency, I need to apply it now and right this minute. I do not need or want some numpty who doesn&#8217;t know what the change is actually doing or for telling me that it&#8217;s not really an emergency because I put a date on to start the work in 5 days time &#8211; which is what I have to do in order to get a change approved.</p>
<p>Then, equally, when we agree that perhaps maybe it might actually be an emergency, they then spend the next three days trying to get me to update the work plan to insert the correct end dates and times for the various parts of the change.</p>
<p>My advice is this, change happens, it needs to be controlled, and this is a good thing. However, Change Control departments need to butt out and start doing their job and stop telling the rest of us how to do ours &#8211; after all, we don&#8217;t go to their office and tell them how to sweep up do we! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I <em>have</em> worked with lots of Change Control people who knew what they were doing, but in recent times they have become few and far between.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/have-change-control-become-the-new-health-safety/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PL/SQL expression evaluator</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/plsql-expression-evaluator/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/plsql-expression-evaluator/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 12:43:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=164</guid>
		<description><![CDATA[The following is a pretty nice expression evaluator for Oracle&#8217;s PL/SQL language. You pass it a string containing an expression that would return a numeric value when evaluated and it will evaluate the entire expression and return the number. The passed expression must be in valid Oracle syntax or you will get a NULL instead [...]]]></description>
				<content:encoded><![CDATA[<p>The following is a pretty nice expression evaluator for Oracle&#8217;s PL/SQL language.  You pass it a string containing an expression that would return a numeric value when evaluated and it will evaluate the entire expression and return the number. <span id="more-164"></span></p>
<p>The passed expression must be in valid Oracle syntax or you will get a NULL instead of a number.</p>
<pre>CREATE FUNCTION expression (iExpression IN varchar2)
RETURN number AS

vResult number;

BEGIN
-----------------------------------------------------------
-- Expression evaluator for PL/SQL.
-- Pass in a string containing the expression you want to
-- evaluate using correct Oracle syntax and the result will
-- be returned.
--
-- WARNING: Causes a parse for every expression and will
-- soon fill your cache with similar statements.
-----------------------------------------------------------
-- Norman Dunbar    02 July 2009        Created new function.
-----------------------------------------------------------

execute immediate 'begin :r := ' || iExpression ||
                          ' ; end;' using OUT vResult;

RETURN vResult;

EXCEPTION
WHEN others THEN
RETURN NULL;  -- It all went horribly wrong!
END;
/</pre>
<p>Of course, it has its drawbacks, the biggest one being that it will, if called repeatedly with different expressions, fill up your cache with similar statements.</p>
<p>So my challenge is to come up with a similar and equally short PL/SQL routine that will not age potentially useful SQL out of the cache while leaving multiple copies of</p>
<pre>begin :r := 2+2; end;</pre>
<p>and so on lying around taking up valuable cache space.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/07/plsql-expression-evaluator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If I committed a crime, would the government pay for me?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/if-i-committed-a-crime-would-the-government-pay-for-me/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/if-i-committed-a-crime-would-the-government-pay-for-me/#comments</comments>
		<pubDate>Tue, 26 May 2009 12:51:19 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=159</guid>
		<description><![CDATA[The recent revelations about the inhuman brutality and abuse heaped on innocent children by the so called Sisters Of Mercy and/or the Christian Brothers over 60 odd years in Ireland is an abomination. Summary of the report Reactions But what is worse is the fact that before the report came out damning the Catholic Church [...]]]></description>
				<content:encoded><![CDATA[<p>The recent revelations about the inhuman brutality and abuse heaped on innocent children by the so called <em>Sisters Of Mercy</em> and/or the <em>Christian Brothers</em> over 60 odd years in Ireland is an abomination.<span id="more-159"></span></p>
<p><a title="Report summary" href="http://news.bbc.co.uk/1/hi/northern_ireland/8059973.stm" target="_blank">Summary of the report</a></p>
<p><a title="Reactions to the report" href="http://news.bbc.co.uk/1/hi/world/europe/8060056.stm" target="_blank">Reactions</a></p>
<p>But what is worse is the fact that before the report came out damning the Catholic Church for covering up and/or ignoring the abuse (physical, mental and sexual) a couple of things happened.</p>
<ul>
<li>The Christian Brothers successfully sued in 2004 (the report was 9 years in the making)  banning the report from naming names and so no-one can be prosecuted.</li>
</ul>
<ul>
<li>The Catholic Church negotiated with the Irish Government with the end result that it is the <em>Irish Tax Payers</em> who are paying the vast majority of the compensation for the crimes committed by the Catholic Church.</li>
</ul>
<p>Something here doesn&#8217;t make sense to me.</p>
<p>Even better, when the Irish citizens discovered this fact and created a row about it (as reported on the BBC news this morning &#8211; Tuesday 26th May 2009) the Church simply announced that it <em>would not be renegotiating the deal</em>.</p>
<p>I fail to see how or why the Catholic Church &#8211; one of the richest institutions in the world &#8211; should be allowed to commit heinous crimes over 60 odd years and then get off by having the people that the crimes were committed against, pay the compensation. Despicable.</p>
<p>My advice to people worldwide who wish to have children is simple:</p>
<ul>
<li>Don&#8217;t. There are far too many people on this planet already and we do not need any more.</li>
<li>If you ignore my advice above, don&#8217;t forget to keep your children well away from the Catholics.</li>
</ul>
<p>Actually, keeping your children well away from any form or religion sounds like excellent advice to me. Live in the real world and not the one favoured by these people who believe in an invisible sky fairy who rules over us all.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/if-i-committed-a-crime-would-the-government-pay-for-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elephant safari</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/elephant-safari/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/elephant-safari/#comments</comments>
		<pubDate>Thu, 14 May 2009 09:00:13 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=149</guid>
		<description><![CDATA[Way back in the mists of time, Alison and I spent a wee while in South Africa you can see some of the pictures here. One of the activities we went on was an Elephant Safari. Well, if this picture is anything to go by, we didn&#8217;t have half as exciting a time as these [...]]]></description>
				<content:encoded><![CDATA[<p>Way back in the mists of time, Alison and I spent a wee while in South Africa<span id="more-149"></span> you can see some of the <a title="Safari Pictures" href="http://homepage.ntlworld.com/alison.dunbar/southafrica2006/index.html" target="_blank">pictures here</a>. One of the activities we went on was an <a title="On an elephant" href="http://homepage.ntlworld.com/alison.dunbar/southafrica2006/pages/PICT0085.html" target="_blank">Elephant Safari</a>.</p>
<p>Well, if this picture is anything to go by, we didn&#8217;t have half as exciting a time as these people!</p>
<div class="wp-caption alignnone" style="width: 510px"><a href="http://img17.imageshack.us/img17/4121/k4vsjpg.jpg"><img title="Having fun?" src="http://img17.imageshack.us/img17/4121/k4vsjpg.jpg" alt="" width="500" height="375" /></a><p class="wp-caption-text">Click picture for the full sized original</p></div>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/elephant-safari/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Might as well jump on the bandwagon</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/might-as-well-jump-on-the-bandwagon/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/might-as-well-jump-on-the-bandwagon/#comments</comments>
		<pubDate>Wed, 13 May 2009 13:17:54 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=145</guid>
		<description><![CDATA[MP&#8217;s expense claims seem to be causing all sorts of trouble at the moment. It&#8217;s extremely funny how The Daily Mail suddenly went all quiet on the subject after it was discovered that the Tories had been just as dishonest as Labour. Funny that. I work for a living and if I get a job [...]]]></description>
				<content:encoded><![CDATA[<p>MP&#8217;s expense claims seem to be causing all sorts of trouble at the moment.<span id="more-145"></span></p>
<p>It&#8217;s extremely funny how The Daily Mail suddenly went all quiet on the subject after it was discovered that the Tories had been just as dishonest as Labour. Funny that.</p>
<p>I work for a living and if I get a job in London and have to live there, I can claim a <em>limited</em> amount of my overall expense back. This is fine.</p>
<p>Why is it that MPs, who are doing nothing more than a job &#8211; like the rest of us &#8211; can claim all sorts of <em>additional</em> expenses over and above what we lowly workers can claim?</p>
<p>I can&#8217;t get a load of scatter cushions on expenses for my flat in London, not that I would allow any scatter cushions within the four walls mind you, so why the f*ck should MPs be allowed to? At our expense as well?</p>
<p>When they put themselves up for election they know what the job entails, London, and if they don&#8217;t want to have the same overheads of working away from home as the rest of the population, then tough, don&#8217;t apply for the bloody job then.</p>
<p>Is it just me that thinks these people have some sort of superiority complex over the rest of us? Being am MP is doing a job, nothing more, nothing less. They get paid for it and incur expenses like we all do. Deal with it in the same way that we have to.</p>
<p>It&#8217;s not bloody rocket science after all. (But if it was, then you can bet that the rocket scientists wouldn&#8217;t be getting tax payers to fund <em>their</em> scatter cushion fund!)</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/might-as-well-jump-on-the-bandwagon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bloody cyclists have a new weapon!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/bloody-cyclists-have-a-new-weapon/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/bloody-cyclists-have-a-new-weapon/#comments</comments>
		<pubDate>Tue, 12 May 2009 12:45:56 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=140</guid>
		<description><![CDATA[Driving to work this morning when I hit the Kirkstall Road area where a perfectly good dual carriageway has been split into a bus (and cyclist) lane only and a lane for the rest of us. at the end of this section of the road, there is a set of traffic lights that only affect [...]]]></description>
				<content:encoded><![CDATA[<p>Driving to work this morning when I hit the Kirkstall Road area where a perfectly good dual carriageway has been split into a bus (and cyclist) lane only and a lane for the rest of us.<span id="more-140"></span> at the end of this section of the road, there is a set of traffic lights that only affect the non-bus (and cyclist) lane.</p>
<p>The purpose of these lights is to stop the normal people from getting to work on time, while allowing those on a bus the ability to get about 20 yards further up the road than they would normally if there were no lights there. Go figure, this is Leeds after all.</p>
<p>The lights are operated &#8211; in other words, they turn red &#8211; when a bus or coach passes over a sensor in the road about 300 yards back from the lights themselves. This allows the bus to trigger said sensor and travel at breakneck speed &#8211; as they do &#8211; towards the lights which will have turned red by the time it gets there.</p>
<p>Unfortunately, this morning, all the bloody cyclists were triggering the sensor as well. So every bloody cyclist passing over the section of road where the sensor was buried, turned the lights red. We all have to stop while no buses are coming and the cyclists are so far away from the lights that they will be green by the time they get there.</p>
<p>What a crock of shit!</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/bloody-cyclists-have-a-new-weapon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s wrong with this file system?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/whats-wrong-with-this-file-system/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/whats-wrong-with-this-file-system/#comments</comments>
		<pubDate>Mon, 11 May 2009 10:02:24 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[QDOSMSQ]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=133</guid>
		<description><![CDATA[On the QL we have traditionally had a 36 character limit on file names after the initial (5 character) device name. Something like this: flp1_source_code_myfile_c In the above, flp1_ is the device name and is not included in the 36 character limit. There can be a network device tagged on the front as well, and [...]]]></description>
				<content:encoded><![CDATA[<p>On the QL we have traditionally had a 36 character limit on file names after the initial (5 character) device name. Something like this: <span id="more-133"></span></p>
<pre>flp1_source_code_myfile_c</pre>
<p>In the above, <em>flp1_</em> is the device name and is not included in the 36 character limit. There can be a network device tagged on the front as well, and this too is not included in the filename limit.</p>
<p>Technically, in the above, <em>source</em> and <em>code</em> are both directories (the default directory separator is the underscore character) while <em>myfile_c</em> is the filename and extension.</p>
<p>In the original days of the QL, all we had was a pair of built in <a title="QL Microdrives" href="http://terdina.net/ql/mdv.html" target="_blank">microdrives</a> and so the file name limit wasn&#8217;t too much of a hassle because we only had about 100KB (yes, KB) to play with and there were no actual directories as such.</p>
<p>Then we moved on to floppies and even a 40 MB (yes, MB) hard drive &#8211; and suddenly, this limit began to look rather silly, especially as we now had proper directories.</p>
<p>The problem, as I see it is simple. Inside the directory entry for a filename, a space of 36 characters has been reserved. Unfortunately, given the above filename as an example, the following will happen:</p>
<ul>
<li>The root directory on the floppy disc will contain an entry for a directory named <em>source</em>.</li>
<li> The <em>source</em> directory will have an entry for a directory named <em>source_code</em>.</li>
<li> The <em>source_code</em> directory will have an entry for a file named <em>source_code_myfile_c</em>.</li>
</ul>
<p>You can see the problem, the entire directory structure, less the device name, is replicated all the way down the tree. Surely it makes sense, even with a 36 character limit, to only have the appropriate parts of the full path in each directory. For example:</p>
<ul>
<li>The root directory on the floppy disc will contain an entry for a directory named <em>source</em>.</li>
<li> The <em>source</em> directory will have an entry for a directory named <em>code</em>.</li>
<li> The <em>code</em> directory will have an entry for a file named <em>myfile_c</em>.</li>
</ul>
<p>With this system, we would be able to have almost unlimited depth to our disc structures &#8211; possibly not wise &#8211; and each part of a file&#8217;s full path would be limited to 36 characters, not the entire path itself.</p>
<p>Well, I think it makes sense anyway.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/whats-wrong-with-this-file-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A different way to spend a Saturday &#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/a-different-way-to-spend-a-saturday/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/a-different-way-to-spend-a-saturday/#comments</comments>
		<pubDate>Mon, 11 May 2009 09:40:45 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=125</guid>
		<description><![CDATA[Alison and I went to Harrogate on Saturday and spent the day building a couple of beehives. Alison hasn&#8217;t done any form of wood workery before and she did a really good job of putting her hive together, although her hammering technique was a tad amusing, but then again, as she&#8217;s never had to use [...]]]></description>
				<content:encoded><![CDATA[<p>Alison and I went to Harrogate on Saturday and spent the day <span id="more-125"></span>building a couple of beehives. Alison hasn&#8217;t done any form of wood workery before and she did a really good job of putting her hive together, although her hammering technique was a tad amusing, but then again, as she&#8217;s never had to use a hammer before why should she know?</p>
<p>Me? Well, I&#8217;m a professional (mechanic and DBA) and I managed to get a bit of mine glued and nailed into the wrong location and, I think, upside down as well! Duh! A quick bash with a hammer and chisel and it was retrieved ready to be fixed onto the right place.</p>
<p>At present the hives are store in the garage and are exuding a very pleasant &#8220;woody&#8221; smell. Hopefully soon we will get them into the garden and full of bees.</p>
<p>For details of bee keeping in the West Yorkshire area, check out <a title="http://www.hrbka.org.uk/" href="http://www.hrbka.org.uk/" target="_blank">http://www.hrbka.org.uk/</a> which is, if I do say so myself, a rather fine website.</p>
<p>We also prepared for the arrival of our new workers by purchasing a smoker, a hive tool, some frames and foundation (for the brood box) from <a title="Claro Bees" href="http://www.hrbka.org.uk/index.php?option=com_content&amp;view=article&amp;id=9&amp;Itemid=14" target="_blank">Claro Bees</a> and ordering a couple of rather natty jackets with a built in veil. Both in bridal white as well so we shall look very dashing indeed!</p>
<p>Claro Bees is an intersting shop. It looks like a portakabin!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/05/a-different-way-to-spend-a-saturday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I hate those damned koi carp!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/i-hate-those-damned-koi-carp/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/i-hate-those-damned-koi-carp/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 19:44:11 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>
		<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=120</guid>
		<description><![CDATA[As mentioned previously on this blog, we have had a large number of breeding frogs in our pond.Well the tadpoles have hatched and are growing well. At least, the ones that manage to stay well hidden are. Those damned Koi are eating machines and there is wholesale slaughter going on in the pond at the [...]]]></description>
				<content:encoded><![CDATA[<p>As mentioned previously on this blog, we have had a large number of breeding frogs in our pond.<span id="more-120"></span>Well the tadpoles have hatched and are growing well. At least, the ones that manage to stay well hidden are. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Those damned Koi are eating machines and there is wholesale slaughter going on in the pond at the moment. The volume of tadpoles is dwindling quite rapidly as those fat, greedy bastards (have I mentioned that I don&#8217;t like them?) gorge themselves on anything that moves.</p>
<p>Why can&#8217;t they eat the cats that we get in the garden I wonder?</p>
<p>I&#8217;d love to don my scuba gear and go spear fishing in the pond. Only kidding! You can&#8217;t use scuba gear when spear fishing in the UK &#8211; so I&#8217;ll have to use my snorkel instead!</p>
<p>At least I managed to save afew lumps of spawn and move them to the little ponds in the back garden for safety. No fish in there &#8211; just how I like it. Those little ones are doing well so far.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/i-hate-those-damned-koi-carp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is it that the people with the worst taste in music, play it loudest?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/why-is-it-that-the-people-with-the-worst-taste-in-music-play-it-loudest/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/why-is-it-that-the-people-with-the-worst-taste-in-music-play-it-loudest/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 19:38:11 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=117</guid>
		<description><![CDATA[Walking through Leeds today, traffic doing its thing as usual. Then, in the distance, it could be heard&#8230;..&#8230;.. thump thump thump getting louder and louder and louder. Soon, it appeared, yet another bloody moron in a beat up old Corsa (or similar) with a dustbin exhaust &#8211; take note, that changes the engine&#8217;s breathing and [...]]]></description>
				<content:encoded><![CDATA[<p>Walking through Leeds today, traffic doing its thing as usual. Then, in the distance, it could be heard&#8230;..<span id="more-117"></span>&#8230;.. thump thump thump getting louder and louder and louder. Soon, it appeared, yet another bloody moron in a beat up old Corsa (or similar) with a dustbin exhaust &#8211; take note, that changes the engine&#8217;s breathing and will stuff your engine a lot quicker than you think. Intake and exhaust are balanced for best results by professional engineers, and you are not one of those.</p>
<p>The noise, for it could hardly be described as music, is pumping out with maximum base applied and the volume turned up as loud as it will go (all the wat to 11 for Spinal Tap fans!).</p>
<p>Now, I love my music, but I listen to it, not everyone else on the bloody planet! I am smart enough to realise that not everyone has my taste in music, so I don&#8217;t force everyone to listen to it. Why can&#8217;t these driving morons have similar consideration for the rest of us?</p>
<p>There is an additional problems too, not just the noise. The volume is so high that whatever music <em>was</em> intended to be played has no chance thanks to the total harmonic distortion of about 100% introduced by the crap quality speakers! You can usually hear them trying desperately to escape from their mountings.</p>
<p>The &#8216;C&#8217; is silent &#8211; as in Rap Music. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/why-is-it-that-the-people-with-the-worst-taste-in-music-play-it-loudest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Political correctness my arse!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/political-correctness-my-arse/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/political-correctness-my-arse/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:02:15 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=111</guid>
		<description><![CDATA[As I came into work this morning (21st April 2009) I was listening to the man from the Driving Test &#8216;agency&#8217; on Radio 4. The person was asked about the proposals for adding a new section to the test where the examiner gives the trainee driver a set of instructions similar to directions obtained from [...]]]></description>
				<content:encoded><![CDATA[<p>As I came into work this morning (21st April 2009) I was listening to the man from the Driving Test &#8216;agency&#8217; on Radio 4.<span id="more-111"></span></p>
<p>The person was asked about the proposals for adding a new section to the test where the examiner gives the trainee driver a set of instructions similar to directions obtained from a passer by,  and whether a trainee would be <em>failed </em>for getting the instructions wrong.</p>
<p>The man from the agency replied , with a straight face, that &#8220;we do not fail people. We have people who pass and those who don&#8217;t pass&#8221;. The Radio 4 interviewer practically wet himself laughing.</p>
<p>Me? I was screaming at the radio again! What the f*ck are we doing to this country with all this crap about political correctness and not hurting people&#8217;s feelings? It is all lies I tell you, damned lies.</p>
<p>There <em>are </em>failures in exams, driving tests and so on, no matter what you call it, they are <em>failures </em>and it is a fact of life. Stop trying to kid on that people don&#8217;t fail, they effing well do &#8211; I should know, I <em>failed </em>my maths Higher (A Scottish Educational exam) where you get a grade between A and F, I got nothing, not a mention, zilch, bugger all in fact.</p>
<p>I <em>failed </em>it so miserably indeed.</p>
<p>Am I bitter? No.</p>
<p>Has it affected my life since them? Not yet.</p>
<p>Do I care that I failed, well yes I do, but I know for a fact that I did <em>fail</em>, I didn&#8217;t <em>not pass</em>!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/political-correctness-my-arse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>God and the Italian earthquake</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/god-and-the-italian-earthquake/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/god-and-the-italian-earthquake/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 12:34:27 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>
		<category><![CDATA[Religion]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=105</guid>
		<description><![CDATA[I was shouting at a nun on TV the other night. The silly woman had [thankfully] survived the Italian earthquake and in retelling her story she said words along the lines of &#8220;I woke up when the quake started and the walls began to fall down. I got up and rushed outside. I only escaped [...]]]></description>
				<content:encoded><![CDATA[<p>I was shouting at a nun on TV the other night.<span id="more-105"></span> The silly woman had [thankfully] survived the Italian earthquake and in retelling her story she said words along the lines of &#8220;I woke up when the quake started and the walls began to fall down. I got up and rushed outside. I only escaped because of god.&#8221;</p>
<p>Does the woman not realise that it was her &#8216;god&#8217; who was responsible for the damned earthquake in the first place? Or does that not count? Funny how &#8216;god&#8217; is only ever mentioned for the good stuff.</p>
<p>Why do they put lightning conductors on church spires then?</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/04/god-and-the-italian-earthquake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The frogs are gone &#8230;</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-gone/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-gone/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 14:12:34 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=101</guid>
		<description><![CDATA[Well, the frogs have almost gone. After a mass orgy of croaking all night and day (do they ever sleep?) and sex all day and night (lucky b*ggers!) they have started leaving. The pond is returning to the domain of the Koi carp (which I hate almost as much as I hate cats) and is [...]]]></description>
				<content:encoded><![CDATA[<p>Well, the frogs have almost gone. After a mass orgy of croaking all night and day (do they ever sleep?) and sex <span id="more-101"></span>all day and night (lucky b*ggers!) they have started leaving. The pond is returning to the domain of the Koi carp (which I hate almost as much as I hate cats) and is full of spawn. This morning there were only about a dozen frogs left, a couple still paired up, but most of the rest had gone. Where to I wonder?</p>
<p>No doubt that damned cats will be having a field day killing and maiming the poor b*ggers as they wander back to whence they came. Wish I could do the same for the cats &#8211; send them back to wherever they came from I mean. (Ok, I admit it, in a box if necessary!)</p>
<p>Funnily enough, this year we have no frogs in the ponds at the back of the house, only in the one at the front. Last year we had lots at the back as well &#8211; but that was where the cats used to hang out &#8211; until I put the cat zapper in. I just wonder if those damned murdering b&#8217;stards managed to kill off all the frogs at the rear?</p>
<p>Anyway, we seem to have a leak in the smallest pond at the rear, so I&#8217;ll have to get patching soon.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-gone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Live badger spotted in Yorkshire!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/live-badger-spotted-in-yorkshire/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/live-badger-spotted-in-yorkshire/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 12:27:13 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=92</guid>
		<description><![CDATA[Coming home from our bee keeping course on Tuesday night (10th March 2009) Alison and I spotted a ghostly shape on the grass verge in the dark. Turns out to have been a live badger. We stopped (yes, it was safe to stop!) and it wandered away a few yards, paused and watched us watching [...]]]></description>
				<content:encoded><![CDATA[<p>Coming home from our bee keeping course on Tuesday night (10th March 2009) Alison and I spotted a ghostly shape on the grass verge in the dark. Turns out to have been a live badger. <span id="more-92"></span>We stopped (yes, it was safe to stop!) and it wandered away a few yards, paused and watched us watching it. We remained thus for about 10 seconds until it lost interest in us and wandered off into a field.</p>
<p>At least it wandered away from the road!</p>
<p>I&#8217;ve only ever seen wild badgers as corpses until now! Usually at the side of the road where so many end up. I have to say that they are pretty hard to see in the gloom. Must be something to do with their colouring and us humans being pretty blind at night as well!</p>
<p>Foxes are even more difficult to see at night &#8211; unfortunately, it&#8217;s usually too late when you do spot them!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/live-badger-spotted-in-yorkshire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The frogs are spawning again</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-spawning-again/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-spawning-again/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 10:49:18 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=86</guid>
		<description><![CDATA[Just like last year, the mass orgy of frog sex is taking place on Alison&#8217;s birthday! We have more mating frogs that you can shake a stick at in the pond right now. Most are spawning &#8211; as they do &#8211; some already have. It&#8217;s interesting to see how the males lose interest in the [...]]]></description>
				<content:encoded><![CDATA[<p>Just like last year, the mass orgy of frog sex is taking place on Alison&#8217;s birthday! We have more mating frogs that you can shake a stick at in the pond right now. <span id="more-86"></span>Most are spawning &#8211; as they do &#8211; some already have. It&#8217;s interesting to see how the males lose interest in the females once sex has been had!</p>
<p>One problem I have this year, lots of the frogs are getting up the pump outlet pipe and into the filtration system. I&#8217;ve extracted about 20 pairs of frogs from the filter bed this weekend already. I don&#8217;t want them going up there and spawning as they will clog up the works and, most likely, die as they cannot get out and there&#8217;s nothing to eat in there either.</p>
<p>All I need now is some method of stopping them getting up the pipe and, much more importantly, some method of preventing those damned Koi from eating all the tadpoles. I have suggested a harpoon but I have been over-ruled by Alison on the matter as she loves her fish.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/the-frogs-are-spawning-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle diagnostic events</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/oracle-diagnostic-events/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/oracle-diagnostic-events/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:41:32 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=81</guid>
		<description><![CDATA[Tanel Poder has started what looks to be an excellent series of posts on his blog on the subject of Oracle diagnostic events (eg 10046 traces) at this location.]]></description>
				<content:encoded><![CDATA[<p>Tanel Poder has started what looks to be an excellent series of posts on his blog on the subject of Oracle diagnostic events (eg 10046 traces) at <a href="http://blog.tanelpoder.com/2009/03/03/the-full-power-of-oracles-diagnostic-events-part-1-syntax-for-ksd-debug-event-handling/" target="_blank">this location</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/03/oracle-diagnostic-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another cycling moron</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/another-cycling-moron/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/another-cycling-moron/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 20:47:33 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=78</guid>
		<description><![CDATA[I ranted previously about cyclists. Tonight, coming home from work, I saw the biggest moron on two wheels yet.So there we were at a junction. I was at the head of the queue on a dual carriageway. There was traffic crossing from our left and a cyclist arrived up the inside of a large van [...]]]></description>
				<content:encoded><![CDATA[<p>I ranted previously about cyclists. Tonight, coming home from work, I saw the biggest moron on two wheels yet.<span id="more-78"></span>So there we were at a junction. I was at the head of the queue on a dual carriageway. There was traffic crossing from our left and a cyclist arrived up the inside of a large van and cycled to the head of the queue and pulled in front of the van!</p>
<p>The cyclist had no protective clothing or head gear at all. She, for it was a woman, was dressed in her sunday best by the look of things! She was now at the front of the queue, however, her position on the road put her slap bang in the middle of the other side of the dual carriageway and right in the path of the oncoming vehicles.</p>
<p>This woman was completely unaware of the carnage heading her way as she started to pull out into the road without looking in any direction what so ever! She was missed &#8211; very closely &#8211; by at least 4 cars. None of them much further away from destroying her than 6 inches. I kid you not.</p>
<p>Once she had managed to avoid all the oncoming traffic, she wobbled directly into the path of the van she had just queue jumped. Still not looking and still, miraculously, breathing and unhurt. As the van took avoiding action to avoid this lunatic, the driver tooted his horn. His reward for not killing the cyclist?</p>
<p>She gave him the finger.</p>
<p>I suspect this woman is not long for the world. Some people should not be allowed to breed!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/another-cycling-moron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The frogs are coming!!!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/the-frogs-are-coming/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/the-frogs-are-coming/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 08:07:39 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Creatures]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=67</guid>
		<description><![CDATA[Last night Alison found the first frog of the year in our driveway. The snow that has been around for a couple of weeks now had vanished as the temperature raised itself to a heady 6 degrees C and out she came, (the frog, not Alison!) heading for the big pond. Last year, on March [...]]]></description>
				<content:encoded><![CDATA[<p>Last night Alison found the first frog of the year in our driveway. The snow that has been around for a couple of weeks now had vanished as the temperature raised itself to a heady 6 degrees C and out she came, (the frog, not Alison!) heading for the big pond.<span id="more-67"></span></p>
<p>Last year, on March the 9th (Alison&#8217;s birthday), I counted over one hundred froggy heads in our pond by the front door. It was very pleasant sitting in our lounge listening to them sing the evening away. About a week or so later, they were gone but  their spawn filled the pond. When it had all hatched, the water was black with tadpoles. Nice!</p>
<p>Unfortunately, when we bought the house, the pond we inherited was full of fish too. Some Koi Carp and some yellow things and a couple of black versions of the yellow ones &#8211; can you tell I know what I&#8217;m talking about &#8211; and I&#8217;m sad to say that they completely &#8216;dysoned&#8217; the tadpoles up leaving nothing at all. I never saw a single young frog from the big pond last year. <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>We did get a few froglets from the smaller ponds round the back of the house  as there are no fish there. Unfortunately, all the neighbourhood cats used to play around there and hunt the frogs, squirrels  and birds. Murdering bastards!</p>
<p>&#8220;They are only doing what comes naturally&#8221; cat owners are fond of saying and this is true, but if I had a python and it did what they do naturally, to their cats, I&#8217;m sure they would change their tune! Keep <em>your </em>effing cats out of <em>my</em> garden! I&#8217;m pretty sure that if I took all the cat shit back to the owners they wouldn&#8217;t be too enamoured either &#8211; so why do I have to put up with it?</p>
<p>I hate cats by the way, can you tell?</p>
<p>I&#8217;m happy for you to own a cat but keep the effing things inside where they can do no harm otherwise, don&#8217;t be surprised if they don&#8217;t come home one night &#8211; if only I could set up a cat killing laser defence system around my garden life would be grand! For the moment, I have to be satisfied with the RSPB approved cat deterrent device which emits ultrasonic sound that cats, dogs and foxes find uncomfortable. It seems to work!</p>
<p>I&#8217;m also not all that fond of the fish either, but I do like frogs. Unfortunately, Alison likes the fish and indeed, the cats, so a mass slaughter of these killer alien creatures is somewhat forbidden at the moment I&#8217;m afraid to say. She won&#8217;t let me buy a crossbow from Amazon either. Is there no justice in the world?</p>
<p>With a bit of luck, I&#8217;m hoping to help boost the frog population this year by grabbing a load of spawn from the big pond and using it to fill the smaller ponds at the back of the house. They should be safer there this year as the cats now populate the front garden instead.</p>
<p>I&#8217;d much rather I just slaughter the fish (foul creatures that they are) and the cats too. Still, there&#8217;s time!</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/the-frogs-are-coming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>It must be efficient, I&#8217;m using bind variables!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/it-must-be-efficient-im-using-bind-variables/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/it-must-be-efficient-im-using-bind-variables/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 13:17:06 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=54</guid>
		<description><![CDATA[For many years, various big guns &#8211; and a lot of smaller ones &#8211; in the Oracle world have been advocating, nay demanding, that we [almost] always use bind variables in our SQL code. The reason is simple, it&#8217;s shareable, efficient,  reduces parsing and allows the application to scale up to more and more users. [...]]]></description>
				<content:encoded><![CDATA[<p>For many years, various big guns &#8211; and a lot of smaller ones &#8211; in the Oracle world have been advocating, nay demanding, that we [almost] always use bind variables in our SQL code. The reason is simple, it&#8217;s shareable, efficient,  reduces parsing and allows the application to scale up to more and more users.<span id="more-54"></span></p>
<p>Over the years I have spent fixing and tuning Oracle databases, I have noticed a trend of developers moving away from hard coding everything to using binds more and more in their code. How refreshing, the performance must also be improving, mustn&#8217;t it?</p>
<p>Not quite! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>The problem is becoming apparent that a lot of developers don&#8217;t know anything/much about Oracle and also don&#8217;t know anything/much about their own chosen language either.</p>
<p>I&#8217;m pleasantly surprised when I see code like the following in the cache on my databases :</p>
<pre>SELECT stuff FROM some_table 
WHERE some_column = :a_bind_variable;</pre>
<p>It&#8217;s a start, but it is still broken. How can this be?</p>
<p>While the  developer is indeed using binds, s/he has not considered how that statement is created within the application. As there are many application coding languages, I shall resort to my own pseudo-code to demonstrate the problem.</p>
<pre>Function GetEmpForID(int empId, Connection conn)
begin
 Statement Stmt(conn, "Select stuff from some_table 
                       where some_column = :some_value");
    Stmt.Parse();
    Stmt.Bind(":some_value", empId);
    ResultSet Rslt =  Stmt.Execute();
    //Process Results here
end</pre>
<p>Looks great doesn&#8217;t it? Well, no, it doesn&#8217;t. The major problem is that fact that the statement will be parsed each and every time that this function is called. Within a function (in most languages) the statement is created on the stack and on exit from the function, deleted.</p>
<p>In reality, we don&#8217;t get much in the way of efficency improvements because we still have a 1:1 parse:execute ratio, not what we want at all. What we need to do is make the statement external to the function (global or whatever the language supports) similar to the following.</p>
<pre>Connection conn;
Statement StmtEmpForId(conn, "Select stuff from some_table 
                       where some_column = :some_value");

Function GetEmpForID(int empId)
begin
    external Statement StmtEmpForId;
    if not StmtEmpForId.Parsed() then StmtEmpForId.Parse();
    StmtEmpForId.Bind(":some_value", empId);
    ResultSet Rslt =  StmtEmpForId.Execute();
    //Process Results here
end</pre>
<p>Now we are getting somewhere! The statement is external to the function itself, so exists even when the function has exited. If this is the first time that we call the function, the statement will be found to be unparsed, so we can parse it &#8211; this avoids the application parsing statements at startup and possibly parsing statements that never get used.</p>
<p>Once parsed, and on every subsequent call of the function, all we have to do is bind the variable and execute the statement before processing the results.</p>
<p>As long as the statement (and connection)  remain in scope (hence being globals) then we only parse the statements once regardless of the number of times that we execute it. So, if we execute our one statement a million times, we have only carried out one single [hard] parse.</p>
<p>A good workman knows how his tools work and how to use them.</p>
<p>In C++ you would, I suppose, create an appConnection object with members for the Oracle (OCCI?) Connection object and each of the Statements you wish to use in the application, after all, the statments should remain in the same scope as the connection shouldn&#8217;t they?</p>
<p>In Java, well, I have no idea, all the Java stuff I&#8217;ve looked at seems to be reinventing the wheel over and over again &#8211; who knows what those guys get up to! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/02/it-must-be-efficient-im-using-bind-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ROWIDs are fun</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/rowids-are-fun/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/rowids-are-fun/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 13:20:23 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=41</guid>
		<description><![CDATA[In a previous posting here on the subject of Lazy Developer Syndrome, I showed a small fragment of code where I SELECTed the ROWID in addition to all the other data I wanted, then UPDATEd the same row using the ROWID I had stored rather then using the Primary Key index that I used to [...]]]></description>
				<content:encoded><![CDATA[<p>In a previous posting here on the subject of Lazy Developer Syndrome, I showed a small fragment of code where I SELECTed the ROWID in addition to all the other data I wanted, then UPDATEd the same row using the ROWID I had stored rather then using the Primary Key index that I used to SELECT the row in the first place. Why did I do this?<span id="more-41"></span></p>
<p>Selecting the ROWID is always a good idea if you intend to UPDATE or indeed, DELETE, it afterwards.  The ROWID is after all the fastest way to get to a row in your table. It&#8217;s how the indexes get you to the data after all.</p>
<p>If you have a primary key constraint and the index supporting it has a height of 2, then to get from your supplied primary key value to the data requires 3 single block accesses &#8211; the index root and the correct leaf block. From the leaf block we get the ROWID for the requested primary key value, and a further single block read takes place to fetch back the block containing the required row.</p>
<p>Some of these blocks may be in the cache but then again, they might all  not be &#8211; so 3 physical reads would be required as the worst case and 3 logical reads as a best case.</p>
<p>An UPDATE specifying the primary key value again will also have to perform 3 more single block reads, hopefully from the cache. However, an UPDATE using the ROWID already fetched will only have to perform one block read, again hopefully from the cache, and that block will be the actual data block to be amended. We don&#8217;t need to use the index and <strong>we save 2 single block reads</strong>. Good eh?</p>
<p>A DELETE using a ROWID or a primary key value will also take differing numbers of block reads. If you delete using the ROWID, the index has to be read and updated by removing the entry for the row in question and if you DELETE using the Primary Key value, the index will be read again (in consistent mode) and the data block will be read in current mode in order to make the DELETE work.</p>
<p>My own testing, so far, has shown that the difference is a single block read saved when using the ROWID rather than the Primary key value however, I have not yet determined if that figure will change if the height of the index itself changes.</p>
<h4>Update by Primary Key.</h4>
<pre>SQL&gt; update indextest 
     set name = name 
     where id = 86057;
1 row updated.

Execution Plan
----------------------------------------------------------
 0 UPDATE STATEMENT Optimizer=ALL_ROWS 
    (Cost=2 Card=1 Bytes=79)
 1 0 UPDATE OF 'INDEXTEST'
 2 1  INDEX (UNIQUE SCAN) OF 'INDEXTEST_PK' (INDEX (UNIQUE)) 
       (Cost=1 Card=1 Bytes=79)

Statistics
-----------------
1 db block gets
2 consistent gets
0 physical reads
1 rows processed</pre>
<h4>Update by ROWID.</h4>
<pre>SQL&gt; update indextest 
     set name=name 
     where rowid = 'AAAXktAAEAAAET8ABI';
1 row updated.

Execution Plan
----------------------------------------------------------
 0 UPDATE STATEMENT Optimizer=ALL_ROWS 
   (Cost=1 Card=1 Bytes=78)
 1 0 UPDATE OF 'INDEXTEST'
 2 1 TABLE ACCESS (BY USER ROWID) OF 'INDEXTEST' (TABLE) 
       (Cost=1 Card=1 Bytes=78)

Statistics
-----------------
1 db block gets
0 consistent gets
0 physical reads
1 rows processed</pre>
<h4>Delete by Primary Key.</h4>
<pre>SQL&gt; delete from indextest 
     where id = 86057;
1 row deleted.

Execution Plan
----------------------------------------------------------
 0 DELETE STATEMENT Optimizer=ALL_ROWS 
    (Cost=1 Card=1 Bytes=13)
 1 0  DELETE OF 'INDEXTEST'
 2 1   INDEX (UNIQUE SCAN) OF 'INDEXTEST_PK' (INDEX (UNIQUE)) 
        (Cost=1 Card=1 Bytes=13)

Statistics
-----------------
5 db block gets
2 consistent gets
0 physical reads
1 rows processed

SQL&gt; rollback;
Rollback complete.</pre>
<h4>Delete by ROWID.</h4>
<pre>SQL&gt; delete from indextest 
     where rowid = 'AAAXktAAEAAAET8ABI';
1 row deleted.

Execution Plan
----------------------------------------------------------
 0 DELETE STATEMENT Optimizer=ALL_ROWS 
   (Cost=1 Card=1 Bytes=25)
 1 0  DELETE OF 'INDEXTEST'
 2 1   TABLE ACCESS (BY USER ROWID) OF 'INDEXTEST' (TABLE) 
        (Cost=1 Card=1 Bytes=25)

Statistics
-----------------
5 db block gets
1 consistent gets
0 physical reads
1 rows processed

SQL&gt; rollback;
Rollback complete.

SQL&gt; exit</pre>
<p>So, when creating your application, the idea is to build in performance from the start (ie, you do not add it in after the fact!) so when reading data that will be updated or deleted in a subsequent operation, always grab hold of the ROWID and use that to make your DELETE or UPDATE as efficient as you can.</p>
<p>By the way, never (can we say &#8216;never&#8217; in these politically correct times?) store the location of a row in another table as a ROWID &#8211; if you do, and you ever export the table and reimport it, the ROWIDs you carefully saved will no longer point to the row that you thought they did!</p>
<p>Did you never wonder why indexes are stored in the export file as a CREATE INDEX statement, and not as the pure index data itself?</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/rowids-are-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lazy developer syndrome</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/lazy-developer-syndrome-and-rowids/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/lazy-developer-syndrome-and-rowids/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 15:23:24 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=23</guid>
		<description><![CDATA[To those who don&#8217;t know me, I&#8217;m an Oracle DBA and I also can develop as well. I detest having to work on applications which have the following construct in the code: SELECT &#60;stuff&#62; FROM TABLE WHERE &#60;something&#62; FOR UPDATE; In most cases, the above is a sign of developer laziness. They cannot be bothered [...]]]></description>
				<content:encoded><![CDATA[<p>To those who don&#8217;t know me, I&#8217;m an Oracle DBA and I also <em>can </em>develop as well. I detest having to work on applications which have the following construct in the code:<span id="more-23"></span></p>
<pre style="padding-left: 30px;">SELECT &lt;stuff&gt;
FROM TABLE
WHERE &lt;something&gt;
FOR UPDATE;</pre>
<p>In most cases, the above is a sign of developer laziness. They cannot be bothered to write correct code to handle a situation where a row that the user has been working on (unlocked) has been amended by another user in the meantime.</p>
<p>In Oracle you should <em>lock late and lock short</em> (as Dave Ensor says). Only lock a row as you are about to update it. This is optimistic locking.</p>
<p><em>Do not</em> lock it when you start working on it and keep it locked until you finish the update. This is pessimistic locking. When you write an application that does this, you end up with rows locked out all over the place as people get half way through amending some details and then have to answer the phone, or pop outside for a ciggie, or go to the loo.</p>
<p>Pessimistic locking &#8211; just say <strong>NO!</strong></p>
<p>It isn&#8217;t difficult, for example, to add a column to the table to hold an update counter (or similar) and to have a trigger update that counter by one each time an UPDATE is performed. The developer would read in the current value along with the data he wishes to display for amendment and the ROWID for the row in question.  Once the user has made the changes and clicked OK (or whatever) what&#8217;s wrong with running the following statement :</p>
<pre style="padding-left: 30px;">UPDATE &lt;table&gt;
SET &lt;stuff&gt;=&lt;new_stuff&gt;
WHERE ROWID=:stored_rowid
AND upd_counter=:stored_upd_counter;</pre>
<p>If it works, job done, slip in a COMMIT while no-one is looking, that will release the locks and will save the data permanently to the table with the changes made and the trigger&#8217;s change to the update counter carried out as well.</p>
<p>If, on the other hand, it returns <em>no rows updated</em>, we know some other user got there before us and changed the value in the update counter column. Now, we can handle that by displaying a message to the user and perhaps switching to a new screen showing the user&#8217;s own changes and the other user&#8217;s changes and then request that our user chooses to either force through his own changes,  accept the other users changes aborting his own or to redisplay the previous screen with the new data loaded for further amendments.</p>
<p>It&#8217;s much more friendly for all users of the application but it takes a little more thought on the developer&#8217;s side of things. It&#8217;s easier for a lazy developer to simply choose not to think and blindly carry on with his SELECT &#8230; FOR UPDATE nonsense.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/lazy-developer-syndrome-and-rowids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So transport is killing the planet is it?</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/so-transport-is-killing-the-planet-is-it/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/so-transport-is-killing-the-planet-is-it/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 16:51:04 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=13</guid>
		<description><![CDATA[I suspect not. http://www.newscientist.com/article/mg20026873.100-how-kangaroo-burgers-could-save-the-planet.html The gist of the above article is this, worldwide, livestock creates more greenhouse gasses than all forms of transport combined. Eating meat is bad for the planet &#8211; can you hear all those veggies crowing now? Never mind, Kangaroos taste good and can help save the planet. Check out the link [...]]]></description>
				<content:encoded><![CDATA[<p>I suspect not.</p>
<p><a title="http://www.newscientist.com/article/mg20026873.100-how-kangaroo-burgers-could-save-the-planet.html" href="http://www.newscientist.com/article/mg20026873.100-how-kangaroo-burgers-could-save-the-planet.html" target="_blank">http://www.newscientist.com/article/mg20026873.100-how-kangaroo-burgers-could-save-the-planet.html</a></p>
<p>The gist of the above article is this, <em>worldwide, livestock creates more greenhouse gasses than all forms of transport combined. </em>Eating meat is bad for the planet &#8211; can you hear all those veggies crowing now? <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Never mind, Kangaroos taste good and can help save the planet. Check out the link above for the full story.</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/so-transport-is-killing-the-planet-is-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cyclists &#8211; I hate them!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/cyclists-i-hate-them/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/cyclists-i-hate-them/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 16:40:26 +0000</pubDate>
		<dc:creator>Norman</dc:creator>
				<category><![CDATA[Rants & Raves]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=7</guid>
		<description><![CDATA[I hate cyclists. They are so full of themselves! They sit there, two or three abreast on narrow roads, dawdling along having a nice chat, completely oblivious to the queue of traffic behind them. Give them a happy toot (ie, not a nasty long drawn out blast) on the horn to let them know you [...]]]></description>
				<content:encoded><![CDATA[<p>I hate cyclists. They are so full of themselves! They sit there, two or three abreast on narrow roads, dawdling along having a nice chat, completely oblivious to the queue of traffic behind them. Give them a happy toot (ie, not a nasty long drawn out blast) on the horn to let them know you are there and you get a load of abuse. Nice &amp; friendly!</p>
<p>I was once run over by a cyclist. <span id="more-7"></span>I was on a pedestrian crossing, with the green man telling me I could cross. The cyclist [must have] overtaken a queue of stationary traffic to get me, but he managed it. He was apparently watching some scantily clad women on the other side of the road, his ipod (other personal stereos are available <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) was turned up as loud as it would go and he hit me.</p>
<p>When he saw what had happened, his excuse was that &#8220;the lights were green!&#8221; which was highly amusing to the taxi driver at the front of the queue (he said as much out of his window while calling the cyclist a few choice names too) as he had overtaken the taxi in order to get me!</p>
<p>I have also been narrowly missed on numerous occasions when the lights were red (for traffic) by cyclists (usually clad in those tight shiny suits) who apparently do not have to stop at the red lights. When I comment as they pass, that &#8220;the lights are red&#8221; &#8211; they all seem to have serious doubts about the marital status of my parents at the time of my conception! Hang on, I&#8217;m the one with right of way so why am I the &#8216;bastard&#8217;?</p>
<p>Don&#8217;t bother to mention one way streets either, they are apparently not applicable to cyclists.</p>
<p>Ok, I&#8217;m not tarring <em>all </em>cyclists with the same brush, there are many who do have consideration for other road users and indeed the laws of the road and Highway Code too. But so far, not many!</p>
<p>They pay no road tax, no insurance and demand that we give up half of our roads to enable them to have their own dedicated cycle path. Excuse me? In my opinion, cyclists shouldn&#8217;t be allowed on the road until they have taken a test and passed it (I at least passed a cycling proficiency test before I was allowed out on the road by my parents)  and you should pay at least third party insurance as well. Then you can consider yourselves &#8216;allowed&#8217; on the public roads (ok, I get the irony of that last bit!) .</p>
<p>If I am driving my car along the road and a cyclist ignores the lights and gets hit by me, I have no come back on him for the damage to my car, caused by him/her and if s/he is dead, how do I claim back from the corpse? Try it and all you will get is a tabloid style attack from the various red tops about how a callous car driver killed an innocent cyclist and then billed his parents for the damage. Best you get insurance then!</p>
<p><em>To all you human, considerate, and law abiding cyclists out there &#8211; well done and thank you. You have my sincere  sympathies at the treatment you get from other road users purely because of the insane and selfish behaviour of a number of your peers.</em></p>
<p>To the rest of you, and you know who you are, <em>get stuffed</em>!</p>
<p>By the way, two bits of black tarmac in the pub having a chat. A red bit of tramac walked in. The bar went quiet. One of the black bits turned to the other and said &#8220;do not say anything to him, he will kill you!&#8221;. The other replied &#8220;Why?&#8221;. &#8220;Because he&#8217;s a cycle-path!&#8221; <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>Are cyclists really friendly to the environment? I don&#8217;t think so myself. All that puffing and panting as they cycle slowly up hills must surely be contributing extra CO<sub>2</sub> to the atmosphere? (That wasn&#8217;t a serious question by the way!)</p>
<p>Cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/cyclists-i-hate-them/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/hello-world/</link>
		<comments>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/hello-world/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 13:19:14 +0000</pubDate>
		<dc:creator>Blogman</dc:creator>
				<category><![CDATA[Welcome]]></category>

		<guid isPermaLink="false">http://qdosmsq.dunbar-it.co.uk/blog/?p=1</guid>
		<description><![CDATA[Welcome to my blog. Don&#8217;t expect me to be sensible or politically correct here, it&#8217;s my space and I&#8217;ll say what I like! So there! Of course, anything I do say will be able to be commented on by you, my faithful reader (singular!), assuming that you care of course. Ok, seriously, I&#8217;ll be ranting [...]]]></description>
				<content:encoded><![CDATA[<p>Welcome to my blog.</p>
<p>Don&#8217;t expect me to be sensible or politically correct here, it&#8217;s my space and I&#8217;ll say what I like! So there! <img src='http://qdosmsq.dunbar-it.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Of course, anything I do say will be able to be commented on by you, my faithful reader (singular!), assuming that you care of course.</p>
<p>Ok, seriously, I&#8217;ll be ranting and raving about all sorts of stuff here. I&#8217;ll try to categorise them so you can sift the interesting from the less interesting. Who knows, it might be amusing.</p>
]]></content:encoded>
			<wfw:commentRss>http://qdosmsq.dunbar-it.co.uk/blog/2009/01/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
