Archive for March, 2009

Catching Up – Email, PL/JSON, Oracle Open Source, ORA_Tweet on oracle.com

Hi all.

This post is just a catchup of what I have been doing recently.

I cleaned out my email inbox. I had 5000 unread emails. I have a problem that if I get an email that is not spam but is not critical, I put it aside “to read later”. Sometimes, I actually do go back and read them. More often, I never see it again. I would *LIKE* to respond to every email and blog post that I get. Unfortunately, I just don’t always have time. By the time I do have time, I have plenty of newer posts and emails.

Click to continue reading “Catching Up – Email, PL/JSON, Oracle Open Source, ORA_Tweet on oracle.com”

Read the rest of this entry »

Twitter Weekly Updates for 2009-03-29

Click to continue reading “Twitter Weekly Updates for 2009-03-29″

Read the rest of this entry »

JSON In (and out) of Oracle – JSON Data Type

From the database geek.

Update March 29, 2009:  PL/JSON is now available as an open source project (MIT License).  Read the FAQ at http://oracleoss.com

Do you use JSON? Do you use Oracle? How would you like to use JSON in Oracle? How would you like to store it, generate it and read it? I am creating a new JSON data type that will work like XMLType.

I am assuming you are familiar with Oracle (or you probably wouldn’t be reading this blog). If you are not familiar with JSON it is JavaScript Object Notation, a lightweight data-interchange specification. Think of it as a replacement to XML.

Click to continue reading “JSON In (and out) of Oracle – JSON Data Type”

Read the rest of this entry »

Twitter Weekly Updates for 2009-03-22

Click to continue reading “Twitter Weekly Updates for 2009-03-22″

Read the rest of this entry »

Autonomous transactions (sometimes) suck

Conversation:

Dev: Here’s the new package.
Me: Why are the procedures autonomous transactions.
Dev: Because they use the xxxx table.
Me: ???
Dev: That table is used by a lot of processes.
Me: ???
Dev: if I don’t use autonomous transactions, I get a mutating trigger error.
Me: An autonomous transaction does not “fix” the problem.
Dev: That’s the way we’ve been fixing it.
Me: !! :-(

I need some aspirin.

LewisC

Read the rest of this entry »

Twitter Weekly Updates for 2009-03-15

Click to continue reading “Twitter Weekly Updates for 2009-03-15″

Read the rest of this entry »

Ora_Tweet – Tweet From Oracle, A PL/SQL Twitter API

Get the latest source from the ORA Tweet project page at sourceforge.

I had some free time this last Saturday night (after the family was all in bed) and I wanted to do a little mini-project. I don’t get to do enough PL/SQL anymore so I like to look for utilities and smaller fun things to code. While I was thinking about it, I was also following along on twitter to the posts that the people I follow had recently made.

I decided to put together a twitter procedure that would let me make posts from the database.

Click to continue reading “Ora_Tweet – Tweet From Oracle, A PL/SQL Twitter API”

Read the rest of this entry »

Oracle Data Types – 5 FAQs About Number

I get a lot of email, and comments on blog entries, asking questions about many different topics. I am going to try to answer some of the more common questions as FAQs. Today I am starting with some NUMBER FAQs. I am specifically talking about Oracle and I am specifically talking about the NUMBER data type, not numerics in general. I’ve written about NUMBERs before.

Q: What is the difference between an INTEGER and a NUMBER.

A: INTEGER is a subtype of NUMBER. INTEGER is declared as NUMBER(38,0). That means it is a “constrained” NUMBER.

Click to continue reading “Oracle Data Types – 5 FAQs About Number”

Read the rest of this entry »

View PDFs on a BlackBerry

I have been in search of a good PDF viewer for my BlackBerry. I tried out several different readers and even use MobiPocket to convert them. I wrote up my experiences in Mobile PDFs – 4 Way to Read PDFs on your BlackBerry.

In that post, I am review 3 native PDF viewers for the BlackBerry: PDF to Go, Repligo Reader and BeamReader. I am also review the MobiPocket mobile ebook reader. While it doesn’t do PDF, it does convert from PDF to its native format. Finally, I review ShortCovers, a new ebook social network/service.

pdf2go-about Repligo-about

beamreader-about Mobi-loading

Summary

For PDF viewing, I found that BeamReader has some shortcomings.

Click to continue reading “View PDFs on a BlackBerry”

Read the rest of this entry »

Advanced Queues and Streams: A Definition in Plain English

A mathematician, an accountant and an economist apply for the same job. The interviewer calls in the mathematician and asks “What do two plus two equal?”

The mathematician replies “Four.”

The interviewer asks “Four, exactly?” The mathematician looks at the interviewer incredulously and says “Yes, four, exactly.”

Then the interviewer calls in the accountant and asks the same question “What do two plus two equal?” The accountant says “On average, four – give or take ten percent, but on average, four.”

Then the interviewer calls in the economist and poses the same question “What do two plus two equal?”

The economist gets up, locks the door, closes the shade, sits down next to the interviewer and says “What do you want it to equal?”

And now for something completely different:

What is AQ?

Advanced Queues, or AQ, is Oracle’s messaging solution.

Click to continue reading “Advanced Queues and Streams: A Definition in Plain English”

Read the rest of this entry »

Oracle Advanced Replication: A Definition in Plain English

What is Replication?

According to Webster’s Online, the definition we mean is: 3 a : COPY, REPRODUCTION b : the action or process of reproducing

Replication is simply copying data from one database to another. This could be a subset of the data or a complete copy.

I’m going to use insert for my examples but any DML can be replicated.

If you create an insert trigger on a table and push data across a database link every time a record gets inserted, you’ve performed replication. Call that the poor man’s SYNCHRONOUS replication.

Click to continue reading “Oracle Advanced Replication: A Definition in Plain English”

Read the rest of this entry »

A day with Ralph Kimball, Part 1

I had the opportunity to spend a day in a seminar with Ralph Kimball. If you don’t know who that is, he is a guru of data warehousing. If you’re involved in data warehouses, I hope you are at least familiar with his work. Currently in the industry there are two primary, competing warehousing methodologies, i.e. practically religions to some, Kimball vs. Inmon. I think that’s kind of silly. A methodology is like a hammer or a drill; choose the best one for the job. If I absolutely have to pick, I’m in the Kimball camp.

Click to continue reading “A day with Ralph Kimball, Part 1″

Read the rest of this entry »

My Introduction

Welcome to my blog. My name is Lewis R Cunningham and I’m an Oracle geek. I love playing with Oracle, working with Oracle and sharing what I know about Oracle. In my travels as a consultant and employee, I have found that, in the Oracle world at least, managers, project leads, etc. often have to make decisions regarding their projects, employees and day to day operations with very little, and/or erroneous, information. These decisions often negatively impact the business bottom line and ongoing projects. The lack of information can be caused by an incomplete team, a lack of communication inside the team or even ego or attitude problems.

My goal with this blog will be to remove some of the mystery surrounding Oracle technology and to describe ways to integrate that technology in various projects and business areas.

Click to continue reading “My Introduction”

Read the rest of this entry »

Twitter Weekly Updates for 2009-03-08

Click to continue reading “Twitter Weekly Updates for 2009-03-08″

Read the rest of this entry »

When WHEN OTHERS is Evil

From the Database Geek.

As regular readers of my blogs know, one of the things I am is a non-absolutist. I try to never say never or always. Take WHEN OTHERS. I have worked in places where using WHEN OTHERS was banned. I think that’s silly. Nothing wrong with a WHEN OTHERS that logs an error. Right?

We recently had a situation that did just that. The problem was that the exception handler logged the SQLCODE and the SQLERRM (no stack info). This is an old piece of code being updated for some new functionality. Not a complete re-write, just some changes.

Click to continue reading “When WHEN OTHERS is Evil”

Read the rest of this entry »

SQL Analytics, With Clause and Column Level Grants

From the database geek.

Postgres 8.4 is just around the corner. I haven’t had much time lately to keep up with Postgres. I’ve had too much to do in the Oracle world (new job, writing, etc). However, I do try to keep up with a few email groups just to keep touch with what’s coming. Here are three things in Postgres 8.4 that I think will be interesting to a lot of people. Two of them bring Postgres that much closer to Oracle and one of them is useful (at times).

SQL Analytics

SQL Analytic Functions, also called Window Functions, allow you to execute functions across multiple sets of data within a single query.

For example, you can query the max value (or sum, average, whatever) of a field for multiple sort orders in a single query.

Click to continue reading “SQL Analytics, With Clause and Column Level Grants”

Read the rest of this entry »

Twitter Weekly Updates for 2009-03-01

  • DB Geek says: Twitter Weekly Updates for 2009-02-22:
    Having trouble with my web sites today. Very .. http://tinyurl.com/aw3kn4 #
  • Test #
  • Twitterberry says success when testing your connection, even if you put in an invalid password. Hmmmmph. #
  • I am loving my new blackberry bold. I didn’t realize how out of date my 8700 was until I started playing with my bold. #
  • @shanegold yo gaba gaba is the weirdest show since the tele-tubbies. The, um, actors? are creepy. in reply to shanegold #
  • I have an awful head cold and an awful headache going right now. I wish I were home in bed. #
  • @jameskoopmann Thanks.

Click to continue reading “Twitter Weekly Updates for 2009-03-01″

Read the rest of this entry »