Enterprise Manager Cloud Control 13c : First Steps

o-enterprisemgr-13c-clr-2769481Oracle Enterprise Manager Cloud Control 13c Release 1 (13.1.0.0.0) was released a few days ago. Does that have the acronym “oemcc13cr1”? :)

As usual, my first steps are to do some basic installations. The approach is pretty similar to the 12c installations, but it’s a little greedier now. :)

My first attempt was a bit of a disaster. I was trying to install it on a VM with 8G of memory, about all I can spare on my work PC) and it was running like a dog. It got nearly to the end of the configuration section and I ran out of disk space on the physical host. That would have been OK if the installer were running on the VM itself, as the VM would have paused and resumed once I had cleared some space. Unfortunately, I was doing from an X session, which got killed and took my installer with it. :( Rather than trying to continue on my piece of shit work PC, I waited until I got home to do it on my server.

Once home, I kicked off two installation simultaneously. One on OL6 and one on OL7. Each VM had 10G of memory and their virtual disks were on different spindles to the OS disk. As a result, they ran through at a reasonable pace. Not mega fast, but OK.

Over the Christmas break I’ll have a go at some upgrades, then decide if we should be doing this in production at work. If you’ve followed the discussion on Twitter, you’ll know some of the basic requirements.

  • Oracle 12c (12.1.0.2) Enterprise Edition for the repository database. Patched to latest security patch.
  • You can use a Non-CDB or a PDB for the management repository. The template database is still non-CDB.
  • OPTIMIZER_ADAPTIVE_FEATURES=FALSE

That means we will need an upgrade of our repository database from 11.2.0.4 to 12.1.0.2. That’s no big drama, but another thing to do. :)

Cheers

Tim…

Update: Thanks to Seth Miller for pointing out my mistake about the PDB support for the OMR.

VirtualBox 5.0.12

I was just going to update one of my seldom used servers to VirtualBox to 5.0.10, when I noticed Santa brought 5.0.12 as an early Christmas present yesterday! :)

VirtualBox 5.0.12 is a maintenance release with a bunch of fixes and additions. The downloads and changelog are in the usual places!

So far I’ve installed it on Windows 7 (work PC), OS X : El C[r]apitan (Laptop) and Oracle Linux 6 (a home server) and all the guest additions I’ve updated so far as happy. :)

Cheers

Tim…

 

Birmingham City University (BCU) Talk #4

bcuOn Thursday last week, the day after UKOUG Tech15, I did my 4th talk at Birmingham City University (BCU).

In my previous visit I did a talk about community and employability to the staff. This time I did a quicker version of the same talk, but to the students. I’ll be going back a few times this year to do technical sessions.

I’ve mentioned before, this type of non-technical presentation is really useful in developing yourself as a presenter. It’s easy to hide behind the technical content. Non-technical presentations have to be more conversational and have more “personality”, for want of a better word. I think that feeds back into your general presentation style.

After the session I always have a chat with Stuart about how it went and what comes next. I get the feeling he’s sometimes worried I’m not getting enough out of it, but that’s far from the truth. I think these kind of sessions are helping me far more than I thought they would.

If you are thinking about getting into the presenting game, I’ve written some public speaking tips. As well as all that, consider throwing in a variety of types of session. If you have any local universities or colleges, get in contact and see if they need some guest speakers.

Cheers

Tim…

UKOUG Tech15 : Wednesday

ukoug-tech15-speakerToday was a full day at UKOUG Tech15. Yay!

Zahid Anwar rescued my laptop charger, and left it at the Version 1 stand for me to pick up. Thanks guys!

My first session was at 10:00, which was called Pluggable Databases: What They Will Break & Why You Should Use Them Anyway! I like giving this presentation and the crowd seemed to respond really well to it. Maybe I’ve converted a few people? Quote of the day must go to Jonathan Lewis who said,

“I enjoyed your presentation, but I don’t know why.”

I am being very selective with that quote, because it made me laugh. :) Actually, Jonathan was very complementary, as were a number of the other speakers that were present. I know it’s not about trying to impress other speakers, but it is really nice when you get a good response from them as well as the audience. :) The questions ran into the break, including three questions that I didn’t know the answer to. They are on my list of things to find out.

From there I just bounced around catching up with friends, both old and new, answering questions, speaking to people in the exhibition hall and filming a couple of segments for OTN.

At about 15:00 I got a major energy slump and was considering going home, but Noel Portugal persuaded me to go to his session on Internet of Things (IoT). As I was walking to it I bumped into Lars Ulveseth who made a comment about the weather, which confused me a little. When I quizzed him, he explained it was a reference to my session called It’s raining data! Oracle databases in the cloud, which he was just heading to. I told him I wasn’t presenting that, so he pointed me to the agenda and sure enough, I was down to present it at 15:30. Talk about shocked and surprised! After changing my underwear, it was off to do my last presentation of UKOUG Tech15! :)

Even though I got to the session on time and did the talk, I am still incredibly freaked out by it all. I keep thinking, what if I had gone home? What if I had not bumped into Lars? What if it had been earlier in the day and I had missed it? I am still mortified now thinking how easily I could have missed it. :( On reflection, I remember being accepted for 3 sessions, but in my head they were all database sessions. When I looked through the database track, only two were present, so I though the other one must have got pulled. It turns out this session was marked as virtualization, not database, so I never saw it on the grid. If you look on my UKOUG Tech15 : See you there! post from the other day, you’ll notice I didn’t mention it. :( Anyway, all’s well that ends well!

Thanks to the hardcore crowd that sat through the last session of the day, when the rest of the people had gone home or headed off to the German market to do Christmas shopping! :) I got some questions during and after the session, and the people I spoke to afterwards seemed pleased with what I presented. It’s really a collection of my observations while trying out AWS, Azure and Oracle Cloud.

One of the guys in the crowd was also working at a UK University in a similar role to me, using a bunch of similar tech and higher education (HE) software, so we spent about an hour chatting once the session was over, then walked to the station together. It was a really nice example of the networking that is possible at these events. Hopefully we will be able to help each other out in future!

So that’s my last conference for the year, and apart from me being a dumb-ass and nearly missing a session, it was a really great day. Thanks to UKOUG for giving me the opportunity to speak three times this year. :) Thanks to everyone that came to my sessions, asked me questions, and tolerated me talking the hind legs off a donkey! :) Thanks also to the Oracle ACE Program for allow me to keep flying the flag, even in my home town. :)

Tomorrow morning I’m doing a talk to the students at Birmingham City University, then it’s back to my job and normal life for the rest of the year. :)

Cheers

Tim…

UKOUG Tech15 : Monday

ukoug-tech15-speakerAs mentioned the other day, my first day at UKOUG Tech15 was a rather brief affair. I just popped in during an extended lunch break to present, then it was straight back to work.

I met a couple of people (Sve and Debra) on the way in, but pretty much had to go straight to my session. There were a few people (Connor, Niall, Martin, BrendanNeil, Iain and Dave) lurking around who I tried to persuade, with varying degrees of success, not to stay. :)

The session was called Oracle Database Consolidation: It’s Not All About Oracle Database 12c! and was born out of my frustration about the one-size-fits-all attitude some people have about consolidation. Depending on who you speak to, consolidation is only about [Virtualization | Containers| Exadata | PDBs] (pick one), when in fact you always end up using a combination of approaches, including some old, tried and tested, methods. It was an overview session, which always makes me nervous for a couple of reasons. First, I find overview sessions really scary to present because you can’t hide behind geek talk. Second, I’m always worried people will come along expecting something more technical, even though you’ve said it is an overview session. I started off the session by reminding people it was an overview session and made it clear I would not be offended if they wanted to leave. :)

A couple of nights ago I had a dream Connor was in the front row and I totally blanked at the start of the session. That didn’t quite come to pass. Connor was about 3 rows back and although I was a little shaky at the start, I didn’t blank completely. :)

I think the session went OK. I did what I said I would do. I just hope the audience got what they expected…

After the session, I got to speak briefly to Zahid Anwar, and said a quick hello to Frits and Oyvind on the way out, but it was pretty much a dash out and back to work. So much so that I left my Apple laptop charger in Hall 5 after my session. If anyone found it, please let me know. :)

So that was my first brief visit to UKOUG Tech15. I’m not in on Tuesday as a bunch of other people from work are going, so I’m left behind to hold the fort. I will be in all day Wednesday (I hope), so I look forward to catching up with people properly. If you see me walking round the conference and you have a question or just want to say hello, don’t be shy. I love talking about Oracle stuff and I would rather spend the time talking with you than sitting in someone else’s session, that I’ve probably seen 6 times already this year. :)

Cheers

Tim…

UKOUG Tech15 : See you there.

ukoug-tech15-speakerUKOUG Tech15 Super Sunday is underway. The Sunday event always coincides with my nephew’s Birthday celebration, so I never get to attend. You’ve got to get your priorities straight. :)

This year I’ll be presenting two sessions:

  • Monday 12:20 – 13:10 : Oracle Database Consolidation: It’s Not All About Oracle Database 12c! This is an overview session, suitable for beginners and management types.
  • Wednesday 10:00 – 10:50 : Pluggable Databases: What They Will Break & Why You Should Use Them Anyway! For all those folks thinking about moving to 12c soon, this might help you decide which way to go. :) Monday is a fleeting visit for me. I’ll be doing my session, then I’ve got to go straight back to work. I’m not in on Tuesday, but I should be in all day Wednesday, I hope.

Having a conference in your home town sounds like a good thing, but I find it harder to deal with. When you are away from home it is easy to throw yourself into conference mode and turn off real life. When you live close to the conference, you have to switch in and out of conference mode constantly. Normal life is a distraction from the conference experience. :)

Cheers

Tim…

Don’t forget the COPY command in SQL*Plus (and SQLcl)

One of the developers asked me to copy a small table from Live to Dev. In situations like this, my first thought is to use the SQL*Plus COPY command. By the way, this command is also available in SQLcl.

It’s super-easy and has been around forever. Provided you can live with the data type restrictions, it’s a lot less hassle than expdp/impdp, even with the NETWORK_LINK option.

As always, it’s in the documentation, but the SQL*Plus help text tells you how to use it, so you don’t even have to RTFM is you don’t want to. :)

SQL> help copy

COPY
----

Copies data from a query to a table in the same or another
database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.

COPY {FROM database | TO database | FROM database TO database}
{APPEND|CREATE|INSERT|REPLACE} destination_table
[(column, column, column, ...)] USING query

where database has the following syntax:
username[/password]@connect_identifier
SQL>

What I ended up doing was something like this.

conn scott@dev
copy from scott@live create scott.emp_20151201 using select * from scott.emp;

Because it’s been around for so long, you rarely see people talk about it, which made me wonder how many newer folks may not have noticed it, hence this blog post. :)

Cheers

Tim…

PL/SQL Formatting : More pearls of wisdom from Bryn

glasses-272399_1280-smallAnother topic of conversation that came out of Bryn‘s session at Oracle Midlands related to PL/SQL code formatting. I’m not sure I agree 100% with his opinion, but it’s certainly making me think about my current stance.

When I said I was going to blog about a couple of the points he raised, Bryn emailed me some stuff, which I’m going to use here. So this is Bryn’s content, with some of my opinions thrown in. I will no doubt get told off for not doing the subject justice, like I did with the last post. :)

Bryn: Look at page 1 (below). This makes PL/SQL look so old-fashioned. I’m sure that this is part of what makes it unappealing to the modern youth. How easy do you find it to read its real meaning?

Me: With a few minor formatting changes, this is pretty much what I do. :) As a result, it looks really normal to me and I like it, but if I try to put myself into the head-space of a young person, it does look overly formal, and as Bryn said in his talk, we are essentially shouting all the keywords and using naming conventions that detract from the true meaning we are trying to convey. I don’t like to admit it to myself, but I kind-of see his point. It does look a little Pipe and Slippers.

Bryn: Now look at Page 4 (below). Identifiers are like proper nouns in English prose. They’re capitalized to let them stand out. The capitals in Object_ID (or DBMS_Output) are an aid to pronunciation.

04-bryn-modern

Me: This is a slightly unfair comparison, since there is no syntax highlighting, which is on by default in all PL/SQL IDEs, but it does look less “old”. I understand Bryn’s point about the capitals potentially aiding pronunciation, but if I’m going to stop “shouting” the keywords, I actually prefer the look of it all in lower case myself. :) I agree that identifiers still need “_” between words. Although camelCase is used by many languages, it doesn’t work so well in Oracle. It looks fine in your scripts, but when you are looking at dictionary views, much of the information is presented in uppercase, so “uniquenessContraintMissing” becomes “UNIQUENESSCONSTRAINTMISSING”, which sucks. The prefix/suffix used on identifiers can be confusing, especially since an alternative was mentioned in the previous post.

Bryn: As promised, here’s my-marked up copy of the Gettysburg Address. It’s considered to be an exemplar of English prose, so having it mangled into an incomprehensible mess by the robotic application of “code formatting best practice” makes my point very vividly. … Feel free to use it. But do make sure that you credit the author, President Abraham Lincoln, and me for having had the idea to use it to make fun of the anally retentive code formatters who jointly conspire to make PL/SQL look so dated.

02-bryn-prose1

03-bryn-prose2

Me: Yeah. Point made! :)

I’ve tried to alter my code formatting in the past, which invariably meant I had to go back and reformat it a couple of days later when I couldn’t stand knowing it wasn’t “how I usually do things”. :) Having said that, if you read the last blog post, you would see I tried to stop shouting. :) It’s not what Bryn likes, but I think it’s a step in the right direction… Maybe…

Am I going to redo all my articles, blog posts and videos? No. Am I going to try and change? At the moment I’m thinking yes, but I reserve the right to do a u-turn at any point.

Don’t forget to check out these whitepapers from Bryn.

Cheers

Tim…

Preventing PL/SQL name clashes. You learn something new every day!

glasses-272399_1280-smallI mentioned in yesterday’s Oracle Midlands post, Bryn had an example of some syntax I had not seen in 20+ years of PL/SQL development.

You tend to name PL/SQL parameters and variables in such a way as to prevent name clashes with table columns, but you could just qualify each use of a PL/SQL identifier with the identifier for the name of the block in which the item is declared in this case the procedure name. In the following example, “dummy” is both a parameter name and a table column, but Oracle knows exactly what you mean because you’ve fully qualified it.

create or replace procedure my_proc(dummy varchar2)
as
  amount pls_integer;
begin
  select count(*)
  into   my_proc.amount
  from   dual a
  where  a.dummy = my_proc.dummy;
  dbms_output.put_line('amount=' || my_proc.amount);
end my_proc;
/

set serveroutput on
exec my_proc('Y');
amount=0

PL/SQL procedure successfully completed.

SQL>

You can also do this for parameterised cursors and named/labelled blocks. You learn something new every day! :)

This was just one of the points Bryn discussed in his whitepaper called Doing SQL from PL/SQL: Best and Worst Practices.

Bryn: Look for this section: “Name capture, fine grained dependency tracking, and defensive programming”. This discussion leads to this:

Principle 1: In embedded SQL, dot-qualify each column name with the from list item alias. Dot-qualify each PL/SQL identifier with the name of the name of the block that declares it.

It is also mentioned in his paper Why use PL/SQL?

Cheers

Tim…

Oracle Midlands : Event #12 – Summary

Tonight was Oracle Midlands Event #12 with Bryn Llewellyn  and Neil Chandler.

Bryn very kindly stepped in for Tom Freyer who unfortunately couldn’t make it. Bryn’s presentation was called Why use PL/SQL?, which was based on his whitepaper of the same name. I’ve written about a number of the topics he raised, including a piece on My Utopian Development Environment, but his talk and his whitepaper put forward a much more consistent and compelling argument. Definitely worth checking out if you are a PL/SQL expert or newbie!

Along the way, he used a little piece of syntax I have never noticed before, which has been available for the whole 20+ years I’ve been using PL/SQL. I’ll write about that in a post tomorrow if I get chance.

By the way, Bryn loves being called Brian, and he loves it when you say S.Q.L. and PL/S.Q.L. rather than Sequel and PL/Sequel. :)

redstacktechNext up was Neil with a session called “Why has my plan changed?”. I’ve written about many of the issues discussed in this session, but Neil crystallised a whole array of points really well, and used live demos which I always like to see. Regardless of how well you think you know the subject, I would be surprised if you don’t walk away with a few new things, which you can later pretend you always knew. :)

Both guys will be presenting these sessions at UKOUG Tech15 if you want to catch up with them!

Thanks to the guys for coming to speak to us. Thanks to Bryn’s mom, for living in the UK, giving him an excuse to come to UKOUG Tech15 early and therefore be available to step in at short notice. Thanks as always to Red Stack Tech for sponsoring the event, allowing it to remain free, and to Mike for organising it!

Cheers

Tim…