dinsdag, juni 08, 2010

dbfs is great

While experimenting with 11gR2, more specific, with dbfs and dbfs_client on Linux I asked my self "what can we do with it?". The first thing that popped up to try was copy a few simple files in it and that works fine. I can edit the file using the blob editor in dbVisualizer, using vim on the host where the dbfs is mounted. So this works ...

Now let's create a database in the dbfs filesystem.

Guess what: it works! Right at this moment the catalog is running..... amazing. Well, it did not completely finish but considering the fact that the dbfs host has little memory and that the hosting database has a sga, just large enough to be able to start .... I could work.

dbfs_01.png

This just shows the table that is used for the T1 filesystem. Now open catalog.log and see:

dbfs_02.png

The catalog did run in some error but hey, this was not on a very serious server.

sqlplus "/ as sysdba"


SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 8 14:52:03 2010


Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to an idle instance.


SQL> startup upgrade

ORACLE instance started.


Total System Global Area  217157632 bytes

Fixed Size 2211928 bytes

Variable Size 159387560 bytes

Database Buffers 50331648 bytes

Redo Buffers 5226496 bytes

Database mounted.

Database opened.

SQL> select name from v$datafile;


NAME

--------------------------------------------------------------------------------

/var/home/oracle/tmp/t1/Z/datafile/o1_mf_system_60wcd2bt_.dbf

/var/home/oracle/tmp/t1/Z/datafile/o1_mf_sysaux_60wcdp88_.dbf

/var/home/oracle/tmp/t1/Z/datafile/o1_mf_sys_undo_60wcfjsk_.dbf



The startup upgrade was needed because the catalog failed.

This shows that the product has a tremendous potential. A database with a database running in it ...


The problem with the crashing catalog was that I ran out of disk space. The test database where dbfs was running in has very little memory, also very little diskspace ...
Now let's hope that we can mount the dbfs filesystems on other systems than only linux too.


dbfs is hidden in Oracle SecureFiles.


According to the procedure we should change directory to $ORACLE_HOME/rdbms/admin and run the dbfs_create_filesystem.sql script. This one calls the advanced version of the script, only using @dbfs_create_filesystem_advanced.sql instead of @@dbfs_create_filesystem_advanced.sql A better option would be to fix this script so we can run it from any location, without having to change directory. Things can be so easy ...

2 reacties:

Ignacio Ruiz zei

... but, do you feel comfortable with the fact that DBFS uses fuser, which gives us a user-space filesystem without concurrency support? Oracle DB is heavily concurrent on IO

Ronald Rood zei

It acts just as an ordinary filesystem, with the advantage that the total data collection can now be - safe - in the database. It is a great improvement if you ask me.