While preparing to get the comments section done for my codemonth site, I needed something that could tell how old a comment was. Not just showing the date, but maybe showing in a bit more readable way, when the comment was from. So if you look at sites like Twitter and Facebook, comments are "dated" with strings like "1 hrs" or "1 day old" etc. So I wanted to make a small package that could do that for me.
I headed on down to the conference and instantly saw a bunch of friendly faces, including lots of people I had met on the OTN Yathra 2014 Tour.
After the keynotes, I got to have a quick chat about User Groups with Mary Lou Dopart from Oracle, then it was off to my first session about database consolidation.
I’m always more nervous about giving introductory/overview sessions than I am about full-on technical sessions. My database consolidation session is a little bit like a history lesson of consolidation, including old and new. The response was very good. I had a lot of people wanting to speak to me afterward, which meant I missed the next two sessions. I don’t mind that, as I feel my purpose here is to interact with as many people as possible. As long as people want to speak to me I’m willing to speak.
After lunch I had a major energy crash again. Whenever I was speaking to people I felt really up-beat, but as soon as the conversation stopped I felt like I wanted to collapse on the floor and sleep. To play it safe I went back to my room to sleep for a couple of hours.
Next up I went to see Debaditya Chatterjee and Giridhar Ravipati speaking about “Oracle Multitenant Best Practices”. Some points that came out of that were.
Some points about possible features in 12.2 were also mentioned, including:
Remember, all talk of 12.2 is covered by the safe harbour slide, so those features might not end up in the final release.
After speaking to Debaditya and Giridhar, we headed off to a panel session to close the day. As most people will know, putting me on a panel can be a dangerous thing. I ended up having something to say about almost everything. Panels are a mix of scary and fun. As usual, the session was followed by additional questions and conversations which lasted about an hour.
After saying a few quick goodbyes, it was off to grab some food, then back to my room to sleep some more. Are you starting to sense a pattern here?
Overall, day 1 was a really fun experience. Let’s hope day 2 does not come with quite so much jet-lag!
Integrating plsql with different web applications, is extending the functionality of the database beyond just data management. But it is when we combine these API integrations, that we can really see the benefit of them. In this entry I will show how integrating just two different API's, we can create an easy monitoring solution, that can rival more expensive traditional choices.
What I will do, is I will combine the Airbrake API and the Pagerduty API, to not only track errors, but also implement a monitoring solution that can alert my DBA that something is wrong. I will show how we can use those API's to setup team based alerting and reporting on errors, and hint on how you could further imporve or extend the usage of this.
photo by www.GlynLowe.com
One challenge with Docker is having persistent storage for a container especially when that container gets restarted on another VM host and we want it to point to the same data. If we add in Delphix with Docker we can easily move persistent data and a docker container to a new host.
For the docker container we will use wordpress that leverages a MySQL database for it’s persistent datastore.
The source and target machines already have docker and MySQL on them, so all we need to do is start MySQL, create a wordpress schema, start docker, get the docker wordpress container, then start a docker container with wordpress and point to the MySQL database.
ssh delphix@source# password is delphixsu –# password is delphixvi /etc/my.cnf#add line “user=root” then save fileservice mysqld startmysql -u root -pCREATE DATABASE wordpress;CREATE USER wordpressuser;SET PASSWORD FOR wordpressuser= PASSWORD(“password”);GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser IDENTIFIED BY ‘password';FLUSH PRIVILEGES;exit
Then start docker and download the “wordpress” container
Start docker wordpress container
Now, on the source machine, we have a docker wordpress container using a persistent MySQL database for storage.
Now I have a thin clone of the MySQL database, a virtual database (VDB), running on the target machine. I just need to create a docker wordpress container to use it.
service docker startdocker pull wordpress
docker run -p 80:80 –name wordpress \-e WORDPRESS_DB_HOST=172.16.160.161:3306 \-e WORDPRESS_DB_USER=wordpressuser \-e WORDPRESS_DB_PASSWORD=password \-d wordpress
Now I can access my wordpress blog on my target machine and modify it separately from the source. If the target machine goes down, I can migrate the VDB to another host and startup the container there and point the wordpress container to the same VDB now running on a new host.
One other change I made on the target VDB is changing the siteurl and home to be the new IP of the target machine:
mysql -u wordpressuser -ppassword -h 172.16.160.161 -P 3306 wordpress << EOF
update wp_options set option_value=’http://172.16.160.161′ where option_id<3;
select option_value,option_id from wp_options where option_id < 4;
From here we can set up architectures where the source is hosted directly on Delphix and Delphix can manage version controlling the source MySQL database and WordPress application.
We can spin out multiple VDBs in minutes for almost no storage to give to multiple developers to try modifications and merges of changes on.
If you are a regular user of LOB’s in the database, take care when you switch from 11g to 12c. Notice the subtle difference:
In 11g, you are permitted to, and recommended to, use SECUREFILE lobs, but they are not the default
SQL> select name, value 2 from v$parameter 3 where name = 'db_securefile'; NAME VALUE ---------------------------------------- --------------- db_securefile PERMITTED
In12c, SECUREFILE lobs will be the default.
SQL> select name, value 2 from v$parameter 3 where name = 'db_securefile'; NAME VALUE ---------------------------------------- --------------- db_securefile PREFERRED
This change should be beneficial, because SECUREFILE lobs are the newer and more functional implementation, but just be aware that the default has changed between versions.
The taxi to the airport was good. The driver was interesting, speaking to me about his visits to India and Pakistan. It certainly helps pass the time when the driver is chatty.
I wasn’t able to check-in online, but there was no queue at the check-in desk, so that was quick. It’s such a short trip I’m only traveling with hand luggage, but I still checked it. I can’t be bothered to fight for overhead locker space with everyone. The queue for security was really long, but they had all the sections open, so it moved quickly. I had to get my laptop scanned because … reasons?
Once through security I bought myself a coffee and promptly threw it across the floor. Embarrassing much! I was hoping to find some floor to take a nap on, but after shaming myself with the coffee situation, I thought the last thing I needed was to shame myself further by sleeping on the floor. I try to limit myself to one shameful moment per airport visit…
The flight from Birmingham to Dubai was easy. It was meant to be 6.5 hours, but we arrived early. The plane was half empty, so there was free space next to me. Happy days. During the flight I watched:
After a 2.5 hour layover in Dubai, it was time for the next flight. The flight from Dubai to Hyderabad was really busy and some lucky people, including me, got upgrades to business class (see video). It was only a 3 hour flight, but I’m all about the business class these days! The important thing about upgrades is you have to pretend it wasn’t a free upgrade and you could afford it. During the flight I watched the second half of Mission Impossible : Rogue Nation. It was quite good.
After a very pleasant flight, I arrived at Hyderabad and bumped into Kamran Agayev at customs. We agreed to share a taxi to the hotel, then I made him wait for over an hour for my bag to arrive. It was really embarrassing. Sorry mate!
I’m now firmly ensconced in the hotel (see video). It’s 05:24 and I plan to spend the whole of today (Friday) in bed playing catch-up, before the conference starts on Saturday.
A couple of months ago I did a presentation and decided to put the files up in github (https://github.com/karlarao/conference_eco2015) just because I wanted to move away from dropbox for my scripts and resources. Well, that was very convenient because the audience can just download the master zip file and that’s it! But then I figured I don’t want to have the next presentation on another repo and it would look pretty messy on my git account. Ultimately I’d like all the presentations to be on one repo and only separated by folders but then by default if you just put it that way then the “download zip” will download all of the conference folders.
The howto below will show you how to create a branch for each presentation folder so that every folder will have its own “download zip” link. Another way to get a downloadable link is through releases but it doesn’t fit the requirement of having just the subset of files shown on the zip file.
Here we will be working on the following branches:
master – this is the default branch where all the files are shown
empty – an empty branch created from master. this is just used for creating the stage branch, more like a gold image copy
stage – this is where we initially commit the presentation files and later on will be deleted once the custom branch is created and merged to master
a custom branch (in this example: talks3) – this is the branch we create from the stage and then merged with the master
Click on the link below to get started.
howto: github – talks branch https://www.evernote.com/l/ADB4_Zskw9hBEql3ZU_PhweA3UrVOO2WBgg
If the branching stuff is to much for you, then here’s some git learning references http://karlarao.tiddlyspot.com/#GitHub
Monitoring application performance, is always difficult. Sometimes you want to monitor every aspect (with a minor latency impact) and sometimes you just want to monitor the basics. Like counting how many times a specific business process was called, or measuring how long it took. You also want it to be lightweight, and you want it to be really simple. As in really really simple.
Thanks for coming to my presentations in RAC day at Dublin, Ohio. Please find the presentation files below. Hopefully, I will get video files and upload that here too.
md5 checksum of the zip file is:
$md5sum ooug_2015_pdf.zip df8bdcbc02926e5bbd721514b473bf16 ooug_2015_pdf.zip
Update: The first talk is now “Why use PL/SQL?” by Bryn Llewellyn.
This is the day after I get back from India, right after my first day back at work. It’s going to be really hard to drag myself there, but I know it will be worth it!