Oracle RMAN and archivelog

September 19, 2012

As usual, I start saying I’m not a DBA, but sometimes perform some DBA task, so…

I had again a problem with a database server running out of disk space due to Oracle database usage. This time it was archivelog and RMAN. I’m pretty sure you could find information of archivelog and rman out there, so I won’t repeat it here. In order to be able to uses RMAN a database must be in archivelog mode. In archivelog mode, the redo logs, are archived in separate files instead of overwritten. This actually means that, under some circumstances your disk will be fully used.

Our knowledge base says that, if you need to free disk space, you must do this:


RMAN> DELETE OBSOLETE;
RMAN> CROSSCHECK ARCHIVELOG ALL;

If you don’t get enough space after that, then


RMAN> BACKUP ARCHIVELOG ALL;
RMAN> DELETE ARCHIVELOG ALL;

However, in my experience what it actually happens when you do this is:

  • RMAN creates a new backupset for archivelogs
  • The archivelog files are removed

So it doesn’t free any space if you don’t move the backupset outside the filesystem. Even worse, it actually uses more disk space until you delete archivelog.

After removing (lot of times) archivelogs and RMAN backupset, the problem was still there, because new archivelogs files appeared, so, as it’s a critical database, and we still have export backups, we decided to put noarchivelog mode, until we realize what’s going on with this database.

More information about archivelog and RMAN:

Advertisements

Deploying Django apps

June 2, 2010

One part of the application life cycle is deploying it. Since I knew virtualenv I think one of its major advantage is to keep isolated every project running in the same server. However Alberto Morales make me note this aproach has its major disadvantage too.

Isolating each project makes them fully independent. You can install different versions of Django, and any other lib you need using easy_install or pip making it really simple. You can even has several virtualenvs for the same project (this could be interesting to try new versions of libs). You can upgrade your libs in a simple manner.

Among disadvantages maybe the more clear is that, if you use almost the same libs in your projects you will be having several copies of the same things, and even worse, as they are in differents path you will have several copies of the same things in memory.

IMHO the servers are quite cheaps to try to optimize things to that level. Having a dedicated server in ISPs such as OVH or 1AND1 is cheap. Let’s said your choiced plan is about 750 euros/year, this means about 62.5 euros/month. Having this in mind (and assuming the projects I meaning are those that can be run several in a server) you should note that if deploying your projects for performance makes you work (let says) 4 hours more in a month than deploying them in a easy way, you would optimize your time contracting another server.

That’s way I’d rather to use an easy way to deploy projects even if the mem footprint is higher.