our man in the sky

2008/11/27

rman in the cloud.

We have started experimenting with the cloud backup module of rman (Oracle Recovery Manager). This module adds media management support for aws (Amazons Web Service), specifically the s3 storage service.

For all our databases (clients’ and our own) that run Oracle on 10g or higher we use recoverable image copies instead of backup sets (rman: backupset). We typically have one image copy set in +ASM that trails the database by n days, where n is the recovery window. In addition we have one image copy set on a filesystem (local or remote) that trails the database by less than a day (rman: until time “trunc(sysdate)”).

Our plan is to create backup sets on aws of the image copies once a week. Since the aws driver is a sbt (rman: tape) driver, there are certain restrictions. The most important is that we can only backup sets, not image copies.

According to the documentation (10gR2), the following are legal variations of the “backup … copy of …” command:

backup as copy copy of  database;
backup as backupset copy of tablespace tablespace_name;
backup as backupset copy of datafile datafile;

Based on the syntax diagrams, I am hoping I will be allowed to do:

backup as backupset copy of database;

Will let you know how it plays out.


ruby and mysql C libraries on the Mac

2008/11/26

Configure ruby for mysql on the Mac

I struggled with this one. First I though the problems were rooted in the MySQL version I was running (5.1.X). I realized finally that I had not provided all the configuration parameters.

My original attempt:

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

The output from this command includes:

Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
    ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql -- --with-mysql-dir=/usr/local/mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
...

I managed to make it work by changing the command line to:

$ sudo gem install mysql -- \
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions.  This could take a while...
Successfully installed mysql-2.7
1 gem installed

PS: The “\” is just a line continuation marker, to make things fit in this post.

PS: This was after downgrading mysql to 5.0.X.


too much dbWatch?

2008/11/23

OK, I know; two posts in a row regarding dbWatch. That is just a coincedence … promise! More coming.


dbWatch Monitor on the Mac

2008/11/23

If you use the Mac, you may have some problems with making dbWatch Monitor (ie. the UI) work on your machine. There is an easy solution
and there is a difficult one. I will not go into detail about the difficult one, but the basic outline is:

  • Install the software on a *nix machine
  • Copy the installation to your Mac
  • Make sure you have the right Java runtime environment (JRE) on your Mac
  • Edit the shell script that launches dbWatch to use your JRE

A much easier solution is to install the software, Server and Monitor, on a *nix server and then use ssh and X to run the Monitor software.

$ ssh -X <hostname> -l <user> -p <port> \
/usr/local/dbWatch8.2/dbWatchMonitor8.2

Just substitute <hostname>, <user>, and <port> with the hostname of your dbWatch Server machine, the username of a user on that very same server, and the port that ssh listens on respectively.

Note: I always move sshd off 22 and over to one of the non-reserved ports, ie. higher than 1024. That is why I specify the port. If your sshd runs on the default port, you can leave -p <port> out off the command .


go Marek!

2008/11/06

It was great to see the latest edtion of SQL Server magazine. dbWatch 8.1 gets a decent review: 4 out of 5 stars. I admit that I am not a neutral observer. As a former employee and (current) shareholder I like to keep tabs on what’s going on with the company.

I strongly recommend checking out dbWatch for database monitoring. If you are too busy to watch fancy reporting screens and would rather get a text message or an email if something needs your attention, this might very well be the tool for you. Contact Marek at dbWatch Software, tell him that Espen sent you.

dbWatch supports Oracle, SQL Server and MySql; all in the same user interface. Sometimes I guess, Java is a good thing . . .

You can check out the review here.