Feed aggregator

Custom ActiveRecord create, add and delete methods for legacy databases

Raimonds Simanovskis - Wed, 2008-07-09 16:00

In some Ruby on Rails projects I am putting ActiveRecord interface on top of existing legacy databases. It is quite easy to specify legacy table names and primary keys in ActiveRecord models so that ActiveRecord would generate correct SQL SELECT statements to read data from legacy databases.

But it is more difficult to insert, update and delete in legacy databases using ActiveRecord. When using Oracle legacy databases then quite often they have exposed PL/SQL APIs for writing to tables and you are typically not allowed to directly modify tables with INSERT, UPDATE and DELETE statements.

Therefore I created support for custom create, update and delete methods in the version 1.1.3 of ActiveRecord Oracle enhanced adapter which uses also my ruby-plsql gem.

Let’s look at the following example. Assume that we have the following table:

CREATE TABLE test_employees (
  employee_id   NUMBER(6,0),
  first_name    VARCHAR2(20),
  last_name     VARCHAR2(25),
  hire_date     DATE,
  salary        NUMBER(8,2),
  version       NUMBER(15,0),
  create_time   DATE,
  update_time   DATE

And we have the following PL/SQL API package that should be used to write to this table:

  PROCEDURE create_employee(
      p_first_name    VARCHAR2,
      p_last_name     VARCHAR2,
      p_hire_date     DATE,
      p_salary        NUMBER,
      p_employee_id   OUT NUMBER);
  PROCEDURE update_employee(
      p_employee_id   NUMBER,
      p_first_name    VARCHAR2,
      p_last_name     VARCHAR2,
      p_hire_date     DATE,
      p_salary        NUMBER);
  PROCEDURE delete_employee(
      p_employee_id   NUMBER);

Then we define ActiveRecord model in the following way:

class TestEmployee < ActiveRecord::Base
  set_primary_key :employee_id
  # should return ID of new record
  set_create_method do
      :p_first_name => first_name,
      :p_last_name => last_name,
      :p_hire_date => hire_date,
      :p_salary => salary,
      :p_employee_id => nil
  # return value is ignored
  set_update_method do
      :p_employee_id => id,
      :p_first_name => first_name,
      :p_last_name => last_name,
      :p_hire_date => hire_date,
      :p_salary => salary
  # return value is ignored
  set_delete_method do
      :p_employee_id => id

And as a result we can use this model in the same way as other ActiveRecord models:

@employee = TestEmployee.create(
  :first_name => "First",
  :last_name => "Last",
  :hire_date => Date.today
@employee.first_name = "Second"

And all writing to the database will be done using defined API procedures.

Currently this functionality is embedded into Oracle enhanced adapter but if somebody needs it also for other databases this functionality could easily be extraced from the adapter.

To get the new release of Oracle enhanced adapter just do:

sudo gem install activerecord-oracle_enhanced-adapter

Source code of Oracle enhanced adapter is located at GitHub and you can submit bug reports and enhancement requests in Lighthouse.

Categories: Development

New Features in Approving Expense Reports in Oracle Internet Expense (iExpense) using AME

Krishanu Bose - Wed, 2008-07-09 07:17
Following features are new in R12 Oracle Internet Expense if you are using AME for Manager Expense report approval.
1. Parallel Approval
With Parallel Approvals, you will be able to route approvals in parallel when expense reports are charged to multiple cost centers, multiple projects, or multiple awards. This will streamline the approvals process and thus ensure users are reimbursed as quickly as possible.
2. FYI Notification
Now, you will be able to define rules in AME to send FYI notifications to managers and others who should be informed of expenses charged to their area of authority, but who do not need to approve the expense report.
3. Aggregation of Amount
You will be able to route expense approvals based on the aggregated amounts charged to cost centers or projects. The approval notification will show both the total amount to be approved, and how much of each expense was charged to the area of approval authority. This feature will ensure that proper approval authority is enforced when an expense report is allocated to many different cost centers, projects, or awards.

Performing a JOIN on groups of values using nested tables

Mike Moore - Tue, 2008-07-08 12:35
-- Join on a nested table example:

-- this example takes 2 tables (c & d). On each table it does
-- a group by, and the details of that group are collected into a nested table.
-- tables c & d are then joined on that nested table

-- I probably would never do this, but I do think it is interesting.


CREATE TABLE d (animal VARCHAR2(5 BYTE), grp NUMBER(6));


INSERT INTO d (animal, grp) VALUES ('cat', 4);
INSERT INTO d (animal, grp) VALUES ('cat', 7);
INSERT INTO d (animal, grp) VALUES ('toad', 7);
INSERT INTO d (animal, grp) VALUES ('frog', 4);
INSERT INTO d (animal, grp) VALUES ('frog', 7);


CREATE TABLE c( animal VARCHAR2(5 BYTE), grp NUMBER(6));

INSERT INTO c (animal, grp) VALUES ('cat', 1);
INSERT INTO c (animal, grp) VALUES ('frog', 1);
INSERT INTO c (animal, grp) VALUES ('frog', 66);
INSERT INTO c (animal, grp) VALUES ('cat', 33);
INSERT INTO c (animal, grp) VALUES ('cat', 44);
INSERT INTO c (animal, grp) VALUES ('cat', 66);
INSERT INTO c (animal, grp) VALUES ('frog', 44);
INSERT INTO c (animal, grp) VALUES ('toad', 44);

SELECT grp, animal FROM c ORDER BY grp, animal;
SELECT grp, animal FROM d ORDER BY grp, animal;


mystr VARCHAR2(80);
FOR cur1 IN
FROM (SELECT grp grp1, CAST(COLLECT(animal) AS string20_table) tab1
(SELECT grp grp2, CAST(COLLECT(animal) AS string20_table) tab2
ON tab1 = tab2
DBMS_OUTPUT.put_line( TO_CHAR(cur1.grp1)
|| '='
|| TO_CHAR(cur1.grp2));
-- final output
-- 1=4
-- 44=7
-- 66=4

How to find, share and back up JDeveloper code templates

Brenden Anstey - Mon, 2008-07-07 20:52

JDeveloper code templates are stored in the JDevHome folder in an XML file called java.tpl. This is one file worth backing up if you have a lot of custom code templates.

The file is in [Drive:]\JDevHome[Version]\system\oracle.jdeveloper.[version] eg.


Vote for my session proposal at Oracle OpenWorld

Raimonds Simanovskis - Mon, 2008-07-07 16:00

oow.pngIf you still have not voted for my session proposal “Using Ruby on Rails with Oracle E-Business Suite” then please do so :) Voting deadline is near – July 13th.

In any case I am going to be at Oracle OpenWorld conference in San Francisco in September. So if some of my blog readers will also be there and would like to have some chat with me about Oracle and Ruby then please let me know.

Categories: Development

Siebel Web Service Invocation Error

Peeyush Tugnawat - Mon, 2008-07-07 10:05

Issue: Error code: SBL-EAI-04313 while invoking a Sibel Web Service from BPEL.

Error Details:

“There is no active Web Service with operation named 'http://siebel.com/asi/:SiebelAccountInsert'.(SBL-EAI-04313”

   <siebelf:siebdetail xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <siebelf:logfilename xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">EAIObjMgr_enu_0024_25165939.log</siebelf:logfilename>
      <siebelf:errorstack xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
         <siebelf:error xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
            <siebelf:errorcode xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">SBL-EAI-04313</siebelf:errorcode>
            <siebelf:errorsymbol xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">IDS_EAI_WS_OP_NOT_FOUND</siebelf:errorsymbol>
            <siebelf:errormsg xmlns:siebelf="http://www.siebel.com/ws/fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">There is no active Web Service with operation named 'http://siebel.com/asi/:SiebelAccountInsert'.(SBL-EAI-04313)</siebelf:errormsg>


I was able to resolve this issue by doing the the following:

1. Login to Siebel

2. Browse to Administration - Web Services

3. Within Siebel WS Administration, make sure that the status of WS is ‘Active’


4. Make sure that the Binding is set to SOAP_DOC_LITERAL


5. and finally Clear the Cache by clicking the “Clear Cache” button


Introduction to EclipseLink

Debu Panda - Mon, 2008-07-07 04:24
Doug Clarke has written a nice article that introduces EclipseLink.

I'm beginning to distrust Oracle

Claudia Zeiler - Mon, 2008-07-07 01:35
I am learning that I have been trusting Oracle too much. I have figured that Oracle has top rate developers, so when they offer a facility like ASMM or GATHER_STATS_JOB. I assume that it will be done well.

Now I am learning that ASMM has been allocating our shared pool too large, and has been adjusting sizes not once an hour, but once a minute.

I am not happy with the statistics that the 'wonderful' automatic GATHER_STATS_JOB has been collecting. Also the job has been causing contention with some of our production jobs.

The one that seems really strange to me is Log_buffer. I allocated 28M to log_buffer. According to Oracle, LGWR should be writing, at a maximum, when log_buffer is 1M full. Instead, I see that it is writing 2M at a time. I am going to have to figure that one out.

I expect that when Oracle offers to automate these processes, that this is their own product, so the calculations will be well done. I expected, but I am wrong.

OTL - Authorized Delegate

RameshKumar Shanmugam - Sun, 2008-07-06 00:55

Authorized Delegate: This functionality is similar to the timekeeper functionality but has few difference

  • Timekeeper uses the PUI where as Authorized Delegate uses Self Service
  • Timekeeper can access the people who are assigned to the Timekeeper group where authorized Delegate is controlled by the HR:Security Profile
  • Timekeeper has seeded responsibility where the authorized delegate the user must build the custom responsibility using the Seeded Menu 'Authorized Delegate Timecard Entry’

This functionality is good to use when a single person need to enter time for fewer number of employees, if there are more number of employees it is always advisable to use timekeeper

Try it out

Categories: APPS Blogs

Silverlight and EPM

Oracle EPM Smart Space - Tue, 2008-07-01 13:42

So we went on a mission to see if we could build our first Rich Internet Application for BI and EPM and here is what we did and what we found out.

We used Silverlight for our first try.  We selected Silverlight over other RIA technologies because; one we knew C# and two there is a pretty good beta available for Silverlight.  We are considering other technologies but wanted to start with what we could use and get running the fastest.

We started with lots of research and came up with two projects.  The first project consisted of building what we called a Provider DLL (thanks Mike) that talked HTTP and XML to the existing Smart View back-end.  This gave us access to the Planning and FM repositories (Forms, Business Rules and Calculations) and access to Essbase (Data and Calculations).  The second project was the UI, this was done with a mix of Expression Blend and Visual Studio.  This turned out pretty awesome and was very easy but we did find that there is not a whole lot out there as far as controls go for BI and EPM.  We had to build all of our own controls.  Here are some screen shots.




The really cool part about the application is the async nature of RIA’s.  Basically everything is async and this really makes for a rich and crisp UI experience…  No browser lockups, fast operations, run multiple operations at once, etc.  Overall RIA’s seem to have a place in more than just consumer applications and we will continue to explore the possibilities of applying this technology to BI and EPM.  Stay tuned for more on this topic.

Categories: Development

Another Site Specific Browser

Oracle EPM Smart Space - Tue, 2008-07-01 09:36

I got a comment pointing me in the direction of another site specific browser Bubbles.  This is a Windows SSB that has many of the same features as the ones I spoke about in my earlier post on this topic.  This one also has some cool extension capabilities that enhance the SSB experience.  For example you can get an extension for Yahoo mail and you will get System tray notifications when you get new mail.  I applied this to Workspace and every thing worked great, here is a screen shot:


The extensions could be powerful in the context of BI and EPM.  The first thing that comes to mind is notifications like the ones in Smart Space or some how tie into the notifications in Workspace.  For now I just like having Workspace always running in my system tray.

Categories: Development

Why do we not report by the Gregorian calendar?

Dylan Wan - Tue, 2008-07-01 02:37

  1. The number of days is different in each calendar month.
  2. The week and month cannot be aligned. The number of weekends is different in each calendar month.
  3. The number of working days is different in each calendar month. It ends up that the number of days in each quarter is also different.
  4. The period closing day will fall into different days in each period. The accounting department prefers always close the period by a given day in a week, such as Wednesday or Friday.

Categories: BI & Warehousing

13 Period Calednar

Dylan Wan - Tue, 2008-07-01 02:14

In this posting, I will discuss the following topics:

* What is the 13 period calendar? * Who uses the 13 period calendar? * How is it different from the 4-4-5 calendar?

Read the rest of this entry »

Categories: BI & Warehousing

ESB consolidation - Progress buys Iona

Nigel Thomas - Mon, 2008-06-30 09:11
I guess Iona was one of the first well known Irish software companies, and now it must be one of the last. It has succumbed to Progress Software for $106M. Paul Freemantle beat me to the news that Progress now owns or is a major committer for at least 4 different ESBs - Sonic, Artix, C24 and ActiveMQ/Camel/ServiceMix (plus Actional if you like) - hey, that's more than Oracle isn't it? (or maybe not...).

Skiing the Ruts

Mary Ann Davidson - Sun, 2008-06-29 04:35

When I began writing this blog entry, it was still winter in Idaho. Then (if I may be forgiven), I got into a writer’s rut out of which I have only recently hauled my slightly frostbitten muse. E kala mai ia’u (please excuse me).

At any rate, global warming is nowhere in evidence in Idaho. It was a record cold winter and an above average snow pack; we were still getting snow flurries as late as May 20th. The rivers are so full from runoff that the outfitters (river raft guides) are having their best season in years. Technically, you can still ski in the backcountry if you are willing to climb for the thrill of doing so. Needless to say, spring has also been late: my lilacs have only just popped, though here we are in late June.

It may seem strange to be talking about Nordic skiing instead of, say, a summer sport like mountain biking but a) I don’t know anybody who has ended up in the emergency room from Nordic skiing (whereas I know a lot of post-traction mountain bikers) and b) if you aren’t doing your sport, and you are serious about it, you are always training or thinking about what you can do to improve.

I switched from “traditional” Nordic skiing to “skate skiing” a few years ago, mostly to keep up with my Siberian husky. For those who are not Nordic (aka cross-country) skiing fiends, if you go out on a Nordic trail, they are often groomed so that both skate skiers and traditional Nordic skiers can use the same trail. Special snow cats cut grooves in the snow so that the traditional (aka “kick and glide”) Nordic skiers can move easily. The snow cats also flatten the trail so that we skate skiers can glide merrily along (passing the generally slower traditional Nordic skiers). I like skate skiing because it is fast and more aerobic than traditional Nordic skiing and because on a good day, it is like surfing a long board. (Glide: it’s all about the glide.)

Nordic skiing, especially skate skiing, is not about being the strongest or the even the fastest skier – it’s about technique. Most particularly, it is about efficiency. The more distance you can travel with the least effort, the longer you can go. Endurance is important, of course, but endurance is facilitated by good technique. For example, an extra 2 inches in your glide per step adds up over the 5K, 10K, or 15K you are out there. If you cover the same territory with 500 fewer “steps” than your equally fit competitor, you win. It’s the skiing equivalent of “do more with less.” (Only in Nordic skiing, you actually can do more with less; in fact, it is preferable.)

If you love to ski, as I do, you get good at learning not only ways to be more efficient as you ski (lengthen that glide!) but ways to “cheat” and rest (instead of powering through every step). The more efficient you are, the longer you can stay out on a beautiful day when the sky is slate gray, the snow covers all the hills, and the only spot of color is the burnt orange of dormant Arctic willows awaiting spring.

One of the ways I cheat is to use the traditional Nordic ruts when I am skate skiing. That is, when my legs get tired and I don’t feel like skating, I get in the ruts and push myself along, especially when going downhill – it is easier than skating. More control, less effort, your upper body does all the work and your legs just – rest. To be honest, my regular “workout run” in winter is between the 7K and 11K markers on the Harriman Trail. On the way back, it is almost all downhill so I get in the ruts and pole myself along. Whee!

In short, ruts are good. Ruts are your friends. Ruts help you go farther and faster if you use them properly: to rest, glide and do the distance the easy way instead of the hard way.

Now, the idea of ruts being good goes against received wisdom. Most people use ruts in the pejorative sense. For example, “I’m in a rut.” My is in a rut. If you think about it, “in a rut” in some cases is just a negative spin on “in the groove.” Surfers would say, “I got it wired.” “Got it wired” is surf lingo for knowing a surf spot really well: whether the waves breaks best on a high or low tide (and on what swell direction), and where the strike zone is: where, exactly the wave is going to break, so you know where to sit. The surfer who has it wired can (all things being equal) catch the most waves with the least amount of work.

Even though “ruts” can make things easy, even a generally useful rut can in some cases hold you back (hence, the expression “being in a rut”). For example, I can do the same 8K loop (from the 7K to the 11K marker on the Harriman Trail and back) and I did it often this winter. However, even if the terrain is the same, it is sometimes useful to ski from the 11K marker to the 7K marker and back. Why? Because I am skiing downhill on the way out and uphill on the way back. Which means I am pushing myself when I am tired, instead of coasting when I am tired. And I build endurance by “getting out of the ruts” literally, since I can’t use them going uphill. Getting out of your ruts from time to time is very useful. Even a good rut can hold you back.

One of the personal rut-breaking moments I have experienced lately came courtesy of a good friend who – like me – shares a deep love for nā mea ‘apau Hawai’i (all things Hawaiian). We like to get together and “talk story.” On one recent such occasions, Palani gave me an eye-opening rut buster. He noticed that, at a conference we had both attended, I was besieged by people wanting “just a minute of my time to talk about X.” Palani told me he thought I had an ‘opihi problem. I laughed because I knew what ‘opihi are. They are mollusks: limpets, actually. More specifically, ‘opihi are opportunistic mollusks – they wait until a moving object goes by in the water, they latch onto it, and can only be removed with a crowbar. (They are actually considered a delicacy by Hawaiians and nice lū’au food.)

After I was done laughing myself sick, I realized that Palani had highlighted A Truth. The world is full of people who want to “network” (which actually is a noun, but ‘opihi use it as a verb) where the specific definition of “network” means “asking for a favor that will be a lot of work for the askee, not taking no for an answer and then sucking all the oxygen out of the room, leaving the askee gasping for air.”

The Truth is that one’s reward for being helpful is too often a big ‘opihi infestation. I note emphatically that helping a friend through a bad period (e.g., dissolving marriage, health crisis) does not fall into the categorization of “‘opihi infestation.” One of the blessings of friendship includes “bearing one another’s burdens.” You do that gladly for people you love. Neither does being helpful and kind when you can (also known as “living aloha”) count toward becoming a future member of ‘Opihi Anonymous.

That said, after my discussion with Palani, I started thinking about how my tendency to be helpful had allowed a lot of ‘opihi to barnacle my ride, to the point that things I want to do get pushed aside to make room for more ‘opihi. I found myself becoming quite cranky, and whose fault was it, really? I should have painted myself with ‘opihi repellant and sailed on by those opportunistic mollusks.

For example, recently, an acquaintance asked me for a favor that was not in my professional area of expertise. I said I’d pass his interest in FOO along to someone I know (BAR) who might be able to help him (and I was at a meeting with BAR a few weeks ago so it was a convenient discussion to have). What was a favor – and a stretch for me – turned into “I really need you to do this because it is my PhD dissertation and I need people to fill out my questionnaire.” (“Gee, maybe you should have picked a research topic that was not so difficult to get people to work with you on. And did I mention for the 15th time that This is Not My Area of Expertise?”) I got emails, I got phone calls, I not nagged on weekends, until (fairly quickly) I said, “I will do one thing for you, then you are on your own.”

Most of us (me included) are willing to be helpful to others if we can. There is a big difference between doing a favor as you can, and allowing ‘opihi to attach to your ship as you sail by, thereby reducing your aerodynamics, clogging your intake valves and requiring expensive ‘opihi removal services. It crowds out other things you could be doing that would be more productive, bring you more pleasure or that would lengthen your stride, so to speak. To quote my buddy Palani, “Eh Sistah, No Mo’ ‘Opihi.” * I am getting out of the ‘opihi rut and not feeling guilty about it one li’ili’i (eensy) bit.

My second example is a “rut breaker” who changed not only his sphere of influence but whose ideas percolated into other arenas. In fact, he is one of the most influential people you’ve probably never heard of. His name was John Boyd and he changed the art of war.

Major John Boyd was an Air Force fighter pilot, whose energy maneuverability (E-M) theory encapsulated how and why fighter pilots win in aerial combat. His street creds came from his days as “40 second Boyd,” whose bet that he could defeat any opponent in aerial combat in 40 seconds or less went uncollected by any and all challengers. He was also - and infamously - a pain in the ‘ōkole of the United States Air Force, who thought they could banish Boyd to the basement of the Pentagon, only to have him become an insistent gadfly in the procurement arena. In part, Boyd’s intransigence resulted from his desire to have his E-M knowledge manifested in actual aircraft designs (e.g., the F-15).

What Boyd came up with (to simplify his legacy) is called the OODA loop. His idea was that what makes one warrior prevail over another in a dogfight – or, by extension – one group of warriors prevail over another – is agility. He categorized agility via the acronym by which his work is recognized: OODA – observe, orient, decide and act. His theory, briefly, is that one of the ways you can prevail against an enemy is to get within his decision-making and response capability. Getting inside the enemy’s OODA loop disrupts his ability to react and gives you the advantage. (His work on quantifying and describing qualities of agility were also embedded within the design for the F-15 which he fought for relentlessly.)

Boyd’s theories have been tremendously influential and not just within the Air Force (to whom he – unfortunately – remained a problem child and who therefore did not really accord Boyd the recognition he deserved). Marines love him, to the point that when he died and was buried in Arlington Cemetery, the story goes that nobody from the Air Force showed up, but the Marines did. One of them took the globe-and-anchor device off his uniform and placed it on Boyd’s grave (probably the highest tribute a Marine can pay to another individual). Boyd’s theories were applied to battlefield maneuvers in the first Gulf War with spectacular results. They’ve also been applied to the business world.

John Boyd’s work was and is a rut-breaker – some of the most innovative and influential ideas to change the art of war. If and as applied to security, it could also be a rut breaker in ways I leave it to better minds than mine to contemplate. For example, suppose system components were clever enough to dynamically reconfigure themselves under attack? More specifically, what if networks could self defend by “observing” what was happening on the network, “orienting” themselves in the larger network battle space “deciding” on a defensive posture, and “adapting” to a different configuration (that is, get “inside” an attackers’ OODA loop)? Static defenses are hard-pressed to prevail over dynamic ones, and as we know, many attacks are already automated and dynamic. Attackers often win because they are inside the enterprise’s OODA loop so that – it stands to reason - static defenses (and for that matter, passive defenses) will never prevail. If it is not already obvious, cyberspace is a battlefield, and no battle is ever won on the defensive.

I recently did a couple of talks at a university, one of which focused on the idea of synthesis: looking for templates or knowledge that can be applied to cybersecurity in other disciplines (economics, history, biology and military strategy were several areas I mentioned). Looking for answers in other disciplines is, paradoxically, both embracing a rut, because you realize there are very few truly “new” problems (“There is nothing new under the sun” – Ecclesiastes) and busting the security rut, by expanding the venues in which we look for answers.

My last rut example is more personal. I went to Hawai’i for two weeks to surf and recharge. My ruts included surfing my favorite surf break (“Pops”) every day but one, to listening to my new favorite Hawaiian music group (Maunalua - who just won another Nā Hōkū (Hawaiian music) award for best group) no less than six times when I was there. Bless their hearts, they played "Koke’e" for me every evening, too. I could go someplace else, but no place else relaxes or recharges me quite the way Hawai’i does. Just like gliding downhill on those winter ski ruts, I am in the groove, joyful and renewed.

*This is pidgin, not Hawaiian. You will hear both in Hawai’i and both are da kine.

For more information:

More on ‘opihi:


There’s a Hawaiian music group called the ‘Opihi Pickers:


More on Maunalua (support Hawaiian music!):


You can find "Koke’e" recorded at:


A great book on John Boyd by Robert Coram:


More on Boyd:

More on OODA loops:


Robert Coram has also written another book on Col. Bud Day, the most decorated living veteran and whose story ought to be required reading for every American:


The incredibly expensive but probably worth it (I have not read it) book about Boyd’s theories:


Oracle OpenWorld 2008 San Francisco

Mark A. Williams - Sat, 2008-06-28 16:21

It's hard to believe, but Oracle OpenWorld 2008 in San Francisco is coming round fast! I will be attending this year and here's my Oracle Mix profile link (free account required):


I've been really busy with the day job though I plan to have some more technical content in the near future! I've a couple of ideas swimming around that may be interesting as they're based on real questions.

I can't believe it! It's been 6 months!

Peter Khos - Sat, 2008-06-28 15:00
Wow! Time flies. It's been six months since I last posted. I had no intention of leaving the blogging world that long but the days, weeks and months sure went by fast. We are now heading into the later part of the year and OOW is only less than 3 months away with its early bird dateline of July 18th.It has been a very busy six months for me with numerous challenges in the new position. Our Peter Khttp://www.blogger.com/profile/14068944101291927006noreply@blogger.com0

ActiveRecord Oracle enhanced adapter version 1.1.1 released

Raimonds Simanovskis - Fri, 2008-06-27 16:00

I just released new version of ActiveRecord Oracle enhanced adapter which includes several new enhancements which could be useful if you use ActiveRecord with legacy Oracle databases:

  • Added ignore_table_columns option for class definitions
    You can specify which table (or view) columns should be ignored by ActiveRecord – these could be either columns which you do not need in Rails application or which have currently unsupported data types. For example:
    class Employee < ActiveRecord::Base
      ignore_table_columns  :phone_number, :hire_date
  • Added support for TIMESTAMP columns
    You can create tables with :timestamp data type which will create TIMESTAMP columns and you can access values from TIMESTAMP columns. Unfortunately due to current ruby-oci8 limitations when you will retrieve TIMESTAMP values it will be without fractional seconds (but if you pass Time value with fractional seconds then it will be stored in database).
  • NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT independent DATE and TIMESTAMP columns support
    By default Oracle adapter (and enhanced adapter as well) changes NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT to ‘DD-MON-YYYY HH24:MI:SS’. But if you are working with some legacy database which requires different NLS date settings then now you can change these settings to different ones. You can put in some initialization file some other NLS settings, e.g.:
    ActiveRecord::Base.connection.execute %q{alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS'}
    ActiveRecord::Base.connection.execute %q{alter session set nls_timestamp_format = 'DD-MON-YYYY HH24:MI:SS'}

    and ActiveRecord will continue to work correctly with date values.

Also one Rails 2.1 related issue was solved. Previously Oracle enhanced adapter always added after_save callback to ActiveRecord session store which stores BLOB data in the database (as in Rails 2.0 there was issue that this callback was not added). Now in Rails 2.1 this callback is added by ActiveRecord therefore Oracle enhanced adapter checks if this callback is already added or not. So now this should work correctly both in Rails 2.0 and Rails 2.1.

Also I have noticed that in some Rails 2.1 applications Oracle adapter is failing on ActiveRecord session store updates when partial updates are enabled. If you also have such issue then put this into your initialization file which will work as workaround until I will find what is causing this problem:

CGI::Session::ActiveRecordStore::Session.partial_updates = false

To get the new release just do:

sudo gem install activerecord-oracle_enhanced-adapter

Source code of Oracle enhanced adapter is located at GitHub. And you can submit bug reports and enhancement requests in Lighthouse. There you can see also some identified enhancements – please add comments to them if you also would like to have them. Then it will be easier for me to select what to include in next version of adapter.

Categories: Development


Subscribe to Oracle FAQ aggregator