|THE LIGHTER SIDE|
Hi Koo To You Too
A haiku is originally a short Japanese poem of three lines with five, seven, and five syllables respectively. A good haiku creates a vivid picture in the reader’s mind. Here is an English haiku by Richard Wright.
Paul Drake from the New York Oracle Users Group imagined the Oracle database giving us haikus instead of error messages.
Instead of “ORA-00904: invalid column name,” we might get:
Instead of “ORA-01034: Oracle not available,” we might get:
Here are some more of Paul Drake’s Oracle haikus. A longer list was published in the December 2001 newsletter of the New York Oracle Users Group.
|STUMP THE SPECIALISTS|
Making Your Database Secure
This month’s question came to us from a friend:
“What should I do to make our databases more secure?”
A more detailed security checklist can be found in the Oracle Database 11g Security Guide. Also, Oracle Enterprise Manager ships with a policy library which covers database security among other things. Policy violations can be viewed in Database Control and Grid Control.
I hope this short answer helps you. Best of luck.
Fancy SQL Tricks Part I
Pivoting is well known to Excel power users; it converts rows of data into a two-dimensional matrix. For example, here are some rows of data from the STATS$SYSSTAT table:
You may want to convert the above data into the following two-dimensional format:
You can do this with the PIVOT operator, introduced in Oracle Database 11gR1, as follows:
logical_reads AS logical_reads,
physical_reads AS physical_reads,
user_rollbacks + user_commits AS transactions
FOR NAME IN
‘session logical reads’ AS logical_reads,
‘physical reads’ AS physical_reads,
‘user rollbacks’ AS user_rollbacks,
‘user commits’ AS user_commits
Here is the Oracle Database 10g version of the above code. It requires a very unintuitive use of the DECODE function.
sum(decode(name,’session logical reads’,value,0))
sum(decode(name,’user rollbacks’,value,’user commits’,value,0))
GROUP BY snap_id;
More information on the PIVOT operator and its sister operator, UNPIVOT, can be found in article by Arup Nanda.
Call Database Specialists when you need remote DBA services or onsite support for your mission-critical Oracle database systems. Arrange a free consultation with a senior Database Specialists team member to find out how we can help increase your uptime, improve performance, minimize risk, and reduce costs. Visit our website for no-cost resources, white papers, conference presentations and handy scripts.
CEO, Database Specialists, Inc.
(415) 344-0500 x48