Friday 27 September 2013

Oracle - How To Determine The Actions of noaudit / audit command

You may be familiar with the noaudit / audit commands in Oracle, but how do you check the current settings?

noaudit all or audit all;

Simple. Just check the DBA_STMT_AUDIT_OPTS table.

SQL> audit all;

Audit succeeded

SQL> SELECT * FROM DBA_STMT_AUDIT_OPTS order by user_name,audit_option;
USER_NAME | PROXY_NAME | AUDIT_OPTION | SUCCESS | FAILURE
----------+------------+-------------------+-----------+----------
NULL | NULL | ALTER SYSTEM | BY ACCESS | BY ACCESS
NULL | NULL | CLUSTER | BY ACCESS | BY ACCESS
NULL | NULL | CONTEXT | BY ACCESS | BY ACCESS
NULL | NULL | CREATE SESSION | BY ACCESS | BY ACCESS
NULL | NULL | DATABASE LINK | BY ACCESS | BY ACCESS
NULL | NULL | DIMENSION | BY ACCESS | BY ACCESS
NULL | NULL | DIRECTORY | BY ACCESS | BY ACCESS
NULL | NULL | INDEX | BY ACCESS | BY ACCESS
NULL | NULL | MATERIALIZED VIEW | BY ACCESS | BY ACCESS
NULL | NULL | MINING MODEL | BY ACCESS | BY ACCESS
NULL | NULL | NOT EXISTS | BY ACCESS | BY ACCESS
NULL | NULL | PROCEDURE | BY ACCESS | BY ACCESS
NULL | NULL | PROFILE | BY ACCESS | BY ACCESS
NULL | NULL | PUBLIC DATABASE LINK | BY ACCESS | BY ACCESS
NULL | NULL | PUBLIC SYNONYM | BY ACCESS | BY ACCESS
NULL | NULL | ROLE | BY ACCESS | BY ACCESS
NULL | NULL | ROLLBACK SEGMENT | BY ACCESS | BY ACCESS
NULL | NULL | SEQUENCE | BY ACCESS | BY ACCESS
NULL | NULL | SYNONYM | BY ACCESS | BY ACCESS
NULL | NULL | SYSTEM AUDIT | BY ACCESS | BY ACCESS
NULL | NULL | SYSTEM GRANT | BY ACCESS | BY ACCESS
NULL | NULL | TABLE | BY ACCESS | BY ACCESS
NULL | NULL | TABLESPACE | BY ACCESS | BY ACCESS
NULL | NULL | TRIGGER | BY ACCESS | BY ACCESS
NULL | NULL | TYPE | BY ACCESS | BY ACCESS
NULL | NULL | USER | BY ACCESS | BY ACCESS
NULL | NULL | VIEW | BY ACCESS | BY ACCESS

27 row(s) returned

SQL> SELECT * FROM DBA_PRIV_AUDIT_OPTS order by user_name,privilege;
USER_NAME | PROXY_NAME | PRIVILEGE | SUCCESS | FAILURE
----------+------------+----------------+-----------+----------
NULL | NULL | ALTER SYSTEM | BY ACCESS | BY ACCESS
NULL | NULL | AUDIT SYSTEM | BY ACCESS | BY ACCESS
NULL | NULL | CREATE SESSION | BY ACCESS | BY ACCESS

3 row(s) returned

noaudit all;
will remove this audit priv and statment:

SQL> noaudit all;

Noaudit succeeded

SQL> SELECT * FROM DBA_PRIV_AUDIT_OPTS order by user_name,privilege;

No rows returned

SQL> SELECT * FROM DBA_STMT_AUDIT_OPTS order by user_name,audit_option;

No rows returned

Thursday 15 August 2013

Time to abandon NOSQL? (The name that is...)

It's odd when a technology comes along that is named after something it is not, rather than something it is. Case in point: NOSQL.

Here's my take on it.

RDBMS has been the crowned prince of data technologies for the last few decades. The momentum behind it was so strong that it has taken something like the last 5 years for other paradigms, more suitable to web scale data, to challenge its dominance. In order to highlight this paradigm shift, someone, somewhere, coined the buzz word NOSQL. The downside of doing this is that, rather than being known for what you are, you become known for what you are not.

And this is a problem. As organisations adopt NOSQL technologies, more and more want to join the band wagon. But rather than having a real world problem to solve with NOSQL, they just "know" that they want NOSQL, any NOSQL. Is the world of data really divided into the SQL and NOSQL? Does that even make sense?

Let's consider the following analogy.

Imagine a town with a large lake in the middle of it. Imagine too that the car is the only form of transportation known to man. Then, one day, someone invents a way to travel over water, cutting down journey times to the other side of the lake in half. But what to call this new fangled vehicle? Well, since it needs to be made clear that this is not just another form of car, let's call it NOCAR. Sounds ridiculous? It's not long before other NOCARs come into being. One that travels through air, one that requires no fuel and just uses peddle power (aka NOPISTON) etc.

Now, imagine someone saying 'Look I don't care what NOCAR we adopt, I just know that we should have one'. Or more subtly 'Aeroplane is my NOCAR of choice', as if now we should compare NOCAR solutions as a level playing field and exclude CARs altogether. Weird. The NOCAR that travels across water is as different to the NOCAR that travels through air as it is to the CAR.

Likewise with NOSQL. MongoDB is as different to Cassandra, as Cassandra is to RDBMS.

As alluded to above, perhaps WEBDB is more appropriate as it describes these technologies for what they are (or claim to be), rather than what they are not.

It's time to abandon the term NOSQL and start discussing these technologies for what they are rather than for what they are not.