<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13668718</id><updated>2012-01-26T08:06:19.526Z</updated><category term='linux'/><category term='plsql'/><category term='xml'/><category term='hpc'/><category term='centos'/><category term='postgresql'/><category term='java'/><category term='mysql'/><category term='vmware'/><category term='oracle sql'/><category term='rants'/><category term='storage'/><category term='music'/><category term='blog'/><category term='sybase'/><category term='sun blades solaris'/><category term='rpm'/><category term='oracle'/><category term='oc4j'/><category term='netbackup'/><category term='dell'/><category term='ibm'/><category term='sql'/><category term='shell'/><category term='websphere'/><category term='unix'/><category term='11g'/><category term='veritas'/><category term='azul'/><category term='jboss'/><category term='sun'/><category term='microsoft'/><category term='weblogic'/><category term='amd'/><category term='bea'/><category term='opensolaris'/><category term='ubuntu'/><category term='blades'/><category term='j2ee'/><category term='solaris'/><category term='laptop'/><category term='hardware'/><category term='hp'/><category term='backup'/><title type='text'>Halis way</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default?start-index=101&amp;max-results=100'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>199</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13668718.post-489769267118812679</id><published>2008-03-09T23:21:00.001Z</published><updated>2010-08-12T08:31:18.673+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='backup'/><category scheme='http://www.blogger.com/atom/ns#' term='netbackup'/><category scheme='http://www.blogger.com/atom/ns#' term='veritas'/><title type='text'>Backups, cheaper and faster?</title><content type='html'>When did backups become easy and affordable?&lt;br /&gt;I've been sort of slacking off in the backup game in the last year or so, our backups have been managed by other parts of the company and some backups have been outsourced to BSP's. I recently spec and deploy a basic &lt;a href="http://www.symantec.com/"&gt;Netbackup&lt;/a&gt; solution for our office servers at work and was amazed how extremely simple the whole thing was. The first backup system I worked with was Legato &lt;a href="http://www.emc.com/products/detail/software/networker.htm"&gt;Networker&lt;/a&gt; (now owned by &lt;a href="http://www.emc.com/"&gt;EMC&lt;/a&gt;) and it was at the time a pretty great product but it was quite difficult to manage, lots of things needed to be scripted and setting up a new tape library required quite a lot of tweaking.&lt;br /&gt;Secondly, the budget was at first glance fairly limited but when we speced up what we needed and got a couple of quotes in I was amazed of how much we actually got for our money.&lt;br /&gt;I wanted basic disk staging then duplication to tape. The obvious choice for tape was &lt;a href="http://en.wikipedia.org/wiki/LTO4"&gt;LTO4&lt;/a&gt;, we get pretty good price / performance, market leading capacity and it's a solid standard.&lt;br /&gt;Most suppliers actually quoted the same tape library, just branded by different vendors. HP, Dell, IBM. All where &lt;a href="http://www.ibm.com/"&gt;IBM 3573&lt;/a&gt; tape libraries, it's a excellent and affordable library. Dell came in best in price as usual. We opted for SAS attached. The backup server, my first choice server these days, is the &lt;a href="http://www.blogger.com/www.dell.com/content/products/productdetails.aspx/pedge_2950_3"&gt;Dell PowerEdge 2950&lt;/a&gt;. I buy it for pretty much 75% of all requirements. Speced out with a pair of Quad-Core 1.86GHz processors, 4Gb RAM, 6x500Gb SATA drives (in RAID5) for the disk staging pool and a SAS5 to attach the library.&lt;br /&gt;Software wise the server is running CentOS 5.1 and Symantec/Vertias Netbackup 6.5 “Linux Starter Edition (LSE)”. The LSE is a pretty good deal, you get a server license, tape library license and 5 client licenses (with bare metal, open file etc.) for a fairly low cost.&lt;br /&gt;Installing and configuring Netbackup was as easy as it gets, the tape library was detected on boot, no sysctl.conf changes needed. Stepped through the netbackup installation process, added the tape library (less than 5 clicks!!), defined a couple of tape label policies, created a 2Tb disk staging pool with my new tape group as the target, just add water (ehm, clients actually).&lt;br /&gt;&lt;br /&gt;The total cost was under £13.000 (about $22.000), installation time was less than one day, included was:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Veritas Netbackup 6.5 Linux starter edition&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Netbackup clients 5-pack&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Netbackup Exchange agent&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Dell PowerEdge 2950 server&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Dell PowerVault TL2000 library w/ one LTO4 SAS drive&lt;/li&gt;&lt;br /&gt;&lt;li&gt;25x LTO4 tapes&lt;/li&gt;&lt;br /&gt;&lt;li&gt;3x LTO cleaning tapes&lt;/li&gt;&lt;br /&gt;&lt;li&gt;CentOS Linux 5.1 (free)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-489769267118812679?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/489769267118812679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=489769267118812679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/489769267118812679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/489769267118812679'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2008/03/backups-cheaper-and-faster.html' title='Backups, cheaper and faster?'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8689589060104553838</id><published>2008-02-20T17:52:00.000Z</published><updated>2008-02-20T18:10:38.745Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='plsql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>How to delete an object with a special character in Oracle</title><content type='html'>There are some things  in &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt; that are possible but  shouldn't be possible.&lt;br /&gt;One thing I love to hate is the fact that you can create tables with almost any name, just as long as you double quote it.&lt;br /&gt;&lt;b&gt;I.e.:&lt;/b&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&amp;gt; create table "My Fruit Table" (id number);&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from tab;&lt;br /&gt;&lt;br /&gt;TNAME                          TABTYPE  CLUSTERID&lt;br /&gt;------------------------------ ------- ----------&lt;br /&gt;My Fruit Table                 TABLE&lt;/font&gt;&lt;/pre&gt;Horrible! And what's even more horrible is that people actually do this. &lt;br /&gt;&lt;br /&gt;Now to the problem, a user created a table with a special character in the name. Not even sure what character but I need a way to drop it. PL/SQL to the rescue.&lt;br /&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; set serveroutput on&lt;br /&gt;&lt;font color="green"&gt;-- Lets create a dummy table with a bogus character in the name&lt;/font&gt;&lt;br /&gt;SQL&gt; declare&lt;br /&gt;        a varchar2(500);&lt;br /&gt;begin&lt;br /&gt;        a:='create table "abctest'||chr(150)||'" (id number)';&lt;br /&gt;        execute immediate a;&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from tab;&lt;br /&gt;&lt;br /&gt;TNAME                          TABTYPE  CLUSTERID&lt;br /&gt;------------------------------ ------- ----------&lt;br /&gt;abctest?                       TABLE&lt;br /&gt;&lt;br /&gt;SQL&gt; desc "abctest?";&lt;br /&gt;ERROR:&lt;br /&gt;ORA-04043: object "abctest?" does not exist&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- And a bit of PL/SQL to drop it&lt;/font&gt;&lt;br /&gt;&lt;font color="green"&gt;-- change the abctest% string to something matching your &lt;b&gt;single&lt;/b&gt; table.&lt;/font&gt;&lt;br /&gt;SQL&gt; declare&lt;br /&gt;        a varchar2(500);&lt;br /&gt;        tname varchar2(50);&lt;br /&gt;begin&lt;br /&gt;        a:='select table_name from user_tables where table_name like ''abctest%''';&lt;br /&gt;        execute immediate a into tname;&lt;br /&gt;        dbms_output.put_line('Table name is: '||tname);&lt;br /&gt;        execute immediate 'drop table "'||tname||'"';&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Table name is: abctest?&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from tab;&lt;br /&gt;&lt;br /&gt;no rows selected&lt;/font&gt;&lt;/pre&gt;Handy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8689589060104553838?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8689589060104553838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8689589060104553838' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8689589060104553838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8689589060104553838'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2008/02/how-to-delete-object-with-special.html' title='How to delete an object with a special character in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1297479465379458338</id><published>2008-02-03T18:55:00.000Z</published><updated>2008-02-03T19:20:34.165Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='oc4j'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='weblogic'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><category scheme='http://www.blogger.com/atom/ns#' term='bea'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Buying marketshare</title><content type='html'>Ok, I'm way waay late on commenting on the two most recent IT company takeovers .&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sun buys MySQL&lt;/b&gt;&lt;br /&gt;Tricky one, I have to honestly say I have a hard time seeing where &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt; fits in to &lt;a href="http://www.sun.com/"&gt;Sun's&lt;/a&gt; portfolio.&lt;br /&gt;Sun is one of &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt; biggest partners (the biggest after &lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt;?) and they are one of the biggest backers of &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;, then even employee a few of head lead Postgres developers.&lt;br /&gt;Sun has got two options with MySQL, they can either invest a lot of RnD in MySQL and actually turn it in to a really good product. MySQL is without a doubt a product with incredible potential, but is today pretty much a over-sized way to store CSV index files (bit harsh perhaps but hey).&lt;br /&gt;Or they can ride out the profits by selling LAMP-stack boxes and let MySQL sustain itself, I doubt they can make up for the billion dollars they payed for it though.&lt;br /&gt;Oh, and what will Sun make of the (rather evil) closed source &lt;a href="http://www.mysql.com/products/enterprise/monitor.html"&gt;MySQL Enterprise Monitor&lt;/a&gt; administration product from MySQL. Sun having new closed source software? Errr!&lt;br /&gt;&lt;br /&gt;Some advice for sun,&lt;br /&gt;1) Add real constraint support. This is a show stopper for many, and the InnoDB approach isn't good enough. MySQL needs native solid from the ground up constraint support, independent of storage engine, version bla bla. If people don't want the "performance loss" of constraints, don't add the constraints!&lt;br /&gt;2) Sort out proper I/O management, tablespaces, clean partitioning all that stuff. MySQL has improved a lot on this point over the last 12 months. But more work is needed, especially if they are planning on selling MySQL powered Thumpers.&lt;br /&gt;3) 100% solid transactional support. MVCC would be fun. I've seen a few to many transactional problems in MySQL. Some sort of logging/undo/redo system is needed.&lt;br /&gt;&lt;br /&gt;On top of that I wouldn't mind a clean hot-backup tool, requires proper transactional support (with something like SCN's etc), 3rd party scripting language support (PgPerl anyone?).&lt;br /&gt;&lt;br /&gt;That's about 250.000 RnD hours, go get busy!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Oracle buys BEA&lt;/b&gt;&lt;br /&gt;This is most likely very good news. I'm a big fan of the Oracle database (duh) and a  fan of &lt;a href="http://www.bea.com/"&gt;Weblogic&lt;/a&gt; Application Server.&lt;br /&gt;What I'm not a big fan of is Oracle Application Server (oc4j).&lt;br /&gt;I hope Oracle realize that Weblogic is the superior product and works with Weblogic as the front runner and port oc4j features to Weblogic and not the other way around. I doubt that will be the case though. If not, I hope they don't kill off Weblogic any time soon.&lt;br /&gt;&lt;br /&gt;Hmm, that's all for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1297479465379458338?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1297479465379458338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1297479465379458338' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1297479465379458338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1297479465379458338'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2008/02/buying-marketshare.html' title='Buying marketshare'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1634008678903086277</id><published>2008-01-18T11:23:00.000Z</published><updated>2008-01-18T11:34:15.937Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Websphere ND dmgr permission problems</title><content type='html'>Ran in to a really weird problem with one of our Websphere 6.1 Network deployment setups yesterday and as I couldn't find one single page about the problem in google I thought I'd blog it.&lt;br /&gt;I'm not much of a Websphere admin but managed to fix it after a while.&lt;br /&gt;&lt;br /&gt;The problem started when a datasource was updated and all of the sudden all node agents stopped trusting the deployment manager (dmgr). Syncing the nodes failed and hence pretty much everything failed to restart / deploy. Running servers where fine though.&lt;br /&gt;We got this message in the logs:&lt;pre&gt;&lt;font color="blue"&gt;[1/17/08 13:30:52:020 GMT] 00000028 RoleBasedAuth A   SECJ0305I: &lt;br /&gt;The role-based authorization check failed for admin-authz operation &lt;br /&gt;SSLAdmin:temporarilyDisableCertificateAuthentication:java.lang.Long.&lt;br /&gt;The user UNAUTHENTICATED  (unique ID: unauthenticated) was not granted&lt;br /&gt;any of the following required roles: administrator.&lt;/font&gt;&lt;/pre&gt;My best guess is that node agent configuration was corrupted in some way.&lt;br /&gt;How do you fix the problem then?&lt;br /&gt;Fairly easy actually.&lt;br /&gt;# Stop all node-agents that seem broken (that would probably be all of them!).&lt;br /&gt;# Go to the node agents bin directory on the node (usually something like $WAS_HOME/profiles/&lt;profile_name&gt;/bin/).&lt;br /&gt;# Manually sync the node with syncNode.sh, point to the SOAP connector (default is 8879) on the DMGR server. See example&lt;pre&gt;&lt;font color="blue"&gt;./syncNode.sh dmgrhost 8879 -username websphere -password webfear&lt;/font&gt;&lt;/pre&gt;# Start the node agent and verify that the logs are happy. Kick off a cell sync from dmgr. You should see entries similar to this in the logs:&lt;pre&gt;&lt;font color="blue"&gt;[17/01/08 16:14:59:872 GMT] 0000002f NodeSyncTask  A   ADMS0003I: &lt;br /&gt;The configuration synchronization completed successfully.&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1634008678903086277?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1634008678903086277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1634008678903086277' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1634008678903086277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1634008678903086277'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2008/01/websphere-nd-dmgr-permission-problems.html' title='Websphere ND dmgr permission problems'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2045809013665972457</id><published>2008-01-01T11:25:00.000Z</published><updated>2008-01-01T11:48:32.649Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='laptop'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='opensolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Solaris Express on a Toshiba Satellite Pro A200</title><content type='html'>I bought myself one of those cheap laptops the other month. I needed a small machine for testing and since laptops are just as cheap (if not cheaper) as desktops these days I got a laptop.&lt;br /&gt;The machine came with Vista but I wanted to triple boot Vista, &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt; and &lt;a href="http://www.opensolaris.org/"&gt;Solaris Express Community Edition&lt;/a&gt;.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Use diskmgmt.msc in Vista to shrink the partition the machine came with, Windows can do this natively so there is no need to use Partition Magic or similar tools. Create at least three new partitions. One for Solaris, one for Linux and one for Linux swap.&lt;br /&gt;&lt;li&gt; Secondly install Solaris, boot off the CD and go through the basic installer. The widescreen resolution worked out of the box (as usual). Do a full install, spending time "fixing" a smaller installer is just annoying. Solaris will install it's grub boot loader on both the MBR and superblock (on the Solaris partition). It probably makes sense to leave a large slice unused so it can be used with ZFS after the installation is done.&lt;br /&gt;&lt;li&gt; Install Ubuntu. Nothing simpler than that.&lt;br /&gt;&lt;li&gt; Edit Ubuntu's grub menu config (&lt;b&gt;/boot/grub/menu.lst&lt;/b&gt;) to include Solaris. Simply point it to the Solaris parition (hd0,2 for me). Add these lines at the end of the file.&lt;br /&gt;&lt;pre&gt;title Solaris&lt;br /&gt;root (hd0,2)&lt;br /&gt;chainloader&lt;/pre&gt;&lt;/ul&gt;&lt;b&gt;Done!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I had to install the &lt;a href="http://homepage2.nifty.com/mrym3/taiyodo/eng/"&gt;gani NIC driver&lt;/a&gt; in Solaris to get the Ethernet card working and the &lt;a href="http://www.4front-tech.com/download.cgi"&gt;Open Sound System&lt;/a&gt; sound card driver to get sound working.&lt;br /&gt;The Atheros WiFi card is supposed to be supported but I couldn't get it to work, even after adding the pci device alias to the driver. I'll post an update if I get it to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2045809013665972457?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2045809013665972457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2045809013665972457' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2045809013665972457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2045809013665972457'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2008/01/solaris-express-on-toshiba-satellite.html' title='Solaris Express on a Toshiba Satellite Pro A200'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1674032251289827163</id><published>2007-12-20T17:58:00.000Z</published><updated>2007-12-20T18:09:14.206Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Solaris 10 on Dell PowerEdge 1950 and 2950</title><content type='html'>I probably get an email every couple a weeks about this one, not sure why.&lt;br /&gt;E-mails regarding something in &lt;a href="http://www.sun.com/"&gt;Solaris&lt;/a&gt; not working on &lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; PowerEdge 9th gen servers.&lt;br /&gt;&lt;br /&gt;For any device driver related issues with Solaris on x86, the first resource to check if you run in to trouble is the &lt;a href="http://www.sun.com/bigadmin/hcl/data/sol/systems/views/all_servers_all_results.mfg.page1.html"&gt;Sun HCL&lt;/a&gt;, the 'hardware compatability list'.&lt;br /&gt;Solaris 10 works fine on most Dell boxes, but some need NIC or HBA drivers.&lt;br /&gt;&lt;br /&gt;For a &lt;a href="http://www.sun.com/bigadmin/hcl/data/systems/details/2200.html"&gt;Dell 2950&lt;/a&gt; that tells us that Solaris works, from release 11/06 upwards, it also tells us to download the ethernet driver &lt;a href="http://www.broadcom.com/support/ethernet_nic/"&gt;here&lt;/a&gt; and the MegaRAID SAS driver &lt;a href="http://www.lsi.com/storage_home/products_home/internal_raid/megaraid_sas/megaraid_sas_8888elp/index.html?remote=1&amp;locale=EN"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NB&lt;/b&gt;, the Sun HCL does not mention the new 'III' series 9-gen server yet. I would guess they are working on as Sun and Dell recently partenered to provide better Solaris support. The PERC6 card may need some new drivers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1674032251289827163?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1674032251289827163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1674032251289827163' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1674032251289827163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1674032251289827163'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/12/solaris-10-on-dell-poweredge-1950-and.html' title='Solaris 10 on Dell PowerEdge 1950 and 2950'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8236596769735303944</id><published>2007-11-28T21:20:00.000Z</published><updated>2007-11-28T21:29:42.478Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Converting MySQL "on update current_timestamp" to Oracle</title><content type='html'>Another short simple SQL for all out there in the process of converting old &lt;a href="http://www.disney.com/"&gt;MySQL&lt;/a&gt; schemas to &lt;a href="http://otn.oracle.com"&gt;Oracle&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;MySQL has got a built in feature to automatically update a column to the current timestamp whenever the row is updated, just by using the default-clause. The "on update current_timestamp" feature can be quite handy if you have lazy developers who can't be bothered writing full insert statements. :)&lt;br /&gt;&lt;br /&gt;The MySQL create table statement would be something like this:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;create table p (&lt;br /&gt; id int,&lt;br /&gt; a varchar(10),&lt;br /&gt; d timestamp DEFAULT CURRENT_TIMESTAMP&lt;br /&gt;                  ON UPDATE CURRENT_TIMESTAMP,&lt;br /&gt; constraint p_pk primary key (id)&lt;br /&gt;);&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Not difficult to do in Oracle either, but we need a trigger to assist.&lt;br /&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&amp;gt; alter session set nls_Date_format='HH24:MI:SS';&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; create table p (id number, a varchar2(10), d date default sysdate, &lt;br /&gt;       constraint p_pk primary key (id));&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into p(id,a) values(1,'test');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; host cat p_test.sql&lt;br /&gt;CREATE OR REPLACE TRIGGER p_d_trig&lt;br /&gt;BEFORE UPDATE ON p&lt;br /&gt;FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;        select sysdate into :new.d from dual;&lt;br /&gt;END p_d_trig;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SQL&gt; @p_test&lt;br /&gt;&lt;br /&gt;Trigger created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from p;&lt;br /&gt;&lt;br /&gt;        ID A          D&lt;br /&gt;---------- ---------- --------&lt;br /&gt;         1 test       &lt;font color="green"&gt;21:15:05&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; update p set a='foo' where id=1;&lt;br /&gt;&lt;br /&gt;1 row updated.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from p;&lt;br /&gt;&lt;br /&gt;        ID A          D&lt;br /&gt;---------- ---------- --------&lt;br /&gt;         1 foo        &lt;font color="green"&gt;21:16:44&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8236596769735303944?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8236596769735303944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8236596769735303944' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8236596769735303944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8236596769735303944'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/11/converting-mysql-on-update.html' title='Converting MySQL &quot;on update current_timestamp&quot; to Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8013547747447063002</id><published>2007-11-04T21:03:00.000Z</published><updated>2007-11-05T08:37:23.112Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='azul'/><category scheme='http://www.blogger.com/atom/ns#' term='weblogic'/><category scheme='http://www.blogger.com/atom/ns#' term='jboss'/><title type='text'>Azul Systems Java appliance</title><content type='html'>So, I've been dragged more and more in to managing Java application containers like &lt;a href="http://www.bea.com/"&gt;Weblogic&lt;/a&gt;, &lt;a href="http://www.ibm.com/"&gt;Websphere&lt;/a&gt; and &lt;a href="http://www.redhat.com/"&gt;JBoss&lt;/a&gt;. These have a tendency to be hugely complex beasts, almost as complex as our favorite &lt;a href="http://www.oracle.com/"&gt;database&lt;/a&gt; and performance optimization is sometimes quite difficult, or simply it's to much effort to actually upgrade or replace the server.&lt;br /&gt;&lt;a href="http://www.azulsystems.com/"&gt;Azul&lt;/a&gt; offers a quite neat (but a tad pricey) solution to this. They off-load Java computation to a separate appliance, the smallest model has 96 processing cores and 48Gb of ram. The big daddy has a massive 768 cores and 768Gb ram. It's a by Azul in house engineered hardware with custom software (I would guess the OS is semi-based on one of our open-source friends (have a look at the ifconfig output)). The application server still a normal server (Linux/Solaris etc), the small JVM on the server pretty much acts as a proxy between external resources such as JDBC sources and the actual JVM on the appliance.&lt;br /&gt;Their marketing crew calls it a "turn key solution", it's not really that easy but it's pretty straight forward to use.&lt;br /&gt;&lt;img src="http://www.azulsystems.com/images/products/compute_appliance/5U_3200_enlarge.jpg" alt="Azul vega"&gt;&lt;br /&gt;The appliance itself takes about 15 minutes to install, setup the networking and the compute domain name and you are pretty much done with the appliance itself.&lt;br /&gt;The application side is almost as easy. Azul provides sort of a "JDK wrapper", you unpack the wrapper and run a simple shell script to integrate it with an existing JDK, the script asks for the path to the JDK to "mimic". Works with IBM and Sun JDK's, both 1.4 and 1.5 (I haven't tried with Jrockit).&lt;br /&gt;Change your appserver init script's to use the new JAVA_HOME, give it a couple of azul specific JVM options, give it 10Gigs or so of heap and off you go. One thing to remember is that most garbage collection arguments are now obsolete, azul uses it's own custom "pausless gc".&lt;br /&gt;The first thing that hit me when starting the first app-server was how incredibly slow it was to deply, deploying EJB's etc took ages, but hm, yes, that's an almost single threaded operation. The application itself felt "ok" when using it, now the cool part, we really couldn't get the application to run slowly with our benchmarks, at least not if we count out the fact that it eventually trashed the database sever (just some random 8-core thing) behind it. Bottlenecks in the application tiers where all gone! It doesn't matter if 5 users are online or 250, the application performs exactly the same.&lt;br /&gt;The simple conclusion now is "we need a bigger Oracle box!".&lt;br /&gt;&lt;br /&gt;Azul provides a quite good web management console for the appliance, the gui provides functionality to manage compute pools if you need to throttle CPU and memory usage between applications or servers and also provides views to monitor applications and utilization.&lt;br /&gt;&lt;br /&gt;I guess one could call it a bit of a custom "throw hardware at the problem" solution, the box itself is quite expensive but for a medium sized company with loads of j2ee apps it makes sense.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8013547747447063002?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8013547747447063002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8013547747447063002' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8013547747447063002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8013547747447063002'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/11/azul-systems-java-appliance.html' title='Azul Systems Java appliance'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1933400547793380330</id><published>2007-11-01T12:15:00.000Z</published><updated>2007-11-01T14:42:29.817Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle SQL to return a alphabetical subset</title><content type='html'>Yes, I know, I've been waaay bad at blogging lately. Been busy working on new projects at work, upgrading applications to Java1.5 containers (Websphere 6.1, Weblogic 9.2 etc). On the fun side we've got an &lt;a href="http://www.azulsystems.com/"&gt;Azul&lt;/a&gt; Java-acceleration box, that really needs a couple of blog entries!&lt;br /&gt;&lt;br /&gt;Anyway, got asked if there was a way to return a resultset of data based on the leading character, the use case was to ignore all strings starting with a,b, or d and return e to z.&lt;br /&gt;&lt;br /&gt;Fairly straight forward but a good SQL to have.&lt;br /&gt;I simply grab the first character in the varchar and compare it's ASCII value  to the ASCII value D.&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;SQL&gt; select * from t;&lt;br /&gt;&lt;br /&gt;A&lt;br /&gt;----------&lt;br /&gt;Atest&lt;br /&gt;Btest&lt;br /&gt;Etest&lt;br /&gt;Htest&lt;br /&gt;Wtest&lt;br /&gt;Dtest&lt;br /&gt;dtest&lt;br /&gt;SQL&gt; with data as (&lt;br /&gt;  2  select ascii(upper(substr(a,1,1))) a_val,a from t&lt;br /&gt;  3  )&lt;br /&gt;  4  select * from data where a_val not between ascii('A') and ascii('D') order by a&lt;br /&gt;  5  /&lt;br /&gt;&lt;br /&gt;     A_VAL A&lt;br /&gt;---------- ----------&lt;br /&gt;        69 Etest&lt;br /&gt;        72 Htest&lt;br /&gt;        87 Wtest&lt;br /&gt;SQL&amp;gt;&lt;/pre&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1933400547793380330?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1933400547793380330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1933400547793380330' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1933400547793380330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1933400547793380330'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/11/oracle-sql-to-return-alphabetical.html' title='Oracle SQL to return a alphabetical subset'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-9126593814952173556</id><published>2007-08-21T08:42:00.000+01:00</published><updated>2007-08-21T08:43:33.765+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle 11g: Archive log alert log output</title><content type='html'>Starting with Oracle 11g the archivelog process is no longer logged to the alert log by default. For good and bad in my opinion, nice to get rid of the log entries on smaller databases but it can be quite useful to see the details on larger systems with multiple log destinations.&lt;br /&gt;&lt;br /&gt;The log level is simply a database parameter and can easily be changed, look at &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/archredo007.htm#i1006885"&gt;this&lt;/a&gt; page to figure out what level you want. I figured 79 would be a good starting point (64+8+4+2+1). Databases running dataguard should probably have 207 (add 128) to include FAL service details.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to set the trace level:&lt;/b&gt;&lt;pre&gt;&lt;font color="darkblue"&gt;&lt;font color="green"&gt;[oracle@vm-rac1 ~]$ rsqlplus "/ as sysdba"&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 11.1.0.6.0 - Production on Sun Aug 19 02:35:23 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2007, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production&lt;br /&gt;With the Partitioning, OLAP, Data Mining and Real Application Testing options&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter log_archive_trace&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;log_archive_trace                    integer     0&lt;br /&gt;SQL&gt; alter system set log_archive_trace=79;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system switch logfile;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production&lt;br /&gt;With the Partitioning, OLAP, Data Mining and Real Application Testing options&lt;br /&gt;&lt;font color="green"&gt;[oracle@vm-rac1 ~]$ talert # my shell alias to tail the current alert log&lt;/font&gt;&lt;br /&gt;  Current log# 1 seq# 7 mem# 0: /u01/app/oracle/oradata/test11g/redo01.log&lt;br /&gt;Sun Aug 19 02:03:14 2007&lt;br /&gt;ARC3: Evaluating archive   log 3 thread 1 sequence 6&lt;br /&gt;ARC3: Beginning to archive thread 1 sequence 6 (627362-628594) (test11g)&lt;br /&gt;ARC3: Creating local archive destination LOG_ARCHIVE_DEST_10: &lt;br /&gt;'/u01/app/oracle/flash_recovery_area/TEST11G/archivelog/2007_08_19/o1_mf_1_6_%u_.arc' (thread 1 sequence 6)&lt;br /&gt; (test11g)&lt;br /&gt;ARC3: Creating local archive destination LOG_ARCHIVE_DEST_1: &lt;br /&gt;'/u01/app/oracle/11.1.0/db_1/dbs/arch1_6_630935902.dbf' (thread 1 sequence 6)&lt;br /&gt; (test11g)&lt;br /&gt;ARC3: Closing local archive destination LOG_ARCHIVE_DEST_10: &lt;br /&gt;'/u01/app/oracle/flash_recovery_area/TEST11G/archivelog/2007_08_19/o1_mf_1_6_3dh5pld1_.arc'&lt;br /&gt; (test11g)&lt;br /&gt;Committing creation of archivelog &lt;br /&gt;'/u01/app/oracle/flash_recovery_area/TEST11G/archivelog/2007_08_19/o1_mf_1_6_3dh5pld1_.arc'&lt;br /&gt;ARC3: Closing local archive destination LOG_ARCHIVE_DEST_1: &lt;br /&gt;'/u01/app/oracle/11.1.0/db_1/dbs/arch1_6_630935902.dbf'&lt;br /&gt; (test11g)&lt;br /&gt;Committing creation of archivelog '/u01/app/oracle/11.1.0/db_1/dbs/arch1_6_630935902.dbf'&lt;br /&gt;ARC3: Completed archiving thread 1 sequence 6 (627362-628594) (test11g)&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Read details about the log trace level &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/archredo007.htm#i1006885"&gt;here&lt;/a&gt;  and general alert log related stuff &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/monitoring001.htm#i1011629"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-9126593814952173556?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/9126593814952173556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=9126593814952173556' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9126593814952173556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9126593814952173556'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/08/oracle-11g-archive-log-alert-log-output.html' title='Oracle 11g: Archive log alert log output'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2664596054480104392</id><published>2007-08-19T21:09:00.000+01:00</published><updated>2007-08-19T21:39:08.920+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='11g'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle 11g: basic rundown</title><content type='html'>Ok, so 11g has been out some time but I've been to busy to really dig in to it until now. 11g is probably the first release that doesn't really many new features; no, before you send me angry e-mails hear me out :)&lt;br /&gt;Take a look at the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm#NEWFTCH1"&gt;new features&lt;/a&gt; list. What do most of these features do? Easy, they just make the most out of the fairly old but totally outstanding REDO and UNDO management in Oracle. Why not use what we already got? Ok, some things are totally new features like the improved partitioning and new data types for the medical and life-sciences industry. &lt;br /&gt;&lt;br /&gt;&lt;B&gt;Partitioning and compression&lt;/b&gt;&lt;br /&gt;The coolest things in 11g is probably the VLDB features for partitioning and compressions, can really reduce storage costs (at the same time as storage costs are plummeting with the competition from iSCSI). It is now possible to create "automatic" partitions, i.e. instead of adding a partition every month with DDL when doing a bulk load Oracle can automatically partition the table as per predefined rules. Pretty cool and saves a lot of time.&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Direct NFS&lt;/B&gt;&lt;br /&gt;Another pretty cool feature, at least for me as I'm using a lot of &lt;a href="http://www.netapp.com/"&gt;Netapp&lt;/a&gt; NFS storage, is the Direct NFS client in Oracle (Linux). Switch to the direct NFS lib and Oracle will do NFS ops outside the Linux kernel, which removes the NFS caching layer and kernel block device mapping etc. Gives a quite massive performance increase on some workloads. This is what I'm playing most with at the moment.&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Data Guard&lt;/b&gt;&lt;br /&gt;Lots of new cool stuff for Data Guard. Most significantly is probably the fact that you can have an open standby, available for real-time queries such as reporting applications and other read only operations. In fact, you can even open a Data Guard instance in read-write mode and mess about with it and later just flashback to a SCN where the db was in sync with the Data Guard master db and just roll forward to the current SCN using the normal FAL services. How sweet isn't that for DR testing and schema change testing. DR testing during live operations, that's a couple of late nights saved.&lt;br /&gt;Other new data guard features include redo shipping compression, the normal improvements to the DG broker, sqlplus manageability etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Workload replay&lt;/b&gt;&lt;br /&gt;Another thing that is really useful for deployment testing and change control is the database replay feature, one can "record" all transactions over a period of time and replay them after a change has happened to ensure performance and functionality has not degraded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Improved ASM features.&lt;/b&gt;&lt;br /&gt;You can now bring online a replaced drive and new writes will go directly to the drive while Oracle sync data from a redundant mirror in the background. Reduces resync time quite a fair bit.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PL/SQL&lt;/B&gt;&lt;br /&gt;Couple of improvements to plsql;&lt;br /&gt;Use of sequences in declares.&lt;br /&gt;Real compound triggers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;New data types&lt;/B&gt;&lt;br /&gt;Not really my thing but probably useful for a lot of people.&lt;br /&gt;Spatial and multimedia support for medical imaging, life-sciences and other fairly odd things. :) Docs &lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28415/ch_dba.htm#IMURG8000"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A couple of minor things have changed as well, the alert log lives in a new place (with it's buddies in the new diag system), the logging levels in the alert log can now be adjusted as well (got a blog entry about that in a couple of days).&lt;br /&gt;&lt;br /&gt;Lots of fun things to play with and to blog about.&lt;br /&gt;&lt;br /&gt;Ah, almost forgot. Larry pulled a version hack on us again. As some of you may now there was never an Oracle Version 1 release, the first version was called 2 since Larry Ellison didn't think anyone would buy version 1. The first (public) 11g release is 11.1.0.6&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2664596054480104392?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2664596054480104392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2664596054480104392' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2664596054480104392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2664596054480104392'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/08/oracle-11g-basic-rundown.html' title='Oracle 11g: basic rundown'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1897409034698230813</id><published>2007-08-11T21:40:00.000+01:00</published><updated>2007-08-11T21:44:37.101+01:00</updated><title type='text'>Oracle Database 11g available for download</title><content type='html'>Well, it's about time. Oracle finally made &lt;a href="http://www.oracle.com/database/index.html"&gt;11g&lt;/a&gt; available for download. Only 32-bit Linux so far though and I have a feeling we'll have to wait a while for most other platforms (possibly a 64-bit Linux download soon).&lt;br /&gt;&lt;br /&gt;Download it &lt;a href="http://www.oracle.com/technology/software/products/database/index.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Lots of new cool stuff to blog about, I'm away on holiday for a week but my recently upgraded lab machines at home are sitting there waiting. Fun times when I get home.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1897409034698230813?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1897409034698230813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1897409034698230813' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1897409034698230813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1897409034698230813'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/08/oracle-database-11g-available-for.html' title='Oracle Database 11g available for download'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-9197463347015836797</id><published>2007-07-30T21:55:00.000+01:00</published><updated>2007-07-30T22:07:17.664+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Limit user sessions in Oracle</title><content type='html'>Developers sometimes enjoy configuring their JDBC datasources after their own likings, testing a performance issue by having a gazzillion threads to the database "just in case we need them". &lt;br /&gt;Well in my opinion, if you need what is obviously too many threads, then there is a coding issue.&lt;br /&gt;So to make people think twice before flooding a service with connections I've started limiting the number of sessions they are allowed to have.&lt;br /&gt;Easy as always to do in Oracle. First we allow resource limits by setting the &lt;b&gt;resource_limit&lt;/b&gt; to &lt;b&gt;true&lt;/b&gt;, then we simply create a &lt;a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/authoriz.htm"&gt;profile&lt;/a&gt; and assign that to the user. The profile can set the limit of how many session a user is allowed to have.&lt;br /&gt;&lt;br /&gt;&lt;B&gt;A little demonstration&lt;/B&gt;;&lt;pre&gt;&lt;font color="darkblue"&gt;oracle@htpc:~$ rsqlplus "/ as sysdba"&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jul 30 21:56:12 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter resource_limit&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;resource_limit                       boolean     FALSE&lt;br /&gt;SQL&gt; alter system set RESOURCE_LIMIT=true scope=both;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; create profile sesslimit limit sessions_per_user 2;&lt;br /&gt;&lt;br /&gt;Profile created.&lt;br /&gt;&lt;br /&gt;SQL&gt; create user fish identified by fish123&lt;br /&gt;  2  default tablespace data profile sesslimit;&lt;br /&gt;&lt;br /&gt;User created.&lt;br /&gt;&lt;br /&gt;SQL&gt; grant create session to fish;&lt;br /&gt;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;SQL&gt; connect fish/fish123&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; disconnect&lt;br /&gt;Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;font color="darkgreen"&gt;-- I'll start two sessions in another terminal.&lt;/font&gt;&lt;br /&gt;SQL&gt; connect fish/fish123&lt;br /&gt;ERROR:&lt;br /&gt;ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/pre&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-9197463347015836797?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/9197463347015836797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=9197463347015836797' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9197463347015836797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9197463347015836797'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/07/limit-user-sessions-in-oracle.html' title='Limit user sessions in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7948391200380332990</id><published>2007-07-08T18:42:00.000+01:00</published><updated>2007-07-08T19:00:28.235+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle sql'/><title type='text'>Using SERVICE_NAMES in Oracle</title><content type='html'>The use of "SERVICE_NAMES" in Oracle is quite an old and probably well known feature but perhaps not everyone is familiar with it yet.&lt;br /&gt;Got asked today about a recovery scenario where the administrator had a failed instance (broken data files, no logs, no backups, just a nightly exp), a new database was created with 'dbca', but with a new name to test importing the exp file.&lt;br /&gt;All worked fine, but there was a problem with the database name. The application had the service name set in a number of config files and there was also a number of ETL scripts with service names hardcoded. The thinking at the time was to delete the old instance, remove all traces of it (oratab etc.) and then create it *again* with the same name.&lt;br /&gt;Now hold on here, we have tested the imp in a new database, all is fine and all we want to do is allow connections to the old database instance name?&lt;br /&gt;That's pretty much a one-liner, not a new database.&lt;br /&gt;We can simply add the new name we want to "listen on" to the SERVICE_NAMES parameter.&lt;br /&gt;Easy peasy.&lt;br /&gt;&lt;br /&gt;Ok, here is what we should do. Quite a long example for something simple.&lt;br /&gt;But hey, just want to make it clear.&lt;br /&gt;&lt;pre&gt;&lt;font color="darkblue"&gt;oracle@htpc:admin$ lsnrctl status&lt;br /&gt;&lt;font color="red"&gt;-- What's the current db_name and service_names?&lt;/font&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:31:22&lt;br /&gt;&lt;br /&gt;Copyright (c) 1991, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))&lt;br /&gt;STATUS of the LISTENER&lt;br /&gt;------------------------&lt;br /&gt;Alias                     LISTENER&lt;br /&gt;Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production&lt;br /&gt;Start Date                08-JUL-2007 18:23:39&lt;br /&gt;Uptime                    0 days 0 hr. 7 min. 43 sec&lt;br /&gt;Trace Level               off&lt;br /&gt;Security                  ON: Local OS Authentication&lt;br /&gt;SNMP                      OFF&lt;br /&gt;Listener Parameter File   /u01/oracle/10g/network/admin/listener.ora&lt;br /&gt;Listener Log File         /u01/oracle/10g/network/log/listener.log&lt;br /&gt;Listening Endpoints Summary...&lt;br /&gt;  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))&lt;br /&gt;  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htpc)(PORT=1521)))&lt;br /&gt;Services Summary...&lt;br /&gt;Service "PLSExtProc" has 1 instance(s).&lt;br /&gt;  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...&lt;br /&gt;Service "peggy" has 2 instance(s).&lt;br /&gt;  Instance "peggy", status UNKNOWN, has 1 handler(s) for this service...&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;Service "peggyXDB" has 1 instance(s).&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;Service "peggy_XPT" has 1 instance(s).&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;The command completed successfully&lt;/font&gt;&lt;br /&gt;oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdba&lt;br /&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:24 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter db_name&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;db_name                              string      peggy&lt;br /&gt;SQL&gt; show parameter service_names&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;service_names                        string      peggy&lt;br /&gt;SQL&gt; &lt;br /&gt;Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;/font&gt;&lt;br /&gt;&lt;font color="red"&gt;-- What can we connect to?&lt;/font&gt;&lt;br /&gt;oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/peggy&lt;br /&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:53 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt; &lt;br /&gt;Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dog&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:31:58 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;ERROR:&lt;br /&gt;ORA-12514: TNS:listener does not currently know of service requested in connect&lt;br /&gt;descriptor&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enter user-name:&lt;/font&gt;&lt;br /&gt;&lt;font color="red"&gt;-- Ouch, that's the one we want!&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;oracle@htpc:admin$ rsqlplus hlinden/hlinden as sysdba&lt;br /&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:32:01 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;&lt;font color="red"&gt;-- Here is the 'one-liner'&lt;/font&gt;&lt;br /&gt;SQL&gt; alter system set service_names='peggy,dog' scope=spfile;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SQL&gt; startup&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  599785472 bytes&lt;br /&gt;Fixed Size                  2022600 bytes&lt;br /&gt;Variable Size             167772984 bytes&lt;br /&gt;Database Buffers          423624704 bytes&lt;br /&gt;Redo Buffers                6365184 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;SQL&gt; &lt;br /&gt;Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;/font&gt;&lt;br /&gt;&lt;font color="red"&gt;-- Let's see what changed. What can we connect to now?&lt;/font&gt;&lt;br /&gt;oracle@htpc:admin$ lsnrctl status&lt;br /&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 08-JUL-2007 18:33:57&lt;br /&gt;&lt;br /&gt;Copyright (c) 1991, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))&lt;br /&gt;STATUS of the LISTENER&lt;br /&gt;------------------------&lt;br /&gt;Alias                     LISTENER&lt;br /&gt;Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production&lt;br /&gt;Start Date                08-JUL-2007 18:23:39&lt;br /&gt;Uptime                    0 days 0 hr. 10 min. 18 sec&lt;br /&gt;Trace Level               off&lt;br /&gt;Security                  ON: Local OS Authentication&lt;br /&gt;SNMP                      OFF&lt;br /&gt;Listener Parameter File   /u01/oracle/10g/network/admin/listener.ora&lt;br /&gt;Listener Log File         /u01/oracle/10g/network/log/listener.log&lt;br /&gt;Listening Endpoints Summary...&lt;br /&gt;  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))&lt;br /&gt;  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=htpc)(PORT=1521)))&lt;br /&gt;Services Summary...&lt;br /&gt;Service "PLSExtProc" has 1 instance(s).&lt;br /&gt;  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...&lt;br /&gt;&lt;b&gt;Service "dog" has 1 instance(s).&lt;/b&gt;&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;Service "peggy" has 2 instance(s).&lt;br /&gt;  Instance "peggy", status UNKNOWN, has 1 handler(s) for this service...&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;Service "peggyXDB" has 1 instance(s).&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;Service "peggy_XPT" has 1 instance(s).&lt;br /&gt;  Instance "peggy", status READY, has 1 handler(s) for this service...&lt;br /&gt;The command completed successfully&lt;/font&gt;&lt;br /&gt;oracle@htpc:admin$ rsqlplus hlinden/hlinden@//htpc/dog&lt;br /&gt;&lt;br /&gt;&lt;font color="darkgreen"&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jul 8 18:34:18 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;font color="red"&gt;-- It works, but where are we?&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select sys_context('userenv','SERVICE_NAME') from dual;&lt;br /&gt;&lt;br /&gt;SYS_CONTEXT('USERENV','SERVICE_NAME')&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;dog&lt;br /&gt;&lt;br /&gt;SQL&gt; select sys_context('userenv','DB_NAME') from dual;&lt;br /&gt;&lt;br /&gt;SYS_CONTEXT('USERENV','DB_NAME')&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;peggy&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7948391200380332990?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7948391200380332990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7948391200380332990' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7948391200380332990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7948391200380332990'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/07/using-servicenames-in-oracle.html' title='Using SERVICE_NAMES in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4336368327014503957</id><published>2007-07-01T22:48:00.000+01:00</published><updated>2007-08-06T08:06:38.551+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hpc'/><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='blades'/><category scheme='http://www.blogger.com/atom/ns#' term='hp'/><category scheme='http://www.blogger.com/atom/ns#' term='ibm'/><title type='text'>The new top 500 supercomputer list is out!</title><content type='html'>Finally had some time to look at the latest &lt;a href="http://www.top500.org"&gt;Top500&lt;/a&gt; supercomputer &lt;a href="http://www.top500.org/lists/2007/06"&gt;list&lt;/a&gt; released last week at ISC '07 last week.&lt;br /&gt;&lt;br /&gt;Lots of changes compared to the old list; two quite interesting new things. First of all is Intel multi-core chips, secondly we have Blades, loads and loads of blades.&lt;br /&gt;A significant number of entries on the list are using Intel Xeon 5160 3.0GHz dual-core CPU's and there is also a number of quad-core systems.&lt;br /&gt;Another interesting point is that the crown in terms of number of systems on the list has been passed from &lt;a href="http://www.ibm.com/"&gt;IBM&lt;/a&gt; (with 192 systems) to &lt;a href="http://www.hp.com/"&gt;HP&lt;/a&gt; (with 201 systems).&lt;br /&gt;The &lt;a href="http://h20311.www2.hp.com/HPC/cache/276446-0-0-0-121.html"&gt;HP Cluster Platform BL460c&lt;/a&gt; holds quite a few spots on the list. Can't say I've heard much about HP's HPC offering so far, they're not exactly beating the drum on that one (compared to the IBM guy who's calling me every 2 months).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sgi.com/"&gt;SGI&lt;/a&gt; holds a few new slots on the list as well, which is extra fun to see considering the hard last year SGI have had. One Altix system even made it to number 10 on the list (with &lt;a href="http://www.nas.nasa.gov/About/Projects/Columbia/columbia.html"&gt;Columbia&lt;/a&gt; on number 13).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.top500.org/"&gt;&lt;img src="http://top500.cachefly.net/themes/top500/logo.gif" alt="Top 500"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4336368327014503957?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4336368327014503957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4336368327014503957' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4336368327014503957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4336368327014503957'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/07/new-top-500-supercomputer-list-is-out.html' title='The new top 500 supercomputer list is out!'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-6692534982010210533</id><published>2007-06-28T09:32:00.001+01:00</published><updated>2007-06-28T09:42:28.301+01:00</updated><title type='text'>Dell teaming with Oracle Enterprise Linux?</title><content type='html'>Just noticed that &lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; change the &lt;b&gt;"Red Hat Enterprise Linux"&lt;/b&gt; label on their support website to just &lt;b&gt;"Enterprise Linux"&lt;/b&gt;.&lt;br /&gt;Is this the first step for Dell embracing &lt;a href="http://www.oracle.com/linux"&gt;Oracle Enterprise Linux&lt;/a&gt;?&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/el4dell.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-6692534982010210533?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/6692534982010210533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=6692534982010210533' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6692534982010210533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6692534982010210533'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/06/dell-teaming-with-oracle-enterprise.html' title='Dell teaming with Oracle Enterprise Linux?'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3187004104976977735</id><published>2007-06-24T20:54:00.001+01:00</published><updated>2007-06-24T21:12:26.801+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Sun 2002 flashback</title><content type='html'>We've been doing some shuffling around of hardware at work and I've recommissioned some old Sun hardware for a new QA environment.&lt;br /&gt;Oh the memories I have of old Sun kit :)&lt;br /&gt;The most exciting thing I've installed is a Sun &lt;a href="http://www.sun.com/servers/midrange/v480/"&gt;v480&lt;/a&gt; connected to a &lt;a href="http://sunsolve.sun.com/handbook_pub/Systems/T3plus/T3plus.html"&gt;T3 brick&lt;/a&gt;. That combo was pretty much the industry standard Oracle solution when I had my first job in "real" systems administration and it was probably one of the first the real mid-range installs I did (not counting ageing 420r/450's).&lt;br /&gt;To be honest, it's a match made in heaven. A quad cpu v480 with a t3 brick (or two) kicked out some real performance numbers in it's day. The v480 is probably one of the nicest boxes to work with (considering age and all), the boards are easy to fit, the RSC is awesome, it's simply rock solid. Running Solaris 8 of course (we still have *lots* of clients on Solaris 8 (with Solaris 10 gaining ground)).&lt;br /&gt;&lt;img src="http://sunsolve.sun.com/handbook_pub/Systems/SunFireV480/images/SunFireV480.jpg"&gt;&lt;br /&gt;&lt;br /&gt;The T3 array is pretty cool, but it brings back the frustrations everyone had with early low-end SANs. The limitation to two disk RAID volumes with very limited zoning and slicing. But hey, it's pretty old and is still pretty fast.&lt;br /&gt;&lt;img src="http://ru.sun.com/products/storage/T3_workgroup/pics/T3_workgroup.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Now if I only could figure out how to get rid of that darn Sun &lt;a href="http://www.sun.com/servers/entry/250/"&gt;E250&lt;/a&gt; we still have running &lt;a href="http://www.sybase.com/"&gt;Sybase 12.5.4&lt;/a&gt;, it just works to well so far.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3187004104976977735?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3187004104976977735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3187004104976977735' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3187004104976977735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3187004104976977735'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/06/sun-2002-flashback.html' title='Sun 2002 flashback'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1886967865903870417</id><published>2007-06-14T12:19:00.000+01:00</published><updated>2007-06-14T12:38:44.100+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Reclaiming LOB space in Oracle</title><content type='html'>Reclaiming space in Oracle can sometimes be a bit of a "problem", not really a problem it just works in a funny way. It's a quite common question I get and users are usually happy with a manual &lt;b&gt;alter table table_name shrink space compact;&lt;/b&gt;, but what do we do for lobs? &lt;br /&gt;We need a manual reclaim for the lob column.&lt;br /&gt;&lt;br /&gt;A little demo:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;(spinner1)oracle@spinner[~/lob_test]$ rsqlplus hlinden/hlinden&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 14 12:19:02 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Create a table and sequence to play with&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; create table lob_test (id number, data blob);&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; create sequence lob_test_seq;&lt;br /&gt;&lt;br /&gt;Sequence created.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Load 50 rows with 1.5Mb blobs (see code bellow)&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; @lobload&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Find out what our lob segment is called&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; select object_name,object_type from user_objects where&lt;br /&gt;  2  created&gt;sysdate-interval '5' minute and object_type='LOB';&lt;br /&gt;&lt;br /&gt;OBJECT_NAME                    OBJECT_TYPE&lt;br /&gt;------------------------------ -------------------&lt;br /&gt;SYS_LOB0000199575C00002$$      LOB&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Display the current size of the lob segment&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; select round(sum(bytes)/1024/1024) Mb from user_segments where &lt;br /&gt;segment_name='SYS_LOB0000199575C00002$$';&lt;br /&gt;&lt;br /&gt;        MB&lt;br /&gt;----------&lt;br /&gt;        75&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Ok, let's delete those blobs and see what the size is after&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; delete from lob_test purge;&lt;br /&gt;&lt;br /&gt;50 rows deleted.&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; select round(sum(bytes)/1024/1024) Mb from user_segments where &lt;br /&gt;segment_name='SYS_LOB0000199575C00002$$';&lt;br /&gt;&lt;br /&gt;        MB&lt;br /&gt;----------&lt;br /&gt;        75&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Still 75Mb, hm, perhaps it recycled if we insert more data?&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; @lobload&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; select round(sum(bytes)/1024/1024) Mb from user_segments where &lt;br /&gt;segment_name='SYS_LOB0000199575C00002$$';&lt;br /&gt;&lt;br /&gt;        MB&lt;br /&gt;----------&lt;br /&gt;       150&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Nope, not recycled. We need to issue a shrink command to free up the &lt;br /&gt;-- space immediately&lt;/font&gt;&lt;br /&gt;HLINDEN@spinner1&gt; delete from lob_test;&lt;br /&gt;&lt;br /&gt;50 rows deleted.&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; alter table lob_test modify lob (data) (shrink space);&lt;br /&gt;&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;HLINDEN@spinner1&gt; select round(sum(bytes)/1024/1024) Mb from user_segments where &lt;br /&gt;segment_name='SYS_LOB0000199575C00002$$';&lt;br /&gt;&lt;br /&gt;        MB&lt;br /&gt;----------&lt;br /&gt;         0&lt;br /&gt;&lt;font color="green"&gt;-- All gone!&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;My simple blob loading code:&lt;br /&gt;&lt;pre&gt;&lt;font color="darkblue"&gt;DECLARE&lt;br /&gt;  src_file      BFILE := bfilename('TMP', 'data.dat');&lt;br /&gt;  dst_file      BLOB;&lt;br /&gt;  lgh_file      BINARY_INTEGER;&lt;br /&gt;  cur_id        NUMBER(10);&lt;br /&gt;BEGIN&lt;br /&gt;  FOR i IN 1..50&lt;br /&gt;  LOOP&lt;br /&gt;    INSERT INTO lob_test(id,data) VALUES(lob_test_seq.nextval,empty_blob())&lt;br /&gt;          RETURNING id into cur_id;&lt;br /&gt;    -- lock record&lt;br /&gt;    SELECT data INTO dst_file FROM lob_test WHERE id=cur_id FOR UPDATE;&lt;br /&gt;&lt;br /&gt;    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);&lt;br /&gt;    lgh_file := dbms_lob.getlength(src_file);&lt;br /&gt;    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);&lt;br /&gt;    dbms_lob.fileclose(src_file);&lt;br /&gt;  END LOOP;&lt;br /&gt;END;&lt;br /&gt;/&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1886967865903870417?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1886967865903870417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1886967865903870417' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1886967865903870417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1886967865903870417'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/06/reclaiming-lob-space-in-oracle.html' title='Reclaiming LOB space in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8692167058126432457</id><published>2007-06-12T23:05:00.000+01:00</published><updated>2007-06-12T23:09:13.802+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle 11g - one month to go</title><content type='html'>Yep, exciting times. July 11th, lots of new cool stuff.&lt;br /&gt;&lt;br /&gt;Read about a couple of new things in &lt;a href="http://www.oracle.com/newsletters/information-indepth/database-insider/jun-07/index.html"&gt;Insider &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you're lucky enough to be in New York, sign up for the launch &lt;a href="http://www.oracle.com/webapps/events/EventsDetail.jsp?p_eventId=66665"&gt;event&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8692167058126432457?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8692167058126432457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8692167058126432457' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8692167058126432457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8692167058126432457'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/06/oracle-11g-one-month-to-go.html' title='Oracle 11g - one month to go'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-5662327696536896979</id><published>2007-06-10T17:34:00.001+01:00</published><updated>2007-06-10T21:30:02.323+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sun blades solaris'/><title type='text'>New blade enclosure from Sun</title><content type='html'>Ever since &lt;a href="http://en.wikipedia.org/wiki/Andy_Bechtolsheim"&gt;Andy Bechtolsheim&lt;/a&gt; returned to &lt;a href="http://www.sun.com/"&gt;Sun&lt;/a&gt; pretty much everything on the &lt;a href="http://www.sun.com/servers/index.jsp"&gt;Sun x64&lt;/a&gt; server line meet all expectations and then some. Sure, there has been the slight &lt;a href="http://cuddletech.com/blog/pivot/entry.php?id=808"&gt;ethernet chipset&lt;/a&gt; problem, but generally the AMD kit has really kicked ass&lt;br /&gt;Though some people where surprised to see first (new) blade offering from Sun, the &lt;a href="http://www.sun.com/servers/blades/8000/"&gt;8000&lt;/a&gt; series. A 4-socket blade offering when most of the market moved away from larger blade enclosures and focused on 2-socket systems. The 8000 still made good sense for larger customers like financial institutions and telcos. Server consolidation on a large level.&lt;br /&gt;&lt;br /&gt;Now the other day Sun released a second (third actually, the 8000 comes in two models) blade offering. The &lt;a href="http://www.sun.com/servers/blades/6000/"&gt;6000&lt;/a&gt; series. It's a fairly basic 10U enclosure, 10 blade slots and the classic Ethernet modules. Not very exciting at first glance, I have to admit. Sounds like the &lt;a href="http://www.dell.com/content/products/productdetails.aspx/pedge_1955_new?c=us&amp;cs=555&amp;l=en&amp;s=biz&amp;redirect=1"&gt;PowerEdge 1955&lt;/a&gt; box but not with the same high density (Dell can do 10 blades in 7U).&lt;br /&gt;&lt;img src="http://www.sun.com/images/k3/k3_sb6000_1.jpg" alt="6000"&gt;&lt;br /&gt;The thing cool about the 6000 enclosure is that it is not a Blade enclosure in the classic sense, it's not "stripped down computers in a box". It's actually 10 high capacity servers. It enclosure offers the same expandability as normal 1U servers.&lt;br /&gt;All blade modules are dual socket, can take up to 16 DIMMS, &lt;b&gt;four&lt;/b&gt; 2.5" SAS drives and even two PCI-e slots. That's right, normal PCI-e slots, no more proprietary on board FC-AL or Infiniband modules. Just slot in a couple of standard c-PCIe cards and off you go. No more opening up the blade to install modules.&lt;br /&gt;Another new feature is a hardware RAID controller on-board (for good and bad indeed).&lt;br /&gt;The whole enclosure is based around industry standards and open solutions.&lt;br /&gt;&lt;br /&gt;In addition to all this cool stuff the real winner here is the selection of blades.&lt;br /&gt;Sun offers no less than &lt;b&gt;3&lt;/b&gt; blade types.&lt;br /&gt;The &lt;a href="http://www.sun.com/servers/blades/t6300/"&gt;t6300&lt;/a&gt; UltraSPARC T1 blade,&lt;br /&gt;the &lt;a href="http://www.sun.com/servers/blades/x6220/"&gt;x6220&lt;/a&gt; AMD blade and&lt;br /&gt;the &lt;a href="http://www.sun.com/servers/blades/x6250/"&gt;x6250&lt;/a&gt; Intel Xeon blade&lt;br /&gt;It's the first Intel Xeon (including quad-core procs) offering from Sun, with many more to come. &lt;br /&gt;&lt;img src="http://www.sun.com/images/k3/k3_sb6000_5.jpg" alt="t6300"&gt;&lt;br /&gt;&lt;br /&gt;Watch Andy talk about the new box &lt;a href="http://www.sun.com/servers/blades/6000/gallery/index.xml?p=2&amp;s=1"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-5662327696536896979?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/5662327696536896979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=5662327696536896979' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5662327696536896979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5662327696536896979'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/06/new-blade-enclosure-from-sun.html' title='New blade enclosure from Sun'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2680663854936703628</id><published>2007-05-30T21:55:00.000+01:00</published><updated>2007-05-30T22:11:25.342+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='plsql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Run system commands from Oracle with PL/SQL</title><content type='html'>I friend of mine asked if it was possible to show the exact Linux kernel version on an Oracle server without actually having shell access to the server.&lt;br /&gt;He had full access to Oracle with sysdba/dba roles etc, but not SSH.&lt;br /&gt;I've seen some versions of executing system commands from Java but never really liked the idea of invoking Java for something simple like that.&lt;br /&gt;&lt;br /&gt;One way I thought of would be to use dbms_scheduler to execute a job with an executable job_typ. The first problem was to find a way to actually return the standard output from the execution to Oracle.&lt;br /&gt;Ok, so my 'hack' here is a stored procedure (entirely in PL/SQL) that creates a job with dbms_scheduler; calling /bin/sh as the executable and hands it a temporary script to execute. In the script I have a simple redirect to a temporary spool file and then the procedure simply reads and outputs the content of the file. It's a bit of a hack but at least it gets the job done and doesn't use Java.&lt;br /&gt;I haven't drilled down on what kind of permissions you need to actually use the procedure but I suspect it's quite a lot.&lt;br /&gt;The temporary spool file handling in my example is quite poor, but works. :)&lt;br /&gt;A word of warning as usual when using PL/SQL, this code example is a proof of concept. It needs *loads' of error catching etc. in order to be production ready, use with caution. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example of use:&lt;/b&gt;&lt;pre&gt;&lt;font color="blue"&gt;oracle@htpc:~$ rsqlplus hlinden/password as sysdba&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 30 21:55:06 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt; set serveroutput on&lt;br /&gt;SQL&gt; @system_run&lt;br /&gt;&lt;br /&gt;Procedure created.&lt;br /&gt;&lt;br /&gt;SQL&gt; exec system_run('ls -l /home/oracle/bin');&lt;br /&gt;&lt;font color="green"&gt;total 12&lt;br /&gt;-rwxr-xr-x 1 oracle dba  797 Nov  5  2006 backup_controlfile.sh&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; exec system_run('uname -a');&lt;br /&gt;&lt;font color="green"&gt;Linux htpc 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 GNU/Linux&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;&lt;b&gt;And here is the procedure code:&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;CREATE OR REPLACE PROCEDURE system_run(cmd IN varchar2)&lt;br /&gt;IS&lt;br /&gt;  script_file   varchar2(40) := 'my-temp-script.sh';&lt;br /&gt;  script_data   varchar2(4000);&lt;br /&gt;  MyFile        utl_file.file_type;&lt;br /&gt;  d             varchar2(4000);&lt;br /&gt;  dump_file     varchar2(40) := '/tmp/my-temp-file.dat';&lt;br /&gt;  dump_type     utl_file.file_type;&lt;br /&gt;BEGIN&lt;br /&gt;  -- Open file&lt;br /&gt;  MyFile := utl_file.fopen('TMP',script_file,'w');&lt;br /&gt;  -- Write data to file&lt;br /&gt;  script_data := '#!/bin/bash' || chr(10) || cmd||'&gt;'||dump_file;&lt;br /&gt;  utl_file.put_line(MyFile, script_data, FALSE);&lt;br /&gt;  -- Close file&lt;br /&gt;  utl_file.fflush(MyFile);&lt;br /&gt;  utl_file.fclose(MyFile);&lt;br /&gt;  -- Purge old logs, no fun anyway&lt;br /&gt;  dbms_scheduler.purge_log(JOB_NAME=&gt;'TEST');&lt;br /&gt;  -- Execute script&lt;br /&gt;  -- The job is created as disabled as&lt;br /&gt;  -- we execute it manually and will&lt;br /&gt;  -- drop itself once executed.&lt;br /&gt;  dbms_scheduler.create_job(&lt;br /&gt;    job_name   =&gt; 'TEST',&lt;br /&gt;    job_type   =&gt; 'EXECUTABLE',&lt;br /&gt;    job_action =&gt; '/bin/bash',&lt;br /&gt;    number_of_arguments =&gt; 1,&lt;br /&gt;    start_date =&gt; SYSTIMESTAMP,&lt;br /&gt;    enabled    =&gt; FALSE);&lt;br /&gt;  dbms_scheduler.set_job_argument_value('TEST', 1, '/tmp/'||script_file);&lt;br /&gt;  dbms_scheduler.enable('TEST');&lt;br /&gt;  -- Wait for the job to be executed&lt;br /&gt;  -- usually done within 1 second but&lt;br /&gt;  -- I set it to 2 just in case.&lt;br /&gt;  dbms_lock.sleep(2);&lt;br /&gt;  -- Open the output file and&lt;br /&gt;  -- print the result.&lt;br /&gt;  dump_type := utl_file.fopen('TMP',dump_file,'r');&lt;br /&gt;  loop&lt;br /&gt;    begin&lt;br /&gt;      utl_file.get_line(dump_type,d);&lt;br /&gt;      dbms_output.put_line(d);&lt;br /&gt;    exception&lt;br /&gt;      when others then&lt;br /&gt;        exit;&lt;br /&gt;    end;&lt;br /&gt;  end loop;&lt;br /&gt;  utl_file.fclose(dump_type);&lt;br /&gt;  -- Clean up our temp files&lt;br /&gt;  utl_file.fremove('TMP', script_file);&lt;br /&gt;  utl_file.fremove('TMP', dump_file);&lt;br /&gt;END;&lt;br /&gt;/&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2680663854936703628?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2680663854936703628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2680663854936703628' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2680663854936703628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2680663854936703628'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/05/run-system-commands-from-oracle-with.html' title='Run system commands from Oracle with PL/SQL'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-382110173198521331</id><published>2007-05-28T10:59:00.000+01:00</published><updated>2007-05-28T11:14:02.943+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>Cyrus IMAP file system tuning</title><content type='html'>Been busy, not enough blogging, bla bla bla. I know.&lt;br /&gt;Just a lot of stuff going on at work at the moment, mergers and integrations.&lt;br /&gt;&lt;br /&gt;We've had some problems with one of our IMAP servers at work running &lt;a href="http://www.postfix.org/"&gt;Postfix&lt;/a&gt; and &lt;a href="http://cyrusimap.web.cmu.edu/"&gt;Cyrus IMAPd&lt;/a&gt;. A for the job quite well speced machine, dual Xeons and 3x146Gb disk in RAID5 (4x146 in RAID10 would have been nicer). Anyway, the machine has got 50 or so IMAP users and perhaps 100Gb spool data on a &lt;a href="http://www.namesys.com/"&gt;ReiserFS&lt;/a&gt; partition.&lt;br /&gt;The machines' avg. load has peaked at over 6.00 with about 75% in iowait on a bad day. I suspect that modern fancy e-mail search tools are to blame for the problems, applications building search indexes and such (Apple Mail anyone?).&lt;br /&gt;Monitoring of the server showed quite a lot of inode update activity, even though there  isn't *that* much new email coming in.&lt;br /&gt;Must be our old (not so) dear friend atime that's making a little mess, I've used the noatimea and nodiratime mount options in the past with great success. Seen performance improvements of a couple of percent.&lt;br /&gt;The mount-options noatime and nodiratime simply disables the feature to update the access timestamp of a file (and directory). I.e. when someone clicks and reads an email in their mail application the inode atime timestamp is updated. When is this atime timestamp used? Never.&lt;br /&gt;Did a quick online remount of the spool fs with noatime and nodiratime.&lt;br /&gt;The result?&lt;br /&gt;Avg. load hasn't touch 1.00 since. Wow! I was expecting an improvement, but not &lt;b&gt;that&lt;/b&gt; big.&lt;br /&gt;Great and easy way to improve performance on IMAP spools.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;mount -o remount,noatime,nodiratime /var/spool/imap&lt;/font&gt;&lt;/pre&gt;And don't forget to update /etc/fstab with the same mount options.&lt;br /&gt;Cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-382110173198521331?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/382110173198521331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=382110173198521331' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/382110173198521331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/382110173198521331'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/05/cyrus-imap-file-system-tuning.html' title='Cyrus IMAP file system tuning'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7448599584204010333</id><published>2007-05-09T21:47:00.000+01:00</published><updated>2007-05-09T22:05:24.912+01:00</updated><title type='text'>Insider for Oracle - funky GUI bits</title><content type='html'>We've been doing a lot of application benchmarking and tuning at work in the last couple of months as we are prepare for a new major release. I've been involved in the Oracle side of things and have spent a lot of time tracking down expensive (or plain weird) SQL-statements and trying to optimize the Oracle databases we use.&lt;br /&gt;&lt;br /&gt;After spending about 6 - 7 hours a day running my normal &lt;a href="http://www.google.com?q=command+line+owns"&gt;sqlplus&lt;/a&gt; scripts over and over trying different things, monitoring benchmark runs I got a bit bored of text output and had a quick &lt;a href="http://www.google.com/?q=just+google+it"&gt;google&lt;/a&gt; for some sort of basic v$whats_up GUI tool and found this little cool little app called &lt;a href="http://www.fourthelephant.com/insider.html"&gt;Insider for Oracle&lt;/a&gt;, it a great app for doing spot-on monitoring, sort of like &lt;a href="http://www.quest.com/spotlight/Overview.aspx"&gt;Spot light&lt;/a&gt; from Quest, but without the hassle. Insider tries to be a more proactive tool with round the clock monitoring, but for that, it's no good.&lt;br /&gt;&lt;br /&gt;The thing I find it useful for is when we start a benchmark I can trail what's going on with the system. See new SQL statements, wait events, SGA usage, PGA usage, hot segments etc. Nothing I can't do from sqlplus but it makes my tasks a bit easier.&lt;br /&gt;Price wise it's quite a bargain for what I use it for, the license is for each database on the application "workspace" (i.e. how many databases you want to look at at once). And for what I use it for just looking at one DB at a time, that works out pretty cheap, 599USD or so. Cheap as chips.&lt;br /&gt;I've found a couple of bugs (and submitted bug reports accordingly) and I've even submitted a couple of enhancement suggestions.&lt;br /&gt;Check out their company &lt;a href="http://www.fourthelephant.com/blog/"&gt;blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7448599584204010333?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7448599584204010333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7448599584204010333' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7448599584204010333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7448599584204010333'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/05/insider-for-oracle-funky-gui-bits.html' title='Insider for Oracle - funky GUI bits'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8259074141293982906</id><published>2007-05-07T22:04:00.000+01:00</published><updated>2007-05-07T22:13:18.306+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opensolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>OpenSolaris SXDE upgrade time</title><content type='html'>It's been a while since I last played with Solaris Express Community Edition, so long that it actually changed names. There are now two versions, one for "random people" and one version for developers. SXCE is not released as often as SXDE but is more tested and stable, SXDE also comes with a lot more goodies, like &lt;a href="http://developers.sun.com/sunstudio/"&gt;Sun Studio 11&lt;/a&gt; and &lt;a href="http://www.netbeans.org/"&gt;Netbeans&lt;/a&gt;.&lt;br /&gt;Anyway, the install of SXDE b63 under &lt;a href="http://www.vmware.com/"&gt;VMWare workstation 6 RC&lt;/a&gt; was as easy as ever.&lt;br /&gt;However, at first boot I almost thought the VM was frozen for a minute or so, after grub it just sits there with a cursor in the corner of the screen for about 2 minutes before kicking off the kernel. All good after that though.&lt;br /&gt;One thing I wanted to test was the new &lt;a href="http://opensolaris.org/os/community/zones/files/Zones_RM_Improvements.html"&gt;simplified resource capping&lt;/a&gt; in Solaris Zones. It was very straightforward and easy to use.&lt;br /&gt;A couple of extra commands in zonecfg and the zone is capped to one core and 512Megs of memory. No more messing around with projects, except if you want really fine grained capping that is.&lt;br /&gt;Cool!&lt;br /&gt;&lt;br /&gt;Took a screenshoot:&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/sol_b63.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/sol_b63_thumb.jpg" alt="b63"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8259074141293982906?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8259074141293982906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8259074141293982906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8259074141293982906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8259074141293982906'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/05/open-solaris-sxde-upgrade-time.html' title='OpenSolaris SXDE upgrade time'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2373644478460955014</id><published>2007-04-30T20:28:00.000+01:00</published><updated>2007-04-30T20:39:46.546+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>How to do an "insert ignore" in Oracle</title><content type='html'>Ok, I should start off with a disclaimer. This is not a good idea to do.&lt;br /&gt;Using the "insert ignore" statement is a way to let &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt; insert data from a dataset which may contain duplicate constraints to existing data, and simply skip the duplicate row.&lt;br /&gt;Sounds like a great way to screw up data  doesn't it? Should not be used unless you really know what is going on.&lt;br /&gt;&lt;br /&gt;Ok, in MySQL we can do this.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;mysql&amp;gt; insert ignore into a select * from b;&lt;br /&gt;Query OK, 1 row affected (0.00 sec)&lt;br /&gt;Records: 2  &lt;b&gt;Duplicates: &lt;font color="red"&gt;1&lt;/font&gt;&lt;/b&gt;  Warnings: 0&lt;/font&gt;&lt;/pre&gt;But can this be done in Oracle without to much fuss? After a discussion on IRC a guy asked why can't we simply use the &lt;a href="http://halisway.blogspot.com/2006/11/oracle-merge-statement.html"&gt;merge&lt;/a&gt; statement?&lt;br /&gt;Well we can and it is probably a quite good suggestion if you *really* want to ditch those dupe rows.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;&lt;font color="green"&gt;-- So what do we got?&lt;/font&gt;&lt;br /&gt;SQL&amp;gt; select * from a;&lt;br /&gt;&lt;br /&gt;         A          B&lt;br /&gt;---------- ----------&lt;br /&gt;         1          2&lt;br /&gt;         2          3&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from b;&lt;br /&gt;&lt;br /&gt;         A          B&lt;br /&gt;---------- ----------&lt;br /&gt;         1          3&lt;br /&gt;         3          4&lt;br /&gt;&lt;br /&gt;SQL&gt; merge into a using b on (a.a=b.a) &lt;br /&gt;  when not matched then insert values (b.a,b.b);&lt;br /&gt;&lt;br /&gt;1 row merged.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from a;&lt;br /&gt;&lt;br /&gt;         A          B&lt;br /&gt;---------- ----------&lt;br /&gt;         1          2&lt;br /&gt;         2          3&lt;br /&gt;         3          4&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Let's rollback that and have a look at the exeuction plan.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; rollback;&lt;br /&gt;&lt;br /&gt;Rollback complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; set autotrace on&lt;br /&gt;SQL&gt; merge into a using b on (a.a=b.a) &lt;br /&gt;  when not matched then insert values (b.a,b.b);&lt;br /&gt;&lt;br /&gt;1 row merged.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 1973318225&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation            | Name | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;|   0 | MERGE STATEMENT      |      |     2 |    64 |     7  (15)| 00:00:01 |&lt;br /&gt;|   1 |  MERGE               | A    |       |       |            |          |&lt;br /&gt;|   2 |   VIEW               |      |       |       |            |          |&lt;br /&gt;|*  3 |    HASH JOIN OUTER   |      |     2 |    64 |     7  (15)| 00:00:01 |&lt;br /&gt;|   4 |     TABLE ACCESS FULL| B    |     2 |    52 |     3   (0)| 00:00:01 |&lt;br /&gt;|   5 |     TABLE ACCESS FULL| A    |     2 |    12 |     3   (0)| 00:00:01 |&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   3 - access("A"."A"(+)="B"."A")&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;-----&lt;br /&gt;   - dynamic sampling used for this statement&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;          0  recursive calls&lt;br /&gt;          5  db block gets&lt;br /&gt;         15  consistent gets&lt;br /&gt;          0  physical reads&lt;br /&gt;          0  redo size&lt;br /&gt;        819  bytes sent via SQL*Net to client&lt;br /&gt;        778  bytes received via SQL*Net from client&lt;br /&gt;          4  SQL*Net roundtrips to/from client&lt;br /&gt;          1  sorts (memory)&lt;br /&gt;          0  sorts (disk)&lt;br /&gt;          1  rows processed&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;Looks ok.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2373644478460955014?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2373644478460955014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2373644478460955014' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2373644478460955014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2373644478460955014'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/04/how-to-do-insert-ignore-in-oracle.html' title='How to do an &quot;insert ignore&quot; in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-145752880409040906</id><published>2007-04-15T20:41:00.000+01:00</published><updated>2007-04-15T20:55:40.061+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='centos'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle under CentOS 5</title><content type='html'>I'm a bit late on this one, but ... &lt;br /&gt;&lt;a href="http://www.centos.org/"&gt;CentOS&lt;/a&gt; version 5 was released the other day. For those of you unfamiliar with CentOS it is &lt;a href="http://www.redhat.com/"&gt;RedHat Enterprise Linux&lt;/a&gt; recompiled and supported by the open source community.&lt;br /&gt;Pretty much RHEL for free.&lt;br /&gt;I can't say there is anything *really* exciting in the new version of RedHat, sure there is Xen support and the general updated versions of the applications included.&lt;br /&gt;New version of &lt;a href="http://www.openoffice.org"&gt;Open Office&lt;/a&gt;, &lt;a href="http://www.postgresql.org"&gt;PostgreSQL&lt;/a&gt; etc.&lt;br /&gt;&lt;br /&gt;One big difference is that everything &lt;b&gt;has&lt;/b&gt; to be NTPL threaded. NPTL threading is the first real *good* threading implementation in Linux. The old Linux threads model is way old. Although NPTL has been available (and the default) in RHEL since version 3, it is not the only supported threading model.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;-So what does this mean for Oracle?&lt;/i&gt;&lt;br /&gt;No more LD_ASSUME_KERNEL hacks.&lt;br /&gt;10g is fine with this, no problem at all. However 9i will have some issues with this, the old way to get Oracle running was simply to set LD_ASSUME_KERNEL to 2.4.19 and Linux would use the Linux threads model. No go in version 5.&lt;br /&gt;Big question, will Oracle support 9i under RHEL5? I'm honestly not to bothered, by the time RHEL5 is mature and tested I really hope that people have switched to 10gR2.&lt;br /&gt;9iR2 has been around for a lng time now and will be for some time. But new system design implementation on 9iR2?&lt;br /&gt;&lt;br /&gt;I've done a quick test install of Centos 5 and 10gR2 (10.2.0.1 and patchset 10.2.0.2) and the install was very painless, pretty similar to Centos 4 with a few changes in the RPM's needed.&lt;br /&gt;RedHat did add a few SHM parameters to sysctl.conf so that section needs reviewing though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-145752880409040906?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/145752880409040906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=145752880409040906' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/145752880409040906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/145752880409040906'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/04/oracle-under-centos-5.html' title='Oracle under CentOS 5'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2109391890791139679</id><published>2007-04-11T23:25:00.000+01:00</published><updated>2007-04-11T23:52:10.056+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='j2ee'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>New dual socket AMD system from Dell</title><content type='html'>&lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; just introduced a new two socket AMD Opteron system, the &lt;a href="http://www.dell.com/content/products/productdetails.aspx/pedge_2970"&gt;PowerEdge 2970&lt;/a&gt;, a system designed to compete with &lt;a href="http://www.sun.com/"&gt;Sun&lt;/a&gt; x4200 and the &lt;a href="http://www.hp.com/"&gt;HP&lt;/a&gt; DL385 G2.&lt;br /&gt;Fairly similar to the Intel-based &lt;a href="http://www.dell.com/content/products/productdetails.aspx/pedge_2950"&gt;PowerEdge 2950&lt;/a&gt; but with AMD procs. Same redundancy with dual psu's, two onboard nic's and the onboard DRAC5 remote management adapter.&lt;br /&gt;Comes default with the 8 slot 2.5" SAS backplane which is nice to see. I'm all in favour of 2.5" drives over 3.5" in small servers. Up to 32Gb RAM, with expensive 4GB DIMMS that is, 32Gb comes in at about $35000 USD :)&lt;br /&gt;Perfect little &lt;a href="http://www.jboss.com/"&gt;J2EE application&lt;/a&gt; server running Linux.&lt;br /&gt;&lt;br /&gt;It's interesting to see the latest trends in that area.  A number of our clients, major investment banks, are currently in the middle of Linux migration projects.&lt;br /&gt;One thing I think slowed Linux adaptation in past has been the "32-bit barrier" and the limit it puts on memory allocation. A J2EE app with a maximum heap size of about 1.5Gb isn't very popular. 8 or even 16Gb is not unusual to see on the Solaris/SPARC side.&lt;br /&gt;Now with AMD Opteron processors (and Intel EM64T) and a mature 64-bit Linux environment that problem has gone away. &lt;a href="http://www-306.ibm.com/software/websphere/"&gt;Websphere 6.0.2&lt;/a&gt; runs perfectly on my test machine with 6Gb heap, performance is great.&lt;br /&gt;Actually all but one of our "Linux clients" are moving to AMD machines over Intel Xeon's, HP and Sun AMD based hardware only so far.&lt;br /&gt;One good example is a project that is currently being migrated from a six processor Sun v890 to a HP DL585, they even got a small performance increase.&lt;br /&gt;Sad to see the SPARC's go but fun to see new platforms coming. Linux one one side and &lt;a href="http://www.google.co.uk/search?q=ipod+moment"&gt;Solaris 10&lt;/a&gt; on the other side.&lt;br /&gt;But the SPARC's will be back, the &lt;a href="http://blogs.sun.com/jonathan/entry/rock_arrived"&gt;new "rock" SPARC &lt;/a&gt; processor just hit silicone and with it's massive coherent memory access space of 256 Tb, the expected number of cores and performance. It will kick some serious ass.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2109391890791139679?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2109391890791139679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2109391890791139679' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2109391890791139679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2109391890791139679'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/04/new-dual-socket-amd-system-from-dell.html' title='New dual socket AMD system from Dell'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-90771268308393051</id><published>2007-03-23T15:18:00.000Z</published><updated>2007-03-26T23:26:15.729+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Understanding Oracle pseudo-columns</title><content type='html'>All the cool people I meet at Oracle events keep referring to "function based indexes" as pseudo-columns. I never really understood the whole thing about it, sure I figures one could consider it a pseudo-column as it was sort of a calculated value that was stored in the database. Never thought much about investigating it either.&lt;br /&gt;However, when playing around with some composite indexes including functions today I finally got it. They &lt;b&gt;are&lt;/b&gt; indeed pseudo-columns, or calculated columns as I think Oracle wants to call them in 11g.&lt;br /&gt;&lt;br /&gt;As always,&lt;br /&gt;an example:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&amp;gt; create table d as select * from all_objects;&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into d select * from d;&lt;br /&gt;&lt;br /&gt;66242 rows created.&lt;br /&gt;&lt;br /&gt;SQL&gt; update d set object_id=rownum;&lt;br /&gt;&lt;br /&gt;132484 rows updated.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Ok, got a test table. Let's index it with some pseudo stuff.&lt;/font&lt;br /&gt;SQL&gt; create index d_1 on d(upper(status));&lt;br /&gt;&lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select index_name,column_name from user_ind_columns where table_name='D';&lt;br /&gt;&lt;br /&gt;INDEX_NAME                     COLUMN_NAME&lt;br /&gt;------------------------------ ----------------------------------------&lt;br /&gt;D_1                            SYS_NC00014$&lt;br /&gt;&lt;br /&gt;SQL&gt; select index_name,column_expression from user_ind_expressions&lt;br /&gt;  2  where table_name='D';&lt;br /&gt;&lt;br /&gt;INDEX_NAME                     COLUMN_EXPRESSION&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;D_1                            UPPER("STATUS")&lt;br /&gt;&lt;br /&gt;SQL&gt; create index d_2 on d(object_id,upper(status),timestamp);&lt;br /&gt;&lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select index_name,column_name from user_ind_columns where table_name='D';&lt;br /&gt;&lt;br /&gt;INDEX_NAME                     COLUMN_NAME&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;D_1                            SYS_NC00014$&lt;br /&gt;D_2                            OBJECT_ID&lt;br /&gt;D_2                            SYS_NC00014$&lt;br /&gt;D_2                            TIMESTAMP&lt;br /&gt;&lt;br /&gt;SQL&gt; select index_name,column_expression from user_ind_expressions&lt;br /&gt;  2  where table_name='D';&lt;br /&gt;&lt;br /&gt;INDEX_NAME                     COLUMN_EXPRESSION&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;D_1                            UPPER("STATUS")&lt;br /&gt;D_2                            UPPER("STATUS")&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Thats the index bit, we got two indexes with the same "function",&lt;br /&gt;-- so Oracle will index the same pseudo column! Eureka!&lt;br /&gt;-- Some tests then...&lt;/font&lt;br /&gt;SQL&gt; set autotrace traceonly exp&lt;br /&gt;SQL&gt; select object_name from d where upper(status)='T';&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 2452139598&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT            |      |    21 |   462 |   165   (0)| 00:00:02 |&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID| D    |    21 |   462 |   165   (0)| 00:00:02 |&lt;br /&gt;|*  2 |   INDEX RANGE SCAN          | D_1  |   418 |       |   157   (0)| 00:00:02 |&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   2 - access(UPPER("STATUS")='T')&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;-----&lt;br /&gt;   - dynamic sampling used for this statement&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- A column can go in the where clause, even pseudo-columns.&lt;/font&lt;br /&gt;SQL&gt; select object_name from d where sys_nc00014$='T';&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 2452139598&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation                   | Name | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT            |      |    21 |   462 |   165   (0)| 00:00:02 |&lt;br /&gt;|   1 |  TABLE ACCESS BY INDEX ROWID| D    |    21 |   462 |   165   (0)| 00:00:02 |&lt;br /&gt;|*  2 |   INDEX RANGE SCAN          | D_1  |   418 |       |   157   (0)| 00:00:02 |&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   2 - access(UPPER("STATUS")='T')&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;-----&lt;br /&gt;   - dynamic sampling used for this statement&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Since it is a column we can obviously select it as well.&lt;/font&lt;br /&gt;SQL&gt; select SYS_NC00014$ from d where object_id=500;&lt;br /&gt;&lt;br /&gt;SYS_NC0&lt;br /&gt;-------&lt;br /&gt;VALID&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 2591304836&lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;| Id  | Operation        | Name | Rows  | Bytes | Cost (%CPU)| Time     |&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;|   0 | SELECT STATEMENT |      |     1 |    18 |     5   (0)| 00:00:01 |&lt;br /&gt;|*  1 |  INDEX RANGE SCAN| D_2  |     1 |       |     3   (0)| 00:00:01 |&lt;br /&gt;-------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;&lt;br /&gt;   1 - access("OBJECT_ID"=500)&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;-----&lt;br /&gt;   - dynamic sampling used for this statement&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- You can even rename the pseudo-column.&lt;br /&gt;-- Oracle did actually dump core after I did that so better not.&lt;/font&lt;br /&gt;SQL&gt; alter table d rename column SYS_NC00014$ to dog;&lt;br /&gt;&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter table d rename column dog to SYS_NC00014$;&lt;br /&gt;&lt;br /&gt;Table altered.&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-90771268308393051?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/90771268308393051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=90771268308393051' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/90771268308393051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/90771268308393051'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/03/understanding-oracle-pseudo-columns.html' title='Understanding Oracle pseudo-columns'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1327918133575708710</id><published>2007-03-21T22:58:00.000Z</published><updated>2007-03-21T23:12:30.616Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Solaris 10 NFS version when using the automounter</title><content type='html'>Classic problem, new stuff is cool and all. But sometimes people (like myself) can't be bothered with configuring everything to the extreme so all new features are working and are compatible. For basic things, the basics is enough.&lt;br /&gt;Take NFSv4, a default Linux box these days do support NFSv4 but I'm usually to lazy to configure it and just slap in an old NFSv3 line in my exports file. Fine with me, fine with most things, except one thing.&lt;br /&gt;The Solaris 10 automounter, it detects the NFSv4 support and automatically tries to mount the NFS share in v4 mode when browsing /net.&lt;br /&gt;&lt;i&gt;Sidenote, if you are not familiar with the /net feature in Linux and Solaris it's pretty neat. See it as a cli version of "My network neighbourhood" in Windows. You can simply cd to /net/&amp;lt;machine name&amp;gt;/&amp;lt;share path&amp;gt; and the automounter will mount that share on that machine. Easy peasy.&lt;/i&gt;&lt;br /&gt;Back to my problem, what do I want? I want the default NFS mount level to be vers=3.&lt;br /&gt;Easy change, just uncomment and set &lt;b&gt;NFS_CLIENT_MAXVERS&lt;/b&gt; to 3 in &lt;b&gt;/etc/default/nfs&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Here's an example, the machine dolphin is my old trustworthy Linux workstation (yes, I like examples):&lt;pre&gt;&lt;font color="blue"&gt;[root@marble /]$ cd /net/dolphin/&lt;br /&gt;[root@marble dolphin]$ ls&lt;br /&gt;shared&lt;br /&gt;[root@marble dolphin]$ cd shared&lt;br /&gt;bash: cd: shared: Permission denied&lt;br /&gt;[root@marble dolphin]$ grep NFS_CLIENT_VERSMAX /etc/default/nfs&lt;br /&gt;#NFS_CLIENT_VERSMAX=4&lt;br /&gt;[root@marble dolphin]$ vim /etc/default/nfs&lt;br /&gt;.. edit ... &lt;br /&gt;[root@marble dolphin]$ grep NFS_CLIENT_VERSMAX /etc/default/nfs&lt;br /&gt;NFS_CLIENT_VERSMAX=3&lt;br /&gt;[root@marble dolphin]$ cd shared&lt;br /&gt;[root@marble shared]$ ls -l&lt;br /&gt;total 84&lt;br /&gt;drwxrwxr-x   6 hlinden  hlinden  4096 Mar  8 15:29 apps&lt;br /&gt;drwxrwxr-x   6 hlinden  hlinden  4096 Sep  7  2006 archive&lt;br /&gt;drwxrwxr-x  11 hlinden  hlinden 12288 Mar 21 16:32 download&lt;br /&gt;drwxrwxr-x  15 hlinden  hlinden  4096 Mar  1 11:05 tmp&lt;br /&gt;[root@marble shared]$&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1327918133575708710?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1327918133575708710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1327918133575708710' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1327918133575708710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1327918133575708710'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/03/solaris-10-nfs-version-when-using.html' title='Solaris 10 NFS version when using the automounter'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4117480646867910627</id><published>2007-02-25T16:48:00.000Z</published><updated>2007-02-26T18:22:11.309Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle constraints in XML data</title><content type='html'>Oracle introduced pretty cool XML support in 9i, it's even cooler in 10g and I don't understand why people don't use it more often. I keep seeing XML data stored in CLOB's all the time. Why not store it as proper XML, it's possible to index, query and even update individual XML elements, attributes or nodes. Fast, simple, easy, no need for full text indexes. Performance of xpath queries is pretty good if indexed correctly, 25 000 XML documents 10k each is still in the sub second range when hitting an index.&lt;br /&gt;&lt;br /&gt;One thing that can be quite nice to have in the XML store is constraints to avoid duplicate data, indexes on XML data are pretty much plain standard pseudo-column indexes (or "functional indexes" as some refer to them as). &lt;br /&gt;We just use the basic extract() or extractValue() functions in Oracles XML feature set.&lt;br /&gt;&lt;br /&gt;Here's an example on how to to create unique constraints (indexes) on XML elements (or attributes):&lt;font color="blue"&gt;&lt;pre&gt;SQL&amp;gt; create table x (a xmltype);&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x values('&amp;lt;type&amp;gt;&amp;lt;name&amp;gt;dog&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x values('&amp;lt;type&amp;gt;&amp;lt;name&amp;gt;cat&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; create unique index xui on x(extractValue(a, '/type/name'));&lt;br /&gt;&lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x values('&amp;lt;type&amp;gt;&amp;lt;name&amp;gt;cat&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;insert into x values('&amp;lt;type&amp;gt;&amp;lt;name&amp;gt;cat&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;')&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00001: unique constraint (HLINDEN.XUI) violated&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x values('&amp;lt;type&amp;gt;&amp;lt;name&amp;gt;fish&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Lets try the constraint on an attribute.&lt;br /&gt;-- attributes are handeled just like elements but need a @ sign prefix&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; drop index xui;&lt;br /&gt;&lt;br /&gt;Index dropped.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; truncate table x;&lt;br /&gt;&lt;br /&gt;Table truncated.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x(a) values('&amp;lt;type id="1"&amp;gt;&amp;lt;name&amp;gt;sally&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x(a) values('&amp;lt;type id="2"&amp;gt;&amp;lt;name&amp;gt;bob&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; create unique index xui on x(extractValue(a, '/type/@id'));&lt;br /&gt;&lt;br /&gt;Index created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x(a) values('&amp;lt;type id="2"&amp;gt;&amp;lt;name&amp;gt;carol&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;insert into x(a) values('&amp;lt;type id="2"&amp;gt;&amp;lt;name&amp;gt;carol&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;')&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-00001: unique constraint (HLINDEN.XUI) violated&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x(a) values('&amp;lt;type id="3"&amp;gt;&amp;lt;name&amp;gt;carol&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Ok, lets see if we can have duplicate names.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; insert into x(a) values('&amp;lt;type id="4"&amp;gt;&amp;lt;name&amp;gt;carol&amp;lt;/name&amp;gt;&amp;lt;/type&amp;gt;');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;And some &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb04cre.htm"&gt;docs&lt;/a&gt; to read.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4117480646867910627?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4117480646867910627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4117480646867910627' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4117480646867910627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4117480646867910627'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/02/oracle-constraints-in-xml-data.html' title='Oracle constraints in XML data'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8272089784341126100</id><published>2007-02-21T22:43:00.000Z</published><updated>2007-02-21T22:51:54.551Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Viewing bind variable values in 10g</title><content type='html'>Oracle 10g introduced a couple of new nice views to help tune queries that use bind variables.&lt;br /&gt;One cool view is &lt;b&gt;v$sql_bind_capture&lt;/b&gt;, this view hold the latest captured value for each bind variable in queries that has been run.&lt;br /&gt;First have a look in &lt;b&gt;v$sql&lt;/b&gt; to find the SQL query you are looking for, join the sql_id to &lt;b&gt;v$sql_bind_capture&lt;/b&gt; and to view the bind variable values for that query.&lt;br /&gt;Example:&lt;pre&gt;&lt;font color="blue"&gt;select&lt;br /&gt;  sql_id,&lt;br /&gt;  t.sql_text SQL_TEXT,&lt;br /&gt;  b.name BIND_NAME,&lt;br /&gt;  b.value_string BIND_STRING&lt;br /&gt;from&lt;br /&gt;  v$sql t&lt;br /&gt;  join v$sql_bind_capture b&lt;br /&gt;  using (sql_id)&lt;br /&gt;where&lt;br /&gt;  b.value_string is not null&lt;br /&gt;  and sql_id='f8pavn1bvsj7t'&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SQL_TEXT                                    BIND_NAME  BIND_STRIN&lt;br /&gt;------------------------------------------- ---------- ----------&lt;br /&gt;select con#,obj#,rcon#,enabled,nvl(defer,0) :1         9110&lt;br /&gt; from cdef$ where robj#=:1&lt;/font&gt;&lt;/pre&gt;I found a pretty bad example here, an Oracle internal dictionary query, but it should show the point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8272089784341126100?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8272089784341126100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8272089784341126100' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8272089784341126100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8272089784341126100'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/02/viewing-bind-variable-values-in-10g.html' title='Viewing bind variable values in 10g'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2979354784805116258</id><published>2007-02-21T17:11:00.000Z</published><updated>2007-02-21T22:52:18.040Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Mixing Dell PowerEdge 1955 and 1855 blades</title><content type='html'>After looking around the Internet for information regarding mixing Dell PowerEdge 1855 and 1955 blades in one enclosure I found some varying "opinions" whether it works or not.&lt;br /&gt;&lt;br /&gt;To get things right.&lt;br /&gt;Yes, it is possible to mix and match any 1855 and 1955 blades in one single enclosure&lt;br /&gt;However, there are two small requirements.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The DRAC/MC needs firmware 1.3 or later (everyone should upgrade to 1.3, even if you don't have any 1955 blades).&lt;br /&gt;&lt;li&gt;You need the digital KVM modules, they rock, get them!&lt;/ul&gt;&lt;br /&gt;The 1955 blades plug-in during operations just as any 1855 blades would, you get a sensor detect and they power on just fine.&lt;br /&gt;&lt;br /&gt;Printout from the DRAC/MC:&lt;pre&gt;&lt;font color="blue"&gt;[Server Module Power Consumption Table]&lt;br /&gt;&amp;lt;Slot#&amp;gt; &amp;lt;Server Name&amp;gt;    &amp;lt;Blade Type&amp;gt; &amp;lt;Power State&amp;gt; &amp;lt;Current/Max Consumption&amp;gt;&lt;br /&gt; 1       Server-1         PE1855       ON            300/300W&lt;br /&gt; 2       Server-2         PE1855       ON            300/300W&lt;br /&gt; 3       Server-3         PE1855       ON            300/300W&lt;br /&gt; 4       Server-4         PE1855       ON            300/300W&lt;br /&gt; 5       Server-5         PE1855       ON            300/300W&lt;br /&gt; 6       Server-6         PE1855       ON            300/300W&lt;br /&gt; 7       Server-7         PE1855       ON            300/300W&lt;br /&gt; 8       Server-8         &lt;b&gt;PE1955&lt;/b&gt;       ON            304/304W&lt;br /&gt; 9       Server-9         &lt;b&gt;PE1955&lt;/b&gt;       ON            304/304W&lt;br /&gt; 10      Server-10        N/A          N/A           N/A&lt;/font&gt;&lt;/pre&gt;Cool!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2979354784805116258?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2979354784805116258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2979354784805116258' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2979354784805116258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2979354784805116258'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/02/mixing-dell-poweredge-1955-and-1855.html' title='Mixing Dell PowerEdge 1955 and 1855 blades'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3331410934248076150</id><published>2007-02-15T21:36:00.000Z</published><updated>2007-02-15T21:56:30.553Z</updated><title type='text'>Extended deployment</title><content type='html'>Ok, I admit it. I've sucked at blogging lately.&lt;br /&gt;In my defence I have had a quite annoying cold that's been hanging on for the last two week, I *really* hate having a fever, I get cranky. I wrote half a blog post about using Oracle XE for reporting with materialized views but never finished it, will probably do that tomorrow or Monday.&lt;br /&gt;Beyond that I just haven't had anything exciting to do, at work I've been working with &lt;a href="http://www.google.co.uk/search?q=pile+of+shit"&gt;Sybase&lt;/a&gt;, can't say that's very exciting. Especially not very exciting when one has to support a major investment bank which has a team of Sybase DBA's which seems to know even less about Sybase than I do (and trust me, I'm a &lt;a href="http://www.google.co.uk/search?q=ticky+tack"&gt;Sybase noob&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;One exciting thing I've been toying with is &lt;a href="http://www-306.ibm.com/software/webservers/appserv/was/"&gt;IBM Websphere Extended Deployment (XD)&lt;/a&gt;. Everyone knows that Websphere isn't very exciting, the XD edition has got some pretty cool features though. And one has to love how simple IBM explains the huuuge cost savings it brings.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;- "A client can buy a few as four medium sized mainframes and deploy a number of applications across these machines and achieve unprecedented utilization".&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Ok, back up a bit here IBM. The concept of Websphere XD works pretty much all platforms. So why bring out the mainframes, I can't really see many clients needing four mainframes for a normal Websphere deployment.&lt;br /&gt;Anyway, what XD brings is pretty much a resource manager and an object grid. Say you have a blade server with 10 blades, you want to deploy two applications which will be load balanced. Instead of telling Websphere to deploy each application on five servers you define metrics of what kind of response times you expect the applications to have, then Websphere will allocate as much resource as needed (or send angry emails requesting more servers). Say one application runs on 2 servers and the other application on the remaining 8, then every Friday everyone in the company needs to use the first application for a couple of hours. Websphere will see the extra utilization and assign a couple of more servers to this app, then when not used any more they will be returned to the second application. Neat!&lt;br /&gt;Another thing you can use XD for is to distribute a large set of data, you can write a distributed application and requests will be sent to the server holding that data. It's way cheaper to buy 16 servers with 16Gb RAM each than to buy one server with 256Gb RAM, let each server hold a piece of the data in RAM in an object grid.&lt;br /&gt;XD also brings some cool monitoring features and other crud. See the comparison of the different versions &lt;a href="http://www-306.ibm.com/software/webservers/appserv/was/hmc.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enough about Websphere, it's not that great. It's just a nice challange to work with. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3331410934248076150?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3331410934248076150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3331410934248076150' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3331410934248076150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3331410934248076150'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/02/extended-deployment.html' title='Extended deployment'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2152613678556650160</id><published>2007-02-01T12:58:00.000Z</published><updated>2007-02-01T13:06:52.427Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='shell'/><title type='text'>bash globbing and dot-files</title><content type='html'>Found a nifty little feature in bash.&lt;br /&gt;&lt;br /&gt;Globbing is expanding file pattterns, like when you typ "ls -l file*" in bash it is not ls that does the file matching and filtering. bash will glob ("expand") the file list file* and ls will get all the files as arguments. &lt;br /&gt;Now, per default bash doesn't glob dot-files. If I do "ls *" I will not get .bashrc and .bash_profile etc. Luckily it is easy to change this behavior. Set the bash option dotglob to enabled and it works!&lt;br /&gt;Example:&lt;pre&gt;&lt;font color="green"&gt;&lt;br /&gt;[hlinden@spinner testdir]$ ls -Al&lt;br /&gt;&lt;font color="blue"&gt;total 0&lt;br /&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 .dotfile1&lt;br /&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 .dotfile2&lt;br /&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 file1&lt;br /&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 file2&lt;br /&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 file3&lt;/font&gt;&lt;br /&gt;[hlinden@spinner testdir]$ echo *&lt;br /&gt;&lt;font color="blue"&gt;file1 file2 file3&lt;/font&gt;&lt;br /&gt;[hlinden@spinner testdir]$ &lt;b&gt;shopt -s dotglob&lt;/b&gt;&lt;br /&gt;[hlinden@spinner testdir]$ echo *&lt;br /&gt;&lt;font color="blue"&gt;.dotfile1 .dotfile2 file1 file2 file3&lt;/font&gt;&lt;br /&gt;[hlinden@spinner testdir]$&lt;/font&gt;&lt;/pre&gt;Just put &lt;b&gt;shopt -s dotglob&lt;/b&gt; in your .bashrc file or in a global /etc/profile.d file.&lt;br /&gt;Another quite nice globbing feature is to have case insensitive globbing.&lt;br /&gt;Check this out:&lt;pre&gt;&lt;font color="green"&gt;[hlinden@spinner testdir]$ shopt -s nocaseglob&lt;br /&gt;[hlinden@spinner testdir]$ ls -l F*1&lt;br /&gt;&lt;font color="blue"&gt;-rw-rw-r--  1 hlinden hlinden 0 Feb  1  2007 file1&lt;/font&gt;&lt;br /&gt;[hlinden@spinner testdir]$&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2152613678556650160?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2152613678556650160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2152613678556650160' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2152613678556650160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2152613678556650160'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/02/bash-globbing-and-dot-files.html' title='bash globbing and dot-files'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1167329071824653823</id><published>2007-01-21T23:34:00.000Z</published><updated>2007-02-28T08:44:51.036Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Flashback a user or schema in Oracle</title><content type='html'>Since 10g we've had the quite cool feature 'flashback', or rather we've had it since waay back. But now Oracle gave us an easy way to use it. We have the recyclebin as a new feature though. Cool but sometimes a bit confusing.&lt;br /&gt;&lt;br /&gt;Flashback can be done at two levels, the whole database or for a single object. Why on earth didn't Oracle include a &lt;b&gt;"flashback schema"&lt;/b&gt; feature. I would guess most users use flashback when doing testing, like schema upgrades and things like that. And if the test fails you want to restore the tables to before the scripts ran (ok workspaces comes to mind here but that's another &lt;a href="http://halisway.blogspot.com/2006/08/using-oracle-workspaces.html"&gt;post&lt;/a&gt;).&lt;br /&gt;I took some time and wrote a script to flashback all &lt;b&gt;tables&lt;/b&gt; and dependant objects from the recyclebin and to flashback existing tables to a previous version.&lt;br /&gt;Since flashback require row movement to be enabled the script checks if it needs to enable that for the tables and will do so if needed.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;&lt;pre&gt;&lt;font color="blue"&gt;-- Ok, let's create a little mess we can clear up.&lt;/font&gt;&lt;br /&gt;SQL&gt; drop table i;&lt;br /&gt;&lt;br /&gt;Table dropped.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from a;&lt;br /&gt;&lt;br /&gt;        ID D&lt;br /&gt;---------- ----------------------------&lt;br /&gt;         1 30-NOV-06 10.34.35.000000 PM&lt;br /&gt;         2 06-NOV-06 08.15.54.000000 AM&lt;br /&gt;&lt;br /&gt;SQL&gt; update a set d=sysdate;&lt;br /&gt;&lt;br /&gt;2 rows updated.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from a;&lt;br /&gt;&lt;br /&gt;        ID D&lt;br /&gt;---------- ----------------------------&lt;br /&gt;         1 21-JAN-07 11.29.53.000000 PM&lt;br /&gt;         2 21-JAN-07 11.29.53.000000 PM&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;-- Commited and all! We sure screwed that up&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select tname,tabtype from tab;&lt;br /&gt;&lt;br /&gt;TNAME                          TABTYPE&lt;br /&gt;------------------------------ -------&lt;br /&gt;A                              TABLE&lt;br /&gt;T                              TABLE&lt;br /&gt;D                              TABLE&lt;br /&gt;BIN$J5ZNZK2dxdvgQKjAKF9ZFQ==$0 TABLE&lt;br /&gt;&lt;br /&gt;4 rows selected.&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;-- Lets run the script to generate our flashback script&lt;br /&gt;-- The script will prompt you for the number of minutes you want to go back&lt;/font&gt;&lt;br /&gt;SQL&gt; @flashback_user&lt;br /&gt;How far back do you want to flashback (in minutes)?&lt;br /&gt;Enter value for minute: 8&lt;br /&gt;         8&lt;br /&gt;testuser&lt;br /&gt;&lt;br /&gt;Spooling flashback_user_testuser.sql&lt;br /&gt;&lt;br /&gt;&lt;font color="blue"&gt;alter table T enable row movement;&lt;br /&gt;flashback table A to timestamp sysdate - interval '8' minute;&lt;br /&gt;flashback table T to timestamp sysdate - interval '8' minute;&lt;br /&gt;flashback table D to timestamp sysdate - interval '8' minute;&lt;br /&gt;flashback table I to before drop;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; @flashback_user_testuser&lt;br /&gt;&lt;br /&gt;Table altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flashback complete.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flashback complete.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flashback complete.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flashback complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; select tname,tabtype from tab;&lt;br /&gt;&lt;br /&gt;TNAME                          TABTYPE&lt;br /&gt;------------------------------ -------&lt;br /&gt;A                              TABLE&lt;br /&gt;D                              TABLE&lt;br /&gt;T                              TABLE&lt;br /&gt;I                              TABLE&lt;br /&gt;&lt;br /&gt;4 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from a;&lt;br /&gt;&lt;br /&gt;        ID D&lt;br /&gt;---------- ----------------------------&lt;br /&gt;         1 30-NOV-06 10.34.35.000000 PM&lt;br /&gt;         2 06-NOV-06 08.15.54.000000 AM&lt;br /&gt;&lt;br /&gt;2 rows selected.&lt;br /&gt;&lt;font color="blue"&gt;-- And we are back in business.&lt;/font&gt;&lt;/pre&gt;&lt;/font&gt;Download my script here: &lt;a href="http://halisway.hifichoice.com/flashback_user.sql"&gt;http://halisway.hifichoice.com/flashback_user.sql&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Read more about flashback &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9011.htm"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1167329071824653823?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1167329071824653823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1167329071824653823' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1167329071824653823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1167329071824653823'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/01/flashback-user-or-schema-in-oracle.html' title='Flashback a user or schema in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-5475688154651151076</id><published>2007-01-16T10:22:00.000Z</published><updated>2007-01-16T10:48:55.021Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Balancing SGA in Oracle 9i</title><content type='html'>Now with 10g having &lt;b&gt;sga_target&lt;/b&gt; for automatically managing your SGA memory size some people get lazy and just forget about SGA. But most of us still have 9i databases to maintain.&lt;br /&gt;&lt;br /&gt;Time for a quick overview on how to reduce disk i/o with the help of db_buffers.&lt;br /&gt;&lt;br /&gt;I've got a Sun v480 with 4Gb RAM running one instance, it's not under a lot of load but could do with some tuning.&lt;br /&gt;Lets look how our current SGA settings looks:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; show parameter sga_max_size&lt;br /&gt;&lt;br /&gt;NAME                                 TYPE        VALUE&lt;br /&gt;------------------------------------ ----------- ------------&lt;br /&gt;sga_max_size                         big integer 2283246744&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$sgastat order by pool,bytes;&lt;br /&gt;&lt;br /&gt;POOL        NAME                            BYTES&lt;br /&gt;----------- -------------------------- ----------&lt;br /&gt;java pool   free memory                  67108864&lt;br /&gt;shared pool trigger source                    152&lt;br /&gt;shared pool fixed allocation callback         496&lt;br /&gt;shared pool trigger defini                    576&lt;br /&gt;shared pool trigger inform                    920&lt;br /&gt;shared pool PLS non-lib hp                   2088&lt;br /&gt;shared pool joxs heap init                   4240&lt;br /&gt;shared pool KQR S SO                         5416&lt;br /&gt;shared pool table definiti                  18984&lt;br /&gt;shared pool PX subheap                      28096&lt;br /&gt;shared pool session heap                    29560&lt;br /&gt;shared pool KGK heap                        33368&lt;br /&gt;shared pool DG Broker heap                  39200&lt;br /&gt;shared pool MTTR advisory                  388024&lt;br /&gt;shared pool errors                         390856&lt;br /&gt;shared pool sessions                       905840&lt;br /&gt;shared pool message pool freequeue         940944&lt;br /&gt;shared pool sim memory hea                1014808&lt;br /&gt;shared pool KSXR receive buffers          1034000&lt;br /&gt;shared pool FileIdentificatonBlock        1791824&lt;br /&gt;shared pool parameters                    1827072&lt;br /&gt;shared pool PL/SQL DIANA                  1960192&lt;br /&gt;shared pool 1M buffer                     2098176&lt;br /&gt;shared pool Checkpoint queue              2622720&lt;br /&gt;shared pool KQR M PO                      2885104&lt;br /&gt;shared pool dictionary cache              3229952&lt;br /&gt;shared pool KQR L PO                      3372488&lt;br /&gt;shared pool event statistics per sess     3762720&lt;br /&gt;shared pool KQR L SO                      5260312&lt;br /&gt;shared pool KGLS heap                     5424464&lt;br /&gt;shared pool KQR M SO                      6135256&lt;br /&gt;shared pool FileOpenBlock                11813536&lt;br /&gt;shared pool PL/SQL MPCODE                22044808&lt;br /&gt;shared pool miscellaneous                25966760&lt;br /&gt;shared pool library cache                66948552&lt;br /&gt;shared pool sql area                    166511368&lt;br /&gt;&lt;font color="green"&gt;shared pool free memory                 248709688&lt;/font&gt;&lt;br /&gt;            fixed_sga                      734360&lt;br /&gt;            log_buffer                     787456&lt;br /&gt;            buffer_cache               1073741824&lt;br /&gt;&lt;br /&gt;40 rows selected.&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;Ok, we can see that we do have quite some free memory&lt;br /&gt;in the shared pool, what should we do with that?&lt;br /&gt;from looking at iostat and wait statistics I've noticed that the disk&lt;br /&gt;subsystem (a simple Sun 3310 in this case) is getting a bit hammered sometimes.&lt;br /&gt;Lets see how the db cache is doing.&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; select size_factor, size_for_estimate, estd_physical_read_factor&lt;br /&gt;  2    from v$db_cache_advice order by size_factor;&lt;br /&gt;&lt;br /&gt;SIZE_FACTOR SIZE_FOR_ESTIMATE ESTD_PHYSICAL_READ_FACTOR&lt;br /&gt;----------- ----------------- -------------------------&lt;br /&gt;      .0938                96                 4344.0852&lt;br /&gt;      .1875               192                  163.0333&lt;br /&gt;      .2813               288                    23.782&lt;br /&gt;       .375               384                   22.5502&lt;br /&gt;      .4688               480                   20.6444&lt;br /&gt;      .5625               576                   10.4806&lt;br /&gt;      .6563               672                    1.4957&lt;br /&gt;        .75               768                    1.0948&lt;br /&gt;      .8438               864                    1.0367&lt;br /&gt;      .9375               960                    1.0102&lt;br /&gt;          1              1024                         1&lt;br /&gt;     1.0313              1056                     .9999&lt;br /&gt;      1.125              1152                      .813&lt;br /&gt;     1.2188              1248                     .7185&lt;br /&gt;     1.3125              1344                     .5829&lt;br /&gt;&lt;font color="green"&gt;     1.4063              1440                      .536 &lt;- Lets aim for this&lt;/font&gt;&lt;br /&gt;        1.5              1536                     .5196&lt;br /&gt;     1.5938              1632                     .5139&lt;br /&gt;     1.6875              1728                     .5079&lt;br /&gt;     1.7813              1824                     .5055&lt;br /&gt;      1.875              1920                     .5043&lt;br /&gt;&lt;br /&gt;21 rows selected.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Right, from looking in the v$db_chace_advice view we can determine that a few hundred Mb more of cache would be a good idea. There is quite a lot of free memory at the OS level, so we can probably increase the sga_max_size with 250Mb as well.&lt;pre&gt;&lt;font color="blue"&gt;&lt;font color="green"&gt;-- Reduce the shared pool with 150Mb.&lt;/font&gt;&lt;br /&gt;SQL&gt; alter system set shared_pool=379584512 scope=spfile&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Add max size with 250Mb&lt;/font&gt;&lt;br /&gt;SQL&gt; alter system set sga_max_size=2545390744 scope=spfile;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Add the 250Mb we added + the 150Mb we reduced from the shared pool.&lt;/font&gt;&lt;br /&gt;SQL&gt; alter system set db_cache_size=1493172224 scope=spfile;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Restart Oracle&lt;/font&gt;&lt;br /&gt;SQL&gt; shutdown immediate&lt;br /&gt;...&lt;br /&gt;SQL&gt; startup&lt;/font&gt;&lt;/pre&gt;That should do the trick, lets see what the server thinks about things in a couple a weeks time or so.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;Don't forget:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Please have more than one look at the statistics before you do anything, the free memory in the shared pool could be free &lt;b&gt;today&lt;/b&gt; but needed all other days. Take a few snapshots over time and analyze the results before doing any changes. And whatever you do, don't over allocate SGA.&lt;br /&gt;The last thing you want is the SGA to be swapped to disk or the system swapping out other things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-5475688154651151076?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/5475688154651151076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=5475688154651151076' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5475688154651151076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5475688154651151076'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/01/balancing-sga-in-oracle-9i.html' title='Balancing SGA in Oracle 9i'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2193213187718957439</id><published>2007-01-10T11:08:00.000Z</published><updated>2007-01-10T11:26:27.532Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Cleaning up sqlplus cut and pastes in vim</title><content type='html'>Classical problem, you write a short piece of SQL in sqlplus, you then want to cut and paste it to vim edit it. But then you get the really annoying line numbers in front of each line.&lt;br /&gt;Sure you can use &lt;b&gt;save myquery&lt;/b&gt; in sqlplus and open the file myquery.sql in vim, but perhaps you want to run vim on another machine, perhaps you run gvim.&lt;br /&gt;So ok, time to get rid of the line numbers.&lt;br /&gt;&lt;br /&gt;Here's what we got in sqlplus:&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; list&lt;br /&gt;  1  select&lt;br /&gt;  2  e.ename,&lt;br /&gt;  3  d.dname&lt;br /&gt;  4  from&lt;br /&gt;  5  dept d,&lt;br /&gt;  6  emp e&lt;br /&gt;  7  where&lt;br /&gt;  8  d.deptno=e.deptno&lt;br /&gt;  9* order by e.ename&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;Lets cut n paste those numbered lines to a vim session.&lt;br /&gt;We now need to delete the first 4 characters of each line. Easy.&lt;br /&gt;Switch to visual mode, jump to the end of the file, step two rows right, hit delete char.&lt;br /&gt;Or in vim command terms (in normal mode (esc-esc)).&lt;pre&gt;&lt;font color="blue"&gt;ctrl-v G l l x&lt;/font&gt;&lt;/pre&gt;Breakdown:&lt;br /&gt;&lt;b&gt;ctrl-v&lt;/b&gt; to get in to visual mode&lt;br /&gt;&lt;b&gt;G&lt;/b&gt; to jump to the end of the file&lt;br /&gt;&lt;b&gt;l&lt;/b&gt; to move the cursor right&lt;br /&gt;&lt;b&gt;x&lt;/b&gt; to delete the selected area&lt;br /&gt;&lt;br /&gt;Visual mode is quite powerful, you can use almost the same commands to comment out code.&lt;br /&gt;Place the cursor in the first line you want to comment out, hit ctrl-v to do a visual mark, use j to move the cursor down to the last line you want to comment out, hit I to get insert, type two hyphens and hit escape. Done.&lt;br /&gt;In vim command terms:&lt;pre&gt;&lt;font color="blue"&gt;ctrl-v j j j I -- esc&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2193213187718957439?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2193213187718957439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2193213187718957439' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2193213187718957439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2193213187718957439'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/01/cleaning-up-sqlplus-cut-and-pastes-in.html' title='Cleaning up sqlplus cut and pastes in vim'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3755177535909382548</id><published>2007-01-07T19:43:00.000Z</published><updated>2007-03-26T23:25:14.575+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hp'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Time for HP Proliant?</title><content type='html'>Now I can't say I've blogged much about &lt;a href="http://www.hp.com/"&gt;HP&lt;/a&gt; server, simply because it's not been very exciting hardware. &lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; and &lt;a href="http://www.sun.com/"&gt;Sun&lt;/a&gt; have always had better products at better prices and have always been better to deal with.&lt;br /&gt;Now recently, especially with the &lt;b&gt;G5&lt;/b&gt; series of it's Proliant line HP have some quite exciting and unique products. The one thing I've always liked with HP is that they've been a long term &lt;a href="http://www.amd.com/"&gt;AMD&lt;/a&gt; Opteron supporter. The where the second big server vendor after &lt;a href="http://www.ibm.com/"&gt;IBM&lt;/a&gt; to launch Opteron based servers. The &lt;a href="http://h10010.www1.hp.com/wwpc/us/en/ss/WF05a/15351-241434-241475-241475-f79-428936.html"&gt;DL385&lt;/a&gt; was unique at the time and served me well in a previous company I worked for. The following DL585 (4 sockets, 128Gb RAM max and 8x 2.5" SAS slots) is still a pretty ok Oracle server, the G2 version comes with a pretty cool front accessible CPU and memory drawer for easy upgrades and repairs is even better. But price wise it's on par with the Sun x4600, and the x4600 will let you scale to 8-sockets over of the 4-socket DL585. &lt;br /&gt;The Intel equivalent, the DL580 offers front accessible memory access, CPU's are still top lid accessible.&lt;br /&gt;&lt;br /&gt;Now with the Intel-based (dual and quad core Xeon 3000, 5000, 5100 and 5300 boxes) machines in the "G5" series we have a few pretty cool new features, the focus on 2.5" SAS drives is nice to see, Sun is going the same way but Dell is clinging on to 3.5" drives (probably to keep the price tag down), some Dell machines can be fitted with a 2.5" backplane (like the PE1950).&lt;br /&gt;The DL360 makes a decent app server with two sockets and up to 32Gb RAM, nice 6 slot SAS backplane and the DL380 adds more PCI I/O and can take up to 8 drives.&lt;br /&gt;Big brother (in the 2-socket famaily) is the ML370, this is a pretty large machine for a 2-socket box, 5U in the rack, but it makes a great &lt;a href="http://www.vmware.com/"&gt;VMWare&lt;/a&gt; server, loads of local disk (&lt;b&gt;16&lt;/b&gt; SAS slots), loads of I/O and can take a massive 64Gb RAM. Great for stand-alone Oracle deployments as well.&lt;br /&gt;The smallest member in the 300-family is the DL320, pretty standard 1-socket Xeon 3000 machine (3.5" drives though), makes a decent webserver or network appliance.&lt;br /&gt;&lt;br /&gt;Ok, now on to the reason I actually started getting excited about HP hardware again.&lt;br /&gt;The recently introduced &lt;a href="http://h10010.www1.hp.com/wwpc/us/en/ss/WF05a/15351-241434-241475-241475-f79-3232017.html"&gt;DL 320s&lt;/a&gt; hybrid data server (or "storage server").&lt;br /&gt;It's pretty much the same as the DL320, but the "s" adds some pretty cool stuff. It can take &lt;b&gt;12&lt;/b&gt; SAS or SATA drives. Which makes it a pretty interesting machine, one could say this is the "HP Thumper", the HP equivalent of the Sun &lt;a href="http://www.sun.com/servers/x64/x4500/"&gt;x4500&lt;/a&gt;. It's not as big and impressive as the x4500 but it's still interesting. Applications like distributed data mining, data analysis and video processing fits like a glove on this box.&lt;br /&gt;&lt;br /&gt;A few bad things about HP, everything is &lt;b&gt;extra&lt;/b&gt;. The price you see is not the price you pay. The list price of a normal, say DL380, includes exactly what is listed. You even have to add the second sets of fans to get redundancy. Half the features in the iLO2 (remote management interface) require extra licenses to be activated. I think HP needs to re-think this. As it stands today I would not look at buying HP servers as generic servers, possibly if I have a project that require something only HP can offer (like a DL320s). It simply doesn't make sense financially. &lt;br /&gt;If I want standard server, I go to Dell. If I want business critical servers, I go to Sun. It's as easy as that. If HP can offer competitive pricing I would not hesitate to at least evaluate deploying HP instead of Dell and in some cases Sun boxes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3755177535909382548?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3755177535909382548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3755177535909382548' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3755177535909382548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3755177535909382548'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/01/time-for-hp-proliant.html' title='Time for HP Proliant?'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3119214645615565278</id><published>2007-01-02T18:16:00.000Z</published><updated>2007-01-09T12:49:19.738Z</updated><title type='text'>Happy new 2007</title><content type='html'>It's been a pretty good year. Lots of cool stuff has happened and lots of interesting technology is maturing and evolving. Most notably &lt;a href="http://www.opensolaris.org/"&gt;OpenSolaris&lt;/a&gt;, While most other UNIX-vendors are pretty much sitting on their behinds watching time go by Sun is kicking in a higher gear. &lt;a href="http://www.opensolaris.org/os/community/zfs/"&gt;ZFS&lt;/a&gt; is being adopted by the FreeBSD and MacOS communities. Iscsi is maturing and &lt;a href="http://www.vmware.com/"&gt;VMWare&lt;/a&gt; is getting some pretty cool features, Veritas is giving away the basic edition of &lt;a href="http://www.symantec.com/enterprise/sfbasic/index.jsp"&gt;Storage Foundation&lt;/a&gt;. Oracle 11g looks very promising.&lt;br /&gt;&lt;br /&gt;All well, I'm flying back to the UK tomorrow (finally), can't wait to get back to London.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3119214645615565278?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3119214645615565278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3119214645615565278' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3119214645615565278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3119214645615565278'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2007/01/happy-new-2007.html' title='Happy new 2007'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7642180425240002282</id><published>2006-12-26T16:41:00.000Z</published><updated>2006-12-26T16:56:30.178Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><title type='text'>Merry Christmas and VMWare 6</title><content type='html'>.. and all that. :)&lt;br /&gt;&lt;br /&gt;Been chilling in Sweden for the last few days, had a terrible flight back with a 2 hour delay due to fog over south east england and then a very annoying crying baby on the plane. &lt;br /&gt;We even had a distubance in the queue to the gate, some guy from the middle east was making a scene and started threatening a few other people for bumping in to him. I have to admit, I knew it wasn't a good idea to mess with airport security, but these guys where hard. The scene was quite funny, when they asked him to come with them and he started questioning them they said something in the lines of &lt;i&gt;"Sir, you have 2 seconds to comply or we will remove you with force."&lt;/i&gt; We didn't seem him again after that.&lt;br /&gt;Anyway, got socks and a few good CD's for Christmas. Always good with new music.&lt;br /&gt;I installed &lt;a href="http://www.vmware.com/products/beta/ws/"&gt;VMWare Workstation 6 beta&lt;/a&gt; yesterday and had a play around with that. A word of warning, although it has some cool features and is meant to be a bit faster the beta version is a debug build and in classic vmware-style the debug builds are &lt;b&gt;&lt;i&gt;slow&lt;/i&gt;&lt;/b&gt;... really slow. Booting &lt;a href="http://www.centos.org/"&gt;CentOS 4&lt;/a&gt; takes at least 50% longer. The "freeze bug" when starting a VM in Vista is fixed though.&lt;br /&gt;&lt;br /&gt;All jolly good fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7642180425240002282?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7642180425240002282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7642180425240002282' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7642180425240002282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7642180425240002282'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/merry-christmas-and-vmware-6.html' title='Merry Christmas and VMWare 6'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-5995112832951282431</id><published>2006-12-21T21:44:00.000Z</published><updated>2006-12-27T16:11:58.584Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Using Solaris projects with Oracle</title><content type='html'>In older versions of &lt;a href="http://www.sun.com/software/solaris/"&gt;Solaris&lt;/a&gt; (9 and earlier) we used to set the system resource control in &lt;b&gt;/etc/system&lt;/b&gt;, in Solaris 10 and &lt;a href="http://www.opensolaris.org/"&gt;later&lt;/a&gt; we do it in a neater way. No more reboots or mocking about, all online, even while Oracle is running.&lt;br /&gt;It's all about projects now.&lt;br /&gt;I've just finished installing 10gR2 under Solaris Express Community Release Build 54 (long name ey?) under VMware on my new laptop.&lt;br /&gt;Example project:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;root@solvm[~]$ projadd -U oracle -K \&lt;br /&gt;"project.max-shm-memory=(priv,4g,deny);\&lt;br /&gt;project.max-sem-nsems=(priv,256,deny);\&lt;br /&gt;project.max-sem-ids=(priv,100,deny);\&lt;br /&gt;project.max-shm-ids=(priv,100,deny)" oraproj&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Lets review our project&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;root@solvm[~]$ su - oracle&lt;br /&gt;Sun Microsystems Inc.   SunOS 5.11      snv_54  October 2007&lt;br /&gt;oracle@solvm[~]$ projects&lt;br /&gt;default oraproj&lt;br /&gt;oracle@solvm[~]$ projects -l oraproj&lt;br /&gt;oraproj&lt;br /&gt;        projid : 101&lt;br /&gt;        comment: ""&lt;br /&gt;        users  : oracle&lt;br /&gt;        groups : (none)&lt;br /&gt;        attribs: project.max-sem-ids=(priv,100,deny)&lt;br /&gt;                 project.max-sem-nsems=(priv,256,deny)&lt;br /&gt;                 project.max-shm-ids=(priv,100,deny)&lt;br /&gt;                 project.max-shm-memory=(priv,4294967296,deny)&lt;br /&gt;oracle@solvm[~]$&lt;/font&gt;&lt;/pre&gt;It's described slightly different in the Oracle installation &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/install.102/b15704/pre_install.htm"&gt;manual&lt;/a&gt; but I'd say my way is slightly better. &lt;b&gt;prctl&lt;/b&gt; is legacy. You can use &lt;b&gt;usermod -K project=oraproj oracle&lt;/b&gt; to set the new project as the users default project (not really necessary)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-5995112832951282431?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/5995112832951282431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=5995112832951282431' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5995112832951282431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5995112832951282431'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/using-solaris-projects-with-oracle.html' title='Using Solaris projects with Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4593311493029839044</id><published>2006-12-14T20:56:00.000Z</published><updated>2006-12-14T21:00:38.958Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Manual operations in an automatic SGA database</title><content type='html'>Oracle 10g introduced the nifty feature of automatic SGA, simply set the parameter &lt;b&gt;&lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams192.htm"&gt;sga_target&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;sga_max_size&lt;/b&gt; to the maximum size you can afford and Oracle will do the rest. But we still have a few manual settings, say you want a tablespace with a non-default block size (also a new feature) than the database default and you create, say a 4k block size, tablespace in a 8k database and you allocate a &lt;b&gt;db_4k_cache_size&lt;/b&gt; for that. How do Oracle allocate that memory?&lt;br /&gt;&lt;br /&gt;Test:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; select name,value from v$parameter&lt;br /&gt;       where name like 'sga_target'&lt;br /&gt;     /&lt;br /&gt;&lt;br /&gt;NAME            VALUE&lt;br /&gt;--------------- --------------------&lt;br /&gt;sga_target      599785472&lt;br /&gt;&lt;br /&gt;SQL&gt; select name,round(bytes/1024/1024) M from v$sgainfo;&lt;br /&gt;&lt;br /&gt;NAME                                              M&lt;br /&gt;---------------------------------------- ----------&lt;br /&gt;Fixed SGA Size                                    2&lt;br /&gt;Redo Buffers                                      6&lt;br /&gt;Buffer Cache Size                               416&lt;br /&gt;Shared Pool Size                                140&lt;br /&gt;Large Pool Size                                   4&lt;br /&gt;Java Pool Size                                    4&lt;br /&gt;Streams Pool Size                                 0&lt;br /&gt;Granule Size                                      4&lt;br /&gt;Maximum SGA Size                                572&lt;br /&gt;Startup overhead in Shared Pool                  68&lt;br /&gt;Free SGA Memory Available                         0&lt;br /&gt;&lt;br /&gt;11 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system set db_4k_cache_size=4M;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;  alter system set db_4k_cache_size=0;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- What actually happend here, from what &lt;br /&gt;-- did Oracle steal those 4Mb&lt;br /&gt;-- Let's query the &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2103.htm#sthref4017"&gt;v$sga_resize_ops&lt;/a&gt; view to see that was done.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select parameter,oper_type,initial_size,target_size &lt;br /&gt;       from v$sga_resize_ops &lt;br /&gt;       where start_time&gt;sysdate-1&lt;br /&gt;     /&lt;br /&gt;&lt;br /&gt;PARAMETER        OPER_TYPE     INITIAL_SIZE TARGET_SIZE&lt;br /&gt;---------------- ------------- ------------ -----------&lt;br /&gt;db_cache_size    SHRINK           436207616   427819008&lt;br /&gt;db_4k_cache_size GROW                     0     8388608&lt;br /&gt;db_4k_cache_size SHRINK             8388608           0&lt;br /&gt;db_cache_size    GROW             427819008   436207616&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;/font&gt;&lt;/pre&gt; Ok, we can see that Oracle shrank the db_cache_size with the requested size and allowed the db_4k_cache_size to grow and when reset back to zero it freed the memory and grew the db_cache_size. Oracle could just as well have allocated the memory to the large_pool if the automatic SGA engine thought that would make more sense.&lt;br /&gt;I've got the last 7 days worth for resize ops in my weekly database report that is e-mailed to me every Monday morning, it's definitely worth keeping an eye on whats going on. Sometimes it's just easier to configure the SGA manually.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4593311493029839044?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4593311493029839044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4593311493029839044' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4593311493029839044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4593311493029839044'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/manual-operatings-in-automatic-sga.html' title='Manual operations in an automatic SGA database'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-2598411933983960281</id><published>2006-12-11T22:34:00.000Z</published><updated>2006-12-11T23:27:01.331Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='storage'/><title type='text'>Testing iSCSI</title><content type='html'>I've been reading a lot about iSCSI lately, Sun is pushing the ZFS and iSCSI integration in the latest release of &lt;a href="http://www.opensolaris.org/"&gt;Open Solaris&lt;/a&gt; and it's the new hot thing in the Oracle community. I remember testing the Linux target ("server side") a few years ago and back then it was quite flaky, far from production ready.&lt;br /&gt;This time around it seems pretty solid.&lt;br /&gt;&lt;br /&gt;I just used the very simple instrucions &lt;a href="http://ubuntuforums.org/showthread.php?t=213545"&gt;here&lt;/a&gt; to compile the iscsi kernel module in &lt;a href="http://www.ubuntu.org/"&gt;Ubuntu&lt;/a&gt;, I created two "zero files" using &lt;b&gt;dd&lt;/b&gt; (one for my VMware Linux test and one for my Vista laptop)  and added them as LUN's to the &lt;b&gt;/etc/ietd.conf&lt;/b&gt; config file.&lt;pre&gt;&lt;font color="darkblue"&gt;# cat /etc/ietd.conf&lt;br /&gt;Target starbuck&lt;br /&gt;        Lun 0 Path=/u03/starbuck_lun0.dat,Type=fileio&lt;br /&gt;Target oravm&lt;br /&gt;        Lun 0 Path=/u03/oravm_lun0.dat,Type=fileio&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;The installation in &lt;a href="http://www.centos.org/"&gt;CentOS 4&lt;/a&gt; was simple, do a &lt;b&gt;yum -y install iscsi-initiator-tools&lt;/b&gt; and set the discovery host and initiator name in &lt;b&gt;/etc/iscsi.conf&lt;/b&gt;. Starting &lt;b&gt;/etc/init.d/iscsi&lt;/b&gt; gives:&lt;pre&gt;&lt;font color="darkblue"&gt;iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-3&lt;br /&gt;iscsi-sfnet: Control device major number 254&lt;br /&gt;iscsi-sfnet:host3: Session established&lt;br /&gt;scsi3 : SFNet iSCSI driver&lt;br /&gt;  Vendor: IET       Model: VIRTUAL-DISK      Rev: 0&lt;br /&gt;  Type:   Direct-Access                      ANSI SCSI revision: 04&lt;br /&gt;SCSI device sdd: 524288 512-byte hdwr sectors (268 MB)&lt;br /&gt;SCSI device sdd: drive cache: write through&lt;br /&gt;SCSI device sdd: 524288 512-byte hdwr sectors (268 MB)&lt;br /&gt;SCSI device sdd: drive cache: write through&lt;br /&gt; sdd: unknown partition table&lt;br /&gt;Attached scsi disk sdd at scsi3, channel 0, id 0, lun 0&lt;/pre&gt;&lt;/font&gt;Create a partition and file system on the whole disk with &lt;pre&gt;&lt;font color="darkblue" size=1&gt;printf "n\np\n1\n\n\nw\n" | fdisk /dev/sdd &amp;&amp; mkfs.ext3 /dev/sdd1&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Done!&lt;br /&gt;&lt;br /&gt;Conneting the iSCSI disk in Vista was pretty straight forward as well, add the iSCSI discovery IP and do a refresh of your targets.&lt;br /&gt;&lt;br /&gt;Read about Oracle RAC and iSCSI in this &lt;a href="http://www.oracle.com/technology/pub/articles/hunter_rac10gr2_iscsi.html"&gt;article&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-2598411933983960281?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/2598411933983960281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=2598411933983960281' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2598411933983960281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/2598411933983960281'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/testing-iscsi.html' title='Testing iSCSI'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1468769236035508341</id><published>2006-12-10T23:47:00.000Z</published><updated>2006-12-10T23:56:26.890Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Monitoring RMAN I/O performance</title><content type='html'>When trying to cut rman backup times there are a lot of parameters to try to tune, database settings, storage subsystem settings, file system settings etc etc.&lt;br /&gt;It can sometimes be hard to remember all the results you get, luckily Oracle keeps them for you. Just query the &lt;b&gt;v$rman_backup_job_details&lt;/b&gt; view for the results.&lt;br /&gt;&lt;br /&gt;Example:&lt;pre&gt;&lt;font color="blue"&gt;column END_TIME format a16&lt;br /&gt;column START_TIME format a16&lt;br /&gt;column COMMAND_ID format a20&lt;br /&gt;&lt;br /&gt;select &lt;br /&gt; command_id, &lt;br /&gt; to_char(start_time,'YYMMDD HH24:MI') start_time,&lt;br /&gt; to_char(end_time,'YYMMDD HH24:MI') end_time,&lt;br /&gt; round(input_bytes/1024/1024) backup_size,&lt;br /&gt; round(INPUT_BYTES_PER_SEC/1024/1024) in_mb_sec,&lt;br /&gt; round(OUTPUT_BYTES_PER_SEC/1024/1024) out_mb_sec &lt;br /&gt;from &lt;br /&gt; v$rman_backup_job_details &lt;br /&gt;where&lt;br /&gt; start_time &gt; sysdate - 7&lt;br /&gt;order &lt;br /&gt; by start_time&lt;br /&gt;/&lt;br /&gt;&lt;font size=1&gt;&lt;br /&gt;COMMAND_ID           START_TIME       END_TIME         BACKUP_SIZE  IN_MB_SEC OUT_MB_SEC&lt;br /&gt;-------------------- ---------------- ---------------- ----------- ---------- ----------&lt;br /&gt;2006-12-10T00:34:25  061210 00:35     061210 00:45           13722         22         10&lt;br /&gt;2006-12-10T23:17:48  061210 23:17     061210 23:26           13784         26         12&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1468769236035508341?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1468769236035508341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1468769236035508341' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1468769236035508341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1468769236035508341'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/monitoring-rman-io-performance.html' title='Monitoring RMAN I/O performance'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7786489531298385535</id><published>2006-12-10T20:10:00.000Z</published><updated>2006-12-10T20:21:46.190Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle ASM instance startup script</title><content type='html'>Tought I'd publish my Oracle ASM instance sysv (Redhat/CentOS/Unbreakable etc) init script. The default &lt;b&gt;oracleasm&lt;/b&gt; script provided by &lt;a href="http://oss.oracle.com/"&gt;asmlib&lt;/a&gt; only prepares the disks available to ASM, you also need to start the basic instance for ASM. I've set the ASM instance to start just after oracleasm and to be killed just before it. Make sure your normal Oracle instance startup scripts are started in the correct order, i.e. after this script for startup and before this script for shutdown.&lt;br /&gt;It reads the default /etc/sysconfig/oracle config file, if nothing it sets it goes to defaults and should be able to start the instance. If you don't have the ASM instance name set in /etc/sysconfig/oracle (as ASM_SID=FOO) and your instance name is not +ASM you may have to edit the script to change the default ASM SID.&lt;br /&gt;&lt;br /&gt;Download the script &lt;a href="http://halisway.hifichoice.com/oraasm"&gt;here&lt;/a&gt;. Copy the script to /etc/init.d/ and use &lt;b&gt;chkconfig --add oraasm&lt;/b&gt; to add it to startup. Do a &lt;b&gt;chkconfig --list oraasm&lt;/b&gt; to verify that the script was added the runlevels you use.&lt;br /&gt;&lt;br /&gt;Please report any bugs, problems or suggestions for the script to me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7786489531298385535?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7786489531298385535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7786489531298385535' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7786489531298385535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7786489531298385535'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/oracle-asm-instance-startup-script.html' title='Oracle ASM instance startup script'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1813291748675772144</id><published>2006-12-05T22:15:00.000Z</published><updated>2006-12-05T22:20:45.781Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Date range generation in Oracle</title><content type='html'>Another interesting question someone asked in the IRC #oracle chat.&lt;br /&gt;&lt;i&gt;-How do I create a table with all dates from 2000 until today in it?&lt;/i&gt;&lt;br /&gt;It's rather simple in plain SQL, no PL/SQL or scripting required.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; create table date1 (d date);&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert &lt;br /&gt;  into date1(d) &lt;br /&gt;select &lt;br /&gt;  to_date('00-01-01','YY-DD-MM') + level &lt;br /&gt;from &lt;br /&gt;  dual &lt;br /&gt;where &lt;br /&gt;  (to_date('00-01-01','YY-DD-MM')+level) &lt; sysdate &lt;br /&gt;connect &lt;br /&gt;  by level&lt;=1000000&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;2530 rows created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select min(d) s, max(d) e from date1;&lt;br /&gt;&lt;br /&gt;S         E&lt;br /&gt;--------- ---------&lt;br /&gt;02-JAN-00 05-DEC-06&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;/pre&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1813291748675772144?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1813291748675772144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1813291748675772144' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1813291748675772144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1813291748675772144'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/date-range-generation-in-oracle.html' title='Date range generation in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-467966161190215414</id><published>2006-12-05T20:32:00.000Z</published><updated>2006-12-05T20:55:51.287Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle trace event 10132</title><content type='html'>The new "in" Oracle trace event seems to be 10132, it's pretty cool. Most Oracle DBA's and developers have probably at least heard about trace levels 10046 and 10053.&lt;br /&gt;10132 is a different from the classic two in the sense that it is is really easy for anyone to intepret, the 10132 trace event gives you a full execution plan and optimizer settings in the udump (user_dump_dest) directory.&lt;br /&gt;It's an easy thing to throw in a script or even as a logon trigger when troubleshooting query problems. Think hibernate or other (weird) ORM tool.&lt;br /&gt;&lt;br /&gt;Lets take a look:&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; alter session set events&lt;br /&gt;  2  '10132 trace name context forever, level 12';&lt;br /&gt;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; select e.ename,d.dname from dept d, emp e where&lt;br /&gt;  2  d.deptno=e.deptno;&lt;br /&gt;&lt;br /&gt;ENAME      DNAME&lt;br /&gt;---------- --------------&lt;br /&gt;SMITH      RESEARCH&lt;br /&gt;...&lt;br /&gt;MILLER     ACCOUNTING&lt;br /&gt;&lt;br /&gt;14 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&amp;gt;&lt;/font&gt;&lt;/pre&gt;And the trace we get looks like &lt;a href="http://halisway.hifichoice.com/peggy_ora_25713.trc"&gt;this&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-467966161190215414?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/467966161190215414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=467966161190215414' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/467966161190215414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/467966161190215414'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/oracle-trace-event-10132.html' title='Oracle trace event 10132'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-9020587406244862330</id><published>2006-12-03T21:14:00.000Z</published><updated>2006-12-04T16:10:28.992Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Laptops - 3 years ago and today</title><content type='html'>So I figured it was time to get a new laptop, my old trustworthy &lt;a href="http://www.dell.com/"&gt;Dell Inspiron&lt;/a&gt; 8600 has done a great job but it's starting to show it's age, it's actually 3 years old on the day next week (Yes, remembering the exact date you bought your last laptop is weird, I know). My 8600 had a few scratches and marks but it still looks pretty ok. Performance wise it's not to bad, I've been running &lt;a href="http://www.opensolaris.org/"&gt;Open Solaris&lt;/a&gt; for the last 18 months and it's been working great, felt fast and snappy. But when it comes to heavy multi tasking, Solaris container and &lt;a href="http://www.vmware.com/"&gt;VMWare&lt;/a&gt; it's not really keeping up with times.&lt;br /&gt;After browsing the laptop market it was quite clear that getting a Core2 machine was the best option if I wanted performance. I was &lt;b&gt;very&lt;/b&gt; tempted to get a cool Acer Ferrari 4006, the price is pretty great now when the 5000-series is just around the corner, but the AMD ML-40 benchmarks put me off, the Core2 totally trash it. Since my old Dell has been working great I went and got a new Dell to replace it. Although I was looking for a smaller machine this time I actually went for pretty much the exact replacement for the 8600, the new &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/inspn_6400?c=uk&amp;cs=ukdhs1&amp;l=en&amp;s=dhs"&gt;Dell Inspiron 6400&lt;/a&gt;. Funny thing, the price of the new machine turned out to be pretty much exactly the same as I payed for my old machine.&lt;table border=1&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;Dell Inspiron 6400&lt;/td&gt;&lt;td&gt;Dell Inspiron 8600&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CPU&lt;/td&gt;&lt;td&gt;Intel Core2 Duo 2.0Ghz&lt;/td&gt;&lt;td&gt;Intel Pentium M 1.4GHz&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Memory&lt;/td&gt;&lt;td&gt;2048Mb&lt;/td&gt;&lt;td&gt;768Mb&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Disk&lt;/td&gt;&lt;td&gt;120Gb 5400rpm&lt;/td&gt;&lt;td&gt;30Gb 5400rpm&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Graphics&lt;/td&gt;&lt;td&gt;ATI X1400 128MB&lt;/td&gt;&lt;td&gt;Nvidia Geforce 5250Go&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Network&lt;/td&gt;&lt;td&gt;54Mbit wifi + 100Mbit wired&lt;/td&gt;&lt;td&gt;11Mbit Wifi + 100Mbit wired&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Optical&lt;/td&gt;&lt;td&gt;DVD+RW&lt;/td&gt;&lt;td&gt;DVD/CD+RW&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;Pointing device&lt;/td&gt;&lt;td&gt;Touchpad&lt;/td&gt;&lt;td&gt;Touchpad / poiting stick&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Screen&lt;/td&gt;&lt;td&gt;1680x1050 high gloss&lt;/td&gt;&lt;td&gt;1680x1050&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Weight&lt;/td&gt;&lt;td&gt;2.8 kg&lt;/td&gt;&lt;td&gt;3.1 kg&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Size&lt;/td&gt;&lt;td&gt;A bit smaller&lt;/td&gt;&lt;td&gt;Quite big&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;VMWare speed&lt;/td&gt;&lt;td&gt;Fast&lt;/td&gt;&lt;td&gt;Slow&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/sidebyside2.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/sidebyside2_thumb.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's quite nice to be able to boot up a &lt;a href="http://www.centos.org/"&gt;CentOS 4.4&lt;/a&gt; running 10gR2 and still have great performance. Both in the VM and in the host OS.&lt;br /&gt;The one thing I don't like is that the 6400 don't have the pointing stick thingy, just the touch pad. But I'm getting used to it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/lowerside.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/lowerside_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/ontop.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/ontop_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/sidebyside.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/sidebyside_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/6400_keyb.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/6400_keyb_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/8600_keyb.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/8600_keyb_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/laptop/topfront.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/laptop/topfront_thumb.jpg"&gt;&lt;/a&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-9020587406244862330?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/9020587406244862330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=9020587406244862330' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9020587406244862330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/9020587406244862330'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/12/laptops-3-years-ago-and-today.html' title='Laptops - 3 years ago and today'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1725908465904087775</id><published>2006-11-29T11:36:00.000Z</published><updated>2006-12-04T16:10:57.159Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle database links using full TNS entries</title><content type='html'>Database links can be most useful, say you want to extract data to a reporting system or something like that. This is a quite common scenario people have problems with and come to the Oracle support IRC channel and ask about, especially developer with just a user account on the remote database and plain user account in the target database. They want to create a database link but don't have access to &lt;b&gt;tnsnames.ora&lt;/b&gt; file at the OS level on the server, they may not even have SSH access to the server. &lt;br /&gt;No problem, you can use the full TNS entry pretty much everywhere you can use the TNS alias, just remember to single quote it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Database link example:&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;[hlinden@whale dblink]$ rsqlplus /&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 9.2.0.4.0 - Production on Wed Nov 29 11:17:26 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Oracle Data Mining options&lt;br /&gt;JServer Release 9.2.0.4.0 - Production&lt;br /&gt;&lt;br /&gt;SQL&gt; select db_link from user_db_links;&lt;br /&gt;&lt;font color="green"&gt;&lt;br /&gt;no rows selected&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;SQL&gt; CREATE DATABASE LINK prodsyslink&lt;br /&gt; CONNECT TO ro_user IDENTIFIED BY ro_user_pass USING&lt;br /&gt; '(DESCRIPTION=(ADDRESS_LIST=(&lt;br /&gt;   ADDRESS=(PROTOCOL=TCP)(HOST=prodserver)(PORT=1521)))&lt;br /&gt;   (CONNECT_DATA=(SERVICE_NAME=prod_db)))'&lt;br /&gt;/&lt;br /&gt;&lt;font color="green"&gt;&lt;br /&gt;Database link created.&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;SQL&gt; select db_link from user_db_links;&lt;br /&gt;&lt;font color="green"&gt;&lt;br /&gt;DB_LINK&lt;br /&gt;------------------------------&lt;br /&gt;PRODSYSLINK&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;SQL&gt; select * from t@prodsyslink;&lt;br /&gt;&lt;font color="green"&gt;&lt;br /&gt;         A          B&lt;br /&gt;---------- ----------&lt;br /&gt;         1          2&lt;br /&gt;         2          1&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;SQL&amp;gt;&lt;/pre&gt;&lt;/font&gt;Cool, now it's possible to create a nice materialized view or whatever is needed.&lt;br /&gt;&lt;br /&gt;Oracle docs about &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5005.htm#sthref6315"&gt;CREATE DATABASE LINK&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1725908465904087775?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1725908465904087775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1725908465904087775' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1725908465904087775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1725908465904087775'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/oracle-database-links-using-full-tns_29.html' title='Oracle database links using full TNS entries'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4432817093825559729</id><published>2006-11-26T22:29:00.000Z</published><updated>2006-11-26T23:23:26.102Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><title type='text'>Redmond technology</title><content type='html'>&lt;i&gt;Disclimer: Long pro-Microsoft ranting. I know most of my blog readers are hard core Unix geeks so please be warned if you are sensitive to Microsoft material.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Ok, I have to admit it, I'm posting this entry from a machine running &lt;a href="http://www.microsoft.com/vista/"&gt;Windows Vista&lt;/a&gt;.&lt;br /&gt;And on top of that, I have to admit that &lt;a href="http://www.microsoft.com/sql/default.mspx"&gt;Microsoft SQL Sever 2005&lt;/a&gt; seems pretty cool. SQL server is not comparable to Oracle by far but it's certainly improved over the 2000 release. I've even fiddled around a bit with C# and OLDEDB providers in Vista. It's pretty sweet, using something like the Vista search API is peanuts, it's easy and clean, all the basics is there and easy accessible. &lt;br /&gt;After using Vista for about a week (No, I did not download the torrent, I'm using a developer licensed copy from &lt;a href="http://msdn.microsoft.com/"&gt;MSDN&lt;/a&gt;) I quite like most aspects of it, the new aero interface is quite fast, it's "cute" without getting annoying and slow. My favourite feature is the basic search functionality which works pretty much everywhere, you can sort of filter the result set in all views. If you type "Comm" in the Start-menu Windows filters the selection to the Command Prompt, so instead of classic browsing you can just type the first few letters of something and just hit enter, sort of like we have done in Unix for the last 15 years ;). Anyway, without a doubt, I feel more productive using Windows Vista than I have felt in a long time. &lt;br /&gt;&lt;img src="http://www.microsoft.com/library/media/1033/windowsvista/images/wv_home_nav_pearl.png"&gt;&lt;br /&gt;&lt;br /&gt;I've been quite distanced from the &lt;a href="http://www.microsoft.com/"&gt;Redmond&lt;/a&gt; scene for a while, the "2003 kit" did nothing for me, but as a technologist I have to admit that there are one or two quite interesting things coming from the Redmond campus in the next six months (and I'm not talking about the &lt;a href="http://faruk.newsvine.com/_news/2006/11/12/438632-zune-install-screen-raises-eyebrows"&gt;Zune&lt;/a&gt; here.&lt;br /&gt;&lt;br /&gt;Another thing that comes to mind here is that Microsoft is in a way shifting away from it's core customer base and trying to gain the interest of Unix shops and "the bigiron people". &lt;br /&gt;Take a product like &lt;a href="http://www.microsoft.com/exchange/"&gt;Exchange 2007&lt;/a&gt;, it's a pretty solid mail server (if you pair it with a couple of &lt;a href="http://www.postfix.org"/&gt;Postfix&lt;/a&gt; releays), but deploying a quite basic Exchange installation is getting pretty tricky, I have to admit I've only seen the beta2 release so far so the final version is probably better, compare that to the super simple and straight forward Exchange 5.4 deployment. Sure, you had a few gotchas in 5.5 and you always swore about all it's shortcomings, but the installation was done in 45 minutes or so. A company with say 100 employees and perhaps 3-4 servers can't just have "the IT guy" any more, not unless he is a pretty good and dedicated IT guy. Microsoft product deployments almost require consultants or at least a decent support channel. Things you previously associated more with larger and more back office deployments like an Oracle database, SAP or &lt;a href="http://www.ifs.com/"&gt;IFS&lt;/a&gt;. &lt;br /&gt;They are adding all this great functionally, but are they abandoning the ease of use and simplicity of their server products? &lt;br /&gt;Myself I don't mind the added complexity as long as the new features can help me get the most out of my deployment, something that Oracle has done an excellent job of. While it is a very complicated product, it is also the most powerful database on the market. Can we have it both ways? Probably not.&lt;br /&gt;&lt;br /&gt;So what's cool? &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Vista in itself isn't &lt;i&gt;that&lt;/i&gt; cool, but I think what people will do with it will be pretty cool. Both developers and end-users will benefit. I think we'll see the same thing we saw when the &lt;a href="http://www.apple.com/"&gt;MacOS X&lt;/a&gt; revolution started. Innovation from all corners of the market.&lt;br /&gt;&lt;li&gt;SQL Server 2005 - pretty cool. But not great, it'll kick some more Sybase butt and perhaps excite a few more developers to give up their Access MDB databases.&lt;br /&gt;&lt;li&gt;.NET framework 3.0 - same as the two above. Managed code is here to stay, .NET, Java and python. Now when you can have managed code in unmanaged code (confusing yes) I think we'll see a more rapid adaptation.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Enough of this silliness, I need to sort myself out, cat some files, pipe some stuff.&lt;br /&gt;Seriously, I'll stick to my motto, use whatever tools are best for the job and don't be afraid to try new products. Homogeneous environments and all that is nice, but when it all comes down to providing the service your clients require you have to look at all the options. Web 2.0 is all about providing a better service than the competition. If that's Microsoft or &lt;a href="http://www.opensolaris.org/"&gt;OpenSolaris&lt;/a&gt;, so be it.&lt;br /&gt;&lt;br /&gt;Classic screenshot:&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/screenvista1.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/screenvista1_thumb.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4432817093825559729?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4432817093825559729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4432817093825559729' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4432817093825559729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4432817093825559729'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/redmond-technology.html' title='Redmond technology'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-322696051903451537</id><published>2006-11-23T21:37:00.000Z</published><updated>2006-11-23T21:56:00.620Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>More cores, less space</title><content type='html'>&lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; just started shipping &lt;a href="http://www.dell.com/content/products/compare.aspx/rack_optimized?c=us&amp;cs=04&amp;l=en&amp;s=bsd"&gt;the "mark ii" 9-series&lt;/a&gt; boxes capable of taking the new &lt;a href="http://www.intel.com/business/xeon/"&gt;quad-core Intel Xeon&lt;/a&gt; processor. &lt;br /&gt;Unfortunately the older &lt;a href="http://halisway.blogspot.com/2006/10/dell-9th-generation-servers.html"&gt;9th generation&lt;/a&gt; are not compatible with the new quad core processors. &lt;a href="http://www.intel.com/"&gt;Intel&lt;/a&gt; made some last minute design changes to the new chip that required Dell to revise their motherboard designs.&lt;br /&gt;Look out for a "II" symbol on the front of your 9th gen boxes.&lt;br /&gt;Quad-core will be available on the SC1430, 1900, 2900, 1950, 2950 and the 1955 blades.&lt;br /&gt;Performance is said to be up to 60% better than a dual core system, which sort of puts 2-socket machines in "enterprise territory" for the first time. Sure, we got the 8-core Sun T1, but that is a quite niche market machine.&lt;br /&gt;A 8-core Dell PowerEdge 2950 with dual quad core procesors, 8Gb RAM and a pair of 72Gb SAS disks costs just under £6000 ($10kUSD).&lt;br /&gt;&lt;br /&gt;I'd love to do some &lt;a href="http://www.jboss.com/"&gt;JBoss&lt;/a&gt; benchmark on a mk2 1950.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-322696051903451537?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/322696051903451537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=322696051903451537' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/322696051903451537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/322696051903451537'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/more-cores-less-space.html' title='More cores, less space'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3763921845874225384</id><published>2006-11-22T21:55:00.000Z</published><updated>2006-11-23T17:20:31.935Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle merge-statement</title><content type='html'>The merge statement has been in Oracle since version 9, but is still not very widely used. &lt;br /&gt;When looking at data loading and merging code I think the most common bit of PL/SQL I've seen is the "merge" statement written in pl with slow and boring if-statements to see check if an entity exists in a table and if it exists the pl-code will do an update, otherwise it will do an insert.&lt;br /&gt;Two words, &lt;b&gt;super slow.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A much better solution is to use the merge-statement which does exactly that, it's basically &lt;br /&gt;"if exists then update else insert". Merge data from one data entity to another.&lt;br /&gt;The basic concept is sort of a join between the loading entity and the destination table.&lt;br /&gt;You can load from a normal table or from select query.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; select * from emp_load;&lt;br /&gt;&lt;br /&gt;EMPNO ENAME      JOB         MGR HIREDATE    SAL     COMM     DEPTNO&lt;br /&gt;----- ---------- --------- ----- --------- ----- -------- ----------&lt;br /&gt; 7654 MARTIN     SALESMAN   7698 28-SEP-81  1450     1400         30&lt;br /&gt; 7788 SCOTT      ANALYST    7566 19-APR-87  3500                  20&lt;br /&gt; 7902 FORD       SALESMAN   7698 03-DEC-81  3000     1300         20&lt;br /&gt; 7100 CHARLES    CLERK      7788 22-NOV-06  1150                  10&lt;br /&gt; 7302 SALLY      CLERK      7902 22-NOV-06  1300                  30&lt;br /&gt;&lt;br /&gt;SQL&gt; MERGE INTO emp e USING emp_load l&lt;br /&gt;  ON (e.empno=l.empno)&lt;br /&gt;  WHEN MATCHED THEN&lt;br /&gt;    UPDATE SET&lt;br /&gt;      e.ename = l.ename,&lt;br /&gt;      e.job = l.job,&lt;br /&gt;      e.mgr = l.mgr,&lt;br /&gt;      e.hiredate = l.hiredate,&lt;br /&gt;      e.sal = l.sal,&lt;br /&gt;      e.comm = l.comm,&lt;br /&gt;      e.deptno = l.deptno&lt;br /&gt;  WHEN NOT MATCHED THEN&lt;br /&gt;    INSERT VALUES (&lt;br /&gt;      l.empno, l.ename, l.job,&lt;br /&gt;      l.mgr, l.hiredate,&lt;br /&gt;      l.sal, l.comm, l.deptno&lt;br /&gt;    )&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;5 rows merged.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from emp;&lt;br /&gt;&lt;br /&gt;EMPNO ENAME      JOB         MGR HIREDATE    SAL     COMM     DEPTNO&lt;br /&gt;----- ---------- --------- ----- --------- ----- -------- ----------&lt;br /&gt;&lt;font color="red"&gt; 7100 CHARLES    CLERK      7788 22-NOV-06  1150                  10&lt;br /&gt; 7302 SALLY      CLERK      7902 22-NOV-06  1300                  30&lt;/font&gt;&lt;br /&gt; 7369 SMITH      CLERK      7902 17-DEC-80   800                  20&lt;br /&gt; 7499 ALLEN      SALESMAN   7698 20-FEB-81  1600      300         30&lt;br /&gt; 7521 WARD       SALESMAN   7698 22-FEB-81  1250      500         30&lt;br /&gt; 7566 JONES      MANAGER    7839 02-APR-81  2975                  20&lt;br /&gt;&lt;font color="red"&gt; 7654 MARTIN     SALESMAN   7698 28-SEP-81  1450     1400         30&lt;/font&gt;&lt;br /&gt; 7698 BLAKE      MANAGER    7839 01-MAY-81  2850                  30&lt;br /&gt; 7782 CLARK      MANAGER    7839 09-JUN-81  2450                  10&lt;br /&gt;&lt;font color="red"&gt; 7788 SCOTT      ANALYST    7566 19-APR-87  3500                  20&lt;/font&gt;&lt;br /&gt; 7839 KING       PRESIDENT       17-NOV-81  5000                  10&lt;br /&gt; 7844 TURNER     SALESMAN   7698 08-SEP-81  1500        0         30&lt;br /&gt; 7876 ADAMS      CLERK      7788 23-MAY-87  1100                  20&lt;br /&gt; 7900 JAMES      CLERK      7698 03-DEC-81   950                  30&lt;br /&gt;&lt;font color="red"&gt; 7902 FORD       SALESMAN   7698 03-DEC-81  3000     1300         20&lt;/font&gt;&lt;br /&gt; 7934 MILLER     CLERK      7782 23-JAN-82  1300                  10&lt;br /&gt;&lt;br /&gt;16 rows selected.&lt;/font&gt;&lt;/pre&gt;If you want to load from a query you can use this syntax:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;MERGE INTO emp e USING &lt;br /&gt;    (&lt;font color="green"&gt;select * from emp_load &lt;br /&gt;      where hiredate &gt; sysdate - 7&lt;/font&gt;) l&lt;br /&gt;  ON (e.empno=l.empno)&lt;br /&gt;...&lt;/pre&gt;&lt;/font&gt;Check out the merge &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#sthref9516"&gt;docs&lt;/a&gt; .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3763921845874225384?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3763921845874225384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3763921845874225384' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3763921845874225384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3763921845874225384'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/oracle-merge-statement.html' title='Oracle merge-statement'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-1189798142673711097</id><published>2006-11-22T12:09:00.000Z</published><updated>2006-11-22T12:12:41.502Z</updated><title type='text'>The Week of Oracle Database Bugs</title><content type='html'>In an effort to try to get &lt;a href="http://www.oracle.com"&gt;Oracle&lt;/a&gt; to improve their response time and responsiveness to fixing critical security flaws in the Oracle database the &lt;a href="http://www.argeniss.com/"&gt;Argeniss&lt;/a&gt; security firm has started the &lt;a href="http://www.argeniss.com/woodb.html"&gt;"The Week of Oracle Database Bugs"&lt;/a&gt;.&lt;br /&gt;In all honesty, Oracle are really bad at fixing critical bugs. Not that many databases are Internet facing, but the concept of social hacking and internal hacking is not unheard of.&lt;br /&gt;&lt;br /&gt;I hope we see a positive response from Oracle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-1189798142673711097?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/1189798142673711097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=1189798142673711097' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1189798142673711097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/1189798142673711097'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/week-of-oracle-database-bugs.html' title='The Week of Oracle Database Bugs'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-454594356899170998</id><published>2006-11-18T16:48:00.000Z</published><updated>2006-11-18T17:05:09.074Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='rants'/><title type='text'>Random bits</title><content type='html'>I must admit that I haven't been very active on the blogging side lately. Been quite busy at work and a fair amount of my free time has been consumed by excessive &lt;a href="http://www.battlestargalactica.com/"&gt;Battestar Galactica&lt;/a&gt; viewing. :)&lt;br /&gt;Work has been quite busy lately, not sure what I've actually done, lots of small things add up I guess. We recently signed a few new customers and need to configure staging environments and of course they have to use the most boring stuff around, &lt;a href="http://www.crazypiglet.com/"&gt;Sybase&lt;/a&gt; and boring &lt;a href="http://www.ibm.com/"&gt;Web&lt;b&gt;fear&lt;/b&gt;&lt;/a&gt;. &lt;br /&gt;Why can't people just face the facts and use &lt;a href="http://www.jboss.com/"&gt;JBoss&lt;/a&gt; and &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;On the plus side I've had to get a closer look at the &lt;a href="http://www.fujitsu-siemens.com/products/unix_servers/primepower/index.html"&gt;FSC PrimePower&lt;/a&gt; Solaris boxes. The SPARC64 processor isn't that bad actually, it's pretty fast. I'd love to get some "end customer" pricing for their systems (noone pays list).&lt;br /&gt;&lt;br /&gt;Productivity wise I'm writing a small system to find new physical devices on a LAN, it simply polls the MAC address table from a switch and stores the entries in a &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; database and when a new MAC is found it sends an e-mail alert to the administrator. That bit is currently working and I'm just writing a small PHP-interface to add comments to MACs so they can be easily identified. I'll post the code when it's done if anyone is interested.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Album recommendation:&lt;/b&gt;&lt;br /&gt;And the artist of the "random time unit" is &lt;B&gt;Blondie&lt;/B&gt;!&lt;br /&gt;The album &lt;a href="http://www.amazon.co.uk/Autoamerican-Remastered-Blondie/dp/B00005MNP6"&gt;Autoamerican&lt;/a&gt; must without a doubt be one of the most creative and uprising albums of all times. Rap, jazz, reggae and disco on the same album is not something we see every day.&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/Autoamerican-Remastered-Blondie/dp/B00005MNP6"&gt;&lt;img src="http://ec1.images-amazon.com/images/P/B00005MNP6.01._AA240_SCLZZZZZZZ_.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-454594356899170998?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/454594356899170998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=454594356899170998' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/454594356899170998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/454594356899170998'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/random-bits.html' title='Random bits'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7207785751259651819</id><published>2006-11-14T12:38:00.000Z</published><updated>2006-11-14T12:52:16.328Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle Alert log shell alias</title><content type='html'>Inspired by &lt;a href="http://laurentschneider.blogspot.com/"&gt;Laurent Schneiders&lt;/a&gt; recent shell alias blog post I decided to post a nice little shell alias I use.&lt;br /&gt;The alias opens the current alert log file in &lt;b&gt;vi&lt;/b&gt;, it reads the background dump dest from sqlplus and constructs the full path to the file name. Works pretty well, it's quite convenient to have one single command to quickly open the alert log, it requires that your &lt;b&gt;oraenv&lt;/b&gt; (ORACLE_HOME, PATH and ORACLE_SID) is set correctly.&lt;br /&gt;&lt;br /&gt;The alias:&lt;br /&gt;&lt;font color="blue" face="Fixed"&gt;alias alert='vi + $(&lt;font color="green"&gt;printf "set heading off pages 0 feedback off\n select value from v\$parameter where name='\''background_dump_dest'\'';\n"|sqlplus -S "/ as sysdba"&lt;/font&gt;)/alert_${ORACLE_SID}.log'&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;If you just want the last 20 lines of the alert log you can use this alias:&lt;br /&gt;&lt;font color="blue" face="Fixed"&gt;alias talert='tail -20 $(&lt;font color="green"&gt;printf "set heading off pages 0 feedback off\n select value from v\$parameter where name='\''background_dump_dest'\'';\n"|sqlplus -S "/ as sysdba"&lt;/font&gt;)/alert_${ORACLE_SID}.log'&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7207785751259651819?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7207785751259651819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7207785751259651819' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7207785751259651819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7207785751259651819'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/oracle-alert-log-shell-alias.html' title='Oracle Alert log shell alias'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-6475378540595344031</id><published>2006-11-05T22:45:00.000Z</published><updated>2006-11-18T16:46:07.410Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle controlfile backup script</title><content type='html'>Wrote a small script to get a "usable" copy of the "CREATE CONTROLFILE" statement one can backup to trace. In a heavily used database it can be quite tricky to find the control file backup without actually "looking for it", in the sense of actually query the database for your thread number.&lt;br /&gt;The script will dump the controlfile to trace and copy it to the local directory with the file name &lt;b&gt;control_INSTANCENAME_TIMESTAMP.sql&lt;/b&gt;, should be fairly simple to integrate the script in to a generic backup process.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;#!/bin/bash&lt;br /&gt;ORACLE_HOME=/u01/oracle/10g&lt;br /&gt;ORACLE_SID=peggy&lt;br /&gt;PATH="$PATH:$ORACLE_HOME/bin"&lt;br /&gt;export PATH ORACLE_HOME ORACLE_SID&lt;br /&gt;&lt;br /&gt;sqlplus -S / as sysdba &amp;lt;&amp;lt;EOF  &amp;gt;/dev/null&lt;br /&gt;&lt;font color="green"&gt;set echo off feedback off verify off pages 0&lt;br /&gt;column TRCLOC new_value TRCFILE&lt;br /&gt;column TRCDATE new_value FILEDATE&lt;br /&gt;column INSTNAME new_value INSTANCE&lt;br /&gt;select to_char(sysdate, 'YYYYMMDD_HH24MISS') TRCDATE&lt;br /&gt;  from dual;&lt;br /&gt;select instance INSTNAME&lt;br /&gt;  from v\$thread;&lt;br /&gt;alter database backup controlfile to trace;&lt;br /&gt;select&lt;br /&gt;        c.value || '/' ||&lt;br /&gt;        instance || '_ora_' ||&lt;br /&gt;        ltrim(to_char(a.spid,'fm99999')) ||&lt;br /&gt;        '.trc' TRCLOC&lt;br /&gt;from&lt;br /&gt;        v\$process a, v\$session b,&lt;br /&gt;        v\$parameter c, v\$thread c&lt;br /&gt;where&lt;br /&gt;        a.addr = b.paddr&lt;br /&gt;        and b.audsid = userenv('sessionid')&lt;br /&gt;        and c.name = 'user_dump_dest'&lt;br /&gt;/&lt;br /&gt;host cp &amp;TRCFILE control_&amp;instance._&amp;filedate..sql&lt;br /&gt;exit&lt;/font&gt;&lt;br /&gt;EOF&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Example usage:&lt;pre&gt;&lt;font color="blue"&gt;oracle@htpc:bin$ ls&lt;br /&gt;&lt;font color="green"&gt;backup_controlfile.sh&lt;/font&gt;&lt;br /&gt;oracle@htpc:bin$ ./backup_controlfile.sh&lt;br /&gt;oracle@htpc:bin$ ls -1&lt;br /&gt;&lt;font color="green"&gt;backup_controlfile.sh&lt;/font&gt;&lt;br /&gt;control_peggy_20061105_225110.sql&lt;br /&gt;oracle@htpc:bin$ grep -m1 "CREATE CONTROLFILE" control*&lt;br /&gt;&lt;font color="green"&gt;CREATE CONTROLFILE REUSE DATABASE "PEGGY" NORESETLOGS  ARCHIVELOG&lt;/font&gt;&lt;br /&gt;oracle@htpc:bin$&lt;/font&gt;&lt;/pre&gt;Found the trace location query over at &lt;a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:4928324060599501360::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1112673450743,"&gt;Asktom&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Quick update:&lt;/b&gt;&lt;br /&gt;The blogger editor buggered up the script the first time around, had to use ampersand encoding to get the &amp;lt;&amp;lt; and &amp;gt; to work properly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-6475378540595344031?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/6475378540595344031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=6475378540595344031' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6475378540595344031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6475378540595344031'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/11/oracle-controlfile-backup-script.html' title='Oracle controlfile backup script'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7694242822615821333</id><published>2006-10-30T13:49:00.000Z</published><updated>2006-10-30T13:57:56.899Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpm'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>rlwrap for rhel / centos / unbreakable</title><content type='html'>Just buil a new RPM file for &lt;a href="http://utopia.knoware.nl/~hlub/rlwrap/"&gt;rlwrap 0.26&lt;/a&gt; for &lt;a href="http://www.centos.org"&gt;Centos 4&lt;/a&gt;, &lt;a href="http://www.redhat.com/"&gt;Redhat 4&lt;/a&gt; and Oracle Unbreakable Linux. I've added my (very) basic sqlplus auto complete file.&lt;br /&gt;&lt;br /&gt;If you are not familiar with rlwrap but use Oracle on Linux/Unix you should definatly have a look. rlwrap provides basic "bash style" command line editing in sqlplus (and other command line tools), you get command history with working arrow keys and normal command line editing.&lt;br /&gt;&lt;br /&gt;Download 32-bit version: &lt;a href="http://halisway.hifichoice.com/rlwrap-hali-0.26-1.i386.rpm"&gt;rlwrap-hali-0.26-1.i386.rpm&lt;/a&gt;&lt;br /&gt;Download 64-bit version: &lt;a href="http://halisway.hifichoice.com/rlwrap-hali-0.26-1.x86_64.rpm"&gt;rlwrap-hali-0.26-1.x86_64.rpm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7694242822615821333?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7694242822615821333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7694242822615821333' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7694242822615821333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7694242822615821333'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/rlwrap-for-rhel-centos-unbreakable.html' title='rlwrap for rhel / centos / unbreakable'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-5191270521986636561</id><published>2006-10-29T20:21:00.000Z</published><updated>2006-10-29T21:00:19.178Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='vmware'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Running Oracle Unbreakable Linux under VMWare</title><content type='html'>I finally got around to do a proper install of &lt;a href="http://www.oracle.com/technology/tech/linux/index.html"&gt;Unbreakable Linux&lt;/a&gt; today.&lt;br /&gt;Pretty much as expect, it's pretty much identical to &lt;a href="http://www.centos.org/"&gt;CentOS&lt;/a&gt;. It's got yum and all that.&lt;br /&gt;&lt;br /&gt;Took the opertunity to try the new free version of &lt;a href="http://www.vmware.com/"&gt;VMWare GSX Server&lt;/a&gt;, or at least what used to be known as GSX. They just call it VMWare server now.&lt;br /&gt;The VMware tgz install on my 64-bit &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu 6.10&lt;/a&gt; was quite smooth. You still have to enter a serial, easily obtained from filling out a &lt;a href="http://register.vmware.com/content/registration.html"&gt;simple form&lt;/a&gt; on the vmware website. The installation of vmware-authd failed though. Since Ubuntu's xinetd doesn't read &lt;b&gt;/etc/inetd.conf&lt;/b&gt; I had to create an entry in &lt;b&gt;/etc/xinet.d/&lt;/b&gt;.&lt;pre&gt;&lt;font color="blue"&gt;hlinden@htpc:~$ cat /etc/xinetd.d/vmware&lt;br /&gt;service vmware&lt;br /&gt;{&lt;br /&gt;        disable         = no&lt;br /&gt;        socket_type     = stream&lt;br /&gt;        protocol        = tcp&lt;br /&gt;        user            = root&lt;br /&gt;        wait            = no&lt;br /&gt;        user            = root&lt;br /&gt;        server          = /usr/sbin/vmware-authd&lt;br /&gt;        port            = 902&lt;br /&gt;}&lt;/font&gt;&lt;/pre&gt;Speed wise VMWare server is great, I only allocated 384Mb RAM to the VM and it still feels quite snappy and fast. I've only tried running two VM's at the same time so far. But my first impressions are simply, great stuff! The VM creation wizard thingy even had &lt;a href="http://www.sun.com/"&gt;Solaris x86&lt;/a&gt; in the list, haven't tried it yet but I sure will.&lt;br /&gt;&lt;br /&gt;Took a few screenshots during the Unbreakable Linux installation.&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/e4_installer1.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/e4_installer1_thumb.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/e4_installer2.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/e4_installer2_thumb.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/e4_boot.jpg"&gt;&lt;img src="http://halisway.hifichoice.com/e4_boot_thumb.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-5191270521986636561?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/5191270521986636561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=5191270521986636561' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5191270521986636561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/5191270521986636561'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/running-oracle-unbreakable-linux-under.html' title='Running Oracle Unbreakable Linux under VMWare'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-7783767605769864201</id><published>2006-10-25T22:07:00.000+01:00</published><updated>2006-10-29T20:05:18.414Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle Unbreakable Linux</title><content type='html'>Ok, so &lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt; is doing "a &lt;a href="http://www.centos.org/"&gt;CentOS&lt;/a&gt;". &lt;br /&gt;Oracle is taking the &lt;a href="http://www.redhat.com/"&gt;Redhat Enterprise Linux&lt;/a&gt; source code, removing all the trademarks, logos and references to Redhat and recompiling it with the &lt;b&gt;Unbreakable Linux&lt;/b&gt; label. If there are any bugs found and redhat don't fix them fast enough (at all?) Oracle will take care of that and guarantee all bugs will be fixed and backported to all versions of Unbreakable Linux.&lt;br /&gt;Sounds pretty good to me, especially when you look at the support cost model.&lt;br /&gt;&lt;br /&gt;The basic support contract "network level" gives you access to patches via Oracles &lt;a href="http://linux.oracle.com/"&gt;up2date&lt;/a&gt; equivalent. And the cost is a mear $99 per year per system. &lt;br /&gt;If you want enterprise support you get that for a couple of hundred more. &lt;br /&gt;If you want &lt;b&gt;premium&lt;/b&gt; support you get that for about $1399 per year, you can't even get that support level from Redhat.&lt;br /&gt;The full support policy can be found &lt;a href="http://www.oracle.com/support/collateral/enterprise-linux-support-policies.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;And... even better... support contract are &lt;b&gt;50% off &lt;/b&gt;for the first few months (although I still haven't found where you can actually buy them).&lt;br /&gt;&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/unbreakable.png"&gt;&lt;br /&gt;&lt;br /&gt;Read &lt;a href="http://www.oracle.com/technologies/linux/index.html?pageregion=ocom_hp_a_main_1_Linux_102506"&gt; more&lt;/a&gt;. Take a few minutes (about 60) to watch Larrys keynote, quite interesting.&lt;br /&gt;&lt;br /&gt;Download &lt;a href="http://edelivery.oracle.com/linux"&gt;ISO images&lt;/a&gt;, free for all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-7783767605769864201?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/7783767605769864201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=7783767605769864201' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7783767605769864201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/7783767605769864201'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/oracle-unbreakable-linux.html' title='Oracle Unbreakable Linux'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-6422331246452878304</id><published>2006-10-23T23:56:00.000+01:00</published><updated>2006-10-29T20:04:55.330Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='amd'/><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><title type='text'>Dell AMD Opteron servers</title><content type='html'>We've known about this for quite some time, I think I heard the first rumors last November and we saw new AMD desktop machines from &lt;a href="http://www.dell.com/"&gt;Dell&lt;/a&gt; about a month ago.&lt;br /&gt;And now we have to new shiny Opteron Socket-F machines. They all run Linux of course.&lt;br /&gt;&lt;br /&gt;First the anticipated &lt;a href="http://www.dell.com/content/products/productdetails.aspx/pedge_sc1435"&gt;Dell PowerEdge SC1435&lt;/a&gt;. A nice little box, as I've said before, the rack mounts in the SC series &lt;i&gt;just get things done&lt;/i&gt;. I do think the price tag at around $3000 USD is a bit high. That'll probably drop quite a lot if you haggle with Dell and buy them in bulk. It is a perfect JBoss server, deployed in a nice farm of course, or it would make a very nice HPC node.&lt;br /&gt;Now if just Dell would send me a few of these to test, they could use a bit of blogger hype. :)&lt;br /&gt;&lt;br /&gt;The second new box looks even more interesting, &lt;br /&gt;the &lt;a href="http://www.dell.com/content/products/productdetails.aspx/pedge_6950"&gt;Dell PowerEdge 6950&lt;/a&gt;.&lt;br /&gt;A four socket machine with up to 8 cores and 64 Gigs of memory. On par with the HP DL585 and sort of a "half size" machine compared to the Sun X4600. I wonder which box packs the best bang for buck, but thats for another post. But a similar speced X4600 cost about twice as much, but on the other hand you get the extra scalability and future proof CPU cards instead of on-board socket-f.&lt;br /&gt;The PE 6950 takes 5 internal SAS disks and has got 7 (free) PCIe slots.&lt;br /&gt;Thats quite a lot of I/O for more NIC's and HBA's, do I dare to say this makes a very nice RAC node. Probably one of the top players in the area, team it up with a decent SAN and you are in business.&lt;br /&gt;Starting price is not bad, not bad at all. An entry-level machine comes in at around $10000 USD.&lt;br /&gt;&lt;img src="http://img.dell.com/images/global/products/pedge/6950_consumption.jpg"&gt;.&lt;br /&gt;&lt;br /&gt;See the product videos over at &lt;a href="http://www.direct2dell.com/one2one/archive/2006/10/23/3235.aspx"&gt;direct2dell&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-6422331246452878304?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/6422331246452878304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=6422331246452878304' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6422331246452878304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/6422331246452878304'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/dell-amd-opteron-servers.html' title='Dell AMD Opteron servers'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3517467133756628439</id><published>2006-10-21T20:14:00.000+01:00</published><updated>2007-04-18T17:53:03.604+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle 10gR2 on Ubuntu 6.10 AMD64</title><content type='html'>I just finished installing &lt;a href="http://www.oracle.com/technology/index.html"&gt;Oracle 10gR2&lt;/a&gt; on my Intel Core2 Ubuntu 6.10 machine running in x86_64 (AMD64) mode. The installation is fairly straight forward with a few gotchas. In comparison to CentOS/Redhat, Ubuntu 6.10 has got much more native 64-bit libraries, pretty much everything is actually 64-bit. Under Redhat most libraries are 32-bit. And the Oracle Universal Installer (OUI) uses a 32-bit Java runtime so hence we have to install a few i386 compatability libraries to get it working.&lt;br /&gt;&lt;br /&gt;First of all make sure your machines hostname resolves to your external IP and not the loopback IP (127.0.0.1).&lt;br /&gt;Double check using this command&lt;pre&gt;&lt;font color="blue"&gt;$ grep $(hostname) /etc/hosts&lt;br /&gt;192.168.95.40           htpc&lt;/pre&gt;&lt;/font&gt;If you see 127.0.0.1 just edit the hosts file to have the external IP.&lt;br /&gt;&lt;br /&gt;Now you need to install a few compat libraries and 32-bit libraries.&lt;pre&gt;&lt;font color="blue"&gt;sudo apt-get install gcc libaio1 lesstif2 &lt;br /&gt;  lesstif2-dev make libc6 libstdc++5 \&lt;br /&gt;  lib32stdc++6 lib32z1 ia32-libs&lt;/pre&gt;&lt;/font&gt;This will probably cascade in to quite a few packages depending on how much you have installed, be patient and let it download everything it needs. The extra ia32 libraries is probably the biggest change to the old 32-bit installation.&lt;br /&gt;&lt;br /&gt;Edit &lt;b&gt;/etc/sysctl.conf&lt;/b&gt; to have the kernel parameters required by Oracle (I've added a few extras here as well to avoid unecessery swapping).&lt;br /&gt;Add these lines:&lt;font color="blue"&gt;&lt;pre&gt;# Oracle stuff&lt;br /&gt;kernel.shmall = 2097152&lt;br /&gt;kernel.shmmax = 2147483648&lt;br /&gt;kernel.shmmni = 4096&lt;br /&gt;kernel.sem = 250 32000 100 128&lt;br /&gt;fs.file-max = 65536&lt;br /&gt;net.ipv4.ip_local_port_range = 1024 65000&lt;br /&gt;net.core.rmem_default = 262144&lt;br /&gt;net.core.rmem_max = 262144&lt;br /&gt;net.core.wmem_default = 262144&lt;br /&gt;net.core.wmem_max = 262144&lt;br /&gt;vm.swappiness=10&lt;/pre&gt;&lt;/font&gt;Create the oracle user and required groups (you don't really need the nobody group, it's only used by root.sh to be the group owning the oraenv and dbhome scripts).&lt;pre&gt;&lt;font color="blue"&gt;sudo groupadd nobody&lt;br /&gt;sudo groupadd oinstall&lt;br /&gt;sudo groupadd dba&lt;br /&gt;sudo useradd -s /bin/bash -g oinstall -G dba oracle&lt;br /&gt;sudo passwd oracle&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;Increase system limits by adding these lines to &lt;b&gt;/etc/security/limits.conf&lt;/b&gt;:&lt;pre&gt;&lt;font color="blue"&gt;* soft nproc 2047&lt;br /&gt;* hard nproc 16384&lt;br /&gt;* soft nofile 1024&lt;br /&gt;* hard nofile 65536&lt;/pre&gt;&lt;/font&gt;To avoid the non-redhat warnings during the prereqs run this command:&lt;pre&gt;&lt;font color="blue"&gt;echo 3 &gt; /etc/redhat-release&lt;/pre&gt;&lt;/font&gt;Add a few symlinks to avoid any script problems:&lt;pre&gt;&lt;font color="blue"&gt;sudo ln -s /usr/bin/awk /bin/awk&lt;br /&gt;sudo ln -s /bin/true /bin/rpm&lt;br /&gt;sudo ln -s /usr/bin/basename /bin/basename&lt;br /&gt;sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so&lt;br /&gt;sudo mkdir -p /u01/oracle/10g&lt;br /&gt;sudo chown -R oracle:oinstall /u01/oracle/10g&lt;br /&gt;sudo chmod -R 775 /u01/oracle&lt;/pre&gt;&lt;/font&gt;Time to run the installer, make sure you are allowed to use the X11 server (export DISPLAY, xhost, vnc whatever). &lt;br /&gt;To get the 32-bit JRE to work you need to set the XLOCALELIBDIR before running the installer:&lt;pre&gt;&lt;font color="blue"&gt;export XLOCALELIBDIR=/usr/lib32/X11/locale&lt;br /&gt;cd /your/install/dir&lt;br /&gt;./runInstaller&lt;/pre&gt;&lt;/font&gt;I just ran the defaults straight through (except the SID name and password). The installation without any warnings or errors. The linker worked fine and everything was configure properly, dbca created the standard database.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;oracle@htpc:~$ uname -a&lt;br /&gt;Linux htpc 2.6.17-10-generic #2 SMP Fri Oct 13 15:34:39 UTC 2006 x86_64 GNU/Linux&lt;br /&gt;oracle@htpc:~$ rsqlplus / as sysdba&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Sat Oct 21 20:13:45 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt; select platform_name from v$database;&lt;br /&gt;&lt;br /&gt;PLATFORM_NAME&lt;br /&gt;--------------------&lt;br /&gt;Linux 64-bit for AMD&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;This guide is based on the &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/install.102/b15667/toc.htm"&gt;Oracle 10gR2 x64_64 installation guide&lt;/a&gt; and I've also used Dizwells excellent &lt;a href="http://www.dizwell.com/prod/node/52?page=0%2C0"&gt;Ubuntu 6.06 32-bit guide&lt;/a&gt; for some ubuntu specific notes. Thanks.&lt;br /&gt;&lt;br /&gt;Cool, now I can alt-tab between sqlplus and my latest Prison Break episodes on the TV  . :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3517467133756628439?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3517467133756628439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3517467133756628439' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3517467133756628439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3517467133756628439'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/oracle-10gr2-on-ubuntu-610-amd64.html' title='Oracle 10gR2 on Ubuntu 6.10 AMD64'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4491584904891294089</id><published>2006-10-20T17:43:00.000+01:00</published><updated>2006-10-29T20:05:32.524Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>Funny temporary table behavior in Postgres</title><content type='html'>Was playing around with temporary tables in &lt;a href="http://www.postgres.org"&gt;PostgreSQL&lt;/a&gt; and found this quite weird behavior. &lt;br /&gt;When you have a table called say &lt;i&gt;animal&lt;/i&gt; and create a new temporary table with the same name postgres is totally ok with the "duplicate" name. Since the temporary table ends up in a different schema I presume. Anyway, it was quite confusing before I figured out what was going on.&lt;br /&gt;It's the same both in 8.1 and 8.2beta. Not sure if it to be expected, a oversight from my side or simply a "bug".&lt;br /&gt;&lt;br /&gt;Example:&lt;pre&gt;&lt;font color="blue"&gt;[postgres@dolphin ~]$ psql&lt;br /&gt;Welcome to psql 8.2beta1, the PostgreSQL interactive terminal.&lt;br /&gt;&lt;br /&gt;Type:  \copyright for distribution terms&lt;br /&gt;       \h for help with SQL commands&lt;br /&gt;       \? for help with psql commands&lt;br /&gt;       \g or terminate with semicolon to execute query&lt;br /&gt;       \q to quit&lt;br /&gt;&lt;br /&gt;postgres=# create user test password 'test';&lt;br /&gt;CREATE ROLE&lt;br /&gt;postgres=# create database testdb owner test template template0;&lt;br /&gt;CREATE DATABASE&lt;br /&gt;postgres=# \c testdb test&lt;br /&gt;You are now connected to database "testdb".&lt;br /&gt;testdb=&gt; create table animal (dog int);&lt;br /&gt;CREATE TABLE&lt;br /&gt;testdb=&gt; \d&lt;br /&gt;        List of relations&lt;br /&gt; Schema |  Name  | Type  | Owner&lt;br /&gt;--------+--------+-------+-------&lt;br /&gt; public | animal | table | test&lt;br /&gt;(1 row)&lt;br /&gt;&lt;br /&gt;testdb=&gt; \d animal&lt;br /&gt;    Table "&lt;font color="green"&gt;public&lt;/font&gt;.animal"&lt;br /&gt; Column |  Type   | Modifiers&lt;br /&gt;--------+---------+-----------&lt;br /&gt; dog    | integer |&lt;br /&gt;&lt;br /&gt;testdb=&gt; create temporary table animal (cat int);&lt;br /&gt;CREATE TABLE&lt;br /&gt;testdb=&gt; \d&lt;br /&gt;         List of relations&lt;br /&gt;  Schema   |  Name  | Type  | Owner&lt;br /&gt;-----------+--------+-------+-------&lt;br /&gt; pg_temp_1 | animal | table | test&lt;br /&gt;(1 row)&lt;br /&gt;&lt;br /&gt;testdb=&gt; \d animal&lt;br /&gt;   Table "&lt;font color="green"&gt;pg_temp_1&lt;/font&gt;.animal"&lt;br /&gt; Column |  Type   | Modifiers&lt;br /&gt;--------+---------+-----------&lt;br /&gt; cat    | integer |&lt;br /&gt;&lt;br /&gt;testdb=&gt; drop table animal;&lt;br /&gt;DROP TABLE&lt;br /&gt;testdb=&gt; \d animal&lt;br /&gt;    Table "&lt;font color="green"&gt;public&lt;/font&gt;.animal"&lt;br /&gt; Column |  Type   | Modifiers&lt;br /&gt;--------+---------+-----------&lt;br /&gt; dog    | integer |&lt;br /&gt;&lt;br /&gt;testdb=&gt;&lt;/pre&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4491584904891294089?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4491584904891294089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4491584904891294089' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4491584904891294089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4491584904891294089'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/funny-temporary-table-behavior-in.html' title='Funny temporary table behavior in Postgres'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-3132900659610521451</id><published>2006-10-17T21:27:00.000+01:00</published><updated>2006-10-17T21:40:00.406+01:00</updated><title type='text'>SQL challange #1</title><content type='html'>Ok, time for a little competition. Myself and &lt;a href="http://pooteeweet.org/"&gt;Lukas Smith&lt;/a&gt; where helping a user with an at first very simple SQL problem. But after a few minutes we wouldn't find a "nice" way to solve it. &lt;br /&gt;&lt;br /&gt;So here is the problem:&lt;br /&gt;Dataset:&lt;br /&gt;&lt;pre&gt;1, 2&lt;br /&gt;2, 1&lt;br /&gt;3, 4&lt;br /&gt;3, 6&lt;br /&gt;4, 3&lt;br /&gt;6, 3&lt;br /&gt;&lt;/pre&gt;And the output from the query we want is:&lt;pre&gt;1,2&lt;br /&gt;3,4&lt;br /&gt;3,6&lt;/pre&gt;&lt;br /&gt;All rows with a matching sister "a=b" relation should be "merged".&lt;br /&gt;&lt;br /&gt;Lukas found one quite good way using &lt;b&gt;exists&lt;/b&gt; in a self-join.&lt;br /&gt;&lt;br /&gt;Any RDBMS goes, ANSI SQL is an advantage but not necessary. Analytics perhaps?&lt;br /&gt;Nicest/fastest/cleanest query wins. Post any questions as comments.&lt;br /&gt;E-mail me or post your solution as a comment to this blog.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://pooteeweet.org"&gt;Lukas'&lt;/a&gt; invite to the challenge. :)&lt;br /&gt;&lt;br /&gt;Thanks and good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-3132900659610521451?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/3132900659610521451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=3132900659610521451' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3132900659610521451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/3132900659610521451'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/sql-challange-1.html' title='SQL challange #1'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-4792360351575790456</id><published>2006-10-14T16:08:00.000+01:00</published><updated>2006-10-14T16:25:06.574+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Running Ubuntu 6.10 on Abit AB9</title><content type='html'>Playing around with my new media center PC at the moment.&lt;br /&gt;&lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt; 6.10 Edgy (daily build from Oct 13th) installed without too many problems yesterday, most of the hardware on my &lt;a href="http://www.komplett.co.uk/k/ki.asp?sku=323531"&gt;Abit AB9 pro&lt;/a&gt; motherboard was detected out of the box.&lt;br /&gt;However the ethernet controller, a Realtek 8111B, card was not detected.&lt;br /&gt;From &lt;b&gt;lspci&lt;/b&gt; I got &lt;b&gt;Realtek Semiconductor Co., Ltd. Unknown device 8168 (rev 01)&lt;/b&gt; and after a quick look in google I found &lt;a href="http://gentoo-wiki.com/HARDWARE_RTL8168"&gt;this&lt;/a&gt; article on how to get the card working. Worked great, just download, change the three &lt;b&gt;MODULE_PARM&lt;/b&gt; lines in the src to &lt;b&gt;MODULE_PARM_DESC&lt;/b&gt; and it compiles ok.&lt;br /&gt;&lt;br /&gt;A few notes on installing Linux on the AB9 motherboard though, a few thought from my experience. First of all, use a &lt;i&gt;very&lt;/i&gt; recent version of Linux. Ubuntu 6.10 worked for me and I'd expect &lt;a href="http://fedora.redhat.com/"&gt;Fedora Core&lt;/a&gt; 6 would work.&lt;br /&gt;Use the jmicron controller, not the ICH8R controller for the disk and optical drive.&lt;br /&gt;&lt;br /&gt;Another thing, which I think is just related to me not having used debian/ubuntu enough. After I partitioned my disk and create ext3 file systems using labels I was unable to mount using LABEL=foo, turns out I had to restart the udev service before they showed up. In CentOS, they just appear under the dev-mapper.&lt;br /&gt;&lt;br /&gt;I'm quite impressed on how good it looks on my LCD television. Even xvid files in HDTV resolution look great.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-4792360351575790456?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/4792360351575790456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=4792360351575790456' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4792360351575790456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/4792360351575790456'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/running-ubuntu-610-on-abit-ab9.html' title='Running Ubuntu 6.10 on Abit AB9'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-8125738119169418539</id><published>2006-10-06T08:34:00.000+01:00</published><updated>2006-10-06T08:35:44.254+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><title type='text'>Blog design updates</title><content type='html'>Joined the blogger &lt;a href="http://beta.blogger.com/"&gt;beta&lt;/a&gt; program yesterday which allowed me to do a few cool updates to the template of the blog.&lt;br /&gt;Note the "Latest Oracle downloads" RSS-feed and the labels amongst other things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-8125738119169418539?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/8125738119169418539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=8125738119169418539' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8125738119169418539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/8125738119169418539'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/blog-design-updates.html' title='Blog design updates'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-116008387479214968</id><published>2006-10-05T22:03:00.000+01:00</published><updated>2006-10-05T22:31:14.846+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Media Center 10g</title><content type='html'>I'm currently shopping around for a combined media center PC / Oracle test box, must be the first time someone tried to combine those two in one box. And the first time someone plan to hook up a Oracle server to a television set. But they, there is a first for everything.&lt;br /&gt;Currently looking at the new &lt;a href="http://www.intel.com/"&gt;Intel Core2&lt;/a&gt; processors. The 2.13GHz &lt;a href="http://www.komplett.co.uk/k/ki.asp?sku=322632"&gt;E6400&lt;/a&gt; seems to be the best value for money. I wouldn't mind the E6600 with 4Mb cache, but the extra £67 can probably be spent on something that adds more value to the system, like an extra SATA disk to distribute the IO load. Not sure if AMD AM2 processors are a valid option anymore? The new Intel 965/975 chipsets are probably not supported in &lt;a href="http://www.sun.com/software/solaris/"&gt;Solaris&lt;/a&gt;though, where as a Nforce chipset probably works gret. &lt;br /&gt;Found a quite decent looking case for the system as well, the &lt;a href="http://www.silverstonetek.com/products-lc17.htm"&gt;Silverstone LC17&lt;/a&gt;.&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/lc17.jpg"&gt;.&lt;br /&gt;I'll post a photo of sqlplus on a 32" LCD television once I buy the system. :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-116008387479214968?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/116008387479214968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=116008387479214968' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/116008387479214968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/116008387479214968'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/media-center-10g.html' title='Media Center 10g'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115990581229736243</id><published>2006-10-03T21:02:00.000+01:00</published><updated>2007-12-20T18:38:58.417Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Dell 9th generation servers</title><content type='html'>&lt;b&gt;Quick overview of Dells 9th generations rack-mount server line up&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It's been a couple of months now since &lt;a href="http://www.dell.com"&gt;Dell&lt;/a&gt; introduced the first machines in the new "9th generation" server line-up, the PowerEdge &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_1950"&gt;1950&lt;/a&gt;, &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_2950"&gt;2950&lt;/a&gt;, &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_2900"&gt;2900&lt;/a&gt; and the Blade &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_1955"&gt;1955&lt;/a&gt; all looked like quite nice machines, they can be fitted with the new DRAC/5 card and onboard PERC. &lt;br /&gt;And they have recently been accompanied by slightly simpler (and more cost effective) &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_sc1435"&gt;SC1435&lt;/a&gt; and the baby &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_860"&gt;860&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;All machines use the new generation &lt;a href="http://www.intel.com/"&gt;Intel&lt;/a&gt; processors (64-bit), FB-DIMM memory and SAS and/or SATA disk drives.&lt;br /&gt;I'm not going to go on about products specs and other sales crap, you can find all that on the Dell website. Just my view on the machines and what they are suitable for. Everything from using &lt;a href="http://www.centos.org/"&gt;Linux&lt;/a&gt; as the OS on the box. Solaris 10 is currently not confirmed as working, using 06/06 you still need a driver disk for the PERC card and ethernet is unsupported so you need a addon Intel PCI card to even make use of the server.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge 1950&lt;/b&gt;&lt;br /&gt;Nice 1U pizza box machine. I would use this as an application or web server, if you equip it with the 4 2.5" disk backplane you could possibly have a very small database on it. Disk I/O is very likely to be a bottle neck though. Hooking it up to a SAN is another option. Good layout of the internal components and the back connectors are easy to access. The PCIe slots are a bit limited in lenght, but then again there aren't many long cards available any more (anyone remember the old full lenght PCI raid cards?). Quite redundant with dual "most things".&lt;br /&gt;To summarize, a perfect box for a &lt;a href="http://httpd.apache.org"&gt;Apache HTTPd&lt;/a&gt; or &lt;a href="http://www.jboss.com/"&gt;Java app&lt;/a&gt; server.&lt;br /&gt;Starting price in a usable spec: $3437&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/1950back.png" alt="1950"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge 2950&lt;/b&gt;&lt;br /&gt;Pretty much the same machine as the 1950 but with more I/O. Six 3.5" drives or eight 2.5" drives. Decent small office file server, takes 1.8Tb internally (3Tb if you go SATA), room for extra Ethernet cards if you want to run iSCSI. Would also be a good "all in all" intranet server, put &lt;a href="http://www.postgresql.org"&gt;Postgres&lt;/a&gt;, PHP, &lt;a href="http://www.postfix.org/"&gt;Postifx&lt;/a&gt; and few other things on it. Or install a &lt;a href="http://www.zimbra.com/"&gt;Zimbra&lt;/a&gt; and use it as a e-mail server.&lt;br /&gt;Slap 8 2.5" drives in it and it is a nice decent DB server. If you team up a group of these and hook them up to a SAN they make great RAC-nodes. As the 1950 it is fairly redundant and can be trusted to work by itself for non-critical things.&lt;br /&gt;Starting price in a usable spec: $3757&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/2950front.png" alt="2950"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge 2900&lt;/b&gt;&lt;br /&gt;Not really a rack-mount box but it does come with a rackmount kit. Only included here as it is the only "one box solution" for larger installations such as a &lt;a href="http://www.oracle.com/"&gt;Oracle EE&lt;/a&gt;, mid-sized file server or even a large e-mail server. Takes up to 10 internal drives (8 + 2 cage), thats 3Tb with current SAS drives. Lots of PCIe I/O, six slots for HBAs and NICs. If you like virtualization it would make a great &lt;a href="http://www.vmware.com/"&gt;VMWare&lt;/a&gt; box, it takes an impressive 48Gb RAM (you don't want to see the price tag for this though).&lt;br /&gt;5U in a rack though, I hope you're not paying per U if you colocate it.&lt;br /&gt;Starting price in a usable spec: $4370&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/2900disk.png" alt="2900"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge 860&lt;/b&gt;&lt;br /&gt;This one I don't really understand. First of all, who came up with the name &lt;b&gt;860&lt;/b&gt;, it is clearly a &lt;b&gt;950&lt;/b&gt;. Second of all I don't really get where this box is meant to be used, the SC1435 is a better choice in 90% of all cases. The only advantage over the SC1435 is the fact that it has the normal kick ass DRAC/5 card as an option. It takes Celeron, Pentium D and Xeon 3000 series processors, I really *really* recommend against using a Celeron proc in anything that goes in a rack. &lt;br /&gt;Possible uses (if I have to) would be a DNS server, mail relay, basic web server or management server.&lt;br /&gt;Starting price in a usable spec: $1391&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge SC1435&lt;/b&gt;&lt;br /&gt;This little guy is not officially out yet, should be available in the comming weeks. The tower equivalent &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_sc1430"&gt;SC1430&lt;/a&gt; is currently available though. I must admit that this is probably one of my favorites in the line-up, not because it's a great flexible, highly redundant machine. But simply because it's cheap and gets the job done! No hot swap anything. This is probably the perfect app or web server for larger load balanced solutions. This is however an &lt;a href="http://www.amd.com/"&gt;AMD Opteron&lt;/a&gt; Socket-F server, &lt;b&gt;not a Intel&lt;/b&gt; as the other. Quite confusing to be honest. I would have hoped that Dell launched a completely new line for the opteron gear. &lt;br /&gt;I would not consider this box unless I was installing at least 4 (or possibly even 6) nodes for a single deployment. If they fail, you'll have a longer down time period than most other boxes since you probably have to get it out of the rack to service it. But it's cheap and just &lt;i&gt;get things done&lt;/i&gt;. I can imagine many &lt;a href="http://www.top500.org/"&gt;high performance computing&lt;/a&gt; farms rubbing their hands when they see this box, it's very suitable for a Linux beowulf cluster. &lt;br /&gt;You can read my review of the older &lt;a href="http://halisway.blogspot.com/2005/09/dell-poweredge-sc1425-review.html"&gt;SC1425&lt;/a&gt;.&lt;br /&gt;Starting price in a usable spec: $2900 (estimated)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Dell PowerEdge 1955&lt;/b&gt;&lt;br /&gt;The Blade server in the new family. Data processing, web servers, app servers and possibly other uses if you add the FC daughter card. Quite decent machines and as a 1855 admin I'm very pleased so far.&lt;br /&gt;One thing to remember though, the 1955/1855 chassis backplane is &lt;b&gt;not&lt;/b&gt; redunant, deploy in groups of two chassis and at least 8 servers to make them cost effective. Price excluding chassis, which usually comes in at about $3000 with redundant PSU's, DRAC, IP-KVM and a pair of switch modules.&lt;br /&gt;Starting price in usable spec: $2516&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Regarding the price, the starting list price on Dells website is unusable. One disk drive included, way to little RAM, no DRAC card etc. All machines have been speced out to a suitable minimal config for actuall deployment use with redundant PSU's, a PERC card, at least 2Gb RAM etc and Bronze NBD support. The size and usage of the box has also been considered, as an example the 2900 was fitted with six drives since it's main purpose is disk and I/O expandability.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update:&lt;/b&gt;&lt;br /&gt;For Solaris 10 support see &lt;a href="http://halisway.blogspot.com/2007/12/solaris-10-on-dell-poweredge-1950-and.html"&gt;this post&lt;/A&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115990581229736243?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115990581229736243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115990581229736243' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115990581229736243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115990581229736243'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/dell-9th-generation-servers.html' title='Dell 9th generation servers'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115973575727399117</id><published>2006-10-01T20:56:00.000+01:00</published><updated>2006-10-01T21:51:19.386+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opensolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='postgresql'/><title type='text'>PostgreSQL 8.2 hits beta</title><content type='html'>&lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; 8.2 hit beta other day.&lt;br /&gt;Just installed it in a Solaris zone on my laptop (you need a fairly recent Solaris Express release to use the a &lt;a href="http://pgfoundry.org/docman/view.php/1000163/230/PostgreSQL-DTrace-Users-Guide.pdf"&gt;dtrace [pdf]&lt;/a&gt; functionallity).&lt;br /&gt;A few new cool features.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;dtrace support in Solaris&lt;br /&gt;&lt;li&gt;Warm standby server support&lt;br /&gt;&lt;li&gt;CREATE INDEX without locking the table&lt;br /&gt;&lt;li&gt;Improved syntax of the config file, support for SI units (kilobyte, megabyte, hour etc)&lt;br /&gt;&lt;li&gt;Basic support for SQL 2003 analytical functions (I couldn't find &lt;b&gt;any&lt;/b&gt; docs about this).&lt;br /&gt;&lt;li&gt;Faster vacuuming&lt;br /&gt;&lt;li&gt;Improved WAL and log management&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Quite a lot of exciting stuff. Analytics could be fun and the speedups in WAL and logging could make a improvement for write intense operations, an area where postgres have been quite slowish in the past.&lt;br /&gt;&lt;br /&gt;Full list and downloads &lt;a href="http://www.postgresql.org/developer/beta"&gt;here&lt;/a&gt;. Cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115973575727399117?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115973575727399117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115973575727399117' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115973575727399117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115973575727399117'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/10/postgresql-82-hits-beta.html' title='PostgreSQL 8.2 hits beta'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115939082562399244</id><published>2006-09-27T21:33:00.000+01:00</published><updated>2006-09-29T22:21:32.500+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='sybase'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Rotating tables (and sybase)</title><content type='html'>Got a question on IRC today about the equivalent of &lt;a href="http://www.mysql.com/"&gt;MySQLs&lt;/a&gt; MAX_ROW setting on a table. The problem at hand was more specific. The table should always contain N number of rows, if a new row was inserted, the oldest should be deleted. I wrote this quick example to provide a possible solution.&lt;pre&gt;&lt;font color="blue"&gt;CREATE TABLE top10data (&lt;br /&gt;        id      NUMBER(2) NOT NULL,&lt;br /&gt;        name    VARCHAR2(20) NOT NULL&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;CREATE VIEW top10 AS&lt;br /&gt;        SELECT id,name FROM top10data;&lt;br /&gt;&lt;br /&gt;INSERT INTO top10data VALUES(1,'one');&lt;br /&gt;INSERT INTO top10data VALUES(2,'two');&lt;br /&gt;INSERT INTO top10data VALUES(3,'three');&lt;br /&gt;INSERT INTO top10data VALUES(4,'four');&lt;br /&gt;INSERT INTO top10data VALUES(5,'five');&lt;br /&gt;INSERT INTO top10data VALUES(6,'six');&lt;br /&gt;INSERT INTO top10data VALUES(7,'seven');&lt;br /&gt;INSERT INTO top10data VALUES(8,'eight');&lt;br /&gt;INSERT INTO top10data VALUES(9,'nine');&lt;br /&gt;INSERT INTO top10data VALUES(10,'ten');&lt;br /&gt;COMMIT;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- trigger on the view, catch the insert and &lt;br /&gt;-- do it on the actuall table&lt;/font&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER top10_trigger&lt;br /&gt;        INSTEAD OF INSERT ON top10 FOR EACH ROW&lt;br /&gt;BEGIN&lt;br /&gt;        UPDATE top10data SET id=id+1;&lt;br /&gt;        DELETE FROM top10data WHERE id&gt;10;&lt;br /&gt;        INSERT INTO top10data VALUES(1,:new.name);&lt;br /&gt;END top10_trigger;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- insert example, note that we insert on the view&lt;/font&gt;&lt;br /&gt;SQL&gt; select * from top10 order by id;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- --------------------&lt;br /&gt;         1 one&lt;br /&gt;         2 two&lt;br /&gt;         3 three&lt;br /&gt;         4 four&lt;br /&gt;         5 five&lt;br /&gt;         6 six&lt;br /&gt;         7 seven&lt;br /&gt;         8 eight&lt;br /&gt;         9 nine&lt;br /&gt;        10 ten&lt;br /&gt;&lt;br /&gt;10 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into top10(name) values('New one');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from top10 order by id;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- --------------------&lt;br /&gt;         1 New one&lt;br /&gt;         2 one&lt;br /&gt;         3 two&lt;br /&gt;         4 three&lt;br /&gt;         5 four&lt;br /&gt;         6 five&lt;br /&gt;         7 six&lt;br /&gt;         8 seven&lt;br /&gt;         9 eight&lt;br /&gt;        10 nine&lt;br /&gt;&lt;br /&gt;10 rows selected.&lt;br /&gt;&lt;/font&gt;&lt;/pre&gt;This solution may have some concurrency problems if it is heavly populated. To get around that problem you could use a sequence and increment the ID from the trigger and delete based on rank() of the numbers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;On another issue&lt;/b&gt;&lt;br /&gt;I've been working a bit with &lt;a href="http://www.sybase.com/"&gt;Sybase&lt;/a&gt; lately.&lt;br /&gt;To say the least, I do not like it.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The way it handles users, permissions and the "database owner" thing. &lt;i&gt;I don't like it.&lt;/i&gt;&lt;br /&gt;&lt;li&gt;Data space and log space, whats this about. Isn't it just better to define logs and a number of "data storage thingies" (why don't we call them tablespaces) for anyone to use. Why pre-assign space and devices to a database (schema'ish) . &lt;i&gt;I don't like it.&lt;/i&gt;&lt;br /&gt;&lt;li&gt;The structure of transaction logging and checkpointing. It just feels ancient. &lt;i&gt;I don't like it.&lt;/i&gt;&lt;br /&gt;&lt;li&gt;If you do a database dump on Solaris/SPARC and try to load it on a Linux/x86 machine you need to do a data conversion process thingie. Whats that about, sure big endian vs. small endian when using raw devices. But a dump should be universal. Sybase should forget about always working with plain raw devices (disk, tape etc) and allow people to actually make use of the file system provided. Besides if you want "endian less" raw devices just use a cds volume under vxvm. Transportable tablespaces anyone?&lt;i&gt; I don't like it.&lt;/i&gt;&lt;br /&gt;&lt;li&gt;The basic footprint is tiny compared to Oracle. The installation takes about 10 minutes and the sybase server uses about 40Mb of memory when you first start it up. So for a basic testing / dev database it is quite nice. &lt;i&gt;I &lt;b&gt;do&lt;/b&gt; like it.&lt;/i&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;And I've been messing around a bit with &lt;a href="http://www.ibm.com/"&gt;DB 2&lt;/a&gt; as well. I'm not sure I like it yet but it is miles better than Sybase. I'll have to think about that one for a while (and play with it a lot more).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115939082562399244?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115939082562399244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115939082562399244' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115939082562399244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115939082562399244'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/rotating-tables-and-sybase.html' title='Rotating tables (and sybase)'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115878320600947501</id><published>2006-09-20T21:07:00.000+01:00</published><updated>2006-09-20T21:13:26.050+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sun'/><category scheme='http://www.blogger.com/atom/ns#' term='hardware'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Update of updates</title><content type='html'>Another quickie update, nothing fun to report anyway. Been busy fighting &lt;a href="http://www.ibm.com/software/websphere/"&gt;WebSphere&lt;/a&gt; lately, trying to get decent performance on a &lt;a href="http://www.sun.com/coolthreads/t2000/"&gt;Sun T2000&lt;/a&gt; server. Out of the box performance was horrible. Websphere 5.1 is still far from satisfactory, I'm putting my hope on Websphere 6.0 now.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Updated Sun boxes:&lt;/b&gt;&lt;br /&gt;Sun finally decided to update the classic vXX0 range. Just a simple face lift to be honest, they still run the same range processors. The v440 has been replaced by the new &lt;a href="http://www.sun.com/servers/entry/v445/"&gt;v445&lt;/a&gt;, the v240 with the &lt;a href="http://www.sun.com/servers/entry/v245/"&gt;v245&lt;/a&gt; and the 1U v210 is replaced by the &lt;a href="http://www.sun.com/servers/entry/v215/"&gt;v215&lt;/a&gt;.&lt;br /&gt;The main two updates are the use of SAS drives and the addition of PCIe. Same basic features as the Galaxy and Niagra servers. They updated the chassi to &lt;a href="http://www.sun.com/aboutsun/media/bios/bios_bechtolsheim.html"&gt;Andys&lt;/a&gt; design.&lt;br /&gt;My favorite new feature is the fact that you can have twice as many drives in the &lt;a href="http://www.sun.com/servers/entry/v445/"&gt;v445&lt;/a&gt;. 8 SAS drives instead of the old 4 SCSI. Might even be usable as a Oracle server without external storage. Oh, one last thing. No Solaris 8 support, bad bad. Who uses Solaris 9 anyway?!&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/v445.jpg"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Oracle patch release:&lt;/b&gt;&lt;br /&gt;Patch release 9.2.0.8 is out, not much new. Bug fixes and a patch for the dreaded select-view-permission-hack security hole. I have tried applying it to both 9.2.0.4 and 9.2.0.6 machines without any hickups. 4547809 in &lt;a href="http://metalink.oracle.com"&gt;Metalink&lt;/a&gt; (now if Oracle would just make these patches available for anyone to download *sigh*).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Btw, I've switched to &lt;a href="http://www.kde.org/"&gt;KDE&lt;/a&gt; at work as well.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115878320600947501?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115878320600947501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115878320600947501' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115878320600947501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115878320600947501'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/update-of-updates.html' title='Update of updates'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115810247783212295</id><published>2006-09-12T23:51:00.000+01:00</published><updated>2006-09-13T00:07:58.013+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dell'/><category scheme='http://www.blogger.com/atom/ns#' term='opensolaris'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>KDE -  Not that krap after all</title><content type='html'>Ok, I've been quite "anti &lt;a href="http://www.kde.org/"&gt;KDE&lt;/a&gt;" the last few years, with good reason imo. The last time I tried KDE must have been around 2001 or 20002 and back then it wasn't that good.&lt;br /&gt;Now the other week my beloved &lt;a href="http://www.opensolaris.org/"&gt;OpenSolaris&lt;/a&gt; powered laptops hard drive failed on me. After I spend about a week moaning about it I finally got around to buying a new drive for it. Replace the old 30gb 4200rpm with a snappy 80gb 5400rpm drive (yes, the speed difference is really significant). Since I didn't have a recent &lt;a href="http://opensolaris.org/os/community/onnv/"&gt;Nevada&lt;/a&gt; build ready and was to lazy to download one I decided to install &lt;a href="http://www.kubuntu.org/"&gt;Kubuntu&lt;/a&gt; instead, got a free CD at an event the other day. Simple install as always with &lt;a href="http://www.ubuntu.org/"&gt;Ubuntu&lt;/a&gt;. Even the widescreen res on my laptop worked out of the box. Easy setup, did the usuall apt-get install oracle-xe, install &lt;a href="http://www.postgresql.org/"&gt;postgres&lt;/a&gt;.&lt;br /&gt;Then I realized I really lliked using KDE, things where so much easier than &lt;a href="http://www.gnomeo.org/"&gt;GNOME&lt;/a&gt;. KDE has probably got less features, but it &lt;i&gt;just works&lt;/i&gt;. The integration between the applications is great, the little IM client &lt;a href="http://kopete.kde.org/"&gt;Kopete&lt;/a&gt; is much nicer than gaim. KDE seems to use less memory than GNOME as well. Oh well, I saved disk space for Solaris and will probably install that as soon as I get around to downloading a recent version. Nevada B48 should be out any day now.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://halisway.hifichoice.com/screenshot_kde1.png"&gt;&lt;img src="http://halisway.hifichoice.com/screenshot_kde1_thumb.png"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115810247783212295?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115810247783212295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115810247783212295' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115810247783212295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115810247783212295'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/kde-not-that-krap-after-all.html' title='KDE -  Not that krap after all'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115771736057909811</id><published>2006-09-08T12:52:00.000+01:00</published><updated>2006-09-08T13:09:20.606+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Fancy group by rollup example</title><content type='html'>Played around with &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2182483"&gt;group by rollup&lt;/a&gt; today and thought I'd post a little example.&lt;br /&gt;&lt;br /&gt;Let's look at the basic usage of the rollup clause&lt;pre&gt;&lt;font color="blue"&gt;select&lt;br /&gt;  deptno,&lt;br /&gt;  ename,&lt;br /&gt;  sum(sal) sal from emp&lt;br /&gt;  group by rollup (deptno,ename)&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Here's the output from sqlplus&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;   DEPTNO ENAME             SAL&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;        10 KING             5000&lt;br /&gt;        10 CLARK            2450&lt;br /&gt;        10 MILLER           1300&lt;br /&gt;        10                  8750&lt;br /&gt;        20 FORD             3000&lt;br /&gt;        20 ADAMS            1100&lt;br /&gt;        20 JONES            2975&lt;br /&gt;        20 SCOTT            3000&lt;br /&gt;        20 SMITH             800&lt;br /&gt;        20                 10875&lt;br /&gt;        30 WARD             1250&lt;br /&gt;        30 ALLEN            1600&lt;br /&gt;        30 BLAKE            2850&lt;br /&gt;        30 JAMES             950&lt;br /&gt;        30 MARTIN           1250&lt;br /&gt;        30 TURNER           1500&lt;br /&gt;        30                  9400&lt;br /&gt;                           29025&lt;br /&gt;&lt;br /&gt;18 rows selected.&lt;/font&gt;&lt;/pre&gt;Ok, thats all well and cool. Oracle sums up the previous rows when the group by condition change, which in our case is for each individual and for the department. When a rollup happens all "non rolled up" columns are returned as nulls as shown in the above example. Notice the last row which has sum of all employees and hence nulls are returned for the two rollup columns.&lt;br /&gt;You probably want to label the rows instead of the nulls with something more usefull, like a small "Sum" descriptor or something. As usuall, decode() is our friend.&lt;br /&gt;Example with pretty labels:&lt;pre&gt;&lt;font color="blue"&gt;with empt as&lt;br /&gt;(&lt;font color="green"&gt;&lt;br /&gt;  select&lt;br /&gt;  deptno,&lt;br /&gt;  ename,&lt;br /&gt;  sum(sal) sal from emp&lt;br /&gt;  group by rollup (deptno,ename)&lt;/font&gt;&lt;br /&gt;)&lt;br /&gt;select deptno,&lt;br /&gt;  decode(ename,&lt;br /&gt;    null,&lt;br /&gt;    decode(rownum,count(*) over (),'TOTAL SUM','DEPT SUM'),&lt;br /&gt;    ename) ename,&lt;br /&gt;  sal&lt;br /&gt;from empt&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- And the output from sqlplus&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    DEPTNO ENAME             SAL&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;        10 CLARK            2450&lt;br /&gt;        10 KING             5000&lt;br /&gt;        10 MILLER           1300&lt;br /&gt;        10 DEPT SUM         8750&lt;br /&gt;        20 ADAMS            1100&lt;br /&gt;        20 FORD             3000&lt;br /&gt;        20 JONES            2975&lt;br /&gt;        20 SCOTT            3000&lt;br /&gt;        20 SMITH             800&lt;br /&gt;        20 DEPT SUM        10875&lt;br /&gt;        30 ALLEN            1600&lt;br /&gt;        30 BLAKE            2850&lt;br /&gt;        30 JAMES             950&lt;br /&gt;        30 MARTIN           1250&lt;br /&gt;        30 TURNER           1500&lt;br /&gt;        30 WARD             1250&lt;br /&gt;        30 DEPT SUM         9400&lt;br /&gt;           TOTAL SUM       29025&lt;br /&gt;&lt;br /&gt;18 rows selected.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Cool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115771736057909811?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115771736057909811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115771736057909811' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115771736057909811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115771736057909811'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/fancy-group-by-rollup-example.html' title='Fancy group by rollup example'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115756050396175287</id><published>2006-09-06T17:21:00.000+01:00</published><updated>2006-09-06T23:36:37.386+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Sending SMS from Oracle (abuse warning)</title><content type='html'>Ok, this post is mostly to annoy people who think stuff like this should be done from the application layer. I do agree with them but these things &lt;b&gt;can&lt;/b&gt; done from the db layer as well.&lt;br /&gt;Anyway, here is a little code sniplet to send a SMS text message from the database just using a insert statement. The SMS provider we use at work for basic &lt;a href="http://www.nagios.org/"&gt;Nagios&lt;/a&gt; alerts and stuff like that is &lt;a href="http://sign-up.to"&gt;Sign.Up To&lt;/a&gt;, cheap and quite reliable (they did have some downtime yesterday though). To send the actually message we use a trigger which in turn calls the quite handy (and abusive) dbms package &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_http.htm#sthref14275"&gt;utl_http&lt;/a&gt;, utl_http works in Oracle 8 and up (including XE). &lt;br /&gt;If you haven't got utl_http installed you can do so by running the two scripts &lt;b&gt;?/rdbms/admin/utlhttp.sql&lt;/b&gt; and &lt;b&gt;?/rdbms/admin/prvthttp.plb&lt;/b&gt; as sysdba on the server. The response you get back is either a message id or the keyword "fail" if the message fails for some reason, the trigger simply catch that message and store it a table.&lt;br /&gt;This code is just proof of concept and should not be used for anything "real", no error handeling or input checking. It just sends off the data to the message aggregator. And it can't handle any fancy characters in the message nor spaces. You can easily implement basic URL encoding using &lt;a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:10444643777538"&gt;this&lt;/a&gt; function written by Tome Kyte.&lt;pre&gt;&lt;font color="blue"&gt;create table smslog (&lt;br /&gt;        sms_id number(8),&lt;br /&gt;        smsno varchar2(18) not null,&lt;br /&gt;        message varchar2(160) not null,&lt;br /&gt;        status varchar2(150),&lt;br /&gt;        sendtime date&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;alter table smslog add constraint&lt;br /&gt;  smslog_pk primary key (sms_id);&lt;br /&gt;&lt;br /&gt;create sequence smslog_pk_seq;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER smslog_insert_trigger&lt;br /&gt;  BEFORE INSERT ON smslog FOR EACH ROW&lt;br /&gt;DECLARE&lt;br /&gt;  req   UTL_HTTP.REQ;&lt;br /&gt;  resp  UTL_HTTP.RESP;&lt;br /&gt;  val   VARCHAR2(2000);&lt;br /&gt;  url   VARCHAR2(300);&lt;br /&gt;BEGIN&lt;br /&gt;  url := 'http://sms.sign-up.to/smpp_send.php?username=username&amp;from=oracle&amp;&lt;br /&gt;account=account_no&amp;password=yourpassword&amp;&lt;br /&gt;message='||:new.message||'&amp;to='||:new.smsno;&lt;br /&gt;  req := UTL_HTTP.BEGIN_REQUEST(url);&lt;br /&gt;  UTL_HTTP.SET_HEADER(req, 'User-Agent', 'Mozilla/4.0 Oracle');&lt;br /&gt;  resp := UTL_HTTP.GET_RESPONSE(req);&lt;br /&gt;  UTL_HTTP.READ_LINE(resp, val, TRUE);&lt;br /&gt;  UTL_HTTP.END_RESPONSE(resp);&lt;br /&gt;  :new.status := val;&lt;br /&gt;  :new.sendtime := sysdate;&lt;br /&gt;  SELECT smslog_pk_seq.nextval INTO :new.sms_id FROM dual;&lt;br /&gt;END smslog_insert_trigger;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- And a sample sent message.&lt;/font&lt;br /&gt;SQL&gt; insert into smslog(message,smsno) &lt;br /&gt;  2  values('Eat_more_fruit','4479697xxxxx');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from smslog;&lt;br /&gt;&lt;br /&gt; SMS_ID SMSNO           MESSAGE              STATUS        SENDTIME&lt;br /&gt;------- --------------- -------------------- ------------- ---------&lt;br /&gt;      1 4479697xxxxx    Eat_more_fruit       3211821       06-SEP-06&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115756050396175287?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115756050396175287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115756050396175287' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115756050396175287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115756050396175287'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/sending-sms-from-oracle-abuse-warning.html' title='Sending SMS from Oracle (abuse warning)'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115740769468084475</id><published>2006-09-04T22:49:00.000+01:00</published><updated>2006-09-04T23:08:14.776+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><title type='text'>NFS locking issues</title><content type='html'>Been quite busy at work, decommissioning some old servers.&lt;br /&gt;We are trying to get rid of everything pre RHEL/CentOS 3.x. After buying a new shiny file server for our home directories (a Dell 2850 with lots of cheap disk space) I ran in to some very weird problems. Everything worked fine at first, I myself (as a &lt;a href="http://www.xfce.org/"&gt;XFCE&lt;/a&gt; user) didn’t have any problems at all, but our GNOME users ran it some serious problems. When logging in to GNOME the desktop did not start properly, gnome-panel looked like a grey bar without any tools and the desktop menu didn’t appear on right click. Simply, nothing in GNOME worked. Not in Centos, not in Fedora, not even JDS in Solaris worked.&lt;br /&gt;After installing the GNOME debuginfo packages for Linux it appeared to be some weird NFS locking problem (haven’t we all hear that one before) in gconfd. NLM auth lock calls got denied. Hard to troubleshoot why and how at the time, we simply remounted the NFS shared with the &lt;a href="http://www.die.net/doc/linux/man/man8/mount.8.html"&gt;nolock&lt;/a&gt; mount option in Linux and the sort of undocumented mount option &lt;a href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqa6?a=view"&gt;llock&lt;/a&gt; in Solaris.&lt;br /&gt;NFSv3 is just a mostly irritating patch work of addons, statd, lockd etc etc.&lt;br /&gt;Hate NFSv3, why didn’t I include a NFSv4 migration while we where at it.&lt;br /&gt;The nolock "hack" will have to do for now, I’ll will try to troubleshoot the problem later on. &lt;br /&gt;&lt;br /&gt;fstab line in Linux:&lt;font color="blue"&gt;&lt;pre&gt;fs1:/export/home  /export/home nfs rsize=16384,wsize=16384,intr,nolock&lt;/pre&gt;&lt;/font&gt;I'll try to post some rather interesting Oracle 10gR2 &lt;a href="http://www.sun.com/servers/coolthreads/t2000/"&gt;Sun Fire T200&lt;/a&gt; server benchmarks later on this week. I've found a rather good benchmarking tool called &lt;a href="http://www.dominicgiles.com/swingbench.php"&gt;Swingbench&lt;/a&gt;. Written in Java and easy to use. It comes with a data loading utility to populate the database with nice bogus data and then has a few tools to simulate different workloads.&lt;br /&gt;Been reading a lot about file system tuning recently as well, ext3 tuning parameters and Oracles &lt;b&gt;filesystemio_options&lt;/b&gt; parameter, need to dig up a good test box for that so I can evaluate the options. My current two disk machine doesn't cut it for I/O load testing.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Finally a quick movie recommendation.&lt;/b&gt;&lt;br /&gt;Bought a new &lt;a href="http://www.amazon.co.uk/Samsung-Definition-Freeview-LE32R74BDX-XEU/dp/B000F4TC3C"&gt;LCD TV&lt;/a&gt; the other day so I've been overindulging in movies recently.&lt;br /&gt;&lt;a href="http://www.amazon.co.uk/V-Vendetta-Natalie-Portman/dp/B000B83Z4O"&gt;&lt;img src="http://images.amazon.com/images/P/B000B83Z4O.01._SS500_SCLZZZZZZZ_V51374732_.jpg"  width="350" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And a big thanks to Lukas Smith for sending me a few DVDs from my &lt;a href="http://www.amazon.co.uk/gp/registry/2DVDSUWWE98ZD"&gt;wish list&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115740769468084475?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115740769468084475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115740769468084475' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115740769468084475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115740769468084475'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/09/nfs-locking-issues.html' title='NFS locking issues'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115650147511920389</id><published>2006-08-25T11:10:00.000+01:00</published><updated>2006-08-25T11:26:46.483+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Oracle dates diffs using analytics</title><content type='html'>Simple little analytical query to find out the difference between two dates on adjecent rows in oracle using the lead analytical function lead() fetches the value from the &lt;b&gt;next&lt;/b&gt; row in the resultset, you can use lag() to find the &lt;b&gt;previous&lt;/b&gt; row.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; select * from leadtest;&lt;br /&gt;&lt;br /&gt;        ID TAG        STAMP&lt;br /&gt;---------- ---------- ---------&lt;br /&gt;         1 dog        05-JAN-06&lt;br /&gt;         2 dog        05-MAY-06&lt;br /&gt;         3 dog        05-SEP-06&lt;br /&gt;         4 cat        05-APR-06&lt;br /&gt;         5 cat        28-APR-06&lt;br /&gt;         6 cat        28-SEP-06&lt;br /&gt;         7 cat        28-OCT-06&lt;br /&gt;&lt;br /&gt;7 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; with t as&lt;br /&gt;  2  (&lt;br /&gt;  3    select&lt;br /&gt;  4      tag,&lt;br /&gt;  5      stamp,&lt;br /&gt;  6      lead(stamp,1,stamp) over &lt;br /&gt;  7        (partition by tag order by stamp) stamp2&lt;br /&gt;  8    from&lt;br /&gt;  9      leadtest&lt;br /&gt;  10  )&lt;br /&gt;  11    select tag, stamp, stamp2, stamp2 - stamp diff from t&lt;br /&gt;  12 /&lt;br /&gt;&lt;br /&gt;TAG        STAMP     STAMP2          DIFF&lt;br /&gt;---------- --------- --------- ----------&lt;br /&gt;cat        05-APR-06 28-APR-06         23&lt;br /&gt;cat        28-APR-06 28-SEP-06        153&lt;br /&gt;cat        28-SEP-06 28-OCT-06         30&lt;br /&gt;cat        28-OCT-06 28-OCT-06          0&lt;br /&gt;dog        05-JAN-06 05-MAY-06        120&lt;br /&gt;dog        05-MAY-06 05-SEP-06        123&lt;br /&gt;dog        05-SEP-06 05-SEP-06          0&lt;br /&gt;&lt;br /&gt;7 rows selected.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Lets try lag() as well.&lt;/font&gt;&lt;br /&gt;SQL&gt; with t as&lt;br /&gt;  2  (&lt;br /&gt;  3    select&lt;br /&gt;  4      tag,&lt;br /&gt;  5      stamp,&lt;br /&gt;  6      lag(stamp,1,stamp) over &lt;br /&gt;  7        (partition by tag order by stamp) stamp2&lt;br /&gt;  8    from&lt;br /&gt;  9      leadtest&lt;br /&gt;  10  )&lt;br /&gt;  11    select tag, stamp, stamp2, stamp - stamp2 diff from t&lt;br /&gt;  12 /&lt;br /&gt;&lt;br /&gt;TAG        STAMP     STAMP2          DIFF&lt;br /&gt;---------- --------- --------- ----------&lt;br /&gt;cat        05-APR-06 05-APR-06          0&lt;br /&gt;cat        28-APR-06 05-APR-06         23&lt;br /&gt;cat        28-SEP-06 28-APR-06        153&lt;br /&gt;cat        28-OCT-06 28-SEP-06         30&lt;br /&gt;dog        05-JAN-06 05-JAN-06          0&lt;br /&gt;dog        05-MAY-06 05-JAN-06        120&lt;br /&gt;dog        05-SEP-06 05-MAY-06        123&lt;br /&gt;&lt;br /&gt;7 rows selected.&lt;/pre&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115650147511920389?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115650147511920389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115650147511920389' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115650147511920389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115650147511920389'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/08/oracle-dates-diffs-using-analytics.html' title='Oracle dates diffs using analytics'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115628772002358107</id><published>2006-08-22T23:58:00.000+01:00</published><updated>2006-08-23T00:02:54.126+01:00</updated><title type='text'>And there was Oracle</title><content type='html'>Found a cool link on the oracle-l mailing list to a guy running Oracle 4.1 under DOS. :)&lt;br /&gt;Geeky indeed.&lt;br /&gt;Can't say I remember UFI (previous version of sqlplus), since I was a toddler when it was released. At least they had scott/tiger.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://technology.amis.nl/blog/wp-content/images/subselect.jpg" width="400"&gt;&lt;br /&gt;&lt;br /&gt;Check the video &lt;a href="http://technology.amis.nl/blog/?p=1127"&gt;http://technology.amis.nl/blog/?p=1127&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115628772002358107?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115628772002358107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115628772002358107' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115628772002358107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115628772002358107'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/08/and-there-was-oracle.html' title='And there was Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115549420561894521</id><published>2006-08-13T19:22:00.000+01:00</published><updated>2006-11-21T14:24:13.505Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Using Oracle Workspaces</title><content type='html'>Say the thing we can't do with versioning in Oracle. One really useful feature I often use for day to day stuff is workspaces. A workspace is an independent space where you can play with a table (or a whole bunch of tables) before you actually decide you want your new data to be the live data. Inside a workspace you can commit and rollback data without affecting any other workspace. Even though one should always test and prepare any work on a staging system it can be reassuring not to actually modify a live table without knowing how it will look. You can have almost unlimited numbers of workspaces and even have child workspaces to a parent. You can even do DDL operations. The workspace for the live data is simply called LIVE (in caps).&lt;br /&gt;Let's do a little test.&lt;pre&gt;&lt;font color="blue"&gt;&lt;font color="green"&gt;-- Lets begin with enabling versioning &lt;br /&gt;-- and creating the new workspace&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.enableversioning('t1');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.createworkspace('test');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Don't forget to actually switch to your new ws&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.gotoworkspace('test');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;HALI@spinner1&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- ----------&lt;br /&gt;         1 test&lt;br /&gt;         2 test2&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Ok, lets update the table and insert a new row&lt;/font&gt;&lt;br /&gt;OPS$HLINDEN@spinner1&gt; insert into t1(id,name) values(3,'test 3');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@spinner1&gt; update t1 set name='test 2' where id=2;&lt;br /&gt;&lt;br /&gt;1 row updated.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Note that we actually &lt;b&gt;commit&lt;/b&gt; the data.&lt;/font&gt;&lt;br /&gt;OPS$HLINDEN@spinner1&gt; commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;HALI@spinner1&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- ----------&lt;br /&gt;         1 test&lt;br /&gt;         2 test 2&lt;br /&gt;         3 test 3&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Now we switch bake to the LIVE data.&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.gotoworkspace('LIVE');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- And the live data is unchanged at this point.&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- ----------&lt;br /&gt;         1 test&lt;br /&gt;         2 test2&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- But we are happy with our updated data and want&lt;br /&gt;-- our changed to be the added to the live workspace.&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.mergetable('test','t1');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;HALI@spinner1&gt; select * from t1;&lt;br /&gt;&lt;br /&gt;        ID NAME&lt;br /&gt;---------- ----------&lt;br /&gt;         1 test&lt;br /&gt;         2 test 2&lt;br /&gt;         3 test 3&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;-- Don't forget to clean up after the operation.&lt;/font&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.removeworkspace('test');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;HALI@spinner1&gt; exec dbms_wm.disableversioning('t1');&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;/pre&gt;&lt;/font&gt;Read the &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_intro.htm"&gt;Oracle documentation for workspaces&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115549420561894521?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115549420561894521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115549420561894521' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115549420561894521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115549420561894521'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/08/using-oracle-workspaces.html' title='Using Oracle Workspaces'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115486283689322568</id><published>2006-08-06T11:23:00.000+01:00</published><updated>2006-08-09T09:58:55.146+01:00</updated><title type='text'>New JBoss platform</title><content type='html'>I'm currently in the process of evaluating a new &lt;a href="http://www.jboss.com/"&gt;JBoss&lt;/a&gt; platform for our company. A few months this would have been a quite simple task. But now with the new Intel Xeon 5100 "Woodcrest" processors on the market, it's a new ballgame.&lt;br /&gt;The three different platforms I'm researching at the moment are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Sun &lt;a href="http://www.sun.com/servers/entry/x4100/"&gt;X4100&lt;/a&gt; running Solaris 10&lt;br /&gt; &lt;li&gt;Sun &lt;a href="http://www.sun.com/servers/coolthreads/t1000/"&gt;T1000&lt;/a&gt; running Solaris 10&lt;br /&gt; &lt;li&gt;Dell &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_1950"&gt;PowerEdge 1950&lt;/a&gt; running CentOS 4&lt;br /&gt;&lt;/ul&gt;My previous choice would have been the X4100 without question, the price/performance is good and it's a sort of common platform that can be used for other tasks as well if our needs would change.&lt;br /&gt;Sun recently introduced a dual SAS disk kit for the T1000, which actually makes it usable as an app server, price wise it is &lt;i&gt;slightly&lt;/i&gt; pricey (the 2x72Gb SAS kit is about 650GBP (1000USD)), and it's single PSU. The T2000 would have been a better choice but the cost is simly to high. The biggest benefit it gives is it's top speed with huge amounts of threads and the fact it runs Solaris. We're quite likely to run several Jboss instances on these boxes so running these in Solaris containers is quite a good benefit.&lt;br /&gt;I presume most people have seen the amazing Intel benchmarks of the 5100-series CPU's. It just flies. Trust me here, I know a lot of you probably hate dell kit, but the Dell "9-series" is pretty darn good. Pretty decent remote management with the new DRAC/5 card (it is in fact better than the LOM in the galaxy line (X4100 etc)).&lt;br /&gt;&lt;br /&gt;Quick summary (for midspec machines with 8Gb RAM, procs as listed and max number of 72Gb SAS disks and an extra dual port NIC in the 1950):&lt;table bgcolor="#F0F0FF" border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;Sun X4100&lt;/td&gt;&lt;td&gt;Sun T1000&lt;/td&gt;&lt;td&gt;Dell 1950&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt; &lt;tr&gt;&lt;td&gt;Processor&lt;/td&gt;&lt;td&gt;Dual AMD 280 4-cores&lt;/td&gt;&lt;td&gt;SPARC T1 8-cores&lt;/td&gt;&lt;td&gt;Dual Intel Xeon 5130 4-cores&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Max memory&lt;/td&gt;&lt;td&gt;16Gb&lt;/td&gt;&lt;td&gt;16Gb&lt;/td&gt;&lt;td&gt;32Gb&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Disks&lt;/td&gt;&lt;td&gt;4x SAS&lt;/td&gt;&lt;td&gt;2x SAS&lt;/td&gt;&lt;td&gt;4x SAS or 2x SATA&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;NIC&lt;/td&gt;&lt;td&gt;4x GIG&lt;/td&gt;&lt;td&gt;4x GIG&lt;/td&gt;&lt;td&gt;2x GIG&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;PCI&lt;/td&gt;&lt;td&gt;2 PCIe&lt;/td&gt;&lt;td&gt;1 PCI&lt;/td&gt;&lt;td&gt;2 PCIe or PCI-x&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;PSU&lt;/td&gt;&lt;td&gt;Dual&lt;/td&gt;&lt;td&gt;Single&lt;/td&gt;&lt;td&gt;Dual&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Unit cost&lt;/td&gt;&lt;td&gt;£4500&lt;/td&gt;&lt;td&gt;£6000&lt;/td&gt;&lt;td&gt;£3850&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Support pa&lt;/td&gt;&lt;td&gt;£420&lt;/td&gt;&lt;td&gt;£850&lt;/td&gt;&lt;td&gt;£110&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;3yr cost&lt;/td&gt;&lt;td&gt;&lt;b&gt;£5760&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;£8550&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;£4130&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;I'll post my decision when I make it. I have to say I'm leaning towards Dell at the moment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115486283689322568?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115486283689322568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115486283689322568' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115486283689322568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115486283689322568'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/08/new-jboss-platform.html' title='New JBoss platform'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115471055787389948</id><published>2006-08-04T17:44:00.000+01:00</published><updated>2006-08-04T17:55:57.940+01:00</updated><title type='text'>Oracle group_concat() updated (again)</title><content type='html'>I've ranted about this twice before. The mysql group_concat() equivalent in Oracle has in the past been quite problematic query.&lt;br /&gt;We found a quite good solution a while back and after checking Tom Kytes &lt;a href="http://tkyte.blogspot.com"&gt;blog&lt;/a&gt; I found a even better solution today.&lt;br /&gt;This is mighty impressive SQL code, very simple functions but used in a very clever way.&lt;br /&gt;&lt;br /&gt;Have a peek.&lt;br /&gt;&lt;pre&gt;&lt;span style="color:blue;"&gt;with data&lt;br /&gt; as&lt;br /&gt; (&lt;br /&gt;  select job,&lt;br /&gt;    ename,&lt;br /&gt;    row_number() over (partition by job order by ename) rn,&lt;br /&gt;    count(*) over (partition by job) cnt&lt;br /&gt;  from emp&lt;br /&gt; )&lt;br /&gt; select job, ltrim(sys_connect_by_path(ename,','),',') scbp&lt;br /&gt;  from data&lt;br /&gt;  where rn = cnt&lt;br /&gt;  start with rn = 1&lt;br /&gt;  connect by prior job = job and prior rn = rn-1&lt;br /&gt;  order by job&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;JOB       SCBP&lt;br /&gt;--------- ----------------------------------------&lt;br /&gt;ANALYST   FORD,SCOTT&lt;br /&gt;CLERK     ADAMS,JAMES,MILLER,SMITH&lt;br /&gt;MANAGER   BLAKE,CLARK,JONES&lt;br /&gt;PRESIDENT KING&lt;br /&gt;SALESMAN  ALLEN,MARTIN,TURNER,WARD&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;How cool is that, nothing extra to the query! Just beautiful use of the analytical functions.&lt;br /&gt;&lt;br /&gt;Full TK post over &lt;a href="http://tkyte.blogspot.com/2006/08/evolution.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115471055787389948?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115471055787389948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115471055787389948' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115471055787389948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115471055787389948'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/08/oracle-groupconcat-updated-again.html' title='Oracle group_concat() updated (again)'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115338800599196085</id><published>2006-07-20T10:26:00.000+01:00</published><updated>2006-07-20T10:38:25.670+01:00</updated><title type='text'>Fabric 7 servers</title><content type='html'>Found this very cool new server vendor called &lt;a href="http://www.fabric7.com/"&gt;Fabric 7&lt;/a&gt;.&lt;br /&gt;The thing that sets them aside from other vendors is that they actually have something new to offer, they recently introduced their first products, the &lt;a href="http://www.fabric7.com/products_q80.php"&gt;Q80&lt;/a&gt; and Q160, to the market. AMD Opteron servers, we've all seem those before and know that's about.&lt;br /&gt;&lt;img src="http://www.fabric7.com/_img/_products/q80.gif"&gt;&lt;br /&gt;&lt;br /&gt;Here's the cool part, they support hardware level partitioning. Similar functionality you get in a Sun Fire 2900 and up system. You can cut up the box in four domain, run VMWare in on, Solaris 10 two and Windows in the forth. Sure you could probaly do all that in VMWare, but in some cases you need dedicated hardware for a project. A basic system with 4 single-core processors and 8Gb RAM starts a $29k. Not a great price when comparing to the Sun &lt;a href="http://www.sun.com/servers/x64/x4600/"&gt;x4600&lt;/a&gt; which starts at $26k for a 4 dual-core system with 16Gb RAM. They do however come in at about the same price for a 8 dual-core system with 32Gb RAM. &lt;i&gt;These are list prices, haggeling is up to you.&lt;/i&gt;&lt;br /&gt;&lt;img src="http://www.fabric7.com/_img/q80_arch.jpg"&gt;&lt;br /&gt;This can be a very interesting company in the future. I wouldn't be suprised if one of the big fours try to acquire &lt;a href="http://www.fabric7.com/"&gt;Fabric 7&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115338800599196085?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115338800599196085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115338800599196085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115338800599196085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115338800599196085'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/fabric-7-servers.html' title='Fabric 7 servers'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115325074931751363</id><published>2006-07-18T20:19:00.000+01:00</published><updated>2006-07-18T20:25:49.370+01:00</updated><title type='text'>It's HOT!</title><content type='html'>Been quite slack with the blogging lately.&lt;br /&gt;First of all, it's &lt;a href="http://www.bbc.co.uk/weather/5day_f.shtml?world=0008"&gt;freakin' hot&lt;/a&gt; in London at the moment. 35C tomorrow (95F).&lt;br /&gt;Second of all I'm in the middle of moving to a new flat in east London, about 3 minutes away from &lt;a href="http://en.wikipedia.org/wiki/London_Bridge"&gt;London bridge&lt;/a&gt;.&lt;br /&gt;And lastly I've I'm still quite busy at work, migrating lots of services to new hardware. Batteling with &lt;a href="http://www.microsoft.com/servers/default.mspx"&gt;Windows server&lt;/a&gt; for the first time in a year or so.&lt;br /&gt;&lt;br /&gt;The only thing that keeps my mood up is the new cool and freshing "frappe" from &lt;a href="http://www.caffenero.com/"&gt;Caffe Nero&lt;/a&gt;. I prefer the mint flavored one. Yummy!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.caffenero.com/NeroFood.asp?Section=ColdDrinks"&gt;&lt;img src="http://www.caffenero.com/images/imgPhoto19.jpg"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115325074931751363?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115325074931751363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115325074931751363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115325074931751363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115325074931751363'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/its-hot.html' title='It&apos;s HOT!'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115280094703662052</id><published>2006-07-13T15:13:00.000+01:00</published><updated>2006-07-13T15:29:07.266+01:00</updated><title type='text'>Solaris 10 06/06 on Dell PE 1855 blades</title><content type='html'>Just installed Solaris 10 06/06 on a Dell PowerEdge 1855 blade.&lt;br /&gt;Everything worked out of the box. Drivers for the raidcard, ethernet etc. was all included.&lt;br /&gt;I just mounted the ISO image in the virtual media interface in the remote management DRAC card and ran the manual installer as usual. Default BIOS settings, except that I disable hyperthreading to get better performance.&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;root@juliet:[etc]$ psrinfo -v&lt;br /&gt;Status of virtual processor 0 as of: 07/13/2006 15:07:14&lt;br /&gt;  on-line since 07/13/2006 14:18:56.&lt;br /&gt;  The i386 processor operates at 3200 MHz,&lt;br /&gt;        and has an i387 compatible floating point processor.&lt;br /&gt;Status of virtual processor 1 as of: 07/13/2006 15:07:14&lt;br /&gt;  on-line since 07/13/2006 14:19:02.&lt;br /&gt;  The i386 processor operates at 3200 MHz,&lt;br /&gt;        and has an i387 compatible floating point processor.&lt;br /&gt;root@juliet:[etc]$ isainfo -v&lt;br /&gt;64-bit amd64 applications&lt;br /&gt;        mon sse3 sse2 sse fxsr mmx cmov amd_sysc cx8 tsc fpu&lt;br /&gt;32-bit i386 applications&lt;br /&gt;        mon sse3 sse2 sse fxsr mmx cmov sep cx8 tsc fpu&lt;br /&gt;root@juliet:[etc]$ prtdiag&lt;br /&gt;System Configuration: Dell Computer Corporation PowerEdge 1855&lt;br /&gt;BIOS Configuration: Dell Computer Corporation A04 08/24/2005&lt;br /&gt;BMC Configuration: IPMI 1.5 (KCS: Keyboard Controller Style)&lt;br /&gt;&lt;br /&gt;==== Processor Sockets ====================================&lt;br /&gt;&lt;br /&gt;Version                          Location Tag&lt;br /&gt;-------------------------------- --------------------------&lt;br /&gt;Intel Xeon                       PROC_1&lt;br /&gt;Intel Xeon                       PROC_2&lt;br /&gt;&lt;br /&gt;==== Memory Device Sockets ================================&lt;br /&gt;&lt;br /&gt;Type    Status Set Device Locator      Bank Locator&lt;br /&gt;------- ------ --- ------------------- --------------------&lt;br /&gt;DDR2    in use 1   DIMM1_A&lt;br /&gt;DDR2    in use 1   DIMM1_B&lt;br /&gt;DDR2    empty  2   DIMM2_A&lt;br /&gt;DDR2    empty  2   DIMM2_B&lt;br /&gt;DDR2    empty  3   DIMM3_A&lt;br /&gt;DDR2    empty  3   DIMM3_B&lt;br /&gt;&lt;br /&gt;==== On-Board Devices =====================================&lt;br /&gt;LSI Logic 53C1020 Ultra 320 SCSI&lt;br /&gt;ATI RADEON 7000 PCI Video&lt;br /&gt;Intel 82546GB Gigabit Ethernet&lt;br /&gt;Intel 82546GB Gigabit Ethernet&lt;br /&gt;&lt;br /&gt;==== Upgradeable Slots ====================================&lt;br /&gt;&lt;br /&gt;ID  Status    Type             Description&lt;br /&gt;--- --------- ---------------- ----------------------------&lt;br /&gt;1   available PCI-X            DC_CONN&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;Look at the &lt;a href="http://halisway.hifichoice.com/prtconf_1855.txt"&gt;prtconf -pv&lt;/a&gt;&lt;br /&gt;It was especially cool to have &lt;a href="http://www.sun.com/software/solaris/ds/zfs.jsp"&gt;ZFS&lt;/a&gt; on a production ready box. The blade I installed Solaris on had a pair of mirrored 146Gb drives so I created a 40Gig system partition and a 100Gb partition for ZFS.&lt;br /&gt;Now I just need to investigate how well &lt;a href="http://www.bea.com"&gt;WebLogic 8.1&lt;/a&gt; plays in a zone.&lt;br /&gt;&lt;br /&gt;As a really annoying side note I can mention that it took almost 2 days to get Windows 2000 server installed on another blade. Getting drivers and a &lt;b&gt;retail&lt;/b&gt; copy of Windows 2000 with slipstreamed SP4 was quite difficult. We usually use MSDN media to install development server but the Dell Server Assitant (required to get Windows 2000 working at all) requires a retail OEM version of Windows 2000. Then again, I'm not a very Windowsy' person :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115280094703662052?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115280094703662052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115280094703662052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115280094703662052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115280094703662052'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/solaris-10-0606-on-dell-pe-1855-blades.html' title='Solaris 10 06/06 on Dell PE 1855 blades'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115264607847892447</id><published>2006-07-11T20:12:00.000+01:00</published><updated>2006-07-12T20:17:03.433+01:00</updated><title type='text'>New massive Sun servers</title><content type='html'>Sun, or should I say &lt;a href="http://www.sun.com/aboutsun/media/bios/bios_bechtolsheim.html"&gt;Andy Bechtolsheim&lt;/a&gt;, announced some really awesome servers at the &lt;a href="http://www.sun.com/nc"&gt;NC&lt;/a&gt; event today. &lt;br /&gt;I mean, these new boxes will kick some HP butt.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.sun.com/servers/x64/x4600/"&gt;Sun x4600&lt;/a&gt; - an  8-socket (16-way) Opteron machine. 4 SAS drives, 8 PCI-e, up to &lt;b&gt;128Gb!&lt;/b&gt; memory. Sounds like a fun box.&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.sun.com/servers/x64/x4500/"&gt;Sun x4500&lt;/a&gt; - ok, most companies are moving away from internal storage but now when iSCSI is making great progress it is time to rething the mid size storage sector. This little 4U box has nothing less than &lt;B&gt;48!!&lt;/B&gt; internal SATA drives. Up to 24Tb per machine, with 10 machines in a rack, thats 240Tb per rack. &lt;i&gt;Yes please&lt;/i&gt;.&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.sun.com/servers/blades/8000/"&gt;Sun Blade&lt;b&gt;s&lt;/b&gt; 8000 series&lt;/a&gt; - nice blade enclosure. Future proof, 2 pci-e slots per blade which is nice. And the network backplane has a smart config. Instead of having a interface card on the blade and connect via ethernet to the switch, the "switch" connects to the blade via PCI-e, so the actuall ethernet card is in the switch itself. Small customer base though, only massive datacenters can afford this type of kit.&lt;br /&gt;&lt;br /&gt;I can see a very nice Oracle Data Warehouse setup here. One x4600 processing machine backed by 24Tb iSCSI storage mounted from a x4500 :)&lt;br /&gt;And, we can build a massvie 48-way 3 node RAC deployment in just 12U's (plus proper storage).&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.sun.com/images/k3/k3_sunfirex4500_4.jpg"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115264607847892447?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115264607847892447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115264607847892447' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115264607847892447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115264607847892447'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/new-massive-sun-servers.html' title='New massive Sun servers'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115237341010130677</id><published>2006-07-08T16:34:00.000+01:00</published><updated>2006-07-08T16:43:30.130+01:00</updated><title type='text'>HPC Top500 - AMD vs. Intel</title><content type='html'>The latest &lt;a href="http://www.top500.org/list/2006/06/100"&gt;top 500&lt;/a&gt; HPC list was released about a month back. A lot of new systems on the list which is great news. Opterons are climbing fast and IBM is gaining a lot of market share with Blue Gene systems.&lt;br /&gt;&lt;br /&gt;One thing struck me as quite interesting when I first glanced the list, Xeon processors seems to get higher "per cpu" benchmark figures. I know these numbers aren't the only thing to go after when it comes to comparing HPC processing power. The type of load etc . makes a difference. But still, it's a known fact that Opterons are faster in almost all tasks.&lt;br /&gt;I did a &lt;a href="http://halisway.hifichoice.com/hpcdata.html"&gt;quick calculation&lt;/a&gt; of the top 100 entries which had Xeons or Opterons, the average Rmax per cpu is almost &lt;b&gt;50% better&lt;/b&gt; for Xeons?! &lt;br /&gt;Xeon gets 4.40 and Opteron gets 3.00.&lt;br /&gt;&lt;br /&gt;This makes me even more courius about the next list where we'll hopefully have some Xeon 5100 systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115237341010130677?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115237341010130677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115237341010130677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115237341010130677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115237341010130677'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/hpc-top500-amd-vs-intel.html' title='HPC Top500 - AMD vs. Intel'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115213289548584925</id><published>2006-07-05T21:19:00.000+01:00</published><updated>2006-07-05T23:17:36.483+01:00</updated><title type='text'>Busy with the blades</title><content type='html'>Have been quite slow on the blogging side lately. Actually quite busy at work installing a bunch of new servers. We ordered some Dell kit last week, &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_2850?l=en&amp;s=bsd"&gt;PowerEdge  2850's&lt;/a&gt; and more interestingly &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_1855?l=en&amp;s=bsd"&gt;PowerEdge 1855 blades&lt;/a&gt;. &lt;br /&gt;I must say I really love the blade concept, not so much by the annoying "data center cost saving" hype. I strongly doubt that 10 Xeon blades use much less power than 10 1U Xeon servers. &lt;br /&gt;Power wise, the enclosure wants 4 &lt;b&gt;16 Amp&lt;/b&gt; 3-pole plugs.. go figure :)&lt;br /&gt;&lt;br /&gt;No, what I really like about blade servers is the ease of management and administration. The Dell Blade enclosures we got has 2 built in switch modules, DRAC/MC card and the optional IP-over-KVM module. All these cool modules are &lt;b&gt;cheap&lt;/b&gt; so I can't imagine anyone ordering a blade enclosure without them.&lt;br /&gt;&lt;br /&gt;Then we have the cable side of things. Each enclosure holds 10 servers, from the enclosure we have:&lt;br /&gt;&lt;list&gt;&lt;br /&gt;&lt;li&gt;4 power cables&lt;br /&gt;&lt;li&gt;2 ethernet uplinks (one from each switch module)&lt;br /&gt;&lt;li&gt;1 ethernet management interface&lt;br /&gt;&lt;/list&gt;&lt;br /&gt;Thats 7 in total, compare to 10 1U servers:&lt;br /&gt;&lt;list&gt;&lt;br /&gt;&lt;li&gt;10x 2 power cables&lt;br /&gt;&lt;li&gt;10x 2 ethernet cables to switches&lt;br /&gt;&lt;li&gt;10x 3 kvm (mouse, keyboard and screen to a KVM switch)&lt;br /&gt;&lt;li&gt;10x 1 ethernet management interface&lt;br /&gt;&lt;/list&gt;&lt;br /&gt;Thats &lt;b&gt;80!!&lt;/b&gt; in total. Or about 180 meters of cables. Dang! If we would have had fibre-channel connectivity we would have saved another 18 cables.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://halisway.hifichoice.com/pe1855fnt.jpg" alt="PE1855"&gt;&lt;br /&gt;&lt;br /&gt;Ok, now to what really counts. Price!&lt;br /&gt;For us it started making sense after about 4-5 servers, thas just silly. The question was more "why not" to buy blades. Each blade came in at about £1350 (dual 3.2Ghz, 4Gb, 2x146Gb) and the enclosure itself was about a silly £1000 (including the modules). Thats £15000 for 10 machines, a similar speced &lt;a href="http://www1.euro.dell.com/content/products/productdetails.aspx/pedge_1850?l=en&amp;s=bsd"&gt;PE 1850&lt;/a&gt; costs about £1600. Not that much of saving you say, a lousy £1000 for 10 machines. &lt;br /&gt;&lt;b&gt;But&lt;/b&gt; look at the extra costs around having 10 servers, take the 10 slots on a KVM switch, take the 18 extra ports in ethernet switches, take the freakin' cables. I'm assuming a cost of £1200 for a 16 port KVM switch, allocating 10 of those costs £750, 18 switch ports in two switches at £500 each is £416, 28 cat5 cables at perhaps 60 pounds for a pack.&lt;br /&gt;I'm not counting the extra allocation of PDU's due to the fact the blade enclosure uses the previously mentioned 16A 3-pole sockets which of you probably have to have a few extra installed.&lt;br /&gt;Now we have a cost saving of about &lt;b&gt;£2260&lt;/b&gt; per enclosure. &lt;br /&gt;The biggest saving however will be in time, I'll blog about the ease of use another day. Funny enough the blades will be installed with a huge mix of opterating systems. Windows, both 2000 server and 2003 server, alongside Centos 3, Centos 4 and Solaris 10. Most of them running Weblogic, Websphere and Jboss.&lt;br /&gt;&lt;br /&gt;And a small PS. Nooo, I could not have bought Opterons nor the new Conroe procs. These machines are going to be used mainly for application support mimicking customer environments. And as most people probably know, investment banks don't mix with the latest technology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115213289548584925?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115213289548584925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115213289548584925' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115213289548584925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115213289548584925'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/busy-with-blades.html' title='Busy with the blades'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115185468752798572</id><published>2006-07-02T16:34:00.000+01:00</published><updated>2006-07-02T16:38:07.553+01:00</updated><title type='text'>Turning your desktop in to a desktop</title><content type='html'>Found a very cool video on &lt;a href="http://www.youtube.com/"&gt;YouTube&lt;/a&gt;.&lt;br /&gt;Some canadian grad student has written a prototype desktop system called BumpTop™ which is designed to be an actuall desktop. With piles of documents and applications. You can pile up documents and sort them just as you would on a real life desktop.&lt;br /&gt;&lt;br /&gt;Check out the video.&lt;br /&gt;&lt;object width="425" height="350"&gt;&lt;param name="movie" value="http://www.youtube.com/v/M0ODskdEPnQ"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/M0ODskdEPnQ" type="application/x-shockwave-flash" width="425" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Project &lt;a href="http://honeybrown.ca/Pubs/BumpTop.html"&gt;website&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115185468752798572?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115185468752798572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115185468752798572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115185468752798572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115185468752798572'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/07/turning-your-desktop-in-to-desktop.html' title='Turning your desktop in to a desktop'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115150748722012119</id><published>2006-06-28T15:58:00.000+01:00</published><updated>2006-06-28T16:11:27.803+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Compute sum of in plain Oracle SQL</title><content type='html'>Once again a post about Oracle analytics. Indeed the best thing since sliced bread.&lt;br /&gt;&lt;br /&gt;In sqlplus we have the posibility to insert breaks and to trigger basic events on these breaks. However in plain SQL it is not as easy, not that it is very hard either. Using analytics and the cool classic "decode rownum" hack we can get sort of the same results. On the last returned row you will get the full sum of the previous rows, in a new column however. But at least it's all done at the database layer and in plain SQL.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;An example as usual&lt;/b&gt;&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;SQL&gt; break on report&lt;br /&gt;SQL&gt; compute sum of sal on report&lt;br /&gt;SQL&gt; select ename, sal from emp&lt;br /&gt;  2  /&lt;br /&gt;&lt;br /&gt;ENAME             SAL&lt;br /&gt;---------- ----------&lt;br /&gt;SMITH             800&lt;br /&gt;ALLEN            1600&lt;br /&gt;WARD             1250&lt;br /&gt;JONES            2975&lt;br /&gt;MARTIN           1250&lt;br /&gt;BLAKE            2850&lt;br /&gt;CLARK            2450&lt;br /&gt;SCOTT            3000&lt;br /&gt;KING             5000&lt;br /&gt;TURNER           1500&lt;br /&gt;ADAMS            1100&lt;br /&gt;JAMES             950&lt;br /&gt;FORD             3000&lt;br /&gt;MILLER           1300&lt;br /&gt;JAMES&lt;br /&gt;           ----------&lt;br /&gt;sum             29025&lt;br /&gt;&lt;br /&gt;15 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; clear breaks&lt;br /&gt;breaks cleared&lt;br /&gt;SQL&gt; select e.*, (&lt;font color="green"&gt;decode(rownum,count(*)over(),sum(e.sal)over(),null)&lt;/font&gt;) sum&lt;br /&gt;  2  from (select ename, sal from emp union &lt;br /&gt;  3  select null,null from dual order by ename) e&lt;br /&gt;  4  /&lt;br /&gt;&lt;br /&gt;ENAME             SAL        SUM&lt;br /&gt;---------- ---------- ----------&lt;br /&gt;ADAMS            1100&lt;br /&gt;ALLEN            1600&lt;br /&gt;BLAKE            2850&lt;br /&gt;CLARK            2450&lt;br /&gt;FORD             3000&lt;br /&gt;JAMES             950&lt;br /&gt;JAMES&lt;br /&gt;JONES            2975&lt;br /&gt;KING             5000&lt;br /&gt;MARTIN           1250&lt;br /&gt;MILLER           1300&lt;br /&gt;SCOTT            3000&lt;br /&gt;SMITH             800&lt;br /&gt;TURNER           1500&lt;br /&gt;WARD             1250&lt;br /&gt;                           29025&lt;br /&gt;&lt;br /&gt;16 rows selected.&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update&lt;/b&gt;&lt;br /&gt;You can also use the "group by rollup" features, I've writen a small article about it &lt;a href="http://halisway.blogspot.com/2006/09/fancy-group-by-rollup-example.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115150748722012119?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115150748722012119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115150748722012119' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115150748722012119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115150748722012119'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/compute-sum-of-in-plain-oracle-sql.html' title='Compute sum of in plain Oracle SQL'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115107197833678872</id><published>2006-06-23T15:09:00.000+01:00</published><updated>2006-08-06T11:21:35.396+01:00</updated><title type='text'>Oracle group_concat() updated</title><content type='html'>&lt;b&gt;Update (again)! 2006-08-04&lt;br /&gt;Some even better code was posted &lt;a href="http://halisway.blogspot.com/2006/08/oracle-groupconcat-updated-again.html"&gt;here&lt;/a&gt;!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Found a quick nifty peace of code over at &lt;a href="http://asktom.oracle.com"&gt;asktom&lt;/a&gt;.&lt;br /&gt;The code gives a very cheap and simple way to do group concatiation, same as group_concat() in MySQL. This without using PL/SQL. The code uses the new collect function introduced in Oracle 10g, so unfortunatly it is 10g only. 9i people will have to stay with other methods such as the PL/SQL function stragg().&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;CREATE OR REPLACE TYPE ntt_varchar2 AS TABLE&lt;br /&gt;OF VARCHAR2(4000);&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE FUNCTION to_string (&lt;br /&gt;  nt_in        IN ntt_varchar2,&lt;br /&gt;  delimiter_in IN VARCHAR2 DEFAULT ','&lt;br /&gt;  ) RETURN VARCHAR2 IS&lt;br /&gt;&lt;br /&gt;  v_idx PLS_INTEGER;&lt;br /&gt;  v_str VARCHAR2(32767);&lt;br /&gt;  v_dlm VARCHAR2(10);&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;  v_idx := nt_in.FIRST;&lt;br /&gt;  WHILE v_idx IS NOT NULL LOOP&lt;br /&gt;    v_str := v_str || v_dlm || nt_in(v_idx);&lt;br /&gt;    v_dlm := delimiter_in;&lt;br /&gt;    v_idx := nt_in.NEXT(v_idx);&lt;br /&gt;  END LOOP;&lt;br /&gt;  RETURN v_str;&lt;br /&gt;END to_string;&lt;br /&gt;/&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;And a quick example:&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;SQL&gt; select deptno, cast(collect(ename) as ntt_varchar2) as vals&lt;br /&gt;  from emp group by deptno&lt;br /&gt;&lt;br /&gt;    DEPTNO VALS&lt;br /&gt;---------- -------------------------------------------------------------------&lt;br /&gt;        10 NTT_VARCHAR2('CLARK', 'KING', 'MILLER')&lt;br /&gt;        20 NTT_VARCHAR2('SMITH', 'JONES', 'SCOTT', 'ADAMS', 'FORD')&lt;br /&gt;        30 NTT_VARCHAR2('ALLEN', 'WARD', 'MARTIN', 'BLAKE', 'TURNER', 'JAMES')&lt;br /&gt;           NTT_VARCHAR2('JAMES')&lt;br /&gt;&lt;br /&gt;SQL&gt; select deptno, to_string(cast(collect(ename) as ntt_varchar2)) as vals &lt;br /&gt;  from emp group by deptno;&lt;br /&gt;&lt;br /&gt;    DEPTNO VALS&lt;br /&gt;---------- -------------------------------------------------------------------&lt;br /&gt;        10 CLARK,KING,MILLER&lt;br /&gt;        20 SMITH,JONES,SCOTT,ADAMS,FORD&lt;br /&gt;        30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES&lt;br /&gt;           JAMES&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;Cool!&lt;br /&gt;The origianl thread can be found &lt;a href="http://asktom.oracle.com/pls/ask/f?p=4950:8:17179834578357123531::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:2196162600402"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks to Adrian Billington for coming up with the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115107197833678872?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115107197833678872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115107197833678872' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115107197833678872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115107197833678872'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/oracle-groupconcat-updated.html' title='Oracle group_concat() updated'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115079669355505163</id><published>2006-06-20T10:30:00.000+01:00</published><updated>2006-06-24T10:21:10.146+01:00</updated><title type='text'>Oracle analytical functions</title><content type='html'>Recently I've found myself using the &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/functions001.htm#i81407"&gt;analytical functions&lt;/a&gt; in Oracle more and more. Not really to do in depth analysis, but just to do normal queries.&lt;br /&gt;The analytical functions give you a bigger perspective to work with in a query, you can access more than the current row in a query. Compare it to a "row level aggregator". Things usually done by a group by expression can be done straight in the select clause. You can access the previous rows and following rows in the resultset to compute things.&lt;br /&gt;Very handy indeed.&lt;br /&gt;&lt;br /&gt;Quick example using the very basic functions of analytics.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;select &lt;br /&gt;  distinct(deptno), &lt;br /&gt;  &lt;font color="red"&gt;(count(deptno)over(partition by deptno))&lt;/font&gt; /&lt;br /&gt;  &lt;font color="red"&gt;(count(deptno)over())&lt;/font&gt;*100 dshare &lt;br /&gt;from &lt;br /&gt;  emp&lt;br /&gt;where &lt;br /&gt;  deptno is not null &lt;br /&gt;order &lt;br /&gt;  by deptno&lt;br /&gt;/&lt;br /&gt;&lt;font color="green"&gt;    DEPTNO DSHARE&lt;br /&gt;---------- ------&lt;br /&gt;        10     21&lt;br /&gt;        20     36&lt;br /&gt;        30     43&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;This query does two things and divide the two things to get the size of the deptartment in percent. first it finds the size of the current department, then the total head count (excluding top dog). Notice how both functions look at a bigger window than the current row without aggregating the data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115079669355505163?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115079669355505163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115079669355505163' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115079669355505163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115079669355505163'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/oracle-analytical-functions.html' title='Oracle analytical functions'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115040060327615080</id><published>2006-06-15T20:40:00.000+01:00</published><updated>2006-06-15T20:43:23.293+01:00</updated><title type='text'>Some things never change</title><content type='html'>Looking back at the mid 1980's and the introduction of random strange graphical user interfaces I found two quite funny and &lt;b&gt;very&lt;/b&gt; different video clips on &lt;a href="http://www.youtube.com/"&gt;YouTube&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;B&gt;How do you introduce a new operationg system?&lt;/b&gt;&lt;br /&gt;1. &lt;a href="http://www.youtube.com/watch?v=kvbWLfr-Z4s"&gt;The Microsoft way&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.youtube.com/watch?v=NbrdnsPHMWA"&gt;The Apple way&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How could things go so wrong?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115040060327615080?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115040060327615080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115040060327615080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115040060327615080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115040060327615080'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/some-things-never-change.html' title='Some things never change'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115022781957628844</id><published>2006-06-13T20:40:00.000+01:00</published><updated>2006-06-13T20:45:09.033+01:00</updated><title type='text'>Do Oracle still charge for standby databases?</title><content type='html'>I'm looking in to some upgrade costs for a few systems and was told by our happy Oracle rep. that full Oracle EE licenses are required for all standby databases (i.e. physical standby data guard). Costly indeed.&lt;br /&gt;&lt;br /&gt;Now I stumbled across &lt;a href="http://www.oracle.com/corporate/license/olsadef_ire_v122304.pdf"&gt;this PDF&lt;/a&gt; on the Oracle website.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;From the PDF:&lt;/b&gt;&lt;br /&gt;&lt;i&gt;"System: shall be defined as each distinct production database. Test, development, failover and standby databases are not required to be licensed as systems; however, you may run the program on these databases."&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Not sure whom to believe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115022781957628844?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115022781957628844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115022781957628844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115022781957628844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115022781957628844'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/do-oracle-still-charge-for-standby.html' title='Do Oracle still charge for standby databases?'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-115018586877381658</id><published>2006-06-13T08:55:00.000+01:00</published><updated>2006-06-13T20:44:30.353+01:00</updated><title type='text'>Oracle Validated Configurations</title><content type='html'>&lt;a href="http://www.oracle.com/"&gt;Oracle&lt;/a&gt; have started giving end-to-end recommendation for database software and hardware platforms. Recommending a server, storage system and operating system for new deployments. No need to ask around any more. Just go to  &lt;a href="http://www.oracle.com/technology/tech/linux/validated-configurations/index.html"&gt;this page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Oddly enough, Oracle chose Linux x86_64 for all their recommended configurations so far, perhaps the Solaris choices are to obvious to list. They claim they see a very high demand for Linux x86_64 systems at the moment. Not suprised by that, large SGA allocation on 32-bit platforms has always been a pain in the neck. &lt;br /&gt;We've had a Sun v20z running 64-bit &lt;a href="http://www.centos.org"&gt;CentOS&lt;/a&gt; for six months or so and haven't seen any major problems. Did see one core dump issue in data guard when configuring the standby database in dgmgrl.&lt;br /&gt;&lt;br /&gt;I'm sure we'll see more (Unix) recommended configurations in time.&lt;br /&gt;And still no sight of &lt;a href="http://www.ubuntu.org/"&gt;Ubuntu&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-115018586877381658?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/115018586877381658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=115018586877381658' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115018586877381658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/115018586877381658'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/oracle-validated-configurations.html' title='Oracle Validated Configurations'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114985122093278405</id><published>2006-06-09T11:54:00.000+01:00</published><updated>2006-06-09T12:07:01.373+01:00</updated><title type='text'>hdesc beta1 release</title><content type='html'>I'm pleased to introduce "halis desc" (hdesc for short) for sqlplus :)&lt;br /&gt;&lt;br /&gt;Hdesc is a quick and simple plsql program to display information about a table in sqlplus, it aims to be an extension of the normal desc command with the same level of output as the "\d" command in &lt;a href="http://www.postgresql.org"&gt;PostgreSQL&lt;/a&gt;. I wrote it the other day and haven't done any extensive testing. Since it's a beta release i just included the basic stored procedure, no public synonyms or stuff like that.&lt;br /&gt;&lt;br /&gt;Planed features are constraint output format cleanup, list of triggers on table, more partitioning information and possibly table statistics.&lt;br /&gt;&lt;br /&gt;Download the code here &lt;a href="http://halisway.hifichoice.com/hdesc.sql"&gt;http://halisway.hifichoice.com/hdesc.sql&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Load the stored proc and example&lt;/b&gt;&lt;pre&gt;&lt;font color="blue"&gt;OPS$HLINDEN@orcl&gt; @hdesc&lt;br /&gt;&lt;br /&gt;Procedure created.&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; set serverout on&lt;br /&gt;OPS$HLINDEN@orcl&gt; exec hdesc('t2')&lt;br /&gt;HDesc information for: t2&lt;br /&gt;Column name                    | Data type            | Nullable | Default&lt;br /&gt;------------------------------ | -------------------- | -------- | ----------&lt;br /&gt;T2_ID                          | NUMBER(5)            | NO       |&lt;br /&gt;USER_ID                        | NUMBER               | YES      |&lt;br /&gt;COST                           | NUMBER(4,4)          | YES      |&lt;br /&gt;NUFF                           | VARCHAR2(30)         | YES      |&lt;br /&gt;OBJECT_ID                      | NUMBER               | YES      |&lt;br /&gt;------------------------------ | -------------------- | -------- | ----------&lt;br /&gt;Tablespace: USERS               Monitoring: YES          Partitioned: NO&lt;br /&gt;Last analyzed: 2006/06/08       Row movement: DISABLED   Compression: DISABLE&lt;br /&gt;Constraints:&lt;br /&gt;Primary key T2_PK on column(s): T2_ID&lt;br /&gt;Foreign key: SYS_C0096241 on (USER_ID) references T1(ID)&lt;br /&gt;Foreign key: T2_NUFF_FK on (NUFF,OBJECT_ID) references CT2(OBJECT_NAME,OBJECT_ID)&lt;br /&gt;Unique: T2_COST_UNIQ on (COST)&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Please send any &lt;a href="mailto:hampus.linden@gmail.com"&gt;feedback&lt;/a&gt; you may have.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114985122093278405?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114985122093278405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114985122093278405' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114985122093278405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114985122093278405'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/hdesc-beta1-release.html' title='hdesc beta1 release'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114960010309966783</id><published>2006-06-06T14:11:00.000+01:00</published><updated>2006-06-06T14:21:43.600+01:00</updated><title type='text'>Cost-Based Oracle Fundamentals</title><content type='html'>Just got a new book about Oracle from &lt;a href="http://www.amazon.co.uk"&gt;Amazon&lt;/a&gt;. The book &lt;a href="http://www.amazon.co.uk/exec/obidos/ASIN/1590596366"&gt;Cost-Based Oracle Fundamentals&lt;/a&gt; written by &lt;a href="http://www.jlcomp.demon.co.uk/"&gt;Jonathan Lewis&lt;/a&gt; describes the Oracle Cost-Based optimizer in a easy and understandable way. Jonathan Lewis is the director of the &lt;a href="http://www.ukoug.org/"&gt;UK Oracle user group&lt;/a&gt; and is the author of several quite good books, this is however his best book so far.&lt;br /&gt;My only disappointment so far (haven't fine read all sections yet) is that the book doesn't really cover how to "manually" influence the CBO in other ways than SQL HINTS, such as "faking" your own DBMS_STATS and costs.&lt;br /&gt;&lt;br /&gt;Any how, the best book on Oracle I've seen in a long time.&lt;br /&gt;Go get it, both for DBAs and developers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114960010309966783?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114960010309966783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114960010309966783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114960010309966783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114960010309966783'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/cost-based-oracle-fundamentals.html' title='Cost-Based Oracle Fundamentals'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114950355278896727</id><published>2006-06-05T11:22:00.000+01:00</published><updated>2006-06-24T10:17:11.300+01:00</updated><title type='text'>SQL_CALC_FOUND_ROWS in Oracle</title><content type='html'>People keep telling me about all these new fancy features MySQL have and how nice it would be if Oracle had the same. My usuall response is "Uhm, had that for 15 years or so". Oracle just call the feature something difrerent. My latest MySQL "fancy feature" question was about &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/information-functions.html"&gt;SQL_CALC_FOUND_ROWS&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Here's how you get the same functionality it in Oracle&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;select found_rows, empno, job from &lt;br /&gt;  (select count(*) over () found_rows, empno, job, rownum rn &lt;br /&gt;     from emp order by empno) &lt;br /&gt;where &lt;br /&gt;  rn between 1 and 5&lt;br /&gt;/&lt;font color="green"&gt;&lt;br /&gt;FOUND_ROWS      EMPNO JOB&lt;br /&gt;---------- ---------- ---------&lt;br /&gt;        15       7369 CLERK&lt;br /&gt;        15       7499 SALESMAN&lt;br /&gt;        15       7521 SALESMAN&lt;br /&gt;        15       7566 MANAGER&lt;br /&gt;        15       7654 SALESMAN&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;You do get a bit more data transfered to the application layer, one value for each column. To avoid this and only get the count on the first row you can modify the inner query to use decode() like this&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;select decode(rownum,1,count(*) over ()), empno, job &lt;br /&gt;  from emp order by empno&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114950355278896727?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114950355278896727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114950355278896727' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114950355278896727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114950355278896727'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/sqlcalcfoundrows-in-oracle.html' title='SQL_CALC_FOUND_ROWS in Oracle'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114942567296622102</id><published>2006-06-04T13:41:00.000+01:00</published><updated>2006-06-04T13:54:32.983+01:00</updated><title type='text'>Ubuntu dapper PXE network install</title><content type='html'>I've been testing out the &lt;a href="http://www.ubuntu.com"&gt;Ubuntu&lt;/a&gt; network install environment today. All you need to use the PXE installer is to configure a DHCP server and TFTP server on your network, if you want a more hands off install you can use a "preseed" file. Quite easy to use and it is much more flexible then the ananconda kickstart files.&lt;br /&gt;Ubuntu actually support the kickstart file format as well, so if you don't want to learn the new preconfigure "preseed" format you can just write a normal kickstart syntax file and netboot Ubuntu exactly the same way you would a Redhat/Centos/Fedora box.&lt;br /&gt;&lt;br /&gt;Simple instructions on how to configure a Ubuntu netboot server. My install server "tessy" has IP 192.168.95.20 in this example and I'm installing the VIA C3 shoebox PC "elmer" with IP 192.168.95.30.&lt;br /&gt;Don't forget to disable any other DHCP servers you may have on the network such as in broadband routers. Download the netboot.tar.gz and Ubuntu ISO of your choice. I saved both files in the /dl volume on my server.&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;apt-get install tftpd-hpa&lt;br /&gt;apt-get install dhcp3-server&lt;br /&gt;mkdir -p /var/www/ubuntu-606-server-i386/&lt;br /&gt;mount -o loop /dl/ubuntu-6.06-server-i386.iso /var/www/ubuntu-606-server-i386/&lt;br /&gt;tar xzvf /dl/netboot.tar.gz -C /var/lib/tftpboot&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;Update the following files to suite your setup:&lt;br /&gt;&lt;font color="blue"&gt;&lt;pre&gt;&lt;b&gt;/etc/default/tftpd-hpa&lt;/b&gt;&lt;br /&gt;&lt;font color="green"&gt;RUN_DAEMON="yes"&lt;br /&gt;OPTIONS="-l -s /var/lib/tftpboot"&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/etc/dhcp3/dhcpd.conf&lt;/b&gt;&lt;br /&gt;&lt;font color="green"&gt;ddns-update-style none;&lt;br /&gt;option domain-name "hifichoice.com";&lt;br /&gt;option domain-name-servers 83.146.21.6, 212.158.248.5;&lt;br /&gt;ping-check = 1;&lt;br /&gt;default-lease-time 600;&lt;br /&gt;max-lease-time 7200;&lt;br /&gt;log-facility local7;&lt;br /&gt;subnet 192.168.95.0 netmask 255.255.255.0 {&lt;br /&gt;   range 192.168.95.100 192.168.95.150;&lt;br /&gt;   option routers 192.168.95.1;&lt;br /&gt;   filename="pxelinux.0";&lt;br /&gt;   next-server 192.168.95.20;&lt;br /&gt;}&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;/var/lib/tftpboot/pxelinux.cfg/default&lt;/b&gt;&lt;br /&gt;&lt;font color="green"&gt;DISPLAY ubuntu-installer/i386/boot-screens/boot.txt&lt;br /&gt;PROMPT 1&lt;br /&gt;TIMEOUT 0&lt;br /&gt;label install-simple&lt;br /&gt;        kernel ubuntu-installer/i386/linux&lt;br /&gt;        append initrd=ubuntu-installer/i386/initrd.gz \ -&lt;br /&gt;        ramdisk_size=14984 root=/dev/rd/0 rw preseed/locale=en_US \ -&lt;br /&gt;        kbd-chooser/method=us netcfg/wireless_wep= netcfg/choose_interface=eth0 \ -&lt;br /&gt;        netcfg/get_hostname=elmer preseed/url=http://192.168.95.20/preseed-606-auto.cfg --&lt;br /&gt;LABEL install&lt;br /&gt;        kernel ubuntu-installer/i386/linux&lt;br /&gt;        append vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=14332 \ -&lt;br /&gt;        root=/dev/rd/0 rw  --&lt;/font&gt;&lt;br /&gt;My &lt;a href="http://halisway.hifichoice.com/preseed-606-auto.cfg"&gt;&lt;b&gt;/var/www/preseed-606-auto.cfg&lt;/b&gt;&lt;/a&gt;&lt;/pre&gt;&lt;/font&gt;You'll get a few prompts, but nothing annoying. I'll have a deeper look into the preseed file format some other day. I'm sure a hands-off install is possible.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://wiki.ubuntu.com"&gt;Ubuntu wiki&lt;/a&gt; has a netboot article &lt;a href="https://wiki.ubuntu.com/Installation/LocalNet"&gt;here&lt;/a&gt; and you can read more about the preseed file &lt;a href="http://archive.ubuntu.com/ubuntu/dists/hoary/main/installer-i386/current/doc/manual/en/apcs01.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114942567296622102?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114942567296622102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114942567296622102' title='127 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114942567296622102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114942567296622102'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/ubuntu-dapper-pxe-network-install.html' title='Ubuntu dapper PXE network install'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>127</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114936950426486617</id><published>2006-06-03T21:44:00.000+01:00</published><updated>2006-06-04T19:21:42.276+01:00</updated><title type='text'>Oracle index skip scan</title><content type='html'>Before we had 9i a composite index practically create left most implicit indeces for the columns in the indexes. We know that we should sort the columns in a composite index with the column with the lowest cardinality to the left. Starting in 9i Oracle introduced a new index scan method called "index skip scan". Even though it's been available for a just over 4 years I haven't seen much news or design articles about this method. With a skip scan you can use any part of a composite index in (almost) any type of query.&lt;br /&gt;It comes with a cost of course since Oracle will have to probe the index the same number of times as the leading column(s). I.e. if you leading column have 10 distinct values, Oracle will have to do 10 probes in the binary tree. Skip scans should usually be avoided in extremly heavy use queries but may be a nice feature to keep in mind for reporting queries and other lower use queries.&lt;br /&gt;The benefit is that you can avoid having several indexes on the same columns, saving you update time and a bit of disk space.&lt;br /&gt;&lt;br /&gt;Let us do a little test&lt;pre&gt;&lt;font color="blue"&gt;OPS$HLINDEN@orcl&gt; create table ct as select * from all_objects;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;Table created.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; insert into ct select * from ct;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;...&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; commit;&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;Commit complete.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; create index ct_test_idx &lt;br /&gt;  2  on ct(owner,object_type,object_name);&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;Index created.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; EXEC DBMS_STATS.gather_table_stats('OPS$HLINDEN', 'CT');&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;PL/SQL procedure successfully completed.&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; set autotrace traceonly exp&lt;br /&gt;OPS$HLINDEN@orcl&gt; select status from ct where owner='OPS$HLINDEN'&lt;br /&gt;  2  and object_type='TABLE' and object_name='T9';&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=4 Card=1 Bytes=49)&lt;br /&gt;   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'CT' (TABLE) (Cost=4 Card&lt;br /&gt;          =1 Bytes=49)&lt;br /&gt;&lt;br /&gt;   2    1     INDEX (&lt;b&gt;RANGE SCAN&lt;/b&gt;) OF 'CT_TEST_IDX' (INDEX) (Cost=3 Card&lt;br /&gt;          =1)&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;OPS$HLINDEN@orcl&gt; select status from ct where object_name='T9';&lt;br /&gt;&lt;br /&gt;&lt;font color="green"&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=44 Card=29 Bytes=9&lt;br /&gt;          57)&lt;br /&gt;&lt;br /&gt;   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'CT' (TABLE) (Cost=44 Car&lt;br /&gt;          d=29 Bytes=957)&lt;br /&gt;&lt;br /&gt;   2    1     INDEX (&lt;b&gt;SKIP SCAN&lt;/b&gt;) OF 'CT_TEST_IDX' (INDEX) (Cost=&lt;font colro="red"&gt;15&lt;/font&gt; Card&lt;br /&gt;          =29)&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;Notice the extra cost for scanning the index, eventhough we have fewer conditions we have a five fold cost. Now if the index would have been created backwards ,like ct(object_name,object_type,owner), Oracle would hesitate to even use it unless all three columns had conditions since the number of left most distinct values would have been to high (about 14k in this example, with only between 20 and 25 for the other two columns).&lt;br /&gt;&lt;br /&gt;Skip scans can be good, but for intense queries do create indexes on the required columns.&lt;br /&gt;&lt;br /&gt;Read more &lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#i51571"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114936950426486617?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114936950426486617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114936950426486617' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114936950426486617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114936950426486617'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/06/oracle-index-skip-scan.html' title='Oracle index skip scan'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114911583149002669</id><published>2006-05-31T23:40:00.000+01:00</published><updated>2006-05-31T23:50:31.490+01:00</updated><title type='text'>Sun cutting costs</title><content type='html'>It must be hard to be Jonathan Schwartz a day like this, starting his career as CEO with a 10% head count reduction. Not really news, just a matter of when this would happen. Wall street has been pushing for cost reductions for quite some time now.&lt;br /&gt;Lets hope things will be for the better than Schwartz will be remembered as the man who brought Sun back in to a profitable company.&lt;br /&gt;The statement from Schwartz was pretty clear though. Focus the buisness around the core products and the technology they already have and spend less on specialiced systems.&lt;br /&gt;&lt;br /&gt;I'm still convinced Sun will stand strong and keep growing its market share in a number of sectors.&lt;br /&gt;&lt;br /&gt;Schwartz has already got a long entry in his &lt;a href="http://blog.sun.com/roller/page/jonathan?entry=phase_2"&gt;blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Read the official &lt;a href="http://www.sun.com/smi/Press/sunflash/2006-05/sunflash.20060531.1.xml"&gt;press release&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114911583149002669?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114911583149002669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114911583149002669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114911583149002669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114911583149002669'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/05/sun-cutting-costs.html' title='Sun cutting costs'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114908419125568767</id><published>2006-05-31T14:54:00.000+01:00</published><updated>2006-06-01T00:09:07.573+01:00</updated><title type='text'>Pay for what you use</title><content type='html'>Ok, this is a long entry but it's worth the read.&lt;br /&gt;&lt;br /&gt;I recently helped a friend of mine who work for a quite small company to sort out one of their secondary Oracle system. They only really have one big database, but they need to have a secondary box for training, testing and development. The system they used to have was a four proc &lt;a href="http://h18004.www1.hp.com/products/servers/proliantdl580/index-g2.html"&gt;HP DL580g2&lt;/a&gt; server running &lt;a href="http://wwww.redhat.com/?cost=high"&gt;RHEL 3&lt;/a&gt;. &lt;br /&gt;Their main problem was that since they had a training system on the machine they had to pay for Oracle licensing and support for the machine, for all four CPU's. And since their application schema used partitioning and other EE features they had to have EE on this system as well. &lt;br /&gt;&lt;br /&gt;They had opted for a term license from Oracle &lt;a href="http://oraclestore.oracle.com/"&gt;costing $32k&lt;/a&gt; annually. The server was starting to run a bit slow as well. Developers often have that effect on systems, starting with one test schema and ending up with about 37. The training system was used by a 10 user classroom perhaps twice a month. Minimal usage (for the training functionality) and load, still a massive license.&lt;br /&gt;The problem, they need a faster system and reduce costs. Both where hard requirements.&lt;br /&gt;&lt;br /&gt;Their suggestion was to replace the machine with a &lt;a href="http://h10010.www1.hp.com/wwpc/us/en/ss/WF05a/15351-241434-241475-241475-f80-398220.html"&gt;HP DL585&lt;/a&gt; with four Opteron processors with RHEL 4, still a $32k per year term license plus support on that. Time to cut back a bit here. Why do they need four cpu's on a training system? &lt;br /&gt;&lt;br /&gt;Oracle are nice enough to accept &lt;a href="http://www.sun.com/software/solaris/containers_learning_center.jsp"&gt;per zone&lt;/a&gt; licensing of Oracle under Solaris if you use the resource manager to limit the number of processors the zone can use. I first suggested that they would opt for a Sun T2000 server but they where quite set on using the HP box. Fair enough, they are a HP shop and I'm not in any position to argue with them. So let's stick with the HP box, but let's run Solaris 10 on it. HP even officially support* Solaris 10 on that system. They agreed to do so. Very simple setup, two RAID1 arrays on 15kRPM disks. The databases on the machine aren't very large so there is currently no need for an external disk subsystem. &lt;br /&gt;&lt;br /&gt;We installed Solaris 10 update 1 on the server and created two zones. First zone is “training” which was given one CPU and the second zone “dev” was not resource limited at all and could use all CPU's in the system. &lt;br /&gt;One CPU for the training system that had to be licensed, thats a neat little saving of $24k per annum plus the reduced support cost. The server itself came in at about $15k and the Solaris support contract costs $960 per annum compared to the $1500 per year for RedHat. So even with the new hardware they had a nifty saving at about $10k for the first year. Not to mention the full $24k save for year two and three.&lt;br /&gt;&lt;br /&gt;I almost sound like a &lt;a href="http://blogs.sun.com/roller/page/mary"&gt;Sun marketer&lt;/a&gt; here, but hey, it's plain facts. To prove I'm not a Sun fanboy I'm going to skip the step where I pull out the graphs and ROI calculations. Draw your own graphs! (And may I suggest you do that in &lt;a href="http://www.oracle.com/technology/products/discoverer/index.html"&gt;Oracle BI Discoverer&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;* &lt;a href="http://www.hp.com/wwsolutions/solaris/index-all.html"&gt;http://www.hp.com/wwsolutions/solaris/index-all.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114908419125568767?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114908419125568767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114908419125568767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114908419125568767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114908419125568767'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/05/pay-for-what-you-use.html' title='Pay for what you use'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13668718.post-114885805962360019</id><published>2006-05-28T23:53:00.000+01:00</published><updated>2006-05-29T12:40:41.863+01:00</updated><title type='text'>Testing VxVM under Vmware</title><content type='html'>Just downloaded and tested the new "free" Vertias Storage foundation software for Linux in a Vmware instance.&lt;br /&gt;Ran in to a few problems, not unexpected.&lt;br /&gt;&lt;br /&gt;First, the prein rpm scripts for VXVM fails if you are on a AMD box. Just run through the install script and manually add VRTSvxvm-common and VRTSvxvm-platform with the &lt;font color="blue"&gt;--nopre&lt;/font&gt; rpm options. After rpm is done just run vxinstall to finalize things.&lt;br /&gt;&lt;br /&gt;Now for the second hickup. CDS disks do not work under Vmware. For those of you who are not familiar with cdsdisks it is a new platform independant disk format recently introduced in VxVM. It makes it possible to migrate SAN LUN (or physical disks) from &lt;br /&gt;for instance a HP-UX box to a Solaris box without doing any conversion. &lt;br /&gt;To avoid this problem we need to use the old "simple" disk format. The easiest to always default to this is to create two files under /etc/default.&lt;br /&gt;One file called &lt;b&gt;vxdg&lt;/b&gt; with the line &lt;font color="blue"&gt;cds=off&lt;/font&gt; and one file called &lt;b&gt;vxdisk&lt;/b&gt; with the line &lt;font color="blue"&gt;format=simple&lt;/font&gt;.&lt;br /&gt;&lt;br /&gt;The rest is quite straight forward.&lt;br /&gt;&lt;pre&gt;&lt;font color="blue"&gt;# cat /etc/default/vxdg&lt;br /&gt;&lt;font color="green"&gt;cds=off&lt;/font&gt;&lt;br /&gt;# cat /etc/default/vxdisk&lt;br /&gt;&lt;font color="green"&gt;format=simple&lt;/font&gt;&lt;br /&gt;# vxdiskadd sdb sdc&lt;br /&gt;&lt;font color="green"&gt;[ enter dg1 when prompted for disk group name ]&lt;br /&gt;[ just hit enter for all other prompts ]&lt;/font&gt;&lt;br /&gt;# vxdisk list&lt;br /&gt;&lt;font color="green"&gt;DEVICE       TYPE            DISK         GROUP        STATUS&lt;br /&gt;sda          auto:none       -            -            online invalid&lt;br /&gt;sdb          auto:simple     dg101        dg1          online&lt;br /&gt;sdc          auto:simple     dg102        dg1          online&lt;/font&gt;&lt;br /&gt;# vxassist -g dg1 make u02 1G layout=mirror&lt;br /&gt;# vxprint&lt;br /&gt;&lt;font color="green"&gt;Disk group: dg1&lt;br /&gt;&lt;br /&gt;TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0&lt;br /&gt;dg dg1          dg1          -        -        -        -        -       -&lt;br /&gt;&lt;br /&gt;dm dg101        sdb          -        37701920 -        -        -       -&lt;br /&gt;dm dg102        sdc          -        37701920 -        -        -       -&lt;br /&gt;&lt;br /&gt;v  u02          fsgen        ENABLED  2097152  -        ACTIVE   -       -&lt;br /&gt;pl u02-01       u02          ENABLED  2097152  -        ACTIVE   -       -&lt;br /&gt;sd dg101-01     u02-01       ENABLED  2097152  0        -        -       -&lt;br /&gt;pl u02-02       u02          ENABLED  2097152  -        ACTIVE   -       -&lt;br /&gt;sd dg102-01     u02-02       ENABLED  2097152  0        -        -       -&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;# mkfs.vxfs /dev/vx/dsk/dg1/u02&lt;br /&gt;# mount /dev/vx/dsk/dg1/u02 /u02&lt;br /&gt;# df /u02&lt;/font&gt;&lt;br /&gt;&lt;font color="green"&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;br /&gt;/dev/vx/dsk/dg1/u02    1048576     17338    966793   2% /u02&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Vertias actually let me create 5 user volumes before starting to complain about licensing.&lt;br /&gt;&lt;b&gt;VxVM vxvol WARNING V-5-1-12761 You have exceeded the authorized usage for this product and are out of compliance with your License Agreement.  Please email sales_mail@symantec.com or contact your Symantec sales representative for information on how to obtain additional licenses for this product.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13668718-114885805962360019?l=halisway.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halisway.blogspot.com/feeds/114885805962360019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13668718&amp;postID=114885805962360019' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114885805962360019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13668718/posts/default/114885805962360019'/><link rel='alternate' type='text/html' href='http://halisway.blogspot.com/2006/05/testing-vxvm-under-vmware.html' title='Testing VxVM under Vmware'/><author><name>Hampus</name><uri>http://www.blogger.com/profile/12826832242493809239</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
