Too Cool for Internet Explorer

Wednesday, October 03, 2007

Create a ZFS pool onto an already used and referenced disk

I have been thinking about creating a zfs pool for my home directory for some time now. Today I moved my home directory to /export/backup and unmounted the 120g disk.
When I tried to zpool create home c0d1 I got the message that this disk is still referenced in another boot environment. (Read here why.) I tried to delete that old boot environment, but that did not work, because GRUB then would have entries that point to no existing BE then. I never thought about that before, but I guess I now have to stick to the two BEs and just switch from SXCE1 to SXCE2 and back again.

On #opensolaris I have been pointed to the right tool to use: lumount. I mounted the old environment and commented out the entry in the /etc/vfstab to get rid of that reference for the disk. Now I was able to create the zpool with mountpoint on /export/home. Afterwards I created a new filesystem for my user in it and moved all my data back in there.

Technorati Tags: , , , , ,

Bookmark this on
posted by madhatter @ 12:17 AM

Saturday, September 29, 2007

Solaris Live Upgrade for the first time - with bugs

I switched from FreeBSD to OpenSolaris a few weeks ago. Today I tried the Live Upgrade for the first time, upgrading from snv_70 to snv_72. And while I was happy to see the new system booting had trouble with accessing my cd/dvd-rom drive. After trying this and that and asking on the irc channel I got the hint that I ran into a bug in b72.
Mounting my old root and copying the ata driver to the upgraded root did do the trick then.
Besides having some trouble caused by that bug I really like that live upgrade functionality in Solaris.

I am yet looking forward to explore more on this operating system. At work I have to play around with a 2-node Sun Cluster holding an Oracle RAC at the moment. That's really fun!

Technorati Tags: , , ,

Bookmark this on
posted by madhatter @ 8:21 PM

Thursday, July 26, 2007

Migration made easy with Oracle SQL Developer

A couple of weeks ago I had to migrate lots of data from MySQL to PostgreSQL and it was a pain in the a**. Even though MySQL offers to use a compatibility-mode when exporting tables for Postgres those dump files could not be imported to the Postgres database at all. The DDL was so wrong from Postgres' point of view that I had to search & replace lots of stuff and take care of escaping strings in a few thousand rows...

While I was looking up some data in Oracle's SQL Developer I noticed the 'Migration' menu for the very first time.
I have to admit that I use the SQL developer for almost a year now but did not find the time to explore it in much more detail.

I was wondering if migrating data from the MySQL database to an Oracle database would work out much better/easier with this tool, so I gave it a try:

1. I created a user called MIGRATIONS and granted RESOURCE, CREATE SESSION and CREATE VIEW to him. I then created and connected to a database connection to that user in the SQL Developer and created (right-click) the migration repository there.

2. I then created and connected to a database connection to the destination database and made sure that user had enough rights to create users and things.

3. Now I connected to the MySQL database and captured (right-click) the schema of interest.

4. I got a list of captured objects in a new tab now and was able to convert those. They appeared in another new tab labled 'converted objects'.

5. I renamed the schema from those converted objects (right-click) and generated (right-click again) lots of statements that appeared in a new SQL worksheet.

6. From there I selected the target database from the drop-down in the upper right corner and hit 'run script ()'.

7. I then connected to the created schema in my destination database.

8. Finally I chose 'migrate data' from the migration menu and selected source, destination and the converted objects to get the data transferred.

Like a charm!
Okay, there have been some errors mentioned while the migration process, but it seemed to me that all have been handled somehow as there have been no errors in the Migration log and all tables had the same data as in the source database.

I hopefully have to migrate to Oracle for the next project.

Technorati Tags: , , , , ,

Bookmark this on
posted by madhatter @ 1:46 PM

Thursday, March 08, 2007

Celebrating 3 years 'madhatter to the world'

I am happy to tell, that this weblog now exists for three years. There have been days I was thinking about taking it offline, but the still growing number of visitors made me keep it up. And sometimes I really have something interesting to tell so I post it here. And I think it's interesting to see that I came from lots of music, television and movie content to Oracle, DBA, sysadmin and hacker content. Probably the target audience has changed within these three years. But I said it from the beginning: this is about 'everything I am interested in and you might not care about'.

Technorati Tags:

Bookmark this on
posted by madhatter @ 8:15 AM

Monday, March 05, 2007

Hack-a-lot: Ruby on Rails, Tiger, fink and Oracle

Maybe some of you remember my article about Ruby on Rails with Mac OS X Tiger and PostgreSQL. I tried to use Oracle back then in the first place, but had some issues.
I now stumbled upon an article in the Oracle Magazine how to use the database driver Ruby/OCI8 with ruby and rails.
Of course this wasn't that easy on a Mac. *gnarf*

Because the header files did not happen to appear where they are expected I first tried it with some symlinks, without any luck. Later I came across an article at the rubyonrails wiki where they mentioned that "many readers of comp.lang.ruby advocate installing ruby from source as the install of ruby that comes with Tiger is deemed to be slightly broken".

So I updated my fink branch and installed ruby 1.8.4 and the rubygems via fink after I slightly re-ordered my $PATH to have the fink binaries on top of the list. (Edit: You have to re-order your $PATH first, because you otherwise would mix up both versions of ruby, rake and rails somehow.) I don't have to use symlinks here or remove the ruby distribution from OS X' developer tools.

When this was done I used 'gem install rails', to install rails once more - with all it's dependencies.
'which rails' should show you something like '/sw/bin/rails' after installation has been finished.

I now was able to install the necessary ruby interface for Oracle using OCI8 API with an intermediate step in the installation process: 'ruby setup.rb config'
Now the header files were found and I can keep on with 'make' and 'make install'.

Technorati Tags: , , , , , , ,

Bookmark this on
posted by madhatter @ 10:31 AM

Tuesday, February 27, 2007

More on Technorati: Search fixed

As you may have read some days ago, I was wondering if I should use Technorati here on my weblog anymore or not. It seems that most hick ups are gone right now. My latest postings appeared there already but the search I integrated lots of months ago was broken. Even though that searchlet has been released by Technorati long time ago it still is beta. And that means they can change the URL in it if they like without telling you.
You now are able to use the search form on the right again - until the URL for searching on Technorati will change again.

Technorati Tags: , ,

Bookmark this on
posted by madhatter @ 11:26 AM

Wednesday, February 07, 2007

Technorati: Should I stay or should I go?

I still use the Technorati tags on each of my posts here (see below) and I still have the Technorati search included (to the right) but I noticed lately that Technorati does not seem to update my weblog regularly even though I ping them after each post I put online. And while searching my own site with the search box Technorati offers I noticed that I can't even find most read article on this site.
So, what is Technorati still good for? Maybe it's time to move on and leave Technorati behind. I wrote them an email asking what might cause this problem a couple of weeks ago but never got an answer. Maybe the guys from Technorati already did move on?

Technorati Tags: , ,

Bookmark this on
posted by madhatter @ 8:00 PM