Tuesday, December 28, 2010

How To: Become a Professional Developer

Twitter = Discovery



That led to this article, Staging Servers, Source Control & Deploy Workflows, And Other Stuff Nobody Teaches You.

The first paragraph reads as follows:

I worked for almost three years as a cog in a Japanese megacorporation, and one of the best parts about that experience (perhaps even worth the 70 hour weeks) was that they taught me how to be a professional engineer. Prior to doing so, my workflow generally involved a whole lot of bubble gum, duct tape, and praying. I spent a lot of time firefighting broken software as a result, to the detriment of both my customers and myself. Talking to other software developers has made me realize that I’m not the only person who was never taught that there are options superior to bubblegum. If you aren’t lucky enough to work at a company that has good engineering in its very DNA, you’re likely to not know much about them.

I consider myself incredibly fortunate, I worked for a company, well, a friend, who had all these things in mind. Not all of the mentioned mechanisms were set up mind you; it had been pretty much a one or 2 person shop before I arrived, way back in 2002. They were on the road though. Rational was the source control tool. Rational was the documentation tool. Rational was the functional testing tool. SQLUnit was the database testing tool.

My boss was this guy, Tom Wurzbach.

When he offered me a job, he sent me this link:

http://asktom.oracle.com/pls/apex/f?p=100:1:0

I saw Tom in the title and thought it was a joke of some sorts. Little did I know.

I stayed at this company for just under 3 years. I am not proud of the way I left, but that's a whole other story. That was my longest IT stint to date (+1 year at the current, yippee!).

It took me about 2 years to start to realize what I had learned at that company. In fact, I'm still realizing things now that I learned way back then.

The title? How to become a Professional Developer? I know many who wouldn't call me a professional developer...

I'm going to list the things that I have done and read in my time at that first company. I believe that set a great foundation for me and has allowed me to do all sorts of things.

1
I mentioned AskTom. Funny story (of course). I was off reading some opinion site at work. I received an email from Tom, "What are you doing?" It was rhetorical of course, he knew exactly what I was doing. Please don't read personal stuff on company time.

Point taken.

After that, when I needed to take a break, I would read AskTom. Every day. If it wasn't AskTom, it was something else technical. It was mostly AskTom though. Lots of it. More than I care to remember. Actually, I would bet that I don't remember half of it, it's all been internalized.

2
Find a mentor be it in real life or virtual. I had one sitting in front of me and I had Tom Kyte virtually. The former I didn't realize (yes, long story) until I had gone, the latter, well, he's been a mentor to a great many of you out there.

3
Read. A lot.

Don't just read stuff you agree with, read opposing view points. Don't read about stuff that just works either...if you watch Derek Jeter, he makes it look so easy, like you could go out there and do the same thing. You can't. I promise. Strangely, I have gotten a whole lot out of The Daily WTF. Mr. Kyte even took the helm for a little while some years ago. Learning what not to do is just as important as what to do.

Read the manuals. Read the concepts guide. Read the documentation. I'm shocked when I go somewhere new and they don't have an internal Oracle library set up. What if oracle.com is down? What if it's slow?

Read the New Features guide. It doesn't take long. See what's available.

Some things you should read early and often:
- The Complicator's Gloves
- Big Ball of Mud
- How To Ask Questions The Smart Way
- Why Good Programmers Are Lazy and Dumb

4
Practice. I can't speak to other vendors, but you can download any software you want from Oracle. That's enterprise class software on your little old 'puter. I've had so many databases installed I can't count. I've always had a running database, just for that quick SQL statement (like how old am I in days), or just for a quick sanity check.

I've installed Oracle database version 8i through 11gR2, many, many times (only recently on a non-windows platform though).

I've installed and run Oracle Application Server 9i through 10g.

OBIEE? 10g and 11g.

JDeveloper.

SQL Developer.

Forms and Reports.

EBS even.

The point is, Oracle makes it super-easy to test-drive this stuff and learn it. You have no excuses, the means to your end are out there.

5
Test. I spent a good year at the first job writing nothing but SQLUnit tests. I hated it, every minute of it.

But guess what, it was good for me. You know why?

I had to build scripts to populate and teardown the database.
I had to build SQLUnit tests to login, because we used VPD and nothing worked without a valid login.
I had to build hundreds of little tests. 7 to 10 of them for each procedure or function.

What did all that testing buy me? Well, I know what errors are thrown when you pass in NULL. I know about no_data_found and a host of other errors.

If I were in charge and I got to hire a junior programmer, I would make them build test cases for their first year.

So I have 5 ways to become a professional developer. I have no doubt there are more and someday I'll probably add to the list. Feel free to find the comments and add your ideas on the topic.

Friday, December 17, 2010

Fun Day

Today was the day of my presentation.

Around 4:30 this morning, as I was trying to fall asleep, I had wondered whether I would wake up or not in time. I did, but it took me 2 hours to wake up from not sleeping much. I was a tad nervous. Fortunately I didn't have to get up in front of people, I just had to talk into the phone. The downside to that is that I was just talking into a phone.

I'm probably what you would call a "people person" and over my many moves as a kid, reading people is something I do fairly well. Not seeing them puts me at a disadvantage...but I digress.

The topic of my presentation was twitter and how it can be used to help you professionally. More precisely (and named by Ms. Malone), Professionally Speaking in 140 Characters or Less: How Twitter Can Help Your Career. I've benefited greatly from my use of twitter, I just want to share that with others in the hopes they they can find value out of it. A popular misconception of twitter is that people twit about taking a shit. Well, I haven't seen one person tweet about that...although I'm sure someone has. I like to think that I follow a classy bunch of folks.

Anyway, here is the final presentation, if you would like to download it. Here's the prezi twitter presentation, but it will be changing if not completely trashed.



While riding the high of my first presentation in almost 3 years, @surachart posted this:



A couple of months ago I had been contacted about a profile for Oracle Magazine. I wonder if this was the one?



Page can be found here. Online version of the magazine can be found here.

So, it was a super cool day for me. I celebrated by having 2 Sierra Nevada India Pale Ales (and unlocking 2 new badges) and then falling asleep (crashing) around 9:30 PM.

Tuesday, December 14, 2010

Video: Exadata Hybrid Columnar Compression

I think these videos are a great introduction to new features. Keep 'em coming.

Monday, December 13, 2010

OBIEE 10g: Replace Column or Table in LTS

Even though I'm working hard on learning 11g, I still find little things in 10g that help.

Case in point, I was going through and trying to clean up the physical and BMM layers. Our physical model will now be shared between multiple projects. So how best to do that?

Using aliases along with naming conventions and display folders can help. By doing this, I will be able to "unhook" the source table from any and all joins. The goal is to keep these free...the aliases will be used to join to their respective tables (aliases).

The naming will be something like:
Dim_<source_table_name>_<subject_area>
Fact_<source_table_name>_<subject_area>
Outrigger_<source_table_name>_<subject_area>
Bridge_<source_table_name>_<subject_area>
To further organize them, I will put them in a Display Folder.



I'm just going to create one called "New."

I'm using the SH schema here, so it should be easy to follow along.

Next up, I'm going to create aliases for all my tables. For the sake of brevity and my sanity, I'm only going to use SALES, PRODUCTS, and TIMES.



When I initially started to clean things up, I would screenshot the Column Mappings section of the Logical Table Source. Fun right? There has to be a tool for this. Sure enough...

OK, this post has been sitting here all day...I'm cutting to the chase now.

So I've hooked up (joined) all my new tables. Now I just want to replace them. I could do it by hand, but what fun would that be. Here's the source for SALES.



If you go to Tools -> Utilities, you'll see this screen and the fun little tool we'll use for this exercise:



Now make sure you select "Replace whole table." On the left side, select the table you want to replace, on the right side, select the table you will replace it with.



Hit Next.



Blah blah blah, which translates into the column mappings. Since we are replacing the source table with a copy of itself, this part is easy.

Here you get a nice summary of what the tool will actually be doing.



Hit Next and voila!



Now, what does this buy you?

Since you are now sharing your physical layer with multiple Subject Areas, you've added a layer of abstraction to protect yourself. Let's say a new column was added to SALES. After you've updated your physical layer, you are now free to either keep the others the same or add it to that particular Subject Area. For my (mythical/theoretical) example, I just need that new column in one Subject Area, so I'll just need to pull that into the BMM and I'm done.

An even better example would involve joins. Maybe Subject Area 1 is based on one particular set of joins and the others are not. This should allow you to easily handle this kind of scenario.

I do apologize for this post breaking up as it did. I had the best intentions in the world this afternoon. Hopefully I got the gist of the tool across, if not, yell at me and I'll update it later.

Professionally Speaking...

Last year I submitted an abstract to ODTUG on using social media to increase productivity. It was one of those whims as the deadline for submissions was, that day believe. It got rejected.

I've pondered doing this presentation for quite awhile, but haven't had the energy or drive to do so...not to mention a venue, I need a venue.

On an email exchange following a previous FMT Systems webinar, So, Tell Us What Really Happened at OOW 2010!, I threw my idea out as a possible topic (I should really stop doing that). Of course Hope Malone, the Marketing Director, thought it was a great idea. So here I am.

Ms. Malone, at my behest, gave me a much better title (if not longer!), Professionally Speaking in 140 Characters or Less - How Twitter Can Help Advance Your Career. That's 92 characters if you are counting.

This is a topic I am very passionate about. Social media in general and Twitter specifically have been very good to me, both personally and professionally. I wish that more Oracle folks would use Twitter, there are just a handful right now who are actively engaged...which I believe is unfortunate. So if you have time on Thursday, December 16th, click on the link above and sign up. At the very least, you can heckle me or just laugh at my strange voice.

I'll also be test driving Prezi, cool-not-PowerPoint presentation software. Actually, you can get a sneak preview here (without my wonderful voice):

katezilla: 6

Today is Kate's 6th birthday.



It's becoming a trend, I wrote about it last year too.

Of course, almost 6 years ago, they said she wouldn't live this long. As Kate is wont to do, "Up Yours Doc!" (If she could actually give the middle finger, I have no doubt I would have taught her by now.)

It has been an interesting year for all of us. We had hoped for some direction early in the year with our visit to the Tridas Center...only to be severely disappointed. She pulled another one of her Houdini stunts with The Reaper this summer (7, 6, 5, 4, 3, 2, 1+0). Last month, we finally got a diagnosis, PDD-NOS.

So, Happy Birthday Kate!.

Thursday, December 9, 2010

OBIEE 11g: Getting Started - Part I

A few weeks ago I procured some nifty hardware. Slowly but surely I've begun to build out certain VMs. Currently, this one computer serves as 4:

* Host - Ubuntu 10.10
* Guest - Ubuntu 10.10 - running my wiki, subversion and other documentation type things.
* Guest - Windows XP - Work. This is a VM specific to my current client.
* Guest - Oracle Enterprise Linux 5.5 (Carthage) 64bit. This is my OBIEE 11g playground I'm trying to build out. I have installed the 11gR2 database. I have run the repository creation utility (rcu) that installs the metadata for WebLogic and finally I have installed and (mostly) configured OBIEE 11g.

I'm barely using 10 GB of my 24 available. I so happy.

Anyway, I've configured my database to automatically startup/shutdown when the VM is started/shutdown. I followed Dr. Hall's guide here. Now I'm in the process of getting WebLogic configured to do the same thing automagically. (I should never have shut it down once I got it running...)

Believe it or not, I'm reading the documentation. 11g is a drastic change from 10g, especially with the integration of WebLogic. It's a downright beast.

I still don't know the difference between the Administration Console and Enterprise Manager. But I'm hacking away, as usual.

Since I'm trying to automate this whole thing, I don't necessarily want to use either of those tools. I want to start up the server and have everything running. Here's where I'm at now:



How did I get there you ask?

I opened up a shell and then navigated to:

/obiee/user_projects/domains/bifoundation_domain/bin

In that directory you will find startWebLogic.sh
[oracle@obiee ~]$./startWebLogic.sh
You'll be prompted for a username and password; weblogic is the username and whatever you entered for the password upon installation.

From the Administration Console, I go to bifoundation_domain -> Environment -> Servers



Click on the Control tab, select bi_server1 and select Start:



Awesome. What's a freaking Node Manager?

Here's the text for easier reading:
* For server bi_server1, the Node Manager associated with machine localhost.localdomain is not reachable.
* All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager or you are not authorized to perform the action requested. No action will be performed.
Great...I need to start something else?

Back to the docs.

That took me down a rabbit hole ending up at the wlst (web logic scripting tool and all the examples are in windows).

I looked around the file system for config or log directories to see if I could spot something. Somehow I ended up in:

/obiee/wlserver_10.3/server/bin

Makes sense right?

In there, 2 files: setWLSEnv.sh and startNodeManager.sh

Run setWLSENv.sh first and you get this:
[oracle@obiee bin]$ ./setWLSEnv.sh 
CLASSPATH=/obiee/patch_wls1033/profiles/default/sys_manifest_classpath/weblogic_patch.jar:
/obiee/jrockit_160_17_R28.0.0-679/lib/tools.jar:/obiee/wlserver_10.3/server/lib/weblogic_sp.jar:
/obiee/wlserver_10.3/server/lib/weblogic.jar:
/obiee/modules/features/weblogic.server.modules_10.3.3.0.jar:
/obiee/wlserver_10.3/server/lib/webservices.jar:
/obiee/modules/org.apache.ant_1.7.1/lib/ant-all.jar:
/obiee/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:

PATH=/obiee/wlserver_10.3/server/bin:
/obiee/modules/org.apache.ant_1.7.1/bin:
/obiee/jrockit_160_17_R28.0.0-679/jre/bin:
/obiee/jrockit_160_17_R28.0.0-679/bin:
/usr/kerberos/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/X11R6/bin:
/home/oracle/bin

Your environment has been set.
Now run startNodeManager.sh (too much output, you don't get to see it).

Finally, back to the Administration Console, select bi_server1 again and click on Start:



Much better message this time.

And now I wait...

A minute or 2 later:



Voila!

Or so I thought. I navigated to Answers and was greeted with the wonderful 500 - Internal Server Error



I'll worry about that one tomorrow. It's a start though.

Thursday, December 2, 2010

Win an Exadata Database Machine!

It's not a joke. No, there is no way to win one, yet.

Wouldn't it be nice to have one of these bad-boys in your home office though?



That was my original thought when I posed the question to The Twitter.



After a few replies I realized the absurdity of my thought to have my own private Exadata.

What about small businesses though? Non-profits doing research?

Wouldn't that be a great PR move? A way to give back to the community.

I have ulterior motives, of course. I may be helping out a friend on a database for autism research. If you don't know already, my daughter was recently diagnosed withPDD-NOS, which is...well, it's sort-of autism. I just call it autism though so I don't have to go into the details.

Wouldn't it be great to build out something like that on top of the latest, and greatest, hardware/software combination around? For kicks, I could ask about OBIEE as the reporting layer. (See how selfish I am?)

Anyway, just an idea. I'm full of ideas (or shit as most would say).

What do you think? I'm sure Oracle has tons of charities or causes they support. Would this be a worthwhile cause for Oracle?

As Jake would say, find the comments.

Sunday, November 28, 2010

Sunday, November 21, 2010

IT Meritocracy

Had to look up the word meritocracy, just so I didn't look stupid:

* a form of social system in which power goes to those with superior intellects
* the belief that rulers should be chosen for their superior abilities and not because of their wealth or birth
wordnetweb.princeton.edu/perl/webwn

* a system that rewards an individual based on their own talent and ability.
www.deanza.edu/faculty/leeethan/glossary.html

* A system in which the talented are chosen and moved ahead on the basis of their achievement.
www.talentrecessions.com/terminologycontent.html

IT is very meritocratic. I love that. It's partially what drew me to IT. It has allowed me, without formal education, to gain acceptance and and make a good living.

Let's face it though, IT, generally speaking, is the Wild West. It is no where near as established as Accounting, or Architecture, or Engineering...there is always more than one way to do a particular activity. Not so much in those other professions.

They have history behind the way things are done. It was proven long ago, in many instances, that doing something a particular way is the best way to do it. Those professions today stand on the shoulders of giants.

We really don't have that. Our industry is just too young.

I think this is one of the reasons I enjoy the DBA world, things are provable. DBAs can prove why something is better this was versus the other way. Developers have a harder time. Like I said, there is more than one way to do things.

Technology.
Which one? PL/SQL and put it in the database? (a resounding yes from me). What about Java and moving the business rules to the middle tier? Or Ruby? Or any other language for that matter?

Those decisions are mostly based on a developers comfort zone, or what's hot at the moment. It's not provable though, that one is better than the other. We've had the discussion here on multiple occasions (here, here, here, here...and a bunch of other ones)

How does this relate to meritocracy?
Good question. I would say that most decisions to go a certain direction are based on experience. Experience = merit, in the world of common sense anyway. IT is different though, experience does not equal merit. Just because you have worked in IT for 30 years, that does not make you an expert in a given technology. Sure, for the very rare person, that 30 years is quite valuable...they have seen it all and done it all...and they have learned along the way. I can usually spot those types easily, as there is a sort of calm to them, humility. I tend to gravitate towards those people (which is why I love OOW and other conferences so much, there are a lot of super smart people in close proximity).

I'm not perfect of course. I can remember an incident a couple of years ago where I called a colleague and friend, complicated. In fact, he wasn't, I just didn't know what he was doing. I learned quite a lot from that gentlemen.

How do you tell who is who?
Is it the person like me who isn't afraid to say "I don't know." Or is the person who says, unflinchingly, that we should use technology A over technology B? I usually have a good idea of who's talking out their ass (including myself, on those occasions where I let my emotions get the better of me)...but how do those not "in the know" know? Managers? Other colleagues who might not be versed in a particular technology? How can they tell?

I tend to end up on the wrong side of that. My manager, or someone else, believes I'm just a mal-content. I am working on that.

The meritocratic IT environment is equally fun and frustrating. I just need to figure out a way to minimize the frustrating part of it.

Thursday, November 18, 2010

katezilla: Rock Star

Of course I think my daughter is a rock star. Don't you?



It's been a little while since I have written about Kate, so here goes.

One of the awesome things about OOW this year...just about everybody I met asked about Kate. How cool is that? You guys are some pretty awesome people.

Kate has been doing well...nothing major to report over the last couple of months, until today.

Today was our follow-up visit with Dr. Sutton of Butterfly Effects. Back in February, we had a rather...poor performance from another doctor. He took our money and didn't really provide us with anything; no direction, no "I don't know", no nothing really. "I don't know" is just fine with us. If there is anything we've learned with Kate...she appears to be quite unique...so "I don't know" is perfectly acceptable. Funny how that ties in with IT isn't it? (no, I'm too lazy to explain that one)

Back to Dr. Sutton and today's visit.

We were aware that Dr. Sutton had already spoken to Kate's teacher and her Speech Therapist, way more than the previous doctor. Good sign. We met her at her office this morning at spent almost 2 hours there. She allowed us to vent (boy, you don't want to get either of us talking about Kate and her history and our plans...we'll go on forever). She took notes. She asked questions that she missed the first time.

The best part (weird, I know), Kate actually got a diagnosis. PDD-NOS. Pervasive Developmental Disorder - Not Otherwise Specified. In essence, Autism.

(Small dig: The first doctor said she didn't have PDD...thanks buddy.)

So what does this mean?

Means lots of goodness.

We now have a diagnosis. Yes, it might seem weird to be happy about something like this...but we've been searching for the longest time. It's...just a relief.

Mentally. Something to hang our hat on. Something to work towards getting her as functional as possible. Hope.

Financially. With no diagnosis, insurance doesn't cover many of her services. By many I mean almost all of them. PT, OT, Speech, her Home Health Aid (new acquisition). That's almost all out of pocket. Not sure why we pay for health insurance...it hasn't done us much good (well...just in regards to Kate).

Kate. Kate will now qualify for more. More services. Better services. More services too. She'll have access to a host of organizations now that will be able to help her (and us).

So we're excited! katezilla, Rock Star!

Wednesday, November 17, 2010

Investing In Me

Today I finally received my new computer. I haven't purchased a desktop in...almost 10 years.

This one definitely goes beyond mere desktop though. I bought a ZU 4110 from ZaReason. It's billed as server class. Here are the specs:

Dual Xeon E5504 Quad-Core 2 GHz
24 GB ECC DDR3-1333 (Memory)
2 1 TB Hard Drives

Pretty sweet huh?

How about this?



Or this?



Probably, but I look at it as an investment in me. As I learn more and more about various Oracle tools, I want to install them and play around with them. If I want to be an architect, I should know and understand how they play together. Pretty easy decision, despite the cost. Oh yeah, that 24 GB RAM? Upgradeable to 96. Plenty of room to grow.

Now I should be able to easily fire up multiple VMs, say, one for the database that isn't underpowered. One for OBIEE on Linux. One for the OBIEE client tools on Windows. Perhaps my own WebLogic instance? Who knows.

Point is, I can play, without fear of hitting the limits of my computer. Of course having limits is good...sometimes. Teaches you how to conserve. No more conserving for me.

I'm now equipped with my own personal test lab...and a sauna to help me lose weight.

One last thing, I'll be offering up slices to help pay the bills. :)

Thursday, November 4, 2010

CyanogenMod 6.0.2 - Email Force Close

This week I managed to brick my phone, then with help unbrick it, and like an ID10T, I messing with it again.

After getting it fixed yesterday, I reinstalled CyanogenMod 6.0.2. Lo and behold, those Email Force Close errors showed up again. Great.

Fortunately I use GMail, so it doesn't really affect me, but it is very annoying.

With a trick I learned yesterday, I decided to see what was going on.

The trick is the Android Debug Bridge, or ADB. Among other things, it allows you to run shell commands on your phone. Since I have had Ubuntu for close to 2 years now, I'm naturally a Linux expert (quit laughing).

The specific command I am talking about is logcat. You plug your phone in, run adb logcat and you can see what's going on...it's a log file.

With it turned on, I went to applications and selected Email.



Sorry! The application Email (process com.android.email) has stopped unexpectedly. Please try again.

I then checked the log output...and what could it be? I'm thinking it's some sort of java error, but after reading more closely...
I/Database(19754): sqlite returned: error code = 1, msg = no such column: accountColor
D/AndroidRuntime(19754): Shutting down VM
W/dalvikvm(19754): threadid=1: thread exiting with uncaught exception (group=0x4001d7e0)
E/AndroidRuntime(19754): FATAL EXCEPTION: main
What's that? Database? Really?

A little further down:
E/AndroidRuntime(19754): java.lang.RuntimeException: Unable to create service 
com.android.exchange.SyncManager: android.database.sqlite.SQLiteException: no such column:
accountColor: , while compiling: SELECT
_id,
displayName,
emailAddress,
syncKey,
syncLookback,
syncInterval,
hostAuthKeyRecv,
hostAuthKeySend,
flags,
isDefault,
compatibilityUuid,
senderName,
ringtoneUri,
protocolVersion,
newMessageCount,
securityFlags,
securitySyncKey,
signature,
accountColor
FROM Account
(formatted for better readability)

So someone forgot to add a column? Nice.

Now I know I can put a database on there, I'll be more likely to write something for it. :)

Wednesday, November 3, 2010

How To (Un)Brick Your htc Incredible

Another Great Customer Service Experience

Following on the heels of me breaking my phone for 2 days, I am now up and running again with the latest CyanogenMod 6.0.2 release.

How did I do it? Was it magic? My mad skillz (magic would be more believable)?

We'll go with none-of-the-above.

Mostly, it was Jake. I think he's my unofficial protector.

Late last night he saw my tweets and did a quick post, How is Geekery Like Bank Robbery?, basically talking about the geekiness of many of us who just can't stop what we're doing.

After a few more updates by me, Jake tweeted Android001 and "copied" me.

Next thing I knew I was in an IRC chatroom called #rootmydroid.

I guess I shouldn't be so amazed any more, but I am. People are just awesome. Going out of their way to help those they do not know, for no pay and lot of gratitude from people like me.

What follows is the transcript of that discussion. Blank lines are another user or off topic comments.
[16:46] == chet [ad414951@gateway/web/freenode/ip.173.65.73.81] has joined #rootmydroid
[16:46] -ChanServ- [#rootmydroid] Welcome to #rootmydroid. If nobody is around, please come back later!
[16:47] <@tur42keys> Hi chet
[16:47] hi! @Android001 asked me to stop by (@oraclenerd)
[16:48] <@tur42keys> yeah, I've been reading :)
[16:48] <@Android001> Hi chet
[16:48] <@Android001> Herr we can help :)
[16:48] lol - well, I hope I haven't completely bricked this thing
[16:49] What information can I provide to help you help me?
[16:49] (I'm fairly technically savy)
[16:49] <@tur42keys> Well I've read this, http://www.oraclenerd.com/2010/11/how-to-brick-your-htc-incredible.html
[16:49] <@tur42keys> So I think I'm up to speed :)
[16:50] <@Android001> Agreed
[16:50] <@tur42keys> Have you tried to unroot using an RUU?
[16:50] Not that I am aware of. I was just getting to that last night when I gave up.
[16:51] <@tur42keys> actually, have you done a 'Wipe data/factory reset' in clockworkmod?
[16:51] == noddy_ [6d9922ca@gateway/web/freenode/ip.109.153.34.202] has joined #rootmydroid
[16:51] <@tur42keys> that usually fixes most FCs
[16:51] <@Android001> Well there are 2 possible solutions so far
[16:52] I've done all manner of Wipe data/Factory Reset, wipe cache, wipe system (didn't care about user data)
[16:52] <@Android001> Hmm
[16:52] <@tur42keys> and it's still FCing?
[16:52] after just installing 6.0.1, it goes to the cmod splash screen where it just gets in an infinite loop
[16:52] <@tur42keys> hmm
[16:53] i have to pull the battery to stop it
[16:53] <@tur42keys> Do you have adb?
[16:53] <@Android001> Shh
[16:53] <@Android001> Shh
[16:53] <@Android001> Sorry
[16:53] I do have adb
[16:53] <@tur42keys> lol
[16:53] <@tur42keys> boot it up, then
[16:53] I thought you were telling @tur42keys to not tell me about adb! :)
[16:53] <@tur42keys> do adb logcat
[16:54] <@dmzda> adb = aweseome
[16:54] <@dmzda> damn
[16:54] <@dmzda> adb = awesome
[16:54] <@tur42keys> hehe
[16:54] <@Android001> chet: no! I'm on my phone was a typo
[16:54] <@Android001> :p
[16:54] logcat: not found
[16:55] <@tur42keys> Is your phone booting up?
[16:55] ah...I'm in recovery...shoudl i just let it go into that splash loop?
[16:55] <@tur42keys> yeah
[16:55] <@Android001> Yes
[16:55] doing that now
[16:56] <@tur42keys> adb lolcat also works :)

[16:57] ooh...that's pretty awesome!

[16:58] <@tur42keys> chet: actually, do adb lolcat *:EW > logcat.txt
[16:58] 10-4

[16:58] <@tur42keys> Then upload the logcat.txt to our dropbox thingy

[17:02] I have 300 KB of logcat, is that enough? (didn't seem to want to end)
[17:03] <@tur42keys> Yeah that's fine

[17:03] <@tur42keys> Pastebin it pls

[17:04] Here's the link: http://pastebin.com/Kh1AYW0n

[17:04] <@tur42keys> Thx chet

[17:08] <@tur42keys> Chet: that's a lot of errors lol

[17:09] yeah, scary...lines 105 to 153 just seems to repeat over and over
[17:10] <@Android001> Ye. It isn't good
[17:10] i'm game for whatever you suggest - this is an expensive paper weight right now

[17:11] <@dmzda> I meant at chet

[17:12] i'm running on ubuntu, just an FYI
[17:13] <@dmzda> Me too :D
[17:13] <@tur42keys> chet: yay :-)
[17:13] all the guides seem to be in windows...for whatever reason, the adb thing worked like a charm
[17:13] <@tur42keys> Yeah
[17:14] <@Android001> chet: excellent, rarely do we get people with enough sense to be running Linux
[17:14] lol
[17:14] <@tur42keys> Yeah
[17:14] i think i'm blushing
[17:14] <@tur42keys> Hehe
[17:15] <@Android001> Lol
Yeah for me!
[17:16] <@dmzda> chet: What have you tried so far?
[17:18] boy...that list is long...just a sec

[17:21] I can write up another post and list the details there - that should give you time to figure out
all my wrong doings
[17:21] <@tur42keys> I can see a few ways forward
[17:22] <@tur42keys> We can unroot via fastboot on command line
[17:23] that would be awesome
[17:23] * Android001 if I kick someone in the next minute its just a test :p
[17:24] <@tur42keys> So you've got fastboot on your computer?
[17:24] if i did would i get the kudos like with ubuntu?

[17:24] <@tur42keys> Hehe yeah chet
[17:24] <@Android001> Lol

[17:29] 6.0.2 doesn't have market, so I found out

[17:29] i do not have fastboot installed on my computer
[17:29] <@tur42keys> chet: it should come with adb
[17:29] ah...checking
[17:30] <@Android001> In same /tools directory
[17:30] i don't see fastboot in that directory

[17:30] <@tur42keys> U got the android sdk?

[17:31] i do have it, but I don't see fastboot in the /tools folder
[17:31] <@tur42keys> Hmm

[17:31] <@Android001> chet: odd..

[17:32] should I redownload the sdk?
[17:32] <@tur42keys> Yeah try chet
[17:32] <@Android001> Sure its not hiding files?
[17:32] noddy: http://wiki.cyanogenmod.com/index.php?title=Gapps#Google_Apps
[17:33] ls -la
[17:33] etcltool then hierarchyviewer
[17:33] <@Android001> chet: make sure show hidden files is checked
[17:33] <@Android001> An easy mistake
[17:34] <@tur42keys> Hmm strange chet
[17:35] <@Android001> Very weird
[17:35] <@tur42keys> I'll get you something with fastboot in
[17:36] <@tur42keys> filefactory.com/file/b3d8bhc/n/Other-Shitz-DesireRoot.zip
[17:36] <@tur42keys> In there

[17:36] <@tur42keys> Called fastboot-linux
[17:39] waiting for download

[17:40] <@Android001> Right I must depart
[17:40] <@Android001> Good luck change
[17:40] <@Android001> chet:
[17:40] <@Android001> Not change :p
[17:40] <@tur42keys> Spell check fail
[17:40] <@Android001> Yup
[17:40] <@Android001> See ya tur42keys
[17:40] <@tur42keys> Byee

[17:42] should i just copy fastboot-linux into my /sdk/tools folder?
[17:42] <@tur42keys> Yeah
[17:43] <@tur42keys> Then rename to fastboot
[17:43] <@tur42keys> And copy that zip file you were trying to flash in hboot earlier too
[17:44] PBG1IMG.zip?
[17:44] <@tur42keys> Yeah
[17:44] <@tur42keys> And rename it to rom.zip
[17:44] where would you like me to put it? on the root of the sdcard?
[17:44] or local, on my 'puter
[17:44] <@tur42keys> In the same folder as fastboot
[17:45] 10-4
[17:45] <@tur42keys> On your computer
[17:45] <@tur42keys> Then boot your phone in fastboot
[17:46] <@tur42keys> Power + back
[17:47] I think I'm ready...I'm at the ClockwordMod boot screen -
HBOOT USB PLUG -> FASTBOOT (highlighted)
[17:47] <@tur42keys> Ok
[17:48] <@tur42keys> Press power
[17:48] ok, FASTBOOT -> BOOTLOADER
[17:48] <@tur42keys> Yeah
[17:48] <@tur42keys> Now on your pc
[17:49] <@tur42keys> fastboot oem rebootRUU
[17:49] <@tur42keys> Sudo, ./ etc
[17:49] <@tur42keys> :-)
[17:49] chet@cdj-laptop:/tools/downgrade_files$ fastboot-linux oem rebootRUU ... OKAY
[17:50] <@tur42keys> What do u see on your phone?
[17:50] OOOHH...the pretty HTC logo that i saw in one of those downgrades!
[17:50] <@tur42keys> Hehe
[17:51] <@tur42keys> Now fastboot flash zip rom.zip
[17:52] "sending 'zip' (142861 KB)...
[17:52] writing 'zip'...
[17:52] <@tur42keys> [INFO] etc :-)
[17:52] FAILED (remote: 90 hboot pre-update! please flush image again immediately)
[17:53] <@tur42keys> Ok
[17:53] <@tur42keys> Run that command again
[17:53] <@tur42keys> fastboot flash zip rom.zip
[17:53] working...
[17:54] * tur42keys crosses fingers
[17:54] (further along)!
[17:55] <@tur42keys> Don't touch your phone btw :-)
[17:55] not touching...pretty green bar across the bottom now
[17:55] <@tur42keys> Coolio

[17:56] sweet!
[17:56] <@tur42keys> And you're done
[17:56] <@tur42keys> fastboot reboot
[17:58] htc Incredible...
[17:58] htc - quietly brilliant
[17:58] verizon wireless...
[17:58] effing awesome sauce!
[17:58] <@AColwill> htc - quietly retarded
[17:58] <@tur42keys> Woop!
[17:58] <@dmzda> YAY
[17:58] <@dmzda> Awesome
[17:59] side question: would you guys mind if I posted this dialogue?
[17:59] <@tur42keys> Nah its fine
[17:59] <@dmzda> No
[17:59] sweet...i have a screen again!

[17:59] <@tur42keys> Publicly logged anyway :-)
[17:59] <@tur42keys> LOL
[17:59] Select your language!
[17:59] all of you are my new heros
[18:00] i owe you multiple beers
[18:00] <@dmzda> chet: Glad it worked out
[18:00] if anyone is near tampa or chicago...
[18:00] thank you all so much...very freaking awesome.
[18:01] <@tur42keys> np :-)
[18:01] <@tur42keys> Gotta go
[18:01] <@dmzda> cya tur42keys
[18:02] <@dmzda> chet: Yay for mention :D
[18:02] == tur42keys [~OnPhone@pdpc/supporter/student/tur42keys] has quit [Quit: Pulser is awesome!
Badgers ftw! Vote :coolbadger:]
[18:02] very much appreciated...thanks again!
So thanks again to Android001 (David), @dmzda and @tur42keys. I owe many, many beers.

How To Brick Your htc Incredible

I've had the pleasure of creating a beautiful little paper weight.

Back at OOW, Jake told me it would take one click to root my phone. I took him at his word. What I failed to gather, was hat he didn't mean one click, he meant "one click." As in some sort of multi-step process that requires me to read stuff. I don't read much. I just take things apart and attempt to put them back together.

Anyway, somehow I talked Anthony, one of Jake's teammates, to go ahead and play with my phone (i.e. root it). He did so while sitting at some bar in San Francisco, giving me wi-fi tethering for the win.

Flash forward to a couple of weeks ago, when I decided to get super fancy and install one of the CyanogenMod ROMs, 6.0.2 to be exact. All went well using ClockworkMod, save for the fact that a certain server was down that didn't allow me to download the Google Apps ROM. Once I got that one, installed it and all seemed to be right in the world.

Until I started to get these android.process.email Force Close (FC) errors. Very annoying.

Guess what I did?

I tried to fix that.

Hence the reason for the post. At this point, I am receiving the following errors through ClockworkMod Recovery while attempting to mount /data: E:Can't mount /dev/block/mmcblk0p1 (file exists). Awesome sauce.

I'm simply trying to downgrade my phone back to stock so I can start all over with this mess. After following the instructions to load the PB1IMG.zip to the root of my sdcard, HBOOT -> BOOTLOADER says it can't find the image, which probably has to do with the inability of the system to mount the above drives before boot.

I'm currently reading A Harrowing Tale of Incredible Rooting as this seems to be the closest to my situation. I'm also reading [SOLVED] internal storage partitions screwed up.

Also, I've managed to access the phone directly using the Android Debug Bridge (ADB). I've even installed Eclipse and the Android plugin that goes along with it (that's not as useful as ADB though). ADP allows you to run shell commands directly on your phone.

Almost forgot, there seem to be quite a few YouTube videos on downgrading your Incredible which I've found very helpful. In particular the ones below.



I'll continue to update this page as I progress (or don't).

The bright side of all this is that I won't be intimidated by creating my first Android application. Seems fairly easy to do (now).

Update: 17:11 EST
I'm now working with @Android001 and others in an IRC chat.

So far, I've produced this awesomely wonderful logcat file.

Update: 18:11 EST
Back up and running!

Friday, October 29, 2010

OBIEE: Evaluate

I haven't had a whole lot of opportunities to use this function. It's actually so rare, that I forget how to use it.

In the fine tradition of documenting everything, here I go.

Evaluate Syntax:
EVAULATE('your db function(%1,%2)', parameter list)
The reason I need to use it is because we are removing a view that has some fun SUBSTR/INSTR action in it. I tried writing it up in OBIEE SQL, but it doesn't allow you to traverse from the end of the string...well, someone out there probably could, but I like to limit this kind of thing in the RPD, preferring instead to put it in the database. As much as we'd like to believe it, OBIEE will not be the only application accessing this data. But I digress.

Here's the original Oracle SQL:
SUBSTR( col1, INSTR( col1, '/', -1 ) + 1 )
Which reminds me of something else...there is no real way to test this stuff in the admin tool (RPD). You have to create it there and then create an ad-hoc report to make sure it's working as it should. Rather than deal with that, I just started in Answers.

First go:
EVALUATE( 'SUBSTR( %1, INSTR( %1, '/', -1 ) + 1 )', '/TESTING/TESTING1/TESTING2/REPORT_NAME' )
This resulting in the following when I hit OK:



OK, my bet is that those single quotes inside the single quotes were the cause. So I tried variations of 2 single quotes, 3 single quotes and even double quotes. None of those worked either.

What if I just put that '/' in the parameter list?
EVALUATE( 'SUBSTR( %1, INSTR( %1, %2, -1 ) + 1 )' , '/TESTING/TESTING1/TESTING2/REPORT_NAME', '/')
Voila! Yay for me.

Wednesday, October 27, 2010

Customer Service

Recently, I received a message via LinkedIn from a Product Manager at Oracle.

I won't say who, just because I wouldn't want to get them into any trouble.

The email was fairly general, mostly asking if I had used their product and if I had any questions. Well, I hadn't used that particular product, but I did have questions as it falls into my DW/BI realm.

So I sent my questions.

Within a day or so, I had this long, very detailed description about the differences between the 2 products and why one would choose one over the other (both products were Oracle products). It also included customer examples (sans customer names of course) of who is choosing what and when.

I love these kinds of exchanges. I love having the ability to ask questions of people who manage products because you get real insight into how they are thinking.

I believe this speaks volumes for this individual specifically and Oracle in general. I know Oracle isn't perfect by any means, but what company of that size is? This person wanted to make sure that I was informed, reached out to me, and provided me with the answer to my questions.

I certainly wish there were more people like this (not just at Oracle). After having sat in on an Exadata PoC, I can appreciate it that much more since I never get to spend the money. So thank you anonymous Oracle employee, you set a good example for quite a few people.

Tuesday, October 26, 2010

Google Is Stalking Me

Last week I was doing some research on buy vs. leasing a server/workstation.

Ultimately, I decided to buy one, this one.



I bought it because Amazon was just too expensive (for my purposes) and so was collocating a server (I wanted something a little more beefy than normal). I wasn't about to pay $1000 a month.

During that research, I made it to Storm website (on demand hosting). I'm not sure if I actually clicked on an advertisement on the result page of my Google search or what...but now they are everywhere.

I went to 4 sites today, and here's what I found:

wunderground.com



forum.xda-developers.com



somethingawful.com



linuxquestions.org



addictivetips.com



factmag.com



It's just a tad creepy, but I may be to blame for click on an advertisement (still unsure). Anyone out there experience something like this before?

Wednesday, October 20, 2010

DDL Auditing - Revisited

Of course I can't find the post(s) that I read recently, but they were all concerning auditing DDL. The most desirable solution is to use the built in auditing providing by Oracle...the only problem with auditing, in general, is that no one really monitors it. I'm sure there are numbers out there (read about that too, but can't seem to find the post). Oh wait, I found it, it was a video that I got via the Database Insider newsletter. You can see it here.

The gist of that video (as cheesy as it may be), is that some broker figures out a way to submit trades with his account that don't really exist. He's paid the commission, automatically, some $10 million. The Risk/Security Officer talks about the amount of time (months) they spent trying to track down how it was done. They were at least smart enough to have auditing turned on, however, they never monitored it. Somehow, all this led me to DDL auditing. No idea how, it just did.

After thinking about it for a few days, I realized the similarity between that and my PMDV project I did last year. It only made it to version 0.1, but this gave me the idea to revisit it. Maybe it was just poor naming/branding (PMDV stands for Poor Man's Data Vault)? Maybe it did just suck eggs? Tough to say for sure.

To sum it up quickly, it required a "ticket number" or "work order" to set an application context. Without that application context set, you could not perform any DDL. On top of that, it would record all the DDL changes performed during that deployment window and give you decent reporting through an APEX front end. Like I said in one of those other posts, a former company of mine had to provide the security team with audit reports for each deployment. While the built-in auditing would capture all this, what I created will at least capture that in one place and provide the objects that change.

So perhaps this falls into the Change Management landscape (which is on my radar again...big, big topic).

Guess what, I just remembered how I came to remember this...a conversation on Twitter with @hillbillytoad and @krisrice...that's what led me to the DDL trigger and auditing. I think Kris suggested that a DDL trigger should be installed to prevent little old me from doing damage. :)



That link led to here and then a few other places...

Monday, October 18, 2010

OOW 2010: Blogger Meetup - The Winner!

After waiting for Vanessa to get back from either OOW Detox, vacation, or just life, the winners of the Apple TV have finally been announced.

Sunil Ranka, this guy:



Won one (yes! more than 1) of the Apple TVs with his post Mapping the Maze, Online Bloggers to Real World Faces : Pythian Blogger Meetup at OOW10.

Guess who won the other one? Go ahead, take a moment.

Part I - Part II - Part III - Part IV - Part V

You know when the teacher says, "I need a one page paper on George Washington" and one of your classmates turns in 10 pages, like, the week before it's due? Apparently I'm that guy.

I may have scared off a few people from writing about the event. That wasn't my intention, but apparently I did want it.

So, my first Apple product (wifey does have an iPhone). It should be interesting, I'm sure I'll report back here once I figure it all out.

Thanks to Pythian, HP and OTN for supporting the event. Thanks to Pythian for giving away the Apple TV.

Thursday, October 7, 2010

OBIEE 11g: Connect to Online Repository

I have been doing a quick and dirty proof of concept on 11g. The 32 bit installation went very smoothly on Monday, and then the hard work began.

11g was quite different from 10g and possibly the biggest differentiator was its integration with the WebLogic stack. While I do understand that move, it certainly makes things a more complex in the short run.

So I'm up and running and have the first RPD installed (that's another post, deploying an RPD...joy!), then the change requests begin to roll in. When I would try to open the RPD in online mode, I was greeted with this challenge:



OK, I know the repository password, but I don't remember setting an Administrator password (that was the default username). I tried everything I could think of, Admin123, which is the repository password for the sample application. Tried password. Tried every variation of it. No joy.

In the interest of time (and pressure), I gave up and just decided to edit the offline and then deploy. I was the only one on this system so I wouldn't be affecting anyone. In hindsight, it would have been best to ask my question (or read the docs).

A day later 2 more people joined me to help nail down some reports. I couldn't bring the server down everytime I needed to make a small change, so I asked the Twitter Machine...as usual, it comes through.

Here's the response:



@siebel_ess's link took me to the documentation. @bsousapt's link took me to the 10g way of doing it, which is actually a good compare and contrast as I'm too lazy to show the differences.

Perhaps on purpose, the first link led me to this page:



I'm sure the emphasis, for me, should have been placed on the "Understanding" part of the title.

So first off, I needed to log in to the console at localhost:7001/console. From there I would look for Security Realms:



Since I didn't do any customization of the Security stuff (naturally), I went to the default "myrealm":



Then found Users and Groups



And selected New



The screen is pretty basic, just username, description (optional), Provider (DefaultAuthenticator for me) and the password:



Annoyingly to me, you couldn't add any other attributes, like Group Membership on this initial screen. So I saved, then clicked on the user and was taken to their settings page...where I now find Groups.



This is my account, so I chose the 3 Groups related to OBIEE: BIAdministrators, BI Authors, and BIConsumers



Easy enough.

Now let's try it out. Opened up the BI Admin tool and opened my online repository. Entered the repository password, my username and the password.

Voila! I'm in.

Just an FYI, I am a glutton for punishment. I deployed 20 some-odd times before I finally looked this up. While not the most efficient, it did sear the process into my brain.

Wednesday, October 6, 2010

OBIEE 11G: Connection Gotchas

Doing a quick PoC, I've had to spin up 11g on very short notice. While anarchy is fun, I typically prefer a more guided approach.

Despite not reading documentation ahead of time (much), there is a method to my madness. I learn best by breaking stuff...multiple times.

So, there I am, fresh from exporting from Discoverer then migrating that RPD from 10g to 11g...configuring the Connection Pools. I select a random table and then hit View Data.



Awesome. Very descriptive.

I tried using the BI ODBC Client tool to test the connection.



Awesomer.

Using the Google Machine, I found this reference to Visual Basic (is that really still used?).

Let's try looking something else up (like the documentation you say?). Actually, I didn't find it, a colleague did.

Over on the Siebel Essentials blog, tip #4 for OBIEE 11g, Connections.

To sum it up, you can either use the tns entry as the Data Source Name or you must put a tnsnames.ora file in the <ORACLE_HOME>\OracleBI1\network\admin folder.

Awesomest.

Tuesday, October 5, 2010

OBIEE: obieerpdmigrateutil.exe

I needed to quickly spin up an OBIEE 11g instance (Windows Server 2003, 32 bit) for a PoC. The install went smoothly (unlike my other attempts on a 64 bit Windows environment). With the database and the application server, the machine is running at about 2.5 GB of RAM, 4 is recommended to simply install (including 11 GB of free space).

Anyway, after migrating my Discoverer EUL over to OBIEE, and figuring out the new file structure, I opened up the RPD and received the following goodness:



Yes, I should really read the documentation. I have been, apparently just haven't gotten to that part yet. (Admittedly, I've been reading from the 50,000 foot level).

In the bin directory (which isn't where it used to be) is a utility called obieerpdmigrateutil.exe

To run it issue the following from the command line:
<ORACLE_HOME>\instances\instance1\config\OracleBIServerComponent\coreapplication_obis1>obieerpdmigrateutil.exe 
-i <ORACLE_HOME>\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository\obiee_10g.rpd
-u Administrator
-L obiee_10g_diff
-O <ORACLE_HOME>\instances\instance1\bifoundation\OracleBIServerComponent\coreapplication_obis1\repository\obiee_11g.rpd
You'll be prompted for the Administrator password (which I left blank) and then an encryption password which becomes your new Administrator password.
Please enter the 10g Admin password:

Please enter the encryption password
New_Admin_Passw0rd
Parameters for the utility are as follows (and you must use them all)
obieerpdmigrateutil  -I repository_path
-O new_rpd_path
-L LDIF_file_path
[-U 10g_admin_username]
[-8]
-O Generate output repository.
-I The path of a repository.
-L Generate LDIF file for users and groups in the repository.
-U Name of a user with Administrator privilege in the 10g RPD
-8 Use UTF-8 encoding for LDIF file.
-h Display this usage information and exit.
More on this tool and when it should be used (MUD) here.

Monday, October 4, 2010

Never Use RAISE_APPLICATION_ERROR Again

By Michael O’Neill
http://twitter.com/cleverideanet (professional)
http://twitter.com/oraclenude (personal)
oraclenerd articles

If you write Oracle PL/SQL, you know what RAISE_APPLICATION_ERROR is. It is an abomination of hard-coding and poor practice. If you didn't know that, I'm sorry I was the one who told you. I've written and used extensively an ultra-simple framework to eliminate RAISE_APPLICATION_ERROR from my code forever.
Here's an example (assume 11gR2) of something we all know we can do:
begin  dbms_output.put_line(1/0); end;
This will throw an unhandled ORA-01476 exception. We could write some meaningful handling of that with this:
begin 
dbms_output.put_line(1/0);
exception
when zero_divide
then
dbms_output.put_line('zero divide exception caught');
end;
This coding is elegant because Oracle has conveniently predefined an exception named ZERO_DIVIDE and a corresponding pragma for us. Unfortunately, Oracle has only 22 predefined exceptions. What happens when I do this:
declare
d date;
begin
d := to_date('2010-09-30', 'YYYY-MM-DD'); -- works
dbms_output.put_line(d);
d := to_date('12345-09-30', 'YYYY-MM-DD'); -- fails
dbms_output.put_line(d);
end;
This will throw an unhandled ORA-01861 exception. My option to handle this is less than meaningful because this is not a predefined exception:
declare
d date;
begin
d := to_date('2010-09-30', 'YYYY-MM-DD'); -- works
dbms_output.put_line(d);
d := to_date('12345-09-30', 'YYYY-MM-DD'); -- fails
dbms_output.put_line(d);
exception
when others
then
case sqlcode
when -1861
then
dbms_output.put_line('literal does not match exception caught');
else
raise;
end case;
end;
This leads me to the inevitable desire to create my own named exception and pragma, so I could have code that looks like this instead:
declare
d date;
begin
d := to_date('2010-09-30', 'YYYY-MM-DD'); -- works
dbms_output.put_line(d);
d := to_date('12345-09-30', 'YYYY-MM-DD'); -- fails
dbms_output.put_line(d);
exception
when error.ora_literal_string_mismatch
then
dbms_output.put_line('literal does not match exception caught');
end;
Understanding this, creating my own ERROR package with a friendly named exception and pragma for ORA-01861 leads me to the pattern of how to handle my own application exceptions, namely defining an exception and pragma.

But how does this get RAISE_APPLICATION_ERROR out of my life? Consider the ERROR abbreviated package source I use (full source: error.pks and error.pkb):
create or replace package error is

package_name constant varchar2(32) := 'error'; -- in case you want to change the package name

-- application exceptions and pragmas

(snip)

not_one_based constant string(64) := package_name || '.app_not_one_based';
app_not_one_based exception;
pragma exception_init(app_not_one_based, -20004);

sparsity_not_allowed constant string(64) := package_name || '.app_sparsity_not_allowed';
app_sparsity_not_allowed exception;
pragma exception_init(app_sparsity_not_allowed, -20003);

parameter_cannot_be_null constant string(64) := package_name || '.app_parameter_cannot_be_null';
app_parameter_cannot_be_null exception;
pragma exception_init(app_parameter_cannot_be_null, -20002);

string_too_large constant string(64) := package_name || '.app_string_too_large';
app_string_too_large exception;
pragma exception_init(app_string_too_large, -20001);

application_exception constant string(64) := package_name || '.app_application_exception';
app_application_exception exception;
pragma exception_init(app_application_exception, -20000);

-- rdbms exceptions and pragmas

(snip)

literal_string_mismatch constant string(64) := package_name || '.ora_literal_string_mismatch';
ora_literal_string_mismatch exception;
pragma exception_init(ora_literal_string_mismatch, -1861);

(snip)

procedure throw(p_exception in varchar2);

procedure throw
(
p_exception in varchar2
,p_message in varchar2
);

end;
You can see several user-defined exceptions and pragmas as well as the ORA_LITERAL_STRING_MISMATCH used in the previous example. The full source has more defined, but is not relevant to understanding the concept I am presenting.

Notice there is just one (overloaded) method, THROW. THROW is what I use instead of RAISE_APPLICATION_ERROR.

So, instead of this:
declare
s string(3) := 'abc';
begin
if (instr(s,'b') > 0)
then
raise_application_error(-20000, 'I hate the letter b');
end if;
end;
I use this:
declare
s string(3) := 'abc';
begin
if (instr(s,'b') > 0)
then
error.throw(error.application_exception, 'I hate the letter b');
end if;
end;
On its surface this doesn’t seem terribly interesting or useful. Below the surface, several powerful advantages are gained:
  • A single ERROR package encapsulates a schema’s application exceptions and pragmas, giving me a consistent SQLCODEs returned to my C# code.
  • No more, remembering what number to use in RAISE_APPLICATION_ERROR.
  • Easier to understand code
  • I can effectively organize my exceptions without sprawling them throughout a schema’s packages
  • I can extend the ERROR package (and I have) to do many more things like logging or default messages for exceptions without writing that into my schema’s application packages.
How does it work? Taking a look at the body for the THROW method reveals all:
procedure throw
(
p_exception in varchar2
,p_message in varchar2
) is
begin
begin
begin
execute immediate ('begin raise ' || p_exception || '; end;');
-- exception is raised and immediately trapped
exception
when ora_plsql_compilation_error then
throw(error.exception_does_not_exist, p_exception);
end;

exception
when others then
if sqlcode between - 20999 and - 20000
then
raise_application_error(sqlcode, p_message);
-- this is the best/only use of raise_application_error
-- and eliminates the need in application code
else
raise;
-- nothing extra to do for extra for exceptions outside raise_application_error range
end if;
end;
exception
when others then
raise; -- finally, bubbles up the original throw() call
end throw;
There are few caveats I have using this development pattern. I don’t consolidate every exception I write into my ERROR package, only those exceptions that I want to bubble up unhandled to my C# code. I don’t feel it is necessary to have the same ERROR package in every application schema. In other words I don’t evolve every incarnation of my ERROR package when I’m adding exceptions and pragmas to one schema’s ERROR package. Finally, my ERROR package has a multitude more bells and whistles I’m not sharing in this post for clarity’s sake. If you are interested in a more extended version of my ERROR, let me know via Twitter (@cleverideanet)

Copyright © 2010 Michael O'Neill
Published by Permission on oraclenerd

Sunday, October 3, 2010

OOW 2010: The Appreciation Event

By: Anonymous Unicorn
This post started as an email from a friend of mine (yes, I have one or two), who is also my unicorn (someone who has worked with me and would consider it again, there are so few). I thought it was funny and asked him immediately if I could post it, he agreed, but wanted to expand a little bit.

I did not attend the appreciation event, I gave my ticket away. At the Blogger Meetup, I looked at the lines to get on the buses and I didn't want any part of it. I gave my ticket away.


At the OpenWorld appreciation event they split out their 6 bands on two stages going simultaneously all night. They went all out...there was a carnival in the back where the rides and games were free. Of course with 41,000 people attending OOW the obvious drawback would be transportation, so being on the most popular bus route meant the better part of an hour standing in line both to and from the event. That was expected, but it was the food situation that stuck in my mind.

When we arrived, we swam through masses of people, Berlin playing on the outside stage, and English Beat playing inside a sound stage next door. Not having eaten in 7 hours, the goal was food and drink. After examining the two stages, and seeing no signs of food and drink, I had to get out the map. Everything was in the back, so away we headed following the masses. We got to the food tent...huge tent, nicely decorated inside and out. No food was visible, but we could see clusters of people surrounding what appeared to be circular table configurations, looked like a shark feeding frenzy. Must be food! We tried to lean into one of the feeding stations, and while we realized it was in fact food, being 5 people deep, I couldn’t identify what was there.

Fortunately a server came by and said there were 23 food stations in two tents and the second tent was less busy. We quickly retreated and shuffled amongst the heavy crowd, out of one tent and into the next. This one had 4 long buffets and a handful of feeding stations. While we could actually see what was being served here, the problem was everyone in this tent queued up and lines were LONG.

I stood in one line for a bit and realized that no one else knew what was going on either, they just got in line because that seemed to be the thing to do. These are all highly paid professionals acting like carnal beasts in one tent or lemmings in the other, men, women, old, young, no difference. To me both options were ridiculous so I went over to see what was actually on the table... it wasn't even food...just hors d’oevres like cheeses and grapes! Starving, I cut in real quick (which didn’t affect the stagnant line) grabbed a small paper plate and put a spoonful of couscous on a plate with a few grapes and stood off to the side devouring it within 6 steps as I scanned for the real food.

There it was! Small ribs, fancy spaghetti, can’t even remember what else was there because I never got the opportunity to eat it, but I decided to try by finding the end of the line... I kept walking until I realized I’d rather starve than stand in a line that long. I calculated each 4 table station is supposed to serve as many as 2000 people, and understood what the real situation was: survival. I took my small, but at this point, very valuable plate, and cut in for a few small ribs and decided to go watch Berlin until the lines died down. For now the immediate hunger had simmered down.

I watched Berlin for a few songs, shuffled in to see a few Don Henley songs in the sound stage, then reversed right back out to get in position for the Black Eyed Peas (because they decided to put their two best acts on at the same time). I suppose I made the mistake of trying to get close but standing on the floor and being less than 6’4” tall, all I could do was watch the otherwise very nice screens. A girl all of 5 foot tall stood between me and the stage holding up a stuffed dog as high as she could and made it dance with every song... it was all she could do because I’m not certain she could even see the video screens... great show, and worth the effort to come. When it ended at 11:30pm I made a beeline back to the food tents. I was alone at this point because it was 2:30am eastern time.

Mistake. Both tents looked like apocalyptic wastelands with tired people trudging along table to table, tent to tent to find food. People were tired and in much fewer numbers. Some were collapsed at the few tables around the edges, and scavengers were picking scraps off the feeding stations, still in lines, and many lines had more people than food. The whole thing was surreal. There was actually some couscous left, but since last time they had introduced a few plates of brownies and cookies here and there. When you’re hungry, cookies just don’t cut it, so I dove in for some more couscous and a couple brownies, and after scanning both tents realized it was a cookie or nothing. One table left, a couple plates of cookies, no line.. it was like heaven!

So I’m pretty thirsty by now... and no, there were no drinks in the food tents that I ever identified. Fortunately the beverage booths around the carnival were still well stocked and hardly any lines at this point. I got a half-can of sierra mist (I guess it exists because it fits nicely in a cup with ice) and tried to figure out what to do next. Lots of people left, but apparently the carnival games are free, and unlike the food lines, these lines were moving ok. I can’t leave without trying can I? I decided to try 1 game, chose the game with the biggest prize and stood in the 4-line basketball game for 20 minutes watching hundreds of shots, most of which didn’t hit the rim or even the backboard. One girl won in my line, which I thought was awesome, because it’s actually possible to win. The guy in front of me talked a lot of trash and spent a lot of time plotting his strategy only to brick it like the others. Two shots each, my first shot was a brick too....second went right in! It’s true those rims barely fit the ball, but it is possible! That large stuffed animal forced me to check in a bag on the flight home, but my daughter loved it.

I caught several Steve Miller songs on the way out... it was awesome, I forgot how blues oriented he is, but I knew I had very little sleep ahead of me, so I had to cut out early and back to the buses I went. Lucky #13 bus line was 5 times as long as any other bus line and in retrospect I might have been better off being dropped off somewhere in the middle of San Francisco 3 miles from my hotel at 1am than to stand in that line... but like a good lemming, I stayed, knowing that not many hours later is my next session, and the next night would be spent on a plane rather than in a bed, heading back to the East Coast. But it was worth it.

Discoverer to OBIEE Migration Utility

I couldn't find a whole lot of information on this utility, so of course I'm putting it up here for my own reference.

File name is called migrateEUL.exe and is located in the OracleBI\server\bin directory.

It's not very difficult to run, just type in:
c:\migrateeul file.eex
Easy.

To generate the eex file from Discoverer, open up the Discoverer Administrator tool and then connect to the eul you want to export.

Cancel out of the Load Wizard



Then go to File, Export and select the business areas you want to export.

You'll be prompted to name that file and then hit finish.

Running the utility will produce something like the following:
C:\Documents and Settings\chet\Desktop>migrateeul pdi_eul.eex

Oracle BI SE - EE Migration Assistant Version 10.1.3.4.0


Reading Configuration File...

Error reading configuration !!! Reverting to defaults...[DONE]

Parsing EUL export file C:\Documents and Settings\chet\Desktop\eul.eex...[DONE]

Repository creation started...

Processing Business Area : Business Area 1....[DONE]

Processing Business Area : Business Area 2....[DONE]

Processing Business Area : Business Area 3....[DONE]

Processing Business Area : Business Area 4....[DONE]

Processing Business Area : Business Area 5....[DONE]

Processing Business Area : Business Area 6....[DONE]

All Business Area(s) processed

The migrated repository is saved at C:\Documents and Settings\chet\Desktop\eul.rpd

Migration log is saved at C:\Documents and Settings\chet\Desktop\eul.migration.log

------------------------------------------
EUL MIGRATION SUCCESSFUL
------------------------------------------
Now on to the fun part, using that newly created RPD and making everything pretty.