Category: Uncategorized

October 1st, 2017 by mathias

So every year before and during Oracle Open World we all complain about how data and database is brushed to the side.

This year it is the feature. It is the one thing the big sign on Moscone West screams. “The Autonomous Database”

Here is a picture from showing it. It is all about database.

Every year there is talk about how Oracle needs to return to data and databases. Now that they do, I think we should be very happy even if we suspect the actual feature isn’t what we would have requested.

Any day Oracle talks about database is a day they’re not spending on forgetting it.

Posted in Uncategorized

March 14th, 2017 by mathias

As I wrote a while back I was accepted to speak both at the User Group Leader summit at DOAG16 and at RMOUG Training Days.

The first one was a short presentation where I talked about a large bug in Oracle security and the need to patch and upgrade to not have that exposure. It was great fun as it was limited to a four-minute talk. I learned a lot from preparing for it as that short time allows for no questions and no spur of the moment comments. Each slide has to be carefully timed to make sure the time is enough for all slides.

The last one was about a customer case where a severe performance issue was handled where I talk about all the assumptions we challenged in the process of resolving it. The job took 36 hours and it could only use 8 and soon the amount of work was expected to double. It ended up taking just a few minutes when we were done. Part regular tuning and part using the “magic” of the EXADATA.

While the talk ended up having few attendees – competing with Maria Colgan and Graham Wood is tough – it was a great experience. I have not presented at a conference this big before. Training Days is also a conference that scares me to present at. I lived in Denver and my respect for the conference, the presenters and the quality expected is almost at an unhealthy level. So being there to present was a way to slay a dragon of mine. I had a great time at the conference and I enjoyed presenting. Even though I did not have an oversubscribed room, those who came seems to have enjoyed the session as I was rewarded with a 9.0 rating for the talk.

If you’re thinking about maybe going to Training Days next year, my advice is to do it. It is a great conference and it is extremely well-organized. It is small enough to know the layout and the rooms fast, while still being big enough to have a lot of great talks to choose from every session. There were several where I wanted to go to three and I still regret having missed those where 2-3 fantastic sessions were held at the same time.

I really liked the effort made to make the biggest names available and approachable by everyone by having them have their own tables at lunch time and letting people sit at the table where one of the persons they respect the most sits. I really enjoyed my lunch at Cary Millsap’s table. It was a great group and a very inspiring discussion about performance and discussing old battles in the field.

It is far away, but I’ll be back. I had a blast.

Posted in Uncategorized

March 11th, 2017 by mathias

I have for a few years created a play environment in a similar way. Getting a database installed in a VM is not too hard. But I found that I did it fairly often and not always in the same way and not always without having to resolve problems I know I had solved before but since forgotten the solution for.

Right, write everything down. Yes, it was time for that.

So I now have my notes in order so I can run through the creation of a new VM when a new version of any software I want to have installed becomes available.

Since 12c is out and more importantly 12.2 was released just a week ago it was time to include multitennant in the model.

This is what I want to have in my VM  I use to test and evaluate Oracle Database stuff.

Thus, with this I have three PDBs simulating dev, test , and prod when I want to model  migrating things through an environment. Each of them has APEX so that too can be tested for migrating through an environment.

Including ORDS and glassfish makes then installation complete and not only allows using all features of APEX but also prepares the VM to be used for REST services.

For database work this is to me a very complete VM to test and learn new things with.

I’d recommend that you do the same for what you want. There is the Oracle Developer VM you can get and lots of other ones too. But I find you learn a lot by creating your own. If you install yourself you also get it to be set up the way you want it.

The one I create, I set up as a template and then I clone it to have one that I con make changes to. That allows me to have a pristine version to clone from. Yes, I could use snapshots to achieve much of the same. Having a separate template makes maintaining it much easier in my experience.

When you do install, remember to make a snapshot at least after each individual product has been installed and configured. You will end up going back and redoing it when you run into problems or think of improvements to your install.

The template I create I share with friends and coworkers who may not want to do their own installation. While installing teaches you lots, for some it is not worth it. They just want to play. For those people using mine or the Oracle App Development VM is a quick way to do that. Oracle provides a lot of different ones for that or when you want to try something new. All of them can be found here.

To finish up, I just have to link to Tim Hall. He has a fantastic number of articles and for this stuff his writeup of installing Oracle DB 12.2. When I find a problem it is most of the time already covered in his article. Even more impressing is that he gets it out before you even get your VirtualBox  loaded. I think he had the 12.2 version of this updated and posted within four hours of the release of 12.2.

GO! Create your own VM and get hacking. 12.2 has too much cool stuff in it to not keep you hacking for a long time.

Make hacking a legal sport. 🙂

Posted in Uncategorized

November 6th, 2016 by mathias

So I subscribe to the idea that the only way to improve is to dive in on the deep end. Sink or swim.

With that in mind I sent in an abstract to RMOUG and actually got it accepted. Now, this is a conference I used to attend every year when I lived in Denver. I know the quality they have in most presentations nad I know that lots of people with “important” names in the community attends. I have to up my game and give myself a chance to be embarrassed. It scares and motivates me in equal amounts.

Talking about that feeling, I watched the quick presentation at the OOW 2016 – “EOUC Database ACES Share Their Favorite Database Things”. I was impressed by how they managed to keep those presentations to just five minutes and still get a great message across. I figured that would be a great thing to practice. I’m going to the DOAG conference in a week and before it starts there is a day for user group leaders. I’ll attend that and on the agenda there is a 30-minute slot with 4-minute presentations. Even less than they gave the ACED presenters at OOW. Not really knowing what I’m getting myself into, I tossed my name into that ring also.

Hopefully I get to make a try at that too. There will be just a few days of prep. Maybe that is just as well so I do not find time to chicken out. Standing in front of all the group leaders in Europe with just a couple of evenings to prep will be nerve-wracking. But again, if one wants to improve, one has to test those wings.

Hopefully I’ll get through those without too many scars. I look forward tremendously to both conferences for the meetings as well as for the chance at possibly present at both conferences.

Posted in Uncategorized

December 5th, 2013 by mathias

Time to get back into blogging. I stopped a while ago and the reason was two-fold. As I was leaving my job at Kentor AB I wanted to avoid any concerns with what I wrote while my three month long two week notice played out. The other reason was that once I had left life got really busy both with work for my client as well as with the new adventure I had departed on.

The new adventure is to bring the Miracle brand to Sweden. I will try to build up an Oracle database focused team here in Stockholm based on the success Miracle A/S has had in Denmark. Yes it is equally exciting as it is scary for someone who has lived their life in medium to large scale consulting practices.

However, I have always had a big admiration for the guys who started Miracle and what they have achieved. Getting a chance to bring the same style and quality to my home market of Stockolm and Sweden was just an offer that was too good to pass up. That is the kind of opportunities most of us will only get once or twice in a career. This one came at a time where it was close enough to work with everything else that was going on. The one thing that may not be optimal is having a new house built at the same time. Actually, that makes it completely not optimal. But the phrase I keep repeating to others that are thinking about when the best time to get started is “There is no time such as the present”, so I took my own advice for once.

So now the work is on getting the Oracle practice going, or rather it is going it just needs a few more legs. And with legs I mean consultants.

Next is however partying with our colleagues down in Copenhagen close to the headquarters. Tomorrow evening is when the Christmas party kicks off. Who knows when it will end. 🙂

This blog will soon return to a more technical program. thought probably with some posts on interesting things with starting up a company. I’m sure the next year will teach us a lot of things on how to do that.

About that, this hiring business… When is the best time to add more people to a small company and how do we manage risk? Well… ehhh… Yeah… That’s right there is no best time, but there is no time such as the present.

Posted in Uncategorized

June 25th, 2013 by mathias

So calling Google Reader dead may be a bit premature, but Googles announcement of their intention to kill their baby all but killed it. On monday it is RIP for the reader. I’ve gone through disbelief to mourning the loss to a search for a replacement that best emulates what Google Reader does.

In the end I decided to not just find something that just replaces it with a new tool providing the same exact feature only with a different name.

If I had to find a different tool, I might as well try to find something better. The fact is that although Google Reader was one of my favorite Google tools, I did not use it. Yes, it is a bit odd that I’m writing a post about replacing a tool I didn’t use. And when I say that I didn’t use it, I use the term “did not” very recklessly. The fact is that I could not read all the blog I follow without it. Google Reader had however turned into an infrastructure piece for me. I used it to collect the posts and keep track of what I had read, but the tool of my choice for reading was the Reeder. Unless you are familiar with it, it may seem like I just referred to the Google Reader again, but it is spelled differently and this is a wonderful tool for reading blogs and it uses the Google Reader to manage the blogs and lets Google Reader track which posts are read and which are not.

If the Reeder is such a wonderful app, why not keep using it. At first I thought of abandoning it as Google Reader was going away. But it turns out the Reeder will continue to work (or so they claim). It supports Feedbin and possibly even feedly in the future. There has not been much talk about it on their own website or even on their twitter account. There are lots of fans asking what is going on, scarcely little from @reederapp themselves.

I started thinking of how I consume text these days. I do still surf on a computer, but it is when looking for something. I prefer reading on my iPad. My workflow has actually changed such that when I find a great article or blog post, I flip it so I later can read it in Flipboard on the iPad. If the article is worth saving for the future after having read it I add it to Evernote. As that is my workflow for things I do not have to read right now, why should my workflow for reading blogs be any different? After all, I read them when time allows.

After that epiphany I took a look at Flipboard wondering if I could get a similar tool for reading blogs on the iPad. It turns out I can, they have ceased the opportunity Google created. You can now read your blogs in the tool we all love. Getting my blogs to Flipboard has made them seem so much more enjoyable. It integrates with Google Reader so it imports all the blogs you have there and lets you follow the same blogs.

The one thing that can be confusing is that after opting to read your blogs in flipboard, you will want to go into the settings for Google Reader in Flipboard and possibly turn on to have number of unread items indicated, to set posts you read in Flipboard to read and to show only unread posts. I have them all set to ON and it works very well with the way I want to read my blogs.

For me reading blogs on the iPad is so much more enjoyable than to try to catch up in the browser on the computer. The latter never happens  and I tend to fall far behind and have to set aside a few hours to catch up, since moving my blog reading to Flipboard I have stayed current on all blogs I read.

If you haven’t found a way to read your blogs yet that you really love, give Flipboard a try. I think you’re gonna love it.

Posted in Uncategorized Tagged with: , , ,

February 19th, 2013 by mathias

I have hidden my previous post on the explicit request by Oracle Security Team. If you did read it or have it in your RSS, please do not forward or talk about it online until further notice. I’m not sure it is the right thing to do, but I have promised Oracle to not publish it for now. Please help me keep that promise.

Posted in Uncategorized

October 11th, 2011 by mathias

Sometimes you my find a need to suppress repeating values in SQL. One case is when your reporting tool does not have such a feture or you just cannot find it fast enough. That happened to me with a report that was to be converted to APEX from Oracle Reports the other week.

I could not find an option in APEX to suppress repeating values, and I did not want to make them all control breaks as that would chop up the report too much.

Let’s begin with a real simple SQL that shows the departments different employees work in.

select a.dname
,b.ename
from dept a
inner join emp b
on a.deptno = b.deptno
order by 1,2

This of course gives a list like this:

ACCOUNTING CLARK
ACCOUNTING KING
ACCOUNTING MILLER
RESEARCH ADAMS
RESEARCH FORD
RESEARCH JONES
RESEARCH SCOTT
RESEARCH SMITH
SALES ALLEN
SALES BLAKE
SALES JAMES
SALES MARTIN
SALES TURNER
SALES WARD

Suppose I want to remove the department name when it is the same as on the previous row. SQL does not give a way to just mention a keyword to have it done and APEX does not allow for it as far as I can tell.

The first step is to add a rownumber to the result table for the above SQL.
select c.*
,rownum rn
from (select a.dname
,b.ename
from dept a
inner join emp b
on a.deptno = b.deptno
order by 1,2) c

Now each row has an number starting from 1 and ending with 14. We wrap this in a prefactor construct (i.e. wrap it in a with so the select can use the data).

with rpt as(select c.*
,rownum rn
from (select a.dname
,b.ename
from dept a
inner join emp b
on a.deptno = b.deptno
order by 1,2) c)
select case
when a.dname = b.dname then ' '
else a.dname
end dname
,a.ename
from rpt a left outer join rpt b
on a.rn = b.rn + 1
order by a.rn;

Here we have the select creating the list with the rownumber in a with that the select that follows can reference. We have now also added a selfjoin so we join each row with its predecessor in rownumber order.

This allows us to show data from the prefactored SQl using a to display data and b to check data on the previous row.

In this case we check the department and when it is the same as it was on the previous row we display a single space. if it is not the same, we display the name of the department. Thus, the case performs the supressing of repåeating department names.

The result of this SQL is the following report.

ACCOUNTING CLARK
KING
MILLER
RESEARCH ADAMS
FORD
JONES
SCOTT
SMITH
SALES ALLEN
BLAKE
JAMES
MARTIN
TURNER
WARD

That is it. Suppressing isn’t too hard to do, but it requires a little bit of setup in the SQL.

Posted in Uncategorized

January 1st, 2011 by mathias

At the start of the Christmas break I decided to get started with Oracle VirtualBox 4.0. To get up an going faster with an 11g database I opted to download the pre-made image (called appliance by Oracle) that they use during Developer Days. It has a lot of things preinstalled and ready to go.

  • Oracle Enterprise Linux 5
  • Oracle Database 11g Release 2 Enterprise Edition
  • Oracle TimesTen In-Memory Database Cache
  • Oracle XML DB
  • Oracle SQL Developer
  • Oracle SQL Developer Data Modeler
  • Oracle Application Express 4.0
  • Oracle JDeveloper
  • Hands-On-Labs (accessed via the Toolbar Menu in Firefox)

This is great and it is a very fast way to get up and running assuming you're not looking to practice installing the products. It worked well, except that I had to make two tweaks to make it work.

The first is optional, but allows the linux OS to be updated with the most critical patches. The reason it is needed is that the appliance is configured to be updated from Oracles internal servers, which only those working inside Oracles firewall can reach. Thar will of course not work for those of us not on Oracle's payroll.

To do this, change the directory to /etc/yum.repos.d and run this 

wget http://public-yum.oracle.com/public-yum-el5.repo

Now rename the file already in the directory so it ends with something other than ".repo" to disable use of it for updates and edit the contents of the downloaded file to enable those update servers you want to use. I think the following are the ones you want to enable:

  • el5_u5_base
  • el5_addons
  • el5_oracle_addons

Now the most critical updates *should* be avaiulable to install. Both via commandline yum and through the GUI for the operatingsystem.

The next problem I encountered was that the database didn't start up and the reason seemed to have to do with the default local_listener used when starting and it's not defined. Then it uses the hostname as part of the specification and when it was no in the hosts file it caused the database to not start up as the computer did not know the way back to itself. I'm guessing this could be solved in the VirtualBox config, but s quicker work around for me was to update the hosts file.

Edit the /etc/hosts file and change this line:

127.0.0.1               localhost.localdomain localhost

to

127.0.0.1               localhost.localdomain localhost dhcppc7

Where dhcppc7 is the name of the computer (i.e. the virtual machine). You can see the nme of it by just running the command "hostname". It may always be dhcppc7 for this appliance.

With those changes the appliance gets critical updates from the public YUM-server and the database starts when the appliance is started.

 

Posted in Uncategorized

September 24th, 2010 by mathias

The afternoon started off with a presentation on the result cache in 11G. It was held by Rob van Wijk.

DB result cache is a cache for the resultset of a query or a plsql block. If the same query is executed again with the same parameters, then th code is not executed, the same resultset is sent back.

There are two parameters that controls the result cache.

  • result_cache_size_max_size
  • result_cache_size_max_result

Size is the size of the cache in bytes and result sets it in pct. Presumably the lowest of them takes precedence.

There is a function (memory_cache) to report how the memory in the cache is used.

Status shows if the cache is enabled or disabled.

With the init-parameter result_cache_mode you can force the database to use the cache for all statements. This *may* be useful on session level, it is probably not useful on system level.

It is possible to specify on a table if it should be cached. For it to work, all tables in a query block needs to have caching turned on.

There are some v$-views that provides details about the statements in the cache.

  • v$_result_cache_statistics
  • v$_result_cache_objects
  • v$_result_cache_dependency

Changes to NLS parameters are tracked so a query is treated as a different query if an NLS parameter is different than it was for the cached version of the query.

The relies_on keyword for PLSQL is not needed after 11Gr2, such dependencies are figured out by the database if you skip specifying dependencies.

If you have uncommitted data in your session in a table you query, the cache will not be used as it would return invalid data.

It is a common misunderstanding that result cache and a deterministic function/procedure is essentially the same thing. They do have the same functionality, but in some cases a deterministic may run in 1/3 of the time a result_cached one does. The reason is a latch used for result_cache, but this ought to only be of practical use if you call something a million times and it runs extremely fast.

The last presentation for the day was supposed to  be the keynote for database. Somehow that was not the presentation I ended up on as it barely mentioned database at all. Instead I found myself on Larrys second keynote.

He began with talking about how building hardare and software pre-integrated like the exadata box is the future. He said that his best Friend is Steve Jobs and he has talked about it for a long time and considers it to be one of the keys to Apples success with device they have ever released.

Most industries work that way, a car manufacturer controls every piece that is used to build a car, it does not sell a car for which you buy an engine from someone else.

Larry then went on to talk about all the things that have been released during OOW.

Here is the list:

  • Exalogic Elastic Cloud – Cloud in a box
  • Exadata X2-8 – 8 sockets per node
  • Fusion apps – 5 years of design and programming
  • Oracle Linux unbreakable kernel
  • Solaris 11 – next gen #1 UNIX
  • SPARC – next gen high performance chip
  • Java roadmap – esp vector graphics 2D and 3D
  • MySQL 5.5 – huge performance increases

Oracles R&D budget is now over $4B per year and Larry states that he has no plan stopping there.

Larry made fun of Salesforce again. In his first keynote he said that salesforce is not cloud computing since it is not elastic and it is not virtual. If too many resources are used, salesforce starts killing the reports that users are running. Later the salesforce CEO said something like "Larry just doesn't get it, cloads doesn't run in a box".  Larry stated that typically you do need boxes to run software and when the CEO gets back to the office his technical staff will explain to him that software indeed runs on boxes. His monologe on this pulled down a lot of laughs and a lot of applause. The audience clearly sides with Larry Ellison and Jeff Bezos on what is cloud computing and what is not.

Larry then reviewed exalogic and exadata again. One interesting stat for the value was that Softbank has replaced a 60-rack Teradata with a 3-rack exadata. On top of the simpoler and cheaper solution it also made their applications 2-8 times faster (depending on the application).

The new exadata has very impressive specs. Among other things, it can fit 50 TB of data in flash with the 10x compression it achieves. Supposedly competing platsforms doesn't get anywhere close to 10x compression. The cost of one exadata is about 1/6 of a comparable IBM server.

Oracle Red Hat linux kernel was introduced ti improve performance and stability of linux. Oracle will still provide and support the redhat compatible kernel. But since redhat is now on a four year old kernel, it is not working as well as it could. The exadata machines uses the new Oracle Unbreakable Linux kernel. A client can chose which to boot up Oracle Enterprise Linuc with. The measured speed improvement for the new kernel shows that it is 2-5 times faster on the operations they reported on.

The introduction of the new Fusion apps took up most of the presentation. It seems like all applikations are being replaced. For example, it would seem that there is a new CRM that will replace Siebel, Peoplesoft, JD Edwards, and E-business suite.

It has been a massive project, possible one of the larges ever undertaken. They have created over 5000 tables and when these products are available to buy, the catalog with products form Oracle will have 100 new products.

Once Larry left the stage, people left in droves even though a demo of the new applications was what came next. The applications looked great to me, especially compared with what I have seen of the previous version. Even more impressive was the speed. The live demo showed very smooth operation even of things that you'd expect to be complicated.

That completed the presentations for Wednesday. After it we ventured into chinatown for dinner at Hunan Home's Restaurant. They have been selected best chinese restaurant several times (2010 also) and everything we got there was superb. On top of that the owner had a great sense of humor and made a few jokes when passing by our tables during dinner.

Posted in Uncategorized