OTN Yathra 2014

I’ve been a little quiet on the blog lately, mostly because I’ve been spending my time freaking out about the arrangements for the OTN Yathra 2014 tour of India. I had to apply for a visa, which in itself was not too bad, but I spent quite a long time without a passport, thanks to the courier not bothering to attempt a delivery. All that time I didn’t know if my visa application had been successful, so I wasn’t sure if I would have to submit it again. By the time that arrived, it was so late that booking the flights became interesting… At one point I wrote to Debra Lilley and said words to the effect of, I think this is just not meant to be!

Well tonight (Tuesday evening) I got my flights confirmed for my trip that I start on Sunday. 🙂

This is proving to be quite an expensive trip.

  • Visa: $130.00 – About £110 for the visa itself, and about £20 for the courier service.
  • Vaccinations: £250 – I feel like a human pincushion now. I had a bunch of boosters that were due, as well as stuff specifically for India.
  • Malaria Pills: £80 – We are in low risk areas (cities), but we are doing a couple of journeys between cities by bus, which travel through high-risk areas (countryside), so they advised me not to take any chances. I could have got the cheaper pills for about £8, but I decided to go for the ones with less side affects. I don’t see the point in travelling all that way to stand on a stage and feel like crap because of the anti-malaria pills. At least these should minimise the chances of that. If so, that’s worth a few extra quid.

For those that think this Oracle ACE thing is a free ride, you don’t get any of this money back!

I’ve still got stuff to get, like insect repellent. My pastey white skin seems to be very appetising to insects and I am not a stranger to infections when I do get bitten. Fingers crossed I can avoid the worst of it…

Getting to this point has been a bit of a trial. 🙂 Thanks to everyone who has helped. Murali put together a great pack to help the speakers plan the trip and Lillian and Vikki from the Oracle ACE Program have done a great job pushing through my last minute travel bookings!

Normally I’m doing the thanks when the events are over. 🙂

Let’s hope everything from now on goes a little smoother than it has up until now!

Cheers

Tim…

 

 

The only way is automation! (update)

I was a little surprised by the reaction I got to my previous post on this subject. A number of people commented about the problems with automation and many pointed to this very appropriate comic on the subject.

There are one of two conclusions I can draw from this.

  1. My definition of automation of tasks is very much different to other people’s.
  2. It is common for DBAs and middle tier administrators to do everything by hand all the time.

I’m really hoping the answer is option 1, because I think it would be really sad if being a DBA has degenerated to the point where people spend their whole life doing tasks that could be easily scripted.

So what do I mean when I speak about automation? Most of the time I’m talking about basic scripting. Let’s take and example I went through recently, which involved cloning a database to refresh a test system from production. What did this process entail?

  • Export a couple of tables, that contain environment specific data.
  • Generate a list of ALTER USER commands to reset passwords to their original value in the test system.
  • Shutdown the test database.
  • Remove all the existing database files.
  • Create a new password file.
  • Remove the current spfile.
  • Startup the auxillary DB using a minimal init.ora file
  • Do an RMAN duplicate. In this case I used an active duplicate as the DB was relatively small. If this were a backup-based duplicate, it would have required an extra step of copying the backups using SCP to somewhere that could be seen on the test server.
  • Replace some environment-specific directory objects.
  • Unregister the old test database from recovery catalog.
  • Register the new test database with the recovery catalog.
  • Remove the old physical backups.
  • Drop all database links and recreate database links to point to the correct location for the test system.
  • Reset the passwords to their original values from the old test system.
  • Lock down all users, except those I’ve been asked to leave open.
  • Truncate and import the tables I exported at the start.

None of those tasks are difficult. It requires only a basic knowledge of shell scripting to allow me to start a single shell script and come back later to see my newly refreshed test environment.

What’s the alternative? I perform all the same tasks individually, but have to sit there waiting for each step to finish before I can move on to the next. No doubt, during this time I will be distracted by phone calls or colleagues asking me questions, which drastically increases the risk of human error.

When I talk about automation, I’m not talking about some Earth shattering AI system. I’m talking about scripting basic tasks to make myself more efficient.

At times you have to draw a line. There is no point making your automation too clever because it just becomes a rod for your own back. I’m a DBA, not a software house. This is what people are really warning about, which I did not really make clear in my first post. If something is liable to change each time you do it, you are better having a written procedure to work from, reminding you of the necessary steps and how to determine what needs to be done. You can’t become a slave to automation.

Cheers

Tim…

Oracle Linux and MySQL

I’m in the process of taking on some of the MySQL databases in my company. The first ones are MySQL 4.1 running on Windows, so we are upgrading them to MySQL 5.6 on Oracle Linux. As with many of our systems, these will be running on VMware virtual machines.

Since the current installations are so old, we are planning on dumping out the data and creating fresh installations on the new systems. Based on the advice I got from Ronald Bradford and Sheeri Cabral, we are also taking this opportunity to switch to InnoDB and utf8, rather than MyISAM and latin1 that are currently used.

We are using the MySQL yum repository for the installation, so we can be on the latest MySQL version, rather than that shipped as part of Oracle Linux (or RHEL) 6.5. The other neat thing about this is it takes care of point release upgrades as part of the “yum update” process.

So far all my testing has been done on VMs running on my PC, but we are soon going to start rolling this out. It should be an interesting piece of work. The developers are doing a bunch of testing with InnoDB and utf8 to see what issues we come up against…

Cheers

Tim…

Update. For those new to MySQL, you might like to read this post by Patrick Hurley.

 

The only way is automation!

Basically I’m a lazy person with a short attention span, so when I’ve done something once, I get kind-of bored of doing it again and again. As a result, automation is a perfect solution to me. Figure out how to do something, script it so I can repeat it easily, then move on! *

In my current role I’ve been a little sloppy about automating things. In part, this is because I’ve been doing such a random variety of things it’s been quite hard to see the patterns of repetitive tasks and it’s been difficult to find the time to actually automate the things I have spotted. The fact I’m currently the only DBA in an organisation that believes DBA stands for Do Bloody Anything, means I’ve been slowing sinking into the weeds of late. Over the last week or two I’ve drawn a mental line in the sand and decided I won’t do anything without scripting it or automating it in some fashion. It requires a lot of discipline to do that when it means potentially missing deadlines, but it really is the only way to work.

Most of what I’ve been doing is standard stuff. Scripting cloning procedures, so I can refresh an environment by starting a script and leaving it to do it’s thing. Making sure developers can get their own application server logs without having to ask me. Making sure applications can be deployed by nominated people without my intervention. Hopefully over the coming weeks I will be able to get things to a state where I can actually see some light at the end of the tunnel.

Cheers

Tim…

* It seems people take everything so literally. 🙂 This does not mean I only ever do something once. The, “figure out how to do something”, part is a process of investigation and testing, not just some random crap that gets thrown together in a script. This is true of any process, manual or scripted. 🙂

OUGN VÃ¥rseminar 2014

I’ve had some papers selected for the OUGN VÃ¥rseminar 2014 event in April, so I will be there representing OTN and the Oracle ACE Program. There is an impressive array of speakers lined up for this event already. Should be fun!

I’ve got a couple of months to practice my Captain Jack Sparrow impression. I wouldn’t want to look out of place on the boat!

Cheers

Tim…

 

OTN Yathra 2014 : See you there!

In November I wrote a post about my possible inclusion in the OTN Yathra 2014 tour. That has been confirmed now, so I’m representing OTN and the Oracle ACE Program at all the cities in the tour.

  • Jalandhar – 18th February
  • Noida – 20th February
  • Mumbai – 22nd February
  • Pune – 23rd February
  • Hyderabad – 25th February
  • Bangalore – 27th February
  • Chennai – 1st March

I’m a little bit scared by this trip. The OTN tours are good fun, but they are hard work. Doing seven conferences in 14 days seems like an awfully big task. I could have skipped some of the events to make my life easier, but that feels a little mean. At least when I get back from this tour I will have a week at work to rest before I go off to OUG Ireland… 🙂

So now I’ve got to get my visa sorted out…

Cheers

Tim…

OUG Ireland 2014 : I’m going to be there. Are you?

Earlier in the week I got confirmation I have two papers selected for OUG Ireland 2014.

  • PL/SQL : Stop Making The Same Performance Mistakes
  • An Oracle DBA’s Guide to WebLogic Server

You can see the full agenda here.

I got on the net to check flight prices and Ryanair were doing a round trip for £13. The booking fee on the travel site I used was more then the flight costs, so the total flight costs came to £30. 🙂 Needless to say I booked them straight away, so I will be there representing OTN and the Oracle ACE Program.

In addition to presenting, myself and some of the other ninjas have been speaking with the conference organisers to get RAC Attack included in the event. That’s sorted now. At last count there were 6 RAC Attack Ninjas coming to the event, but others may be lurking around in stealth mode. 🙂 If you are interested in RAC, come and speak to us. We are happy to help people do a full RAC installation on their laptop, but if you don’t want to commit that much time, you can just do part of the installation, like the Grid Infrastructure, and finish it off at home. A lot of people just want to come and ask questions about RAC. That’s fine too! 🙂

As if that wasn’t enough, there are Master Classes with Tom Kyte, Joel Goodman and Uwe Hesse!

Registration is now open, so get yourself sorted. See you there! 🙂

Cheers

Tim…

Oracle Midlands #1 : My first presentation of the year done

I wrote a post in November about an Oracle Midlands group Mike McKay-Dirden was setting up, modelled on the free meetups he’s experienced with the SQL Server community. Last night was the first event, with myself and Pete Finnigan speaking.

Being a Midlands-based event, and me having worked mostly in the Midlands, I’d say about 50% of the people in the audience were people I had either worked with directly, or people who work with people I had worked with directly. That included one guy who I worked with in my first job, who started there on the same day as me. 🙂 It was really cool to meet up with everyone. I hope to see them all at future events.

I felt quite nervous on the lead up to this event. I think part of that was because I’ve been writing tips about public speaking and felt almost like I’ve been setting myself up for a fall, imagining people comparing what I say to what I do. 🙂 One of my former colleagues commented on how nervous I seemed at the start. 🙂 Once I got going things seemed to snap into place, so I think it went fine. 🙂 I spent the break between chatting and answering questions.

Next up was Pete. I’ve seen Pete present a half-day session in the past, so I knew the sort of thing to expect. I think I’m pretty good at security compared to most people, but I know I’m a rank amateur compared to Pete. I’ve said it before and I’ll say it again, I think it should be mandatory for people to sit in one of Pete’s sessions on a regular basis, just to keep reminding them how little they know and how complicated doing security properly really is. I really enjoyed his session and feel like I learned some more stuff. I’m also very scared now… 🙂

Big thanks to Mike for setting up the event and inviting me to speak. Big thanks go out to Red Gate Software sponsoring the event, allowing this to be a free event. Thanks also to computermanuals.co.uk for providing a raffle prize. Of course, thanks to everyone who came to the event, especially Nikolay Manchev and Salih Oztop, who travelled up from London to come to the event. 🙂 Without support of the attendees, this sort of thing can’t happen. If you want it to keep happening, you need to keep coming. 🙂

The next event should be around late February. I won’t be speaking at that event, but I plan to be there. I’ll post again when the dates and agenda are fixed.

Cheers

Tim…

Oracle Database 12c : Some Backup and Recovery Stuff

In a previous post, I had already listed an article on backup and recovery when using the Oracle 12c multitentant option.

In that article I made reference to a restriction when using flashback database against a CDB with a PDB that has had a point in time recovery. I finally got my head round this and posted a note about it here.

As well as this stuff, I’ve also had a play around with table recovery. It’s pretty cool! In previous versions you had to do a manual point in time clone to recover a table in this way. In Oracle 12c it still does this, but it has wrapped it up and hidden it behind a nice RMAN command, making it feel a lot simpler. Definitely a neat feature when you need to recover old versions data that pre-date the level of undo available.

I word of advice before you launch into playing with any of this. TAKE A SNAPSHOT OF YOUR VM!

I’ve been playing about with this stuff using Oracle 12c on Oracle Linux, running on an Oracle VirtualBox VM. You would not believe the number of times I’ve totally screwed up my databases while figuring this stuff out. I’ve recreated PDBs and CDBs a number of times. I’ve had to recover databases that I broke by accident. I’ve even had to restore a previous snapshot of the VM a couple of times to get myself back to a stable state. All this messing about is great for getting to grips with the tech, but it can be frustrating if you are only trying to investigate one specific feature. For this reason, I would say avoid trying to learn this stuff on a physical machine. Especially when learning backup and recovery, it can be a time consuming pain in the ass when you screw things up.You want to be able to get back to the start and try again as quickly as possible. This is where VM snapshots rule! Of course, if you’ve got the time to spare, you can come across some interesting things when you accidentally break things and try to fix them! 🙂

One of things I’ve noticed specifically about RMAN and PDBs is the error handling of some commands is not what it could be. Sometimes you perform a relative simple RMAN command while the PDB is closed and it gives you a “sky is falling in” type message, including the odd ORA-00600, which leads you to believe things are really screwed. You notice the PDB is closed, so you open it and hey presto, the RMAN command works just fine. Now admittedly, I was attempting to do something stupid, but a “You can’t do that when the PDB is closed dumb-ass!” message would have been a lot less scary than an ORA-00600. 🙂 I’m going to try and recreate the specific scenarios and log them on MOS so future versions can handle people doing stupid stuff a bit better. 🙂

Cheers

Tim…