Currently browsing SysAdmin

THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

Linux Patching and Oracle – how to detect RPM conflicts before they happen.

A common scenario in the life of a DBA on a linux server looks something like this:

From: Sue-the-sysadamin To:the-dba Date: 2011-10-28 17:54:34 Dear DBA, We will be patching the linux systems this Friday night, October 28th at 21:00. The list of patches is attached. Let us know if there are any conflicts with Oracle. BTW, we need to know by 14:00 tomorrow. Sue

Yikes! The SysAdmin wants to apply these patches this week, and needs to know if there are any conflicts this afternoon.

So you open up the list of patches. When you see the lengthy list of patches you suddenly realize the long lunch you had planned with your sweetheart is going to be rescheduled.

I recently received several lists of patches that were to be applied to a number of different linux servers that were all running oracle, which led to this blog entry.
Read the rest of this entry . . .

Upgrade to MySQL 5.1.56 on an old Bacula server using 5.0.x and MyISAM tables

Hello there, it’s me again, with another blog about a DBA situation that a typical Linux Administrator may find themselves in.

In this blog, i’m going to review a recent MySQL upgrade I have done on one of the systems I am involved in administering. This is a real world example of an upgrade project, and hopefully when we’re done, there may even be an overall performance boost.

There are several reasons to perform upgrades (of any kind), for me an important one is to keep current for security and bug fixes, but general performance improvements and new features are always welcome as well.
Read the rest of this entry . . .

Using KateSQL to connect to an Oracle database in Kate

Among the features announced with the release of version 4.6 of the KDE Software Compilation is KateSQL, a SQL Query plugin for the Kate text editor providing the basic functionality of a SQL client. It leverages the Qt SQL module, allowing you to make a connection to most types of databases. Out of the box it includes support for MySQL and SQLite, and with this post I’ll show you how to get it to connect to Oracle databases as well.

Since I am an Ubuntu user (Note: you’ll need to be on 11.04 and either be running Kubuntu or have the ‘kate’ package installed) these instructions will be specific to that operating system, though they will likely also apply to other Debian-based distributions with minimal modification. However, if you are using an RPM-based distribution such as openSUSE or Fedora, you’ll need to adapt the instructions somewhat to make sure you have the necessary development packages installed.

The first thing we’ll need to do in order to get this to work is to obtain an Oracle client. This can be downloaded from the Oracle Technology Network and requires that you have a valid Oracle.com Single Sign-On account. For the purposes of this article we’re going to use the Linux x86 Oracle Instant Client and the files we’re going to download are:

oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm
oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm

The first package is the client itself, providing the files required to run OCI applications. The second is the Instant Client SDK which includes header files for developing Oracle applications with Instant Client: in our case an OCI library for the Qt SQL module.

Users of RPM-based distributions can just go ahead and install these packages while others will need to convert them to .deb format first. The best way to do this that I am aware of is with the tool called Alien. Let’s install it, convert the Oracle Instant Client packages, and install them too.

cd /path/to/oracle/instant/client/files
sudo apt-get install alien
sudo alien oracle-instantclient11.2-basic-11.2.0.2.0.i386.rpm
sudo alien oracle-instantclient11.2-devel-11.2.0.2.0.i386.rpm
sudo dpkg -i oracle-instantclient11.2-basic_11.2.0.2.0-2_i386.deb oracle-instantclient11.2-devel_11.2.0.2.0-2_i386.deb

The next step is to install all of the dependencies necessary to build the Qt SQL OCI library.

sudo apt-get build-dep qt4-x11
sudo apt-get install qt4-qmake libqt4-dev libaio1

Then we will need the actual source code for the qt4-x11 package. This can be obtained with the following command:

apt-get source qt4-x11

To recap, at this point we’ve downloaded and installed the Oracle Instant Client and all of the dependencies required to build the qt4-x11 package, and we’ve downloaded the qt4-x11 source code. Next we’re going to build the Qt SQL OCI library itself.

sudo ln -s /path/to/qt4-x11-4.7.0/src /usr/include/src
sudo cp -r /path/to/qt4-x11-4.7.0/include/QtSql/private /usr/include/qt4/QtSql/
cd /usr/include/src/plugins/sqldrivers/oci/
qmake "INCLUDEPATH+=/usr/include/oracle/11.2/client64" "LIBS+=-L/usr/lib/oracle/11.2/client64/lib -Wl,-rpath,/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11" oci.pro
make
sudo make install

Now that the libqsqloci.so module has been built and installed, Kate should be able to connect to an Oracle database. Launch Kate (or close and re-open it if it was already running), click Settings -> Configure Kate, expand the Application tree if necessary, click Plugins, check ‘SQL Plugin‘ and click OK. Then click SQL -> Add connection to launch the connection wizard. In addition to the MySQL and SQLite database drivers, you should now also have drivers named QOCI and QOCI8 available. Choose the appropriate one, enter relevant connection details, and complete the connection wizard. You can now execute queries against the database and display result data.

MySQL Backup Concepts for (Linux) System Administrators – Part 1

Hello, My name is James McOrmond. I am a MySQL DBA (and part time SysAdmin) at the ‘The Pythian Group’ headquarters here in Ottawa.

In my previous employment I was the primary System Administrator for a local Linux OS software company (for over 8 years). Server backups were of course something I was doing as part of my job, but i’ve learned that the backups I was doing for the MySQL databases were probably not what a DBA would have set up.

In this blog post, I will cover 3 basic types of MySQL backups for stand-alone database systems. I will not be covering fancy GUI applications, or really complicated processes – just the basic concepts – which is what I think System Administrators (ie – non DBA’s) need to know to have a good/valid backup. Read the rest of this entry . . .

Installing TOra with Oracle Support on Ubuntu 10.10 (Maverick Meercat)

Good afternoon sports fans. I’ve had a couple of requests to update my world famous blog on installing TOra. Frankly I have been wanting to get this out for a while but duties other than blogging have taken precedence. That and I think my blogging ran out of entropy and needed some other IO to get going again. Well it’s now time for you all to let out that breath you have been holding since the ‘perfect 10′ was released (on 10.10.10 no less).
Read the rest of this entry . . .

Linux desktops, Windows only VPN clients, virtual machines and you — DIY VPN jump box

Being in the remote administration business is a strange beast and offers lots of challenges, but when you are working for multiple clients sometimes connecting to the servers can be challenging enough. Here’s a little idea that I had this morning that may save someone some grief, so I thought I would jot it down for all to see.

One of the issues I have connecting to some clients revolves around my linux desktop. Sure I can connect to many VPN devices using vpnc or other tools, but in some cases client policy prohibits such reasonable behaviour due to a) single vendor plugins; b) bad java or plugin issues; c) host checking software or; d) Antivirus requirements that do not recognize linux agents. My problem is that I do not want to administer Unix servers from a Windows system, it’s just … wrong. Like, fundamentally wrong. (on cue, someone I know is calling me a zealot)
Read the rest of this entry . . .

OVSAGE June Meeting

On June 17th, Pythian hosted the June of meeting of OVSAGE. This month, there was a presentation by Bill Stuart, CEO and VP Engineering , Karoly Molnar of Eseri. Eseri is a local Ottawa company that has integrated a full organization IT solution from the best of the world’s open source, from hosted Intranet to desktops to applications, and host it in the cloud for access on virtual desktops.

Essentially, Eseri provides an “office in a cloud”. Within the organizational cloud, clients have access to a wide range of tools, like wiki, documentation management and e-mail. All of the software used is proven open source products such as Ubuntu for the operating system, Evolution as the e-mail client and Mediawiki for the wiki.

The meeting focused on the technical aspects of Eseri’s offering. Eseri uses Ubuntu Enterprise Cloud as the basis for its architechture. Access is provide using NoMachine client software.

There was much discussion about security, with Eseri emphasizing that each organization is a completely separate entity, with all data being kept with the organizational cloud. Access to the cloud is protected by multiple firewalls. In addition each server/desktop has it’s own firewall enabled.

There was also a great deal of discussion about the tools Eseri applications and how these applications are upgraded. There was much interest in this area since some of the applications that Eseri provides (i.e. Drupal) have complex upgrade paths.

OVSAGE’s next meeting is scheduled for July 17th.

Keeping Up

I found I never published this post as it was sitting in my drafts few months now — it was written in 13th February, 2010. I’m publishing it without any changes.

I learn therefore I am!

I’ve just wrote few bits about learning a new technology and after skimming through my Google Reader, I noticed a great post by Chen Shapira — Deliberate Practice. That’s reminded me about another aspect of learning that I didn’t mention — learning is a continuous process.

There are two aspects…

  • No matter how good I am and how much I know, my knowledge and expertize become outdated relatively quickly these days unless I keep up with the new stuff. Unfortunately, there is so much new technologies these days that I have to be very selective on what I want to follow which is a big challenge in itself. On the other hand, I’d rather be challenged than bored. As DBA’s we are luckier than Developers — their world changes much faster than ours.
  • I forget things I don’t use/do/read about/think about regularly. Refreshing my “old” memory is a must do. This is why I think Chen’s idea of deliberate practice is so great.

Read the rest of this entry . . .

Wherever I May Roam

    Roamer, wanderer
    Nomad, vagabond
    Call me what you will

    $ENV{LC_ALL} = "anywhere";
    my $time = localtime;
    say {$anywhere} my $mind;
    local *anywhere = sub { ... };

    Anywhere I roam
    Where I 'git ghclone environment' is $HOME

        # 'grep may_roam($_) => @everywhere',
        #                with apologies to Metallica

Laziness and a severe addiction to yak shaving conspire to constantly make me tweak configurations and hack scripts to make my everyday editing / shell / development experience as holistic as possible. Unfortunately the same laziness, combined with my constant hopping between home and $work computers, severely gets in the way of effectively using those optimizations. Indeed, although I have those nifty toys installed here and there, because they are not uniformly installed everywhere I constantly find myself using the machines’ functional lowest common denominator.

Read the rest of this entry . . .

Blogrotate #27: The Weekly Roundup of News for System Administrators

Good afternoon and welcome to issue 27. The number 27 according to numerology is “the symbol of the divine light” so I’ll try to do that ideal justice. We’re off to a good start, what with me actually getting this out on schedule and such, so let’s get to it while the day is still quiet.

Operating Systems

It’s been two weeks since Ubuntu 10.04 was released. I’m still loving it. If you are on the fence or just curious, Ryan Paul at Ars has an intensive 9 page review of the release. Read the rest of this entry . . .

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @FN_Press2: Schooner Information Technology Teams with Pythian to Deliver Advanced Support and High... http://finanznachrichten.de/20
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more